The trading interface of the Classic 3.14.0 SBE protocol should not be used. It is best practice to use Classic MFAPI for trading.
The MFTradingHandler interface specifies callbacks for each message type generated by an MFTradingSession object.
Sequence Numbers
- These message types have sequence numbers from the server: OrderCancelReject, ExecutionReport
- Sequence numbering starts at 0
- Set your NextExpectedMsgSeqNum in the TradingSessionStatusRequest message
- If you detect a gap in sequence numbers the appropriate action is to disconnect and reconnect. Use the TradingSessionStatusRequest message
to send your NextExpectedMsgSeqNum and get a replay of any missed message(s).
Replay
- Note: The ResendRequest message is deprecated. Clients should not send it. This message only exists in the mfproto-trading.xml schema. The published APIs do not provide the ability to send this message.
- To get a replay of a missed message or messages - disconnect and reconnect. Then use the TradingSessionStatusRequest message to send your NextExpectedMsgSeqNum and get a replay of any missed message(s).
- If your NextExpectedMsgSeqNum is greater than the server has sent - you will receive a TradingSessionStatus message with a TradingSubscriptionStatus=messageNextExpectedMsgSeqNumTooHigh
- If your NextExpectedMsgSeqNum is less than the server has sent - you will get a replay starting at that message to the end of available messages
- If your NextExpectedMsgSeqNum is equal to the what the server has then you are in sync and no replay will happen.
Order Filled
- When an order is filled you'll receive an ExecutionReport with OrdStatus=Filled and ExecType=Trade. Immediately after you'll receive an extra ExectuionReport with OrdStatus=Filled and ExecType=Restated. This extra message can be ignored - it is there only to fill a gap in the messaging sequence numbers.
Overview
Content Tools