For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 or data.ack): the server replies with 10011. 10011 is not an error. It confirms receipt of the heartbeat. If both locations contain ack, 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:

Field
Type
Required
Description
Example

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)

Field
Type
Description
Example

code

Integer

Heartbeat ack, not an error

10011

trace

String

Echo of the request

423afec425004bd8a5e02e1ba5f9b2b0

msg

String

ok

ok

Last updated