Skip to main content

Derivatives SBE Session Messages

Session Message Types

Client and server use the following administrative/session messages:

  • Logon: Initiates (client) or approves (server) session opening.
  • LogonConf: Initiates (client) or approves (server) session opening.
  • Heartbeat: Controls the session connection state.
  • TestRequest: Controls the session state. Requires Heartbeat reply.
  • ResendRequest: Requests missed FIX messages.
  • GapFill: Gap Fill, must be used instead of resend of administrative messages.
  • Logout: Initiates or approves session closing.
  • LoggedOut:
  • Reject: For administrative message reject.

Logon

Each client uses an assigned IP address and port to establish a TCP/IP session with the server.

The client initiates a session at the start of each trading day by sending the Logon message within a two heartbeats interval. The client identifies itself with the username field. The server validates the username and password of the client.

two heartbeats interval

If the client does not initiate the session by sending the Logon message within a two heartbeats interval of establishing the session, the connection is dropped by the server.

FieldNameTypeLengthDescription
Logon10081Sent to initiate connections
1usernameString1616Logon username
2passwordString3232Logon password
3resetSeqNumuint81(1 = true, 0 = false)

LogonConf

Once the client is successfully authenticated, the server responds with a "Logon Confirmations" message.

FieldNameTypeLengthDescription
LogonConf20036Logon confirmation
1heartbeatIntervalSecondsInt324Heartbeat interval in seconds.

Heartbeat

Client and server use the Heartbeat message to exercise the communication line during periods of inactivity and to verify that the interfaces at each end are available.

The heartbeat interval is three seconds. The server sends a Heartbeat anytime it has not transmitted a message during a heartbeat interval. The client is expected to employ the same logic. The servers sends a logout and breaks the TCP/IP connection with the client if it detects inactivity for five heartbeat intervals. The client is expected to employ similar logic if inactivity is detected on the part of the server.

caution

The heartbeat interval is three seconds. The servers sends a logout and breaks the TCP/IP connection with the client if it detects inactivity for five heartbeat intervals.

FieldNameTypeLengthDescription
Heartbeat1040Connection Heartbeat, may also be sent in response to a TestRequest
1correlationIdint648Optional id if sent in response to a TestRequest

TestRequest

TestRequest is used to force a heartbeat from the opposing application. The message is useful for checking sequence numbers or verifying communication line status. The opposite application responds to the TestRequest with a Heartbeat.

FieldNameTypeLengthDescription
TestRequest1140TestRequest to request heartbeat, receiver should respond with Heartbeat message with the provided test request id included
1correlationIdint648Correlation id to be echoed by receiver

ResendRequest

The client may send a ResendRequest to initiate retransmission of previously sent messages. Like the FIX protocol, GapFill messages are sent in place of admin and missing/unavailable messages.

FieldNameTypeLengthDescription
ResendRequest10240Resend request.
1fromSequenceNumberuint324Sequence number of first message to resend.
2toSequenceNumberuint324Sequence number of last message to resend (or 0 to resend all messages from formSequenceNumber).

GapFill

While retransmitting messages in response to a ResendRequest, the server sends GapFill messages in place of admin and missing/unavailable messages.

FieldNameTypeLengthDescription
ResendRequest20240Resend request
1newSequenceNumberuint324Sequence number of the next message to be sent.
2paddinguint324

Logout

The client is expected to terminate each connection at the end of each trading day before the server shuts down. The client terminates a connection by sending the Logout message. The server responds with a Logout message if the client’s request is successful. The client then breaks the TCP/IP connection with the server.

All open TCP/IP connections are terminated by the server when it shuts down (a Logout is sent). Under exceptional circumstances, the server may initiate the termination of a connection during the trading day by sending the Logout message. Either party that wishes to terminate the connection may wait for the heartbeat interval duration before breaking the TCP/IP connection to ensure that the other party received the Logout message.

FieldNameTypeLengthDescription
Logout10196Logout message to gateway
1reasonString6464Logout reason

LoggedOut

The server sends a LoggedOut message before terminating the connection, either in response to a Logout message from the or for other reasons.

FieldNameTypeLengthDescription
Logout20196Logout message from gateway to client
1detailsString6464Logout details

Reject

The server sends a Reject message in response to a client message which is well-formed but is of unknown type or has an invalid blockLength for the type/version.

FieldNameTypeLengthDescription
Reject210104Reject message from gateway to client
1refSequenceNumberuint324Sequence number of the rejected message from client.
2reasonint324
  • 1 = INVALID_SCHEMA_ID
  • 2 = INVALID_TEMPLATE_ID
  • 3 = INVALID_BLOCK_LENGTH
3detailsString6464Logout details

Was this helpful?