The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning

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.

These messages are received by the "on(...)" methods of a handler implementing the
the MFTradingHandler interface.


Message type                               usage

...

LogonResponse                         typeusage
LogonResponse Called upon a successful logon.
Logout Called                                         Called when a logout is request requested to the client. The client should respond with a logout response.
LogoutResponseA LogoutResponse                        A response to a successful logout request.
Heartbeat                                     Called when a heartbeat is received.
ResendRequestA ResendRequest                           A request from the server to resend messages. Used to notify what messages may have

                                                       been been dropped. Response to this with a sequence gap fill.

MarketDefinition                          Gives the definition of a particular venue.
TradingSessionStatusA TradingSessionStatus                 A response to the trading session request. This notifies the client of the subscription status for a trading venue.
ExecutionReportA ExecutionReport                          A response to an order action (order submission, modifi- cationmodification`, or cancellation) to give the user the status of the order.
OrderCancelReject Sent                      Sent when an attempt to cancel an order fails.

...



Table 5.1. – Order management message types
MFTradingSessionMFTradingHandler
onStart()
logon()
onConnect()
onLogonResponse()
marketDefintionRequest()
onMarketDefinition()
tradeRequest()
onExecutionReport() – including possible replay of missed messages.
createNewOrderSingle()
newOrderSingle()
onExecutionReport()


Image Added





Figure 5.1. – Showing the flow to demonstrate subscribing to trading, replaying, and submitting an order.
The client can subscribe to trading for each venue described in a MarketDefinition. Each venue has its own sequence number for messages. To submit orders, the application will use the creation methods, which do a zero-alloc creation of the newOrderSingle, and then send the message once the fields are filled in.