Fix Specification Lookup – Session – Heartbeat Protocol

Session – Heartbeat Protocol

The Heartbeat is useful for monitoring the status of the communication link and to identify when the last of a string of messages was not received.

When either end of a FIX connection has not sent any data for [HeartBtInt] seconds, it will transmit a Heartbeat message. When either end of the connection has not received any data for (HeartBtInt + some reasonable transmission time) seconds, it will transmit a Test Request message. If there is still no heartbeat message received after (HeartBtInt + some reasonable transmission time) seconds then the connection should be considered lost and corrective action be initiated. If HeartBtInt is set to zero then no regular heartbeat messages will be generated. Note that a Test Request message can still be sent independent of the value of the HeartBtInt which will force a Heartbeat message.

Heartbeats issued as the result of Test Request must contain the TestReqID transmitted in the Test Request message. This is useful to verify that the Heartbeat is the result of the Test Request and not as the result of a regular timeout.

The heartbeat format is as follows:

TagField NameReq'dDescription
8BeginStringYFIX.4.0 (Always unencrypted, must be first field in message)
9BodyLengthY(Always unencrypted, must be second field in message)
35MsgTypeY(Always unencrypted, must be third field in message)
49SenderCompIDY(Always unencrypted)
56TargetCompIDY(Always unencrypted)
115OnBehalfOfCompIDNTrading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)
128DeliverToCompIDNTrading partner company ID used when sending messages via a third party (Can be embedded within encrypted data section.)
90SecureDataLenNRequired to identify length of encrypted section of message. (Always unencrypted)
91SecureDataNRequired when message body is encrypted. Always immediately follows SecureDataLen field.
34MsgSeqNumY(Can be embedded within encrypted data section.)
50SenderSubIDN(Can be embedded within encrypted data section.)
57TargetSubIDN“ADMIN” reserved for administrative messages not intended for a specific user. (Can be embedded within encrypted data section.)
116OnBehalfOfSubIDNTrading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)
129DeliverToSubIDNTrading partner SubID used when delivering messages via a third party. (Can be embedded within encrypted data section.)
43PossDupFlagNAlways required for retransmissions, whether prompted by the sending system or as the result of a Resend Request. (Can be embedded within encrypted data section.)
97PossResendNRequired when message may be duplicate of another message sent under a different sequence number. (Can be embedded within encrypted data section.)
52SendingTimeY(Can be embedded within encrypted data section.)
122OrigSendingTimeNRequired for message resends. If data is not available set to same value as SendingTime (Can be embedded within encrypted data section.)
112TestReqIDNRequired when the heartbeat is the result of a Test Request message.
93SignatureLengthNRequired when trailer contains signature. Note: Not to be included within SecureData field
89SignatureNNote: Not to be included within SecureData field
10CheckSumY(Always unencrypted, always last field in message)