The Session protocol assures client identification, sequential request processing, session state control, and the ability to restore the session after downtime.
Session Message Types
Client and server use the following administrative/session messages:
- Logon (35=A): Initiates (client) or approves (server) session opening.
- Logout (35=5): Initiates or approves session closing.
- Resend Request (35=2): Requests missed FIX messages.
- Sequence Reset (35=4): Gap Fill, must be used instead of resend of administrative messages.
- Test Request (35=1): Controls the session state. Requires Heartbeat reply with
- Heartbeat (35=0): Controls the session connection state.
- Reject (35=3): For administrative message reject.
The Logon message initiates the connection from the client side and approves the connection if sent by the exchange.
|98||EncryptMethod||Int||Y||Encryption method where |
|108||HeartBtInt||Int||Y||Heartbeat interval in seconds. Valid values are between 5s and 60s—30s is recommended. The same value is used by both parties. Value is set by the initiator and echoed back by the acceptor.|
|141||ResetSeqNumFlag||Boolean||N||Flag used to reset the session sequence numbers and start a new session. |
Use with caution, especially during a trading session as this might lead to business data loss.
The Logout message initiates or confirms the termination of a FIX session.
|58||Text||String (200)||N||Logout reason|
Resend Request (35=2)
The Resend Request message can be used to recover an inbound session sequence if a message was missed.
|7||BeginSeqNo||SeqNum||Y||Sequence number of first message in range to be resent|
|16||EndSeqNo||SeqNum||Y||Sequence number of last message in range to be resent|
Sequence Reset (35=4)
The Sequence Reset message can be used in two modes:
- Reset Mode forces the counterparty to adjust inbound message sequence, GapFillFlag = "N" or omitted.
Fill Gap Mode
- Fill Gap Mode is used during retransmission of messages missed by a client. Administrative messages and rejected business messages are not to be retransmitted. Instead a Sequence Reset message with GapFillFlag = "Y" must be used.
|123||GapFillFlag||String (20)||Y||Flag signalling wether to restore missed business/admin messages.|
|36||NewSeqNo||String (20)||Y||New adjusted sequence number|
Test Request (35=1)
Test Request lets you check sequence numbers, or verify the communication line status in conjunction with a Heartbeat message.
A connection participant receiving a Test Request message must reply with a Heartbeat message and refer to the
TestReqID value of the initial message.
|58||TestReqID||String (20)||Y||Id sent to verify communication status. Recipient returns TestReqID in Heartbeat message|
Heartbeat confirms the status of a communication line by replying to a Test Request message.
|112||TestReqID||String (20)||Y||Id sent in response to Test Request message, verifying communication status|
A Reject message is issued by a party if an incoming FIX message is unsupported or not property formed. Rejected messages must not be resent if a Resend Request is received; instead a SequenceReset with GapFillFlag = "Y" is expected.
|45||RefSeqNum||SeqNum||Y||Sequence number of the rejected message|
|58||Text||String (200)||Y||Error message|
|373||SessionRejectReason||Int (2)||Y||Session Reject Reason Code|
Was this helpful?