OnixS C++ Tradeweb Approved Publication Arrangement (APA) Handler  1.2.2.18
API documentation
Getting Started

Inner Contents

 Setting Up Feed Engine
 
 Replaying Log Files
 

Detailed Description

C++ Tradeweb Approved Publication Arrangement (APA) Handler is a C++ library that provides an access to the tardes 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 to quickly build applications to get market data without much involve into raw protocol specifics.

All Handler classes are encapsulated into the OnixS::Tradeweb::MarketData::Apa namespace. Header files are collected in the master OnixS/Tradeweb/MarketData/Apa.h header file for more convenience.

The typical way of using a handler is as follows:

Configuring and Constructing the Handler

Handler's constructor accepts instance of 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::Tradeweb::MarketData::Apa::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::Tradeweb::MarketData::Apa::HandlerSettings contains OnixS::Tradeweb::MarketData::Apa::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::Tradeweb::MarketData::Apa::RdiHandler:

// Create an instance handler's settings.
// This option is used to control verbosity of logger.
// This option is used to specify extra logger settings.
// 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";
// Set up IP addresses and port numbers for multicast feeds
handlerSettings.useFeedA = true;
handlerSettings.useFeedB = true;

Binding Feed Engine to the Handler

Network layer responsible for receiving market data trasmitted by Eurex data interfaces is encapsulated into a OnixS::Tradeweb::MarketData::Apa::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 binded OnixS::Tradeweb::MarketData::Apa::FeedEngine instance. Therefore, keeping instance of OnixS::Tradeweb::MarketData::Apa::FeedEngine valid while it's binded to the instance of OnixS::Tradeweb::MarketData::Apa::Handler is fully user responsibility.