Market data and WebSocket
Market data and WebSocket
REST reads
Use REST for initial page state and historical queries.
| Need | Endpoint |
|---|---|
| Runtime flags | GET /v1/runtime-config |
| Scalar assets | GET /v1/markets |
| Scalar bucket | GET /v1/bucket |
| Scalar book | GET /v1/book?asset=NYCTMP1 |
| Scalar ticker | GET /v1/ticker?asset=NYCTMP1 |
| Binary status | GET /v1/binary/status |
| Binary assets | GET /v1/binary/markets |
| Outcome list | GET /v1/outcomes/meta |
| Outcome price history | GET /v1/outcomes/price-history |
Outcome reads are separate from writes. Check /v1/runtime-config before
showing outcome flows; when outcomes are disabled, outcome routes are
unavailable.
If a market family is unavailable, expect 404 or 503. If access is gated, expect 401 or 403.
WebSocket
Connect to:
wss://{HOST}/v1/ws
/ws is an alias.
When waitlist access is enabled, authenticate with
Authorization: Bearer <jwt> on the WebSocket upgrade. Use ?token=<jwt> only
when the client platform cannot set headers. URL tokens must be short-lived,
scoped to WebSocket use when possible, and redacted from logs and telemetry.
Subscribe
Scalar channels:
{
"type": "subscribe",
"channels": ["book", "trades", "activeAssetCtx"],
"coins": ["NYCTMP1", "NYCTMP2"]
}
Outcome channels (subscriptions are scoped per network):
{
"type": "subscribe",
"channels": ["outcomePrices", "outcomeBook", "outcomeTrades"],
"coins": ["#36010"],
"network": "mainnet"
}
network is optional for backwards compatibility; when omitted the server
routes to the configured outcome default (see /v1/runtime-config's
default_outcome_network). Use outcome coin names from /v1/outcomes/meta.
The server replies with enveloped, network-scoped messages:
{ "channel": "outcomePrices", "network": "mainnet", "data": { "#36010": "0.62" }, "last_update_ts": 1712764800000 }
Unsubscribe
{
"type": "unsubscribe",
"channels": ["book"],
"coins": ["NYCTMP1"]
}
Outcome unsubscribes mirror the subscribe shape and accept an optional
network field that defaults to the configured outcome default.
Client behavior
- Keep a REST fallback for first load and reconnects.
- Treat missing, stale, or delayed data as a real state. Show it; do not guess.
- Use
activeAssetCtxto update displayed mark and active/delisted state. - Use bucket endpoints for countdowns, not local assumptions.
- Reconnect with backoff. Do not reconnect in a tight loop.
TradingView data
TradingView-compatible endpoints are available under /tv/*.
Binary mark chart endpoints use /tv-mark/* when binary mode is active.
API reference
This is the public route map, grouped by capability. Each route lists the authentication it requires, and every path is relative to the base URL for your environment.
Errors and limits
Normal API errors use application/problem+json. Missing routes and routes hidden by the active market mode may return a plain text 404 Not found.