Eurex T7 Market and Reference Data (RDI, MDI, EMDI, and EOBI) Handlers C++ library contains handlers that provide access to corresponding Eurex T7 interfaces:
- OnixS::Eurex::MarketData::RdiHandler for reference data. This interface provides reference data for products and instruments that are available for trading on the T7 Exchange's T7. The reference data is delivered on a product and instrument level. Every tradable object is referenced by a unique identifier, for this reason, the reference data information is essential for any trading application.
- OnixS::Eurex::MarketData::EmdiHandler for un-netted market data. The updates of the order book are delivered for all order book changes up to a given level; all on-exchange trades are reported individually.
- OnixS::Eurex::MarketData::MdiHandler for netted market data. The updates of the order book are sent at regular intervals; they are not provided for every order book change and are sent significantly less frequently than the T7 EMDI. On-exchange trades are not reported individually, however statistical information (daily high/low price, last trade price, and quantity) is provided instead.
- OnixS::Eurex::MarketData::EOBI::EobiHandler for market data by orders. This interface provides the entire visible order book, by publishing information on each order and quote along with state information in an un-netted manner. All on-exchange trades are reported individually.
- OnixS::Eurex::MarketData::EmdsHandler for extended market data (Eurex Trade Prices, Settlement Prices, and Open Interest Data)
All handlers' classes are placed into the OnixS::Eurex::MarketData namespace. Header files are collected in the master
OnixS/Eurex/MarketData.h header file.
The typical way of using a handler is as follows:
- Create an instance handler's settings.
- Create an instance of the Handler class using a previously initialized instance of settings.
- Register listener for errors and warnings to be notified about failures that occurred while the Handler processes market data.
- Register listeners for different events.
- Bind a FeedEngine instance.
- Start market data processing by invoking the handlers' start method.
- Process data of the events for which listeners were previously registered.
- Stop market data processing using the handler's stop method.
Public reference data, delivered by Eurex RDI, contains the technical configuration, e.g., a multicast address and port combinations for market data interface for all products and instruments. When OnixS::Eurex::MarketData::RdiHandler receives all current reference data it can provide the list of the market data interface descriptors:
Configuring and Constructing the Handler
All Handler' constructors accept an instance of the corresponding handler's settings class which defines values of various parameters for determination the Handler's behavior. The role of the most important parameters used in regular cases is described below.
Directory for Log Files
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::Eurex::MarketData::HandlerSettings::logDirectory parameter need be defined for pointing the handlers place where log files to be stored.
The handler can not be run without a license file. When the instance fails to find a valid license, it throws an exception at the initialization stage.
OnixS::Eurex::MarketData::HandlerSettings contains OnixS::Eurex::MarketData::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.
- When there is more than one license file in the license directory the most significant one is chosen (for example, a production instead of a trial if both are available).
The following example demonstrates how to set up initial settings for OnixS::Eurex::MarketData::RdiHandler:
settings.logLevel = LogLevel::Debug;
settings.logSettings = LogSettings::Default;
settings.logDirectory = "logs";
settings.licenseDirectory = "../../license";
RdiHandler handler (settings);
Binding Feed Engine to the Handler
The network layer is responsible for receiving market data transmitted by Eurex data interfaces is encapsulated into a OnixS::Eurex::MarketData::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 a handler class:
See Feed Engine for more details on Feed Engine.
- Any market data handler does not manage the lifetime of the binding OnixS::Eurex::MarketData::FeedEngine instance. Therefore, keeping the instance of OnixS::Eurex::MarketData::FeedEngine valid while it's bound to the instance of OnixS::Eurex::MarketData::Handler is fully user responsibility.
The package contains tools to automate market data handler creation. The available managers are:
Following example demonstrates how to use OnixS::Eurex::MarketData::EmdiHandlerManager:
FeedEngineThreadPool fePool(settings, &feedEngine);
RdiHandler rdiHandler (rdiSettings);
clog << "Will start the RDI Handler ..." << endl;
EmdiHandlerManager manager (emdiSettings);
manager.start (&rdiHandler, productNames, feedEngine);
clog << "Please press Enter key to stop the handlers..." << endl;
clog << "Stopping..." << endl;
clog << "Handlers are stopped." << endl;
- To obtain full and up-to-date network connectivity configuration settings please refer to 'Network Configuration Guide' provided by Eurex.
For more and up-to-date information on getting started aspects, see GettingStarted sample from the samples collection available in distributive package.