user_orders, user_fills, vault_positions) on
this gateway returns { "code": "forbidden" } in the rejected[]
array — use /ws/user for
own-activity streams.
Authentication
SameX-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.tokenId and conditionId come from REST
Subscribe by on-chain native ids, never by app symbol.
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
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
Related
Commands
update_subscription / unsubscribe / list_subscriptions / ping.
Server events
Full event payload catalog per channel.