OnixS C++ CME Market Data Handler  5.4.0
API documentation
Market by Order Functionality Support

Starting with Q4 2016, CME MDP exposes Market By Order (MBO) functionality with current Market By Price (MBP) functionality. MBO disseminates individual orders and quotes at every price level for a particular instrument. MBO functionality is embedded into existing market events and channels.

API Classes and Members Implementing MBO Functionality

The SDK API was enhanced with new classes, listeners and methods to expose the new functionality to the users and provide them with the same experience as they have while working with MBP books.

The SDK exposes the new class OnixS::CME::MDH::MboBook representing MBO book. The design and interface of the new class is similar to the classes encapsulating MBP books like the OnixS::CME::MDH::DirectBook. In particular, this class provides access to bids and offers for the given instrument with the help of OnixS::CME::MDH::MboBook::bids and OnixS::CME::MDH::MboBook::asks members respectively. All bids and asks are sorted in the same way as price levels in the MBP books. The OnixS::CME::MDH::Order class encapsulates bids and offers. It exposes order primary details like id, priority, price and display quantity. In contrast to MBP books, MBO book may contain multiple entries having the same price value. Orders with the same price are sorted by priority starting from the lowest to highest no matter whether a single order is representing bid or offer.

To get subscribed to MBO book updates, it's necessary to override OnixS::CME:MDP3::SecurityListener::onBookUpdate member of OnixS::CME:MDP3::SecurityListener and bind instance of listener to the instance of OnixS::CME::MDH::Handler class using handler.settings().listeners().security(&listener) path.

MBO book maintenance is defined by the correspondent parameter which can be accessed by the handler.settings().bookManagement().mboBooks().maintain(bool status) path.

~~~

Note
The SDK exposes different book update notification strategies. By default, books of each type (direct, implied, etc) are delivered to the user at the end of the corresponding market event (see Book Update Notification Strategies and OnixS::CME::MDH::EventListener for more information). CME MDP uses the same 'End Of Real Quotes' event to define the end of MBO and direct book update transactions. Therefore, MBO books updates are triggered at the same time points as MBP direct books are.

Accurate MBO Book Maintenance and Natural Refresh for MBO Books

The Handler supports both accurate maintenance and natural refresh for MBO books. Users should not experience any difference in MBP and MBO order book maintenance.

Note
Classes implementing price levels in MBP books (like the OnixS::CME::MDH::DirectPriceLevel) have a member identifying whether level data is available when books are naturally refreshed. In case of MBO books, there's no such attribute. All orders are placed one by one in a defined order.

Market State Recovery for MBO books

In case of late join or data loss, the Handler performs a large-scale market state recovery using snapshot feeds.

In contrast to real-time updates, when data for all kind of books is transmitted using the same incremental feed, the recovery from snapshots uses separate 'snapshot MBO' feeds. Therefore, the Handler uses the corresponding snapshot feeds for particular book types when the recovery is performed. Therefore, Handler processes market data from two sources (regular and MBO snapshot feeds), if the users are subscribed to both MBO and MBP books. An important aspect is the fact of performing two recovery procedures for MBP and MBO books may cause increase time of overall recovery since the Handler has to wait until the end of both procedures before switching to real-time data processing.

Note
Both MBP and MBO recovery feeds transmit recent trades and latest statistics. The Handler raises events for trades and statistics taken from snapshots for MBP books, if both MBP and MBO recovery sources are used. Users, who're interested in having statistics and top of MBP book sent in snapshots for MBO book, may consider listening to market data messages using OnixS::CME::MDH::MarketDataListener to have MBO snapshot data for their needs.