|Adjusting Handler Settings|
|Setting Up Feed Engine|
|Handling Issues Like Errors and Warnings|
|Market Data Processing Session|
|Listening to Market Data|
|Trade Order Details|
|Selecting Securities of Interest|
|Using TCP Recovery Facility|
|Replaying Log Files|
Following sections will guide through the major steps to be done to succeed with market data processing.
SDK needs a valid license for successful execution. If SDK licensing services are not able to find a valid license exception will be thrown at the initialization stage when OnixS::CME::MDH::initialize is called and each time attempt to start live market data processing using OnixS::CME::MDH::Handler::start member.
OnixS::CME::MDH::InitializationSettings class exposes OnixS::CME::MDH::InitializationSettings::licenseStore member to be used to instruct SDK where to look for a valid license. By default, SDK looks for a license in the current directory for the application. However, by using noted parameter, it's possible to specify another folder anywhere on file system.
Following example demonstrates how perform one-time SDK initialization:
Before instance of the OnixS::CME::MDH::Handler class can be construct, settings affecting its behavior are to be defined.
For the most cases default parameter values are set defining most likeble behavior of the OnixS::CME::MDH::Handler instance. However, some parameters are to set before moving to OnixS::CME::MDH::Handler instance construction.
See Handler's Settings for more information on adjusting behavior of the Handler.
Network layer responsible for receiving market data trasmitted by MDP is encapsulated into a OnixS::CME::MDH::FeedEngine class. Therefore, to have successfull market data processing from live MDP environment, it's necessary to construct instance of the Feed Engine and bind it to the previously constructed instance of OnixS::CME::MDH::Handler class:
See Feed Engine for more details on Feed Engine.
Handler may log market data it processes for further use by replay feature or analysis as well as other important events which may take place during regular market data processing.
Logging service is encapsulated into OnixS::CME::MDH::Logger abstraction. SDK provides various implementations of logging for different purposes. File-based logging is satisfactory choise for the most cases.
Below is an example of how file based logging can be established:
Once instance of OnixS::CME::MDH::Handler is constructed and binded to the instance of OnixS::CME::MDH::FeedEngine, market data processing can be spawned. However, to get results of market data processing like updated order books, it's necessary to subscribe to corresponding events.
See Event Listeners on which events are exposed by the Handler and how to subscribe on a particular event.
As soon as instance of OnixS::CME::MDH::Handler is configured, binded to a valid instance of OnixS::CME::MDH::FeedEngine and listeners to events of interest are registered, market data processing can be initiated.
Market data processing by initiated by invoking OnixS::CME::MDH::Handler::start member, which accepts instance of OnixS::CME::MDH::SessionSettings class defining behavior of the Handler for the session.
For the most common processing scenarios, SDK exposes ready-to-use presets of session settings: OnixS::CME::MDH::AccurateLateJoinSession(), OnixS::CME::MDH::AccuratePreopeningSession, OnixS::CME::MDH::NaturalRefreshSession, etc. See documentation for noted classes for more details.
To accomplish live market data processing, OnixS::CME::MDH::Handler::stop member is to be called: