Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Market Data Management : Market data subscribers : Accessing extra parameters
Accessing extra parameters
A particular datasource might send out market data that has parameters that are not captured in a basic market data event. When this is the case there is a dictionary of key to value string pairs that are referred to as extra parameters. Also provided is a schema that contains type and description data about extra parameters. The following EPL interfaces provide access to extra parameters:
*com.apama.md.client.EPSchemaInterface — Each market data interface provides the getEPSchemaInterface() action, which you can call to access the schema for any extra parameters.
*com.apama.md.client.EPValuesInterface — Each market data interface and each book entry interface provides the getEPValuesInterface() action, which you can call to access the values of any extra parameters.
See the ApamaDoc for details. The code below provides an example of using the EPSchemaInterface and EPValuesInterface.
using com.apama.md.client.CurrentOrderbookInterface;
using com.apama.md.client.EPValuesInterface;
using com.apama.md.client.EPSchemaInterface;
using com.apama.md.client.OrderEntry;
. . .
action onAllOrders2( CurrentOrderbookInterface currOrderbook ) {
log "Got Orderbook using Callback2 -" at INFO;
log " for symbol: " + currOrderbook.getSymbol() at INFO;
// Extract extra parameters.
// Get the extra parameter interfaces:
EPValuesInterface valuesIface := currOrderbook.getEPValuesInterface();
EPSchemaInterface schemaIface := currOrderbook.getEPSchemaInterface();
// Loop through top level values:
log " with EPs: " at INFO;
logExtraParameters( valuesIface, schemaIface );
// Loop through extra parameters for top bid order:
sequence<OrderEntry> bids := currOrderbook.getRawBids();
if bids.size() > 0 then {
log "Top Bid EPs: " at INFO;
logExtraParameters( bids[0].getEPValuesInterface(), schemaIface );
// Log the value, type and description of all extra parameters:
action logExtraParameters(
EPValuesInterface valuesIface,
EPSchemaInterface schemaIface) {
// Loop through all values and get the schema (type and description)
// for each:
string key;
for key in valuesIface.getRaw().keys() {
if schemaIface.hasField( key ) then {
log " " + key + " " + valuesIface.getParam( key ) + " "
+ schemaIface.getFieldType( key )
+ " " + schemaIface.getFieldDescription( key ) at INFO;
The AggregatedBook actions and interfaces are slightly different as they offer access to the extra parameters from the underlying datasources of the Aggregator/FTSC. They require the symbol and source id (known as the XEPKey) of the underlying datasource to access the values and schema.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback