OnixS C++ CME iLink 3 Binary Order Entry Handler  1.8.0
API Documentation
Scheduling Sessions for Automatic Connection

iLink 3 uses the FIX Performance (FIXP) protocol to establish and manage bi-directional sessions. Per the FIXP protocol, a session is defined as a bi-directional stream of ordered messages between two parties within a continuous sequence number series. With iLink 3, the Market Segment Gateways will (MSGW) supports weekly client sessions and also support mid-week initialization. OnixS::CME::iLink3::Session class exposes members for a FIXP Connections basic handling. It also provides users with an automatic reconnection facility in case of the connection failure.

Sessions Scheduler

To satisfy the needs of real life trading schedules, OnixS CME iLink 3 Handler offers the Sessions Scheduler. This service will automatically connect certain sessions to the counterparty at the beginning of the trading week and keep a FIXP Session connected for an entire trading week, and disconnect it at the end of the last trading day.

The Sessions Scheduler is available as a part of OnixS CME iLink 3 Handler.

SessionScheduler class

OnixS::CME::iLink3::Scheduling::SessionScheduler is a workhorse class of the Sessions Scheduling services. This class exposes a simple, but comprehensive API, to handle connections by schedules.

Registering a Session for Automatic Connection

OnixS::CME::iLink3::Scheduling::SessionScheduler::add member schedules a session for automatic logon and logout according to the specified session time, which can be delivered to Scheduler as an instance of the appropriate class, or as a name of the predefined preset. The parameter of the type OnixS::CME::iLink3::Scheduling::SessionConnectionSettings specifies primary connection parameters like host and port, which Session will use to establish FIXP Connection.

If Session is being registered at the time, noted by schedule, Scheduler will connect the Session immediately.

Removing Session from Scheduling Services

OnixS::CME::iLink3::Scheduling::SessionScheduler::remove given session from the scheduling services.

OnixS::CME::iLink3::Scheduling::SessionScheduler::remove doesn't disconnect an active session from the trading system. Therefore, if session has already been connected by scheduler, it remains connected after unregistering.

Important Behavioral Aspects

The following steps take place while scheduling Session:

Handling Scheduling Warnings and Errors

Scheduler exposes the OnixS::CME::iLink3::Scheduling::SessionSchedulerListener class to get notified listeners about errors in the session scheduling. OnixS::CME::iLink3::Scheduling::SessionSchedulerListener::onError is not linked with session errors. Scheduler raises notifications only about scheduling-related errors like inability to connect a session within the specified amount of time.

Once OnixS::CME::iLink3::Scheduling::SessionSchedulerListener::onError is called by the scheduler, all attempts to logon the disconnected session will be suspended till the next activity (logon) time.

OnixS::CME::iLink3::Scheduling::SessionSchedulerListener::onWarning member is called by Scheduler to provide its users with more information about scheduling flow. This kind of information is usually related with non-critical errors that occur during the scheduling of the session.

In case of failure at logon, scheduler will call the OnixS::CME::iLink3::Scheduling::SessionSchedulerListener::onWarning member and will try to perform logon again according to the settings (Reconnect.Attempts and Reconnect.Interval values). Once all attempts are performed and session remains disconnected, Scheduler will invoke the OnixS::CME::iLink3::Scheduling::SessionSchedulerListener::onError member and will stop all subsequent attempts to bring a session to the connected state until the next logon time.


using namespace OnixS::CME::iLink3;
std::string host = "";
int port = 0;
SessionSettings settings;
Session session(settings, 1, NULL);
SessionSchedulerOptions schedulerOptions;
SessionScheduler scheduler(schedulerOptions);
SessionConnectionSettings sessionConnectivity(host, port);
scheduler.add(&session, sessionSchedule, sessionConnectivity);

Please, see the SessionScheduler sample, included into distribution package of CME iLink 3 Handler, for further references.