After a successful LogonRequest on a BGW session, a client application can log in one or more trader IDs using the OnixS::ICE::BOE::Messaging::TraderLogonRequest message. A trader must be logged in before order-related messages can be sent to the ICE Trading System.
Workflow
The Trader Logon flow is:
- Establish a BGW session.
- Send a OnixS::ICE::BOE::Messaging::TraderLogonRequest message for a trader ID.
- Wait for OnixS::ICE::BOE::Messaging::TraderLogonReport.
- Start sending order-related messages for that trader.
The OnixS::ICE::BOE::SessionListener::onTraderLogonReport callback is invoked when the gateway confirms the trader logon.
- Note
- A trader ID cannot be logged in to more than one gateway session at the same time. If the same trader is already active on another session and has not logged out through Trader Logout, session logout, or disconnection, a new TraderLogonRequest is not processed.
Request Fields
The TraderLogonRequest message contains:
- originatorUserID - trader identifier.
- rawData - trader password.
- MiFID defaults: either mifidID or fields directElectronicAccess, tradingCapacity, liquidityProvision, commodityDerivIndicator, investmentDecision, executionDecision, and clientIDCode.
If mifidID is provided, it is the only MiFID-related value processed by the exchange for the request. The sample application demonstrates building the request through Samples::Helper::createTraderLogonRequest().
Response
On success, the exchange sends OnixS::ICE::BOE::Messaging::TraderLogonReport, which contains the trader identifier and the assigned clientID. If trader logon fails, the exchange responds with OnixS::ICE::BOE::Messaging::TraderLogoutReport.
After a successful trader logon, the exchange replays:
- execution reports for all open GTC/GTD orders for that trader;
- GTC/GTD fills or cancels that occurred while the trader was logged out;
- the last 60 seconds of the previous session.
Example
The Getting Started sample shows the complete flow:
auto traderLogonRequest = Helper::createTraderLogonRequest(cfg.traderId(), cfg.traderPwd());
bgwSession->send(traderLogonRequest);
std::future< T > wait(Stack &stack, std::promise< T > &promise, std::chrono::seconds timeout=std::chrono::seconds{30})
- See also
- Establishing Connection
-
Exchanging Messages