OnixS C++ CME Market Data Handler  5.5.1
API documentation
Tracking Best Bids and Offers Only

By default, the Handler invokes the OnixS::CME::MDH::SecurityListener::onBookUpdate callback once it processes book-related data received via real-time or recovery feeds. Received and processed updates may refer to any level and side in a book. Sometimes, there's no interest in getting notified on updates for any price level in a book except the top one. For this reason, the Handler allows getting notified only on updates of the best bid or offer.

The Handler exposes best bid/offer (BBO) tracking parameters to take advantage of such a facility. The OnixS::CME::MDH::HandlerSettings::bookManagement section of the OnixS::CME::MDH::HandlerSettings class provides access to the corresponding parameters through the three members: OnixS::CME::MDH::BookManagement::directBooks, OnixS::CME::MDH::BookManagement::impliedBooks and OnixS::CME::MDH::BookManagement::consolidatedBooks. The returned instances provide access to BBO tracking parameters for a particular book type.

The OnixS::CME::MDH::DirectBboTracking class for direct books (the OnixS::CME::MDH::ImpliedBboTracking class for implied and consolidated books respectively) exposes members for each price level attribute like price (OnixS::CME::MDH::DirectBboTracking::price) and quantity (OnixS::CME::MDH::DirectBboTracking::quantity), allowing to define BBO tracking.

The OnixS::CME::MDH::BboThreshold::enabled member defines whether the particular attribute must be tracked for changes. The Handler raises a book update only if the BBO exceeds the threshold bounds.

The OnixS::CME::MDH::BboThreshold::threshold member allows controlling the sensitivity of the Handler to the updates. The value specified via the given member allows defining sensitivity threshold for the best bid/offer. If the price-level attribute (price, quantity) of the best bid or offer changes for more than the specified value, the Handler raises an appropriate event. Otherwise - it doesn't.


The following example demonstrates how to configure the Handler to get book updates only when the best bid price or offer changes for more than 10% or quantity changes for more than 50%:s

using namespace OnixS::CME::MDH;
Handler handler;
bboTracking =