OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.0.2
API documentation
Getting Started

Inner Contents

 Setting Up Feed Engine
 
 Replaying Log Files
 

Detailed Description

Eurex T7 Market and Reference Data Interfaces (EMDI, RDI) Handlers C++ library contains 4 handlers which provide access to corresponding Eurex NTA data interfaces:

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:

Public reference data delivered by Eurex RDI contains the technical configuration, e.g. 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 is able to provide the list of market data interface descriptors (OnixS::Eurex::MarketData::EmdiDescriptors) to create minimal number of OnixS::Eurex::MarketData::EmdiHandler instances for requested products. The same way is used for EOBI handler.

Configuring and Constructing the Handler

All Handler' constructors accept instance of corresponding handler's settings class which defines values of various parameters for determination Handler's behavior. Role of the most important parameters that used in regular cases is described below.

Primary Settings

Directory for Log Files

By default, all important aspects of handler's activity is 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.

Licensing

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::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.

Note
When there is more than one license file in the license directory the most significant one is used (for example, production instead of trial if both are available).

Example

Following example demonstrates how to setup primary settings for OnixS::Eurex::MarketData::RdiHandler:

RdiHandlerSettings settings;
// This option is used to control verbosity of logger.
settings.logLevel = LogLevel::Debug;
// This option is used to specify extra logger settings.
settings.logSettings = LogSettings::Default;
// Logs will be stored in 'logs' local sub folder.
settings.logDirectory = "logs";
// This option is used to instruct the Handler where to look for a valid license.
settings.licenseDirectory = "../../license";
RdiHandler handler (settings);

Binding Feed Engine to the Handler

Network layer responsible for receiving market data trasmitted by Eurex data interfaces is encapsulated into a OnixS::Eurex::MarketData::FeedEngine class. Therefore, to have successfull market data processing, it's necessary to construct instance of the Feed Engine and bind it to the previously constructed instance of a handler class:

FeedEngineSettings feSettings;
FeedEngine feedEngine(feSettings);
handler.bindFeedEngine(feedEngine);

See Feed Engine for more details on Feed Engine.

Note
Any market data handler does not manage life-time of bound OnixS::Eurex::MarketData::FeedEngine instance. Therefore, keeping instance of OnixS::Eurex::MarketData::FeedEngine valid while it's bound to the instance of OnixS::Eurex::MarketData::Handler is fully user responsibility.

EMDI handler manager

Public reference data delivered by Eurex RDI contains the technical configuration, e.g. 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 is able to provide the list of market data interface descriptors (OnixS::Eurex::MarketData::EmdiDescriptors) to create minimal number of OnixS::Eurex::MarketData::EmdiHandler instances for requested products. OnixS::Eurex::MarketData::EmdiHandlerManager can do that itself.

Example

Following example demonstrates how to use OnixS::Eurex::MarketData::EmdiHandlerManager:

FeedEngineSettings feedEngineSettings;
FeedEngine feedEngine(feedEngineSettings);
//create instance of reference data handler
RdiHandlerSettings rdiSettings;
RdiHandler rdiHandler (rdiSettings);
rdiHandler.bindFeedEngine(feedEngine);
rdiHandler.registerErrorListener (&myListener);
rdiHandler.registerWarningListener (&myListener);
rdiHandler.registerReferenceDataListener (&myListener);
clog << "Will start the RDI Handler ..." << endl;
rdiHandler.start();
myListener.waitUntilReferenceDataReceived();
//create instance of EMDI handler manager
EmdiHandlerSettings emdiSettings;
EmdiHandlerManager manager (emdiSettings);
manager.registerDepthListener (&myListener);
//register user's callbacks
manager.registerErrorListener (&myListener);
manager.registerWarningListener (&myListener);
manager.registerProductStateChangeListener (&myListener);
manager.registerMassInstrumentStateChangeListener (&myListener);
manager.registerInstrumentStateChangeListener (&myListener);
manager.registerQuoteRequestListener (&myListener);
manager.registerCrossRequestListener (&myListener);
manager.registerComplexInstrumentUpdateListener (&myListener);
manager.registerOrderBookListener (&myListener);
manager.registerTradeListener (&myListener);
//specify the list of products market data to receive for
MarketSegments productNames;
productNames.insert ("FDAX");
productNames.insert ("FGBL");
productNames.insert ("FGBM");
//start manager
manager.start (&rdiHandler, productNames, feedEngine);
clog << "Please press Enter key to stop the handlers..." << endl;
waitUntilEnterKey ();
clog << "Stopping..." << endl;
rdiHandler.stop (true);
manager.stop();
clog << "Handlers are stopped." << endl;
Note
To obtain full and up-to-date network connectivity configuration settings pleasee 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.