OnixS C++ B3 Binary UMDF Market Data Handler  1.3.0
API documentation
Getting Started

Inner Contents

 Setting Up Feed Engine
 
 Replaying Log Files
 

Detailed Description

B3 Binary UMDF Market Data Handler is a C++ library that provides access to the B3 Unified Market Data Feed (UMDF). 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 building applications quickly to get market data without much involving in raw protocol specifics.

All Handler classes are encapsulated into the OnixS::B3::MarketData::UMDF namespace. Header files are collected in the master OnixS/B3/MarketData/UMDF/UMDF.h header file for your convenience.

The typical way of using the Handler is as follows:

Configuring and Constructing the Handler

Handler's constructor accepts an instance of settings class which defines values for various parameters for determination the Handler's behavior. Role of the most important parameters that used in regular cases are described below.

Primary Settings

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::B3::MarketData::UMDF::HandlerSettings::logDirectory parameter needs to 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::B3::MarketData::UMDF::HandlerSettings contains OnixS::B3::MarketData::UMDF::HandlerSettings::licenseDirectory member which contains the path to the directory containing license file(s). If its value is empty the Handler looks for the license file in the current directory.

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

Example

The following example demonstrates how to setup primary settings for OnixS::B3::MarketData::UMDF::Handler:

// Create an instance of Handler's settings.
// This option is used to control the verbosity of the 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.instrumentMulticastFeed.address = "";
handlerSettings.instrumentMulticastFeed.port = 0;
handlerSettings.incrementalMulticastFeedA.address = "";
handlerSettings.incrementalMulticastFeedA.port = 0;
handlerSettings.incrementalMulticastFeedB.address = "";
handlerSettings.incrementalMulticastFeedB.port = 0;
handlerSettings.snapshotMulticastFeed.address = "";
handlerSettings.snapshotMulticastFeed.port = 0;

Binding Feed Engine to the Handler

The network layer responsible for receiving market data transmitted by the exchange data interfaces is encapsulated into a OnixS::B3::MarketData::UMDF::SocketFeedEngine 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 the Handler class:

SocketFeedEngine feedEngine;
handler.bindFeedEngine(feedEngine);

See Feed Engine for more details on Feed Engine.

Note
Any market data handler does not manage the lifetime of the bound OnixS::B3::MarketData::UMDF::SocketFeedEngine instance. Therefore, keeping the instance of OnixS::B3::MarketData::UMDF::SocketFeedEngine valid while it's bound to the instance of OnixS::B3::MarketData::UMDF::Handler is fully user responsibility.
For more and up-to-date information on getting started aspects, see GettingStarted sample from the samples collection available in distributive package.