Heartbeat
Overview
Market-data clients must send application heartbeats using 10010, recommended every 30 seconds. On the stock, crypto, and common channels, more than 60 seconds without a valid 10010 causes the connection to close on a subsequent heartbeat check.
A WebSocket protocol Ping can receive a Pong, but it does not replace 10010 on these channels. Receiving market data or sending subscription requests also does not replace the application heartbeat.
ack is optional:
Omit or
0: keepalive only; the server does not reply.ack=1(top-level ordata.ack): the server replies with10011.10011is not an error. It confirms receipt of the heartbeat. If both locations containack, the top-level value takes precedence.
Heartbeats count toward the 60 frames/minute cap. See WebSocket Limitation.
Rate limits
Subscribe + unsubscribe + heartbeat on one connection: 60 per minute (WebSocket Limitation). Over the limit the socket is closed. Repeated abuse may suspend the API key.
Error codes
See WebSocket Error Codes. Timeout is 513.
Address
See Endpoints.
Request (protocol 10010)
When a reply is needed:
code
Integer
Yes
Heartbeat 10010
10010
trace
String
Yes
Trace id
423afec425004bd8a5e02e1ba5f9b2b0
ack
Integer
No
1 requests a confirmation
1
Reply (protocol 10011, only when ack=1)
code
Integer
Heartbeat ack, not an error
10011
trace
String
Echo of the request
423afec425004bd8a5e02e1ba5f9b2b0
msg
String
ok
ok
Last updated
