wss://api.serialized.trade/v1/stream
One connection, many subscriptions. Subscriptions are additive: each subscribe carries a client-chosen id, acks are explicit, and unsubscribe targets one id without touching the others.
Authentication
Send your key as the first frame within 10 seconds of connecting:{"op":"auth","apiKey":"YOUR_API_KEY"}. The server replies {"op":"auth.ok"}; any other first frame closes the connection (code 4401).
Keepalive
Send{"op":"ping"} every 30s; the server replies {"op":"pong"}. Connections idle for more than 60s are closed.
Errors
Errors arrive as{"op":"error","id":"<sub id>","error":{"code","message"}} - the same machine-readable catalog as REST (INVALID_PARAM, INVALID_CHAIN, …). A bad subscribe only fails that subscription, never the connection.
Reconnect & resume
Delivery is at-most-once: after a reconnect, backfill the gap over REST (trades hascursor + fromAt, candles have endTime), then re-subscribe. Trade events carry a stable identity key (txHash, block, logIndex) for exact dedup.
Limits
Limits per key: 5 concurrent connections, 20 subscriptions per connection, 50 distinct tokens/pools acrosstrades/ohlcv/token-updates. Need more? Ask us.