Keeping connection alive (Heartbeats)

  • The Logon (A) message, that you will receive from the server after successful authentication, will contain the heartbeat interval.

  • The server expects that it receives at least one message from the client within the heartbeat interval. If you have no business messages to send, send a Heartbeat (0) message to indicate you are alive. The server will break the connection if no messages are received from the clients in 1.5 x Heartbeat Interval.

  • The client shall expect to receive at least one message from the server within the heartbeat interval — either a business message or a Heartbeat (0). If no messages are received from the server in 1.5 x Heartbeat Internal, the client can treat the connection as broken (close the connection and reconnect).

  • The server will close the connection:

  • After unsuccessful Logon
  • If no messages received from the client within the given heartbeat interval
  • If the client sends 10 messages in a row that are rejected (messages are malformed or data is invalid, etc.)
  • If the Logon is not sent by the client within 5 seconds after establishing the connection (Trading API)
  • If no subscriptions to channels are made within 5 seconds after establishing the connection (Market Data API)