Capital Markets Adapters 10.7 | Apama Capital Markets Adapters Documentation 10.7 | BM+F Bovespa UMDF Adapter | Service monitor and session configuration
 
Service monitor and session configuration
The BVMF_UMDF service monitors must be configured by routing the following event after all of the monitors are injected:

event com.apama.bvmf_umdf.SessionConfiguration
{
string connection;
dictionary<string,string> configuration;
}
The "connection" field gives the name of the BVMF_UMDF session. This must match the transport name in the IAF configuration file.
The "configuration" dictionary specifies configuration settings for the session. Currently the following keywords are supported:
Parameter
Type
Description
channel
string
Default: Transport name
Channel on which the IAF is configured to listen.
logFile
string
Default: stdout
Path to log file for the BVMF_UMDF service monitors.
logLevel
string
Default: INFO
Logging level for the BVMF_UMDF service monitors. Any level known to the Apama LoggingManager plugin may be used.
logAppend
boolean
Default: True
If set to "true", the log file will be appended to rather than being truncated when the adapter starts.
heartbeatInterval
float
Default: 5.0
Rate at which the heartbeats have to be sent to the transport.
reconnectInterval
integer
Default: 60
Time before which the adapter should try to reconnect to the backup feed if the primary feed fails to send any data.
updateLogging
boolean
Default: False
If set to "true", detailed information on incoming market data snapshot and updates for all subscribed symbols will be logged to the session log file. Note that these log messages will only be visible if the updateLoggingLevel parameter is also set to a level greater than or equal to the logLevel of the session.
updateLoggingLevel
string
Default: DEBUG
Logging level for detailed logging of all incoming market data messages for subscribed symbols. If this is equal to or greater than the logLevel, the extra logging will appear in the log file. Note that this should only be enabled for debugging purposes with a small set of symbols, as the extra logging can be extremely verbose.
aggregatePrices
boolean
Default: True
Market Data received from UMDF can be of either price depth, order depth book or top of the book. If aggregatePrices is set to "true", market data of instruments for which order depth book (MBO) is being received will be published as price depth book(MBP)
publishDepthSourceKeys
boolean
Default: False
If set to "true", com.apama.marketdata.Depth events generated by the adapter will contain extraParams keys identifying the "source" (that is, the outright or implied book) of each price level.
publishUpdateInfoKeys
boolean
Default: True
If set to "true", com.apama.markertdata.Depth and Tick events will include extraParams keys identifying the "source" of each update, that is the channel, update type and message sequence numbers:
Channel. FIX/FAST channel number
UpdateType. "S" for Snapshot, "I" for Incremental, "G" for Gap, "F" for Security Status update
SeqNum. Per-channel message sequence number
RptSeq. Highest per-instrument update sequence number that contributed to this event
RptSeq0. Lowest per-instrument update sequence number that contributed to this event
LastMsgSeq. (Snapshots only) highest incremental message sequence number that contributed to the contents of the snapshot message
publishExtraFIXKeys
boolean
Default: True
If set to "true",com.apama.markertdata.Depth and Tick events will include additional FIX tags from the FIX/FAST messages used to generate the events, in the extraParams dictionary. The set of extra tags that will be included is subject to change.
publishEmptyDepthOnGap
boolean
Default: True
If set to "true", a com.apama.marketdata.Depth event with no bid or ask price levels will be published for all effected symbols when a sequence gap is seen on the FIX/FAST feed. Note that regardless of the setting of this parameter, receipt of a gap report is signalled by publishing both com.apama.marketdata.DepthSubscriptionError and com.apama.marketdata.TickSubscriptionError events for all affected subscriptions as described in the next section. Note also that setting this parameter to "false" does not prevent empty bid or ask books generated during normal operation of the market from being published.
publishMarketStatistics
boolean
Default: False
If set to "true", market statistics will be added to the extraParams dictionary of all the Tick events and the Depth events constructed from market snapshots published to applications. The following set of extraParams keys is used:
IndexValue - Data related to indexes and ETFs
Open - The opening price of the security (first trade)
TheoreticalOpeningPrice - Theoretical Opening Price
TheoreticalOpeningQuantity - Theoretical Closing Price
Close - The closing price of the security (previous day's last trade)
Settle - The settlement price of the security.
High - The highest price traded for the security in the trading session.
Low - The lowest price traded for the security in the trading session
VWAPPrice - the ratio of the value traded to total volume traded over the trading session
ImbalanceBuyers - Imbalance Buyers
ImbalanceSellers - Imbalance Sellers
TradeVolume - The total volume traded for that security in the trading session
OpenInterest - Total number of contracts in a commodity or options market that are still open; that is, they have not been exercised, close out, or allowed to expire.
PriceBandHigh - Price Band High Information
PriceBandLow - Price Band Low Information
TradingReferencePrice - Trading Reference Price
NetChange - Net change from previous day's closing price versus last traded price.
TotalTradedQuantity - Total traded quantity (shares, contracts, exercised contracts) of the trading day
AvgDailyTradedQty - Daily average shares traded within 30 days(Quantity band Information).
MaxTradeVol - The maximum order quantity that can be submitted for a security.(Quantity band)
UnderlyingPrice - To inform the price composition of BDR indexes.(Composite Underlying Price)
PublishExtraStatistics
Except Market statistics, if user needs any of the extra fields delivered by the feed to the Depth and Tick events then you have to set this parameter with MDEntryType followed by Tags. Asterisk (*) symbol also for all parameters. Example:

MDEntryType<space>Tags, MDEntryType<space>Tags....
com.apama.bvmf_umdf.SessionConfiguration
("UMDF_TRANSPORT",{"channel":"UMDF_CHANNEL,
""PublishExtraStatistics":"B
270 271,g 6939 83,C *"})
recordTimestamps
boolean
Default: False
If set to "true", the service monitors will record microsecond resolution timestamps for incoming Snapshot and Incremental events and add these to __timestamps parameter in the extraParams dictionaries of all Depth and Tick events sent to clients. __timestamps is a string dictionary containing the following key:value timestamp pairs:
1000 - time that the message was read from the network (if supplied by the transport)
1249 - time that the event was ready to send to the correlator (if supplied by the transport)
5200 - time that the event reached the monitors
5250 - time that the event was ready to publish
Note that these timestamps are relative to an unspecified epoch so should only be used for latency calculations on a single machine. Note also that actual publication of trade updates may be delayed until the end of a trade "event" on the feed is detected. This delay is not reflected in the 5250 timestamp value but can easily be calculated by an application.
logLatency
boolean
Default: False
If set to "true", and timestamp recording has been enabled both in the transport and in the service monitors, the end-to-end latency (value@5250 - value@1000) will be calculated and logged at INFO level for all Depth and Tick events published to clients.
dropCrossedBooks
boolean
Default: False
If set to "true", prevents all Depth events having best bid price >= best offer price from being routed.
publishSecurityStatus
boolean
Default: False
If set to "true", publishes "SecurityTradingStatus" and "SecurityTradingPhase" updates in the extraPrams of the depth event.
logNewsMessages
boolean
Default: False
Set this to "true" to logs News messages.
ignoreRetransmittedUpdates
boolean
Default: True
Ignore incoming Incremental Updates with QuoteCondition set as being Retransmitted.
forwardSecurityId
boolean
Default: False
If set to "true", forwards the SecurityID used in the UMDF session in the Depth and Tick extraParams as "SecurityId".
useContractMultiplier
boolean
Default: False
If set to "true", The ContractMultiplier provided in SecurityList (Instrument Definition) is used to multiply the quantity values in Depth and Tick updates.
usePriceDivisor
boolean
Default: True
If set to "true", The PriceDivisor provided in SecurityList (Instrument Definition) will be used to divide the Price field to produce the actual order price.
publishBustTrades
boolean
Default: True
If set to "true", a Tick update will be published in the event of a trade bust with "tradeBust":"true" in extraParams. Else the update will be discarded.
publishSortedOrderBook
boolean
Default: False
If set to "true", the adapter publishes order book based on prices that is, Decreasing Order on bidSide and Increasing Order on askSide. This is not a suggested configuration if the instrument is in Auction state or Close state where no prices are received from the exchange.
maxDepthLevel
integer
Default: 0
Number of price levels to be present in the depth update. If set to 0, publishes all the levels received from the exchange.
useMarketDepthFromSnapshot
boolean
Default: False
MarketDepth for an instrument can be retrieved using the SecurityList message and also by using the Snapshot message. If set to "true", the MarketDepth present in the snapshot message will be used as the size of the orderbook.
Note:
maxDepthLevel overwrites this value.
forwardBrokerInformation
boolean
Default: False
If set to "true", publish the Broker information (that is Broker code,time) of MDEntryType (Bid/Ask) in the extraPrams of the depth event.
The following tag are Broker information of MDEntryType(Bid/Ask):
*Tag 288 -> MDEntryBuyer
*Tag 289 -> MDEntrySeller
*Tag 273 -> MDEntryTime
*Tag 272 -> MDEntryDate
*Tag 37016 -> MDInsertDate
*Tag 37017 -> MDInsertTime
excludeStreamIdFromMarketStats
boolean
Default: False
Set to "true" for Connecting to Feeds prior to UMDF 2.0. This will disable publishing of market statistics based on StreamID, and will only publish statistics for the default stream ("E" - Electronic).
Note:
If you want to minimise the size of Depth and Tick events by eliminating extraParams that are not required for a given application should set the "publishDepthSourceKeys", "publishUpdateInfoKeys" and "publishExtraFIXKeys" session parameters to "false" as required.
Sample configuration event
com.apama.bvmf_umdf.SessionConfiguration("UMDF_ADAPTER", {"channel":"UMDF_CHANNEL"})