Skip to main content

Overview

The FIX Session Protocol enables reliable, ordered transport of FIX Application messages. The gateway supports these session-level messages: Sequence Reset, Logon, Logout, Heartbeat, Test Request, Resend Request, Reject.

Logon

The Logon message must be sent first after establishing a TCP connection. The gateway responds with its own Logon message to confirm the session. Logon Fields (MsgType = “A”)
TagFieldDescriptionRequiredTypeValues
98EncryptMethodMethod of encryptionYInt0 (None)
108HeartBtIntHeartbeat interval in secondsYInt30 recommended
Example:
8=FIX.4.4|9=72|35=A|34=1|49=CLIENT1|52=20260212-14:00:00.000|56=BUILDMARKETS|98=0|108=60|10=123|

Logout

Clients must log out at the end of each trading session. Verify no live orders exist and all expected Execution Reports have been received before logout. The party initiating logout breaks the TCP connection, allowing both sides to issue Resend Requests if sequence gaps are detected. Logout (MsgType = “5”)
8=FIX.4.4|9=56|35=5|34=150|49=CLIENT1|52=20260212-20:00:00.000|56=BUILDMARKETS|10=045|

Sequencing and Reconnecting

The Client FIX Gateway may reset inbound and outbound sequence numbers to 1 per a configurable schedule. When reconnecting after disconnect: both sides compare expected vs. received sequence numbers; if a gap is detected, a Resend Request is issued; messages are replayed with PossDupFlag=Y (Tag 43).

Heartbeat and Test Request

The gateway uses the heartbeat interval from the Logon message to determine client liveness. A value of 0 disables the check. Heartbeat (MsgType = “0”) is sent automatically when no data transmits for the heartbeat interval, and in response to a Test Request. Test Request (MsgType = “1”) is sent after HeartBtInt + 2 seconds of inactivity from the peer; if no Heartbeat response arrives within 2 × HeartBtInt + 4 seconds of inactivity, the gateway sends Logout and drops the connection.

Resend Request

Send a Resend Request to recover missed messages when a sequence gap is detected. > Important: If you receive a Resend Request with a sequence gap, resend appropriate messages first before sending your own Resend Request to avoid infinite loops. Two gap recovery methods exist. For receiving messages 1–10, then 15: Method 1: Request resend of 11–14 (specific gap range), then process 15. Method 2: Discard message 15, request resend of 11–999999 (open-ended).

Reject

Recommendation: “Avoid using the FIX Reject message. Per the FIX specification, any message you reject will not be resent.” Instead, contact Buildmarkets support for unexpected message formats.

Sequence Reset

Sequence Reset – Gap Fill must occur in sequence. When resending messages 10–15, if messages 11–14 are administrative messages (other than Reject), replace them with a single Sequence Reset – Gap Fill with NewSeqNo=15.

Message Header

TagFieldDescriptionRequiredTypeValues
8BeginStringFIX versionYString(7)FIX4.4
9BodyLengthMessage body length in bytesYInt
35MsgTypeMessage type identifierYString(3)See message reference
34MsgSeqNumMessage sequence numberYInt
43PossDupFlagPossible retransmission flagNBooleanY = Possible duplicate
49SenderCompIDYour identifierYString(7)
52SendingTimeTimestamp of message sendYUTCTimestamp
56TargetCompIDGateway identifierYString(7)
97PossResendPossible resend indicatorNBoolean
122OrigSendingTimeOriginal timestamp for resendsCUTCTimestampRequired for resends. Must NOT be present on new messages.

Message Trailer

TagFieldDescriptionRequired
10CheckSumThree-digit checksumY