Skip to main content
Market-data gateway. Use for the public trade tape (matcher + chain settlements), orderbook snapshots + deltas, OHLC candles, the live probability chart, market lifecycle, underlying crypto prices, and platform-wide firehoses and trade feed. Trying to subscribe to a private channel (user_orders, user_fills, vault_positions) on this gateway returns { "code": "forbidden" } in the rejected[] array — use /ws/user for own-activity streams.

Authentication

Same X-Api-Key scheme as the rest of the API — no separate auth scheme for market data: Market channels do not require any specific scope — any active key can subscribe. An invalid key is rejected at handshake with 4401 <reason> (same close-code matrix as /ws/user); an invalid or expired bearer token closes with 1008 unauthorized. Supplying credentials commits the handshake to that path: a bad credential never falls back to an anonymous session. Revoking a key immediately closes every live socket bound to that keyId with 4401 api_key_revoked. A request that supplies no credentials at all connects anonymously — the greeting reports "authMethod": "anon" — and may subscribe to every public channel on this gateway. Where the gateway enforces an origin allowlist, an anonymous upgrade must carry an allowed Origin header or it is closed with 1008 forbidden origin, while a key-authenticated upgrade may omit Origin. Use a key anyway when you have one, so the session is attributed to your partner account (partnerId in the greeting). The per-connection limits (resource limits) are the same either way.

Connect greeting

partnerId is the platform-side partner-record id corresponding to your API key. Useful for correlating WS sessions to your own audit trail without a separate REST call. Absent on JWT-authenticated sockets (retail web-app sessions).

Available channels

See Server events for full payload shapes per type.
Live status: token_trade_matches, token_trade_settlements, token_book, token_ohlc, market_price_tick, market_lifecycle, crypto_price_tick, the all_* channels and global_activity push reliably today; market_price_tick only sends when a price input changes, so a quiet market is silent. condition_lifecycle carries only the on-chain trading pause / unpause of a condition, so it is usually silent; follow status and resolution on market_lifecycle. system accepts subscribes, but no platform_status frames are published yet; poll GET /api/platform/status for the freeze flag.
crypto_price_tick is keyed by instrument, not market symbol — one subscription per coin serves every crypto market on that asset. See Crypto price feeds.
Firehoses. all_trade_matches, all_trade_settlements, all_books and global_activity take no ids and carry every market on the platform. all_books in particular sends a full-depth book_update plus a book_delta for every book change; a client that can’t keep up is disconnected once its outbound buffer fills (resource limits). Token channels accept explicit token ids only — there is no * wildcard — and a connection that holds both token_book and all_books receives each frame once per sid. For an activity feed, global_activity sends one frame per trade instead of the two all_trade_matches sends for a binary trade.

tokenId and conditionId come from REST

Subscribe by on-chain native ids, never by app symbol.
Neg-risk (multi-outcome) events are listed as one market per question, and each question market carries its own conditionId, yesTokenId and noTokenId (also under outcomes[].tokenId) — subscribe with those. To go the other way, GET /api/markets/by-token/{id} and GET /api/markets/by-condition/{id} resolve a token or condition id back to its market.

Subscribe example

Subscribe response

Ids are normalized before the ack: market symbols (also inside market_price_tick ids) and crypto instrument ids come back lower-cased, so BTC-USD and btc-usd resolve to the same feed. The channels that take no ids (all_*, global_activity) are acknowledged without an ids field — { "sid": 19, "channel": "all_books" }.

Rejection codes

Commands

update_subscription / unsubscribe / list_subscriptions / ping.

Server events

Full event payload catalog per channel.