WebSocket guide
Live prices
Create a ticket with POST /v1/stream-tickets, then connect to /v1/stream over WSS. Tickets expire after 30 seconds and work once.
{"type":"auth","ticket":"YOUR_TICKET"}
// After hello:
{"type":"subscribe","mode":"reliable","channels":["quotes"],"assets":["crypto:BTCUSD"]}
Use server-side Bearer authentication or browser tickets; never put API keys in URLs. Reply to ping with {"type":"pong"}. Send auth within five seconds; subscribe within ten.
Persist the last received checkpoint.cursor. Reconnect with that cursor in the subscription and the same asset scope. On resync_required, discard the cursor and take a new snapshot. Treat sequence values as strings.
reliable delivers ordered events; display may coalesce prices. Slow consumers disconnect. Limits: five connections per account and 100 assets per connection.
Using prices
Keep decimal prices as strings. For orders, require execution_eligible=true and an unexpired valid_until. Stale, simulated, manual and informational prices cannot execute orders. Persist the quote ID with the order decision.
Candles use accepted observations. Missing data remains a gap; corrected history is a separate dataset. Midpoint candles differ from bid/ask trigger levels.
AsyncAPI schema ↗