Capital Markets Adapters 10.3 | Apama Capital Markets Adapters Documentation 10.3 | BM+F Bovespa UMDF Adapter | subscriptions management
 
subscriptions management
subscriptions to market depth are made by sending the correlator a standard com.apama.marketdata.SubscribeDepth() event. For example:
com.apama.marketdata.SubscribeDepth("BVMF_UMDF","UMDF_ADAPTER","DTCY1",{} )
For Tick subscription:
com.apama.marketdata.SubscribeTick("BVMF_UMDF","UMDF_ADAPTER", "DTCY1", {} )
*The serviceId should always be "BVMF_UMDF"
*The marketId is the session name from the SessionConfiguration event
*The symbol should be from Bovespa UMDF
subscriptions to market depth or trade reports are cancelled by sending the correlator standard com.apama.marketdata.UnsubscribeDepth or com.apama.marketdata.UnsubscribeTick events. For example:

com.apama.marketdata.UnsubscribeDepth("BVMF_UMDF", "UMDF_ADAPTER", "ZLZ9", {})
com.apama.marketdata.UnsubscribeTick("BVMF_UMDF", "UMDF_ADAPTER", "ZLZ9", {})
Market depth is reported in com.apama.marketdata.Depth events. Several extraParams keys are used to annotate the depth data, if the publishDepthSourceKeys session parameter is set to true:
*"Bid1"-"Bid5" - These keys can take several different values:
*"A" - the price at this bid level includes actual orders
*"I" - the price at this bid level includes implied orders
*"AI" - the price at this bid level includes actual and implied orders
*"Ask1"-"Ask5" - As for the corresponding "BidN" keys.
Additional subscription parameters
ChannelID. Channel to which the subscription has to be made to get the market data.
With the release of UMDF PUMA , a single MarketData channel is split in to multiple channels with each channel dissipating data which is either Market By Order (MBO), Market By Price (MBP) or Top Of Book (TOB). But the instrument definition feed across all these three channels remain the same. So if you want to subscribe for a particular kind of MarketData, you must provide an additional identifier in the subscription Request.

com.apama.marketdata.SubscribeDepth("BVMF_UMDF","UMDF_TRANSPORT","BBDC4",{"ChannelID":"50"})
com.apama.marketdata.SubscribeDepth("BVMF_UMDF","UMDF_TRANSPORT","ALLL3",{"ChannelID":"150"})

com.apama.marketdata.UnsubscribeDepth("BVMF_UMDF","UMDF_TRANSPORT","BBDC4",{"ChannelID":"50"})
com.apama.marketdata.UnsubscribeDepth("BVMF_UMDF","UMDF_TRANSPORT","ALLL3",{"ChannelID":"150"})
Note:
The user has to make sure that the Security Definitions for the corresponding channels are configured properly using SecurityDefinitionChannelConfiguration event.