One connection carries every channel. Use it instead of polling — the private
channel gives you a live copy of your orders, positions and balances without a
single GET.
Authenticating the handshake
The upgrade request carries the same three DX-ACCESS-* headers as REST. The
canonical string is fixed:
with an empty body. A bad signature is rejected with 401. There is no
anonymous WebSocket access.
The ±5 second clock window applies here too. Because it is checked once at
handshake, a long-lived connection is unaffected by later drift — but a
reconnect with a stale clock will fail.
Commands
Client to server:
cmd is subscribe, unsubscribe or list_subscriptions. id is yours and
is echoed back. Public channels need market_ids.
The reply assigns a subscription id, one per channel:
Data envelope
seq is per subscription and contiguous from 1.
A gap in seq means you lost data. Public channels have no replay — the
recovery is to resubscribe, which starts a fresh snapshot-then-deltas sequence.Track seq per sid and treat any hole as “resubscribe”, not as something to
paper over. The private user channel is the exception: it has its own
channel_seq and supports replay.
Command errors
Next
Channels — what each one carries.