OnixS CBOE CSM Handler for C++
Adjusting Handler's Settings
Getting Started

Handler Settings

The handler can operate in two modes: Streaming Market Mode and Streaming Market Level 2 Mode. It is represented by the first parameter of the handler's constructor. To choose one, OnixS::CBOE::MarketData::CSM::Handler::Csm or OnixS::CBOE::MarketData::CSM::Handler::CsmL2 must be provided for Streaming Market Mode and Streaming Market Level 2 accordingly.

During the run in each mode, the handler checks availability of corresponding loaded templates, if the certain template is not loaded an exception is thrown.
During the run in each mode, the handler checks registered callbacks, if wrong callback registered an exception is thrown. OnixS::CBOE::MarketData::CSM::CurrentMarketListener must not be registered in Streaming Market Level 2 Mode and OnixS::CBOE::MarketData::CSM::Level2Listener must not be registered in Streaming Market Mode.

If data feed parameters is set without respect to the mode (for example, Streaming Market Level 2 feed setting is set in Streaming Market Mode), incoming message will be ignored without error reporting. This fact will be reflected in a log file.

All Handler's constructors accept an instance of OnixS::CBOE::MarketData::CSM::HandlerSettings class which defines values of various parameters for determination Handler's behavior. The role of the most important parameters, that are used in regular cases, is described below.

Primary Settings

Directory for Log Files

By default, all important aspects of handlers' activity are logged. Therefore, the handler must know where this kind of information can be stored on a local file system. OnixS::CBOE::MarketData::CSM::HandlerSettings::logDirectory parameter needs to be defined for pointing the handlers place where log files are to be stored.


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::CBOE::MarketData::CSM::HandlerSettings contains OnixS::CBOE::MarketData::CSM::HandlerSettings::licenseDirectory Member, which contains a path to the directory containing license file(s). If its value is empty, the handler looks for the license file in the current directory.

If 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).


The following example demonstrates how to setup primary settings for OnixS::CBOE::MarketData::CSM::Handler:

OnixS::CBOE::MarketData::CSM::HandlerSettings handlerSettings;

// This option is used to control logger's output verbosity.
settings.logLevel = OnixS::CBOE::MarketData::CSM::LogLevel::Debug;

// This option is used to specify extra logger settings.
settings.logSettings = OnixS::CBOE::MarketData::CSM::LogSettings::Default;

// Logs will be stored in the 'logs' local sub folder.
settings.logDirectory = "logs";

// This option is used to instruct Handler where to look for a valid license.
settings.licenseDirectory = "../../license";

// Path to a template file.
settings.templateFile = "../CSM_L2_V1.0_template.xml";

// Ip addresses and port numbers of security definitions feed.
settings.securityDefinitionsFeed = FeedDescriptor("", 63913, "", 63945);

// Ip addresses, port numbers and unique name of data feeds.
settings.multicastFeeds.push_back(std::make_pair(FeedDescriptor("", 63900, "", 63932), "Line0"));
settings.multicastFeeds.push_back(std::make_pair(FeedDescriptor("", 63901, "", 63933), "Line1"));

// first argument defines an operating mode
OnixS::CBOE::MarketData::CSM::Handler handler (Handler::CsmL2, settings);