The Lab

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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.
  • No labels