Inner Contents | |
Adjusting Handler's settings | |
Setting up Feed Engine | |
Event listeners | |
Errors and warnings | |
Trade summary and order details | |
Selecting securities of interest | |
TCP Recovery | |
Logging services | |
The Handle API is enclosed in the OnixS::CME::MDH namespace. The master OnixS/CME/MDH.h
header file collects all header files.
The following sections show how to receive and process CME MDP 3.0 market data:
The OnixS::CME::MDH::Handler class encapsulates the market data processing logic in the bounds of a CME MDP 3.0 channel. The OnixS::CME::MDH::HandlerSettings class contains parameters controlling various aspects of market data processing.
Default values configure the likely behaviour of the handler instance. However, some parameters must be set explicitly before starting market data processing:
The SDK needs a valid license for successful execution. If the licensing subsystem is not able to find a valid license, it throws an exception when the OnixS::CME::MDH::Handler::start is called.
By default, the handler looks for a license in the application’s current directory. To instruct the handler where to look for a valid license, use the OnixS::CME::MDH::LicenseSettings::licenseStore method.
The following example shows how to specify the license location:
The Feed Engine abstractions encapsulate market data sources. It is necessary to construct a Feed Engine implementation instance and bind it to the OnixS::CME::MDH::Handler instance:
Once an OnixS::CME::MDH::Handler instance is constructed and bound to an instance of the OnixS::CME::MDH::NetFeedEngine, market data processing can be started. To get the results of market data processing, subscribe to the corresponding events (e.g., order book updates).
To start market data processing, call the OnixS::CME::MDH::Handler::start method.
To stop market data processing, call the OnixS::CME::MDH::Handler::stop method.
The handler can log market data it processes and other events that may occur during market data processing.
The OnixS::CME::MDH::Logger abstract class encapsulates the logging subsystem. The handler provides a few logging implementations. File-based logging is a good choice for most cases.
Below is an example of how the file-based logging is configured: