Skip to content

Common messages · WebSocket ​

See connection, authentication and subscription limits in the WebSocket overview.

Unsubscribe

Subscription accepted (type: subscribed) ​

RECEIVEsubscribed

Server → client

Acknowledges the accepted subscription ID. A missing or blank request ID becomes default.

Message fields ​

FieldTypeRequiredDescription
typestringYesAllowed: "subscribed"
subscription_idstringYesThe accepted request id, or default if the request id was omitted or blank.

Application heartbeat (type: ping) ​

SENDping

Client → server

The application heartbeat echoes ts in a pong message. It is separate from WebSocket protocol ping/pong frames. The server sends protocol pings every 30 seconds and requires a protocol pong within the 90-second read deadline; browsers handle those frames automatically.

Reply: pong

Message fields ​

FieldTypeRequiredDescription
typestringYesAlways ping.
Allowed: "ping"
tsstringNoOpaque value echoed in the pong; defaults to an empty string.
Default: ""

Heartbeat reply (type: pong) ​

RECEIVEpong

Server → client

Echoes the application ping value in ts; it is not a WebSocket protocol pong frame.

Message fields ​

FieldTypeRequiredDescription
typestringYesAllowed: "pong"
tsstringYes

Errors (type: error) ​

RECEIVEerror

Server → client

Subscription validation errors preserve the existing subscriptions and keep the connection open. subscribe_failed is followed by disconnection. Malformed JSON or messages exceeding 64 KiB may close the connection without a JSON error.

codeMeaning
invalid_subscriptionInvalid quote, channel, symbol, or interval.
subscription_limitMore than 100 subscriptions on this connection.
symbol_limitSymbol quota exceeded, or conflicting all-asset subscription.
unknown_messageUnsupported message type.
subscribe_failedRealtime event service unavailable; reconnect with backoff.

Message fields ​

FieldTypeRequiredDescription
typestringYesAlways error.
Allowed: "error"
codestringYesMachine-readable error code; see the error codes above.
Allowed: "invalid_subscription", "subscription_limit", "symbol_limit", "unknown_message", "subscribe_failed"
messagestringYesHuman-readable details.