Apama Capital Markets Foundation Documentation : Capital Markets Foundation : Market Data Management : Market data subscribers : Subscribing to market data
Subscribing to market data
 
Subscription examples
Subscribing to news
MDA provides interfaces for subscribing to several types of market data. For each market data type, there is a factory interface for creating its eponymous subscriber interface. In addition, the factory interfaces provide the most commonly used actions provided by the subscriber interfaces. The actions provided by these interfaces are the same for each market data type. Many of these interfaces provide pairs of actions in which one takes a user-defined callback and one does not, for example, TradeSubscriber.subscribe() and TradeSubscriber.subscribeCb(). See the ApamaDoc for details about using the following interfaces:
Interface
Description
com.apama.md.BBASubscriberFactory
com.apama.md.BBASubscriber
 
com.apama.md.DepthSubscriberFactory
com.apama.md.DepthSubscriber
 
com.apama.md.NewsSubscriberFactory
com.apama.md.NewsSubscriber
 
com.apama.md.OrderbookSubscriberFactory
com.apama.md.OrderbookSubscriber
 
com.apama.md.QuotebookSubscriberFactory
com.apama.md.QuotebookSubscriber
 
com.apama.md.TradeSubscriberFactory
com.apama.md.TradeSubscriber
For each type of market data, there is a factory object and a subscriber object. The factory object for each type of market data provides the same actions. Likewise, the subscriber object for each type of market data provides the same actions.
For example, the BBASubscriberFactory object lets you create a BBA subscriber, or create and also subscribe to BBA data. A subscription can be for a single symbol or for multiple symbols. The BBASubscriber object lets you manage the subscription to BBA data. You use it to subscribe, unsubscribe, set subscription parameters, override default error behavior, manage callbacks, and obtain information about the subscription.
com.apama.md.HandlerErrorConstants
This object provides the possible values for the errorType parameter in a com.apama.utils.Error event of an error callback of a subscriber. They also provide the possible keys for the extraParams dictionary.
com.apama.utils.Params
This object provides actions for adding, obtaining and removing parameters.
com.apama.utils.Error
This object provides actions for setting and obtaining information associated with an error.
The following table lists actions you can execute to subscribe to market data:
To Do This
Execute
Create a market data subscriber and subscribe to one symbol or subscribe to multiple symbols.
xxxSubscriberFactory.subscribe()
xxxSubscriberFactory.multipleSubscribe()
Create a market data subscriber and use that subscriber to subscribe to one symbol or to multiple symbols.
xxxSubscriberFactory.create()
xxxSubscriber.subscribe()
xxxSubscriber.multipleSubscribe()
If the action is successful then your application is subscribed to the particular type of market data. If the action is not successful the default behavior is that MDA logs an error message in the correlator log file. This is the result of the default error callback that is common to market data subscribers. The default error callback logs at the ERROR level. See Overriding default error handling for subscriptions.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback