Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Analytics : Using the position service framework : Defining slices that identify positions to be tracked
Defining slices that identify positions to be tracked
When you subscribe to a default position tracker, one of the parameters is a configuration object that can contain slice details for the position you want to track. Slices are a set of criteria that are used to match against orders coming into the system. If a subscription has no slice information configured it will match all orders.
Slicing lets you split a stream of events into substreams along several dimensions. Position service slices can split on the following dimensions:
*Symbol
*Service identifier
*Exchange identifier
*Market identifier
*Trader (owner) identifier
A slice can match a set of values in each dimension, or all values. For example:
*Symbol EUR/USD, for example, to track the organization-wide position in this instrument.
*Service identifier FIX and market identifier CNX, for example, to track the net position across all symbols and traders on a single market.
*Symbol EUR/USD, Service identifier FIX, market identifier CNX and trader identifier A or B, for example, to track the net position of this group of two traders for the EUR/USD instrument on a single market.
For details about the configuration parameters that let you specify slices , see Using default position trackers.
The following code extract constructs a configuration object that specifies a slice to monitor the net position of MSFT and APMA instrument by trader Gordon Gekko.
// Create a set of slice details to track the positions for.
// In this example, slice on symbols and traders:
sequence<string> symbolSlice := ["MSFT","APMA" ];
sequence<string> traderSlice := ["GGekko"];
 
com.apama.position.PositionConfigParams config :=
new com.apama.position.PositionConfigParams;
config.addParam( openPosConsts.getGenericConsts().
TRACKER_CONFIG_SYMBOL_SLICE, symbolSlice.toString() );
config.addParam( openPosConsts.getGenericConsts().
TRACKER_CONFIG_TRADERID_SLICE, traderSlice.toString() );
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback