Heartbeats

Clients will receive regular heartbeats once connected. Heartbeats will come every 3 seconds. If the last heartbeat received by a client was more than 10 seconds ago, the client should assume that there is either a network problem or they are lagging behind in processing messages. The client should suspend all markets which it is receiving from the feed until it receives another heartbeat message. Additionally, if no messages at all have been received in a 10 second period, the client should assume there is a network problem, disconnect from the feed and attempt to open a new connection.

Below is an example of a heartbeat message::

{
 "mode": "push",
 "type": "heartbeat",
 "msg": {
 "timestamp": "2014-01-21 17:55:22.123456"
 }
}

IMPORTANT: If we are unable to send a heartbeat for 10 seconds (for example, if the SSH window size is at 0 and the client is unable to accept further messages), then we will terminate the connection.

Last updated

Was this helpful?