com.apama.position.tracker
Event PendingPositionTrackerFactory


The PendingPositionTrackerFactory allows the user to create an instance of the Pending Position Tracker provided with the CMF out-of-the-box. This Position Tracker should be created in the context that the orders are being received.

This Position Tracker tracks the cumulative quantity and cash value of all long orders and short orders that are currently active, and that match the specific slice criteria provided in the subscription configuration.

For example, if a trader has open Buy orders in the market with a total quantity of 1000, then there will be a Pending max position of 1000. This is the traders maximum possible additional position if all the active Buy orders were to fully trade. Conversely, if a trader has open Sell orders in the market with a total quantity of 1000, then there will be a Pending min position of -1000.

The Position Tracker may be configured to filter on a set of symbol names, serviceIds, marketIds, exchangeIds, and/or traderIds. The cumulative position is then published back to the subscriber. Internally, the individual positions are stored too, which allows for individual positions or a subset of positions to be queried through Config Store.

The Position Service Interface should be used to subscribe to this Position Tracker, specifying the tracker type as the constant TRACKER_TYPE string defined in the com.apama.position.tracker.PendingPositionTrackerConstants event.
See Also:
com.apama.position.tracker.PendingPositionTrackerFactory - The factory to create a Position Tracker to track orders pending (IE not completed) in the market
com.apama.position.tracker.ReservedPositionTrackerFactory - The factory to create a Position Tracker to track reservation orders pending (IE not completed) in the market
com.apama.position.PSFactory - The factory to create an instance of the Position Service Interface

Action summary
 voidcreate(context mainContext, string trackerName, action<boolean, string> cbCreated)

This action creates a new Pending Position Tracker in the current context.
 
Action detail

create

void create(context mainContext, string trackerName, action<boolean, string> cbCreated)
This action creates a new Pending Position Tracker in the current context.
Parameters:
mainContext - The main context
trackerName - The unique name of the Pending Position Tracker to be created
cbCreated - The callback action that will be called once the Position Tracker has been created, which indicates whether or not it was successful