subscribe and unsubscribe commands, and receive a stream of
{ channel, data } frames.
Endpoints
/ws serves Spot subscriptions. /ws/perp is Testnet-Only and serves Perpetual Subscriptions.
No authentication is required.
Set a descriptive User-Agent in non-browser clients.
Delivery Guarantees
Delivery is best effort. Messages can be missed during disconnections, server restarts, upstream gaps, or when a client’s buffer is full.Reconnecting
Reconnect on close, on heartbeat timeout, and on transport error, using exponential backoff with jitter. After the connection is back:- Resend every subscription.
- Discard any locally maintained order book.
- For
l2Book, wait for a new stream snapshot and replace the book with each frame. Use REST Market Data independently; it has no shared sequence with the stream. - Reconcile other account state through Orders, User Fills, and Balances.
Field Encodings
Book
sz preserves raw chain base units. Trade/order sizes and wallet balances are human units;
check strategy payment-asset units separately. Candle OHLCV fields are JSON numbers. Spot
activeAssetCtx mixes numeric base fields and decimal-string extensions. Trailing zeros in canonical decimal strings are collapsed.
Limits
Connections are limited per client IP address, and inbound messages have a maximum size of 4,096 bytes. Prefer one connection carrying many subscriptions over many connections.
Command rate limits and the per-connection subscription cap are in
Subscriptions. Keepalive timing is in
Heartbeats.