Apama 10.3.1 | Apama Capital Markets Foundation Documentation | Release Notes | What's New in Capital Markets Foundation 5.1 | New market data subscribers
 
New market data subscribers
In a CMF application, to obtain market data, you now set up one or more market data subscribers. CMF provides subscribers for the following types of market data:
*BBA
*Depth
*News
*Orderbook
*Quotebook
*Trade
The event interfaces for subscribing to market data have been streamlined for ease of use. Common tasks, such as subscription to an external datasource, can be accomplished in a single line of code.
The following table lists the new interfaces that you use to subscribe to market data. ApamaDoc provides details about the fields in each interface.
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.
Each factory object creates its eponymous subscriber object. In addition, each factory object provides the most common actions you would execute on the associated subscriber object. 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()
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.
You should use the new market data subscriber interfaces, in conjunction with the new session management interfaces, in place of the low-level market data interfaces, such as com.apama.session.SessionManagerFactory. Also, you can use the new utility interfaces, com.apama.utils.Params and com.apama.utils.Error, with the session management interfaces.
Documentation for using market data subscribers is in the "Market Data Management" section of the Capital Markets Foundation guide.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.