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.
Same X-Api-Key scheme as the rest of the API — no separate auth
scheme for market data:
How to send it
X-Api-Key: ps_live_<keyId>_<secret> header on the upgrade request
?key=<token> query parameter — for browser clients that can’t set custom headers on the WebSocket upgrade
Market channels do not require any specific scope — any active key
can subscribe. Missing or invalid keys are rejected at handshake with
4401 <reason> (same close-code matrix as
/ws/user). Revoking a
key closes every live socket bound to that keyId immediately via
Redis pub/sub.
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).
Live status:token_trade_matches, token_trade_settlements,
token_book, token_ohlc, and system push reliably today.
condition_lifecycle accepts subscribes but most events are not
yet emitted by upstream.
For neg-risk multi-outcome markets each question carries its own
conditionId; resolve outcome token ids through the on-chain
NegRiskAdapter before subscribing.
unknown channel, malformed tokenId / conditionId, missing required ids, or systemids not ["platform_status"]
forbidden
tried a private channel (user_orders, user_fills, vault_positions) on this gateway
subscription_cap_exceeded
connection already holds the maximum number of subscriptions (256)
subscription_too_many_ids
a single subscription / add_ids call exceeded the per-channel id cap (100). Message: "subscription accepts at most 100 ids". Split your ids across multiple subscriptions on the same connection.