Skip to main content
Market-data gateway. Use for the public trade tape (matcher + chain settlements), orderbook snapshots + deltas, OHLC candles, market lifecycle, and the platform-wide status banner. 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 (or an invalid Privy bearer) is rejected at handshake with 4401 <reason> (same close-code matrix as /ws/user): supplying credentials commits the handshake to that path. Revoking a key closes every live socket bound to that keyId immediately via Redis pub/sub. 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. Use a key anyway when you have one: rate-limit ceilings and partner attribution are keyed to it.

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 Privy flows).

Available channels

See Server events for full payload shapes per type.
Live status: token_trade_matches, token_trade_settlements, token_book, token_ohlc, market_lifecycle, crypto_price_tick, and system push reliably today. condition_lifecycle accepts subscribes but most events are not yet emitted by upstream.
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.

tokenId and conditionId come from REST

Subscribe by on-chain native ids, never by app symbol.
For neg-risk multi-outcome markets each question carries its own conditionId; resolve outcome token ids through the on-chain NegRiskAdapter before subscribing.

Subscribe example

Subscribe response

Ids are normalized before the ack: market symbols and crypto instrument ids come back lower-cased, so BTC-USD and btc-usd resolve to the same feed.

Rejection codes

Commands

update_subscription / unsubscribe / list_subscriptions / ping.

Server events

Full event payload catalog per channel.