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.
- Reject: For administrative message reject.
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
password of the client.
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.
|Logon||100||81||Sent to initiate connections|
Once the client is successfully authenticated, the server responds with a "Logon Confirmations" message.
|1||heartbeatIntervalSeconds||Int32||4||Heartbeat interval in seconds.|
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.
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.
|Heartbeat||10||40||Connection Heartbeat, may also be sent in response to a TestRequest|
|1||correlationId||int64||8||Optional id if sent in response to a 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.
|TestRequest||11||40||TestRequest to request heartbeat, receiver should respond with Heartbeat message with the provided test request id included|
|1||correlationId||int64||8||Correlation id to be echoed by receiver|
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.
|1||fromSequenceNumber||uint32||4||Sequence number of first message to resend.|
|2||toSequenceNumber||uint32||4||Sequence number of last message to resend (or 0 to resend all messages from formSequenceNumber).|
While retransmitting messages in response to a ResendRequest, the server sends GapFill messages in place of admin and missing/unavailable messages.
|1||newSequenceNumber||uint32||4||Sequence number of the next message to be sent.|
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.
|Logout||101||96||Logout message to gateway|
The server sends a LoggedOut message before terminating the connection, either in response to a Logout message from the or for other reasons.
|Logout||201||96||Logout message from gateway to client|
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.
|Reject||210||104||Reject message from gateway to client|
|1||refSequenceNumber||uint32||4||Sequence number of the rejected message from client.|
Was this helpful?