id— client-side correlation id; echoed in the response.cmd— one ofsubscribe/update_subscription/unsubscribe/list_subscriptions/get_book_snapshot/ping.params— command-specific payload (omitted forpingandlist_subscriptions).
sid (numeric).
Use sid for subsequent updates / unsubscribes and to route incoming
events. sids are not stable across reconnects.
subscribe
On /ws/user:
/ws/market:
Normalization rules
- All addresses lowercased.
tokenIdis decimal-string with no leading zeroes.conditionIdis lowercased 32-byte hex.- Duplicate ids removed.
Rejection codes
update_subscription
Modify the id list of an existing id-based subscription instead of
opening a new one. Not allowed on subscription-less channels
(user_orders, user_fills).
Add ids
Remove ids
update_subscription on a subscription-less channel is rejected with
invalid_params.
get_book_snapshot
Force a fresh full-depth book_snapshot on a token_book
subscription without unsubscribing / resubscribing. Use on a sequence
gap (book_delta.prevSeq != lastSeq) or after a long pause.
By sid:
book_snapshot per resolved subscription, OR one
book_snapshot_failed per token if the snapshot fetch couldn’t
complete:
unsubscribe
sids are silently ignored (idempotent — the response only
lists sids that were actually removed).
list_subscriptions
ping
ts is the server clock in milliseconds — clients can use it as a
clock-skew probe.
There is no application-level idle timeout, but production clients
should still send a ping every 20–30 s to defeat intermediate
proxies / load balancers that close idle TCP connections.