Documentation Index
Fetch the complete documentation index at: https://docs.adipredictstreet.com/llms.txt
Use this file to discover all available pages before exploring further.
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:
| 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 |
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.
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
| Channel | ids shape | Server pushes |
|---|---|---|
token_trade_matches | one or more tokenId (decimal string) | trade_matched per matcher fill |
token_trade_settlements | one or more tokenId (decimal string) | trade_settled on chain OrderFilled |
token_book | one or more tokenId (decimal string) | book_snapshot (depth 100) on subscribe, then book_update / book_delta; book_snapshot_failed on snapshot fetch errors |
token_ohlc | one or more tokenId | ohlc_update (interval: "s5") |
condition_lifecycle | one or more conditionId (lowercased bytes32 hex) | market_paused / market_unpaused / market_resolved / market_status |
system | must be ["platform_status"] | platform_status (frozen / maintenance banner) |
type.
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.tokenId and conditionId come from REST
Subscribe by on-chain native ids, never by app symbol.
conditionId; resolve outcome token ids through the on-chain
NegRiskAdapter before subscribing.
Subscribe example
Subscribe response
Rejection codes
code | When |
|---|---|
invalid_params | unknown channel, malformed tokenId / conditionId, missing required ids, or system ids 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. |
Related
Commands
update_subscription / unsubscribe / list_subscriptions / ping.
Server events
Full event payload catalog per channel.