OnixS C++ B3 BOE Binary Order Entry  1.2.0
API Documentation
Establishing Connection

Establishing Connection

To establish an FIXP session, use the OnixS::B3::BOE::Session::connect method.

To handle network errors during the connection establishment, one needs to catch OnixS::B3::BOE::Exceptions::SessionException exceptions from the OnixS::B3::BOE::Session::connect method and try to connect again.

See also
Session Initialization and Binding
Reconnection

Closing Connection

To disconnect the session, use the OnixS::B3::BOE::Session::disconnect method.

Example

using namespace OnixS::B3::BOE;
using namespace OnixS::B3::BOE::Messaging;
class MyListener : public SessionListener
{
public:
void onExecutionReportNew(const ExecutionReportNew200& msg, Session* /*sn*/) override
{
std::clog << msg << std::endl;
}
};
const std::string CounterpartyHost = "Localhost";
const int CounterpartyPort = 64124;
SessionSettings settings;
settings.licenseStore("../../license")
.sessionId(100000000 /* "Value Received From B3" */)
.accessKey("Value Received From B3")
.enteringFirm(100 /* "Value Received From B3" */)
.tradingSystemName("Your Trading System Name Here");
MyListener listener;
Session session(settings, &listener);
session.connect(CounterpartyHost, CounterpartyPort);
// ...
session.disconnect();