OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Scheduling Sessions for Automatic Connection

Inner Contents

 Session Schedule
 
 Session Connection Settings
 
 Predefined Schedules and Connection Settings
 

Detailed Description

Sessions Scheduler

The Sessions Scheduler service cat automatically connect sessions to the counterparty at the beginning of the trading day, keep a session connected for the entire trading day, and disconnect it at the end of the last trading day.

SessionScheduler class

The OnixS::B3::BOE::Scheduling::SessionScheduler is the main class of the Sessions Scheduling services.

Registering a Session for Automatic Connection

The OnixS::B3::BOE::Scheduling::SessionScheduler::add member schedules a session for automatic logon and logout according to the specified session time, that can be given to the Scheduler as an instance of the OnixS::B3::BOE::Scheduling::SessionSchedule class, or as an id of the predefined schedule.

The OnixS::B3::BOE::Scheduling::SessionConnectionSettings argument specifies the connection settings.

Note
If the session is being registered between the scheduled logon and logout time, the Scheduler will connect the session immediately.

Removing Session from Scheduler

The OnixS::B3::BOE::Scheduling::SessionScheduler::remove method removes the given session from the scheduling services.

Note
OnixS::B3::BOE::Scheduling::SessionScheduler::remove does not disconnect an active session. Therefore, if the session has already been connected by the Scheduler, it remains connected after unregistering.

Handling Scheduling Warnings and Errors

The Scheduler exposes the OnixS::B3::BOE::Scheduling::SessionSchedulerListener class to notify about errors in the session schedule.

The Scheduler calls the OnixS::B3::BOE::Scheduling::SessionSchedulerListener::onWarning member to notify about non-critical issues.

Scheduling Rules

Example

using namespace OnixS::B3::BOE;
std::string host = "";
int port = 0;
SessionSettings settings;
Session session(settings, nullptr);
SessionSchedulerOptions schedulerOptions;
SessionScheduler scheduler(schedulerOptions);
SessionConnectionSettings sessionConnectivity(host, port);
scheduler.add(&session, sessionSchedule, sessionConnectivity);
See also
the Session Scheduler Sample