|Setting Up Feed Engine|
|Replaying Log Files|
C++ Cboe CFE Multicast PITCH Market Data Handler is a C++ library that provides access to the MILLENNIUM EXCHANGE market data services. Handler encapsulates all low-level aspects of the market data platform allowing focusing on implementing trading solutions and market data processing algorithms. High-level C++ API allows building applications quickly to get market data without much involving in raw protocol specifics.
The typical way of using the Handler is as follows:
Handler's constructor accepts an instance of settings class which defines values for various parameters for determination the Handler's behavior. Role of the most important parameters that used in regular cases are described below.
By default, all the important aspects of the Handler's activity are logged. Therefore the Handler must know where this kind of information can be stored on a local file system. OnixS::CboeCFE::MarketData::Pitch::HandlerSettings::logDirectory parameter need be defined for pointing the Handlers place where log files to be stored.
To run a Handler's instance it is required to have a license file. When the instance is not able to find a valid license it throws an exception at the initialization stage.
OnixS::CboeCFE::MarketData::Pitch::HandlerSettings contains OnixS::CboeCFE::MarketData::Pitch::HandlerSettings::licenseDirectory member which contains path to directory containing license file(s). If it's value is empty the Handler looks for the license file in current directory.
The following example demonstrates how to setup primary settings for OnixS::CboeCFE::MarketData::Pitch::Handler:
Network layer responsible for receiving market data transmitted by the exchange data interfaces is encapsulated into a OnixS::CboeCFE::MarketData::Pitch::FeedEngine class. Therefore, to have successful market data processing, it's necessary to construct an instance of the Feed Engine and bind it to the previously constructed instance of the Handler class:
See Feed Engine for more details on Feed Engine.
The Handler is able to build internal Order Books. To activate this feature, OrderBookListener must be registered.
To achieve better performance, the Order Books are created in the preallocated memory area. To adjust preallocated memory pool size set HandlerSettings::maxBooksObjectAmount. The default value is 500; If the preallocated objects amount is not enough to place all the created books, an exception will be thrown when a book creation fails.
If building internal Order Books is turn on correctly, corresponding callbacks are invoked. OrderBookListener::onOrderBookUpdated is invoked when any Order Book object's state is changed. A reference to the corresponding Order Book object is passed into this callback.
OrderBookListener::onOrderBookOutOfDate is invoked if the Order Book object is out is of date when the system detects inactivity.