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:
{
"type": "subscribe",
"channels": ["outcomePrices", "outcomeBook", "outcomeTrades"],
"coins": ["#36010"]
}
Use outcome coin names from /v1/outcomes/meta.
Unsubscribe
{
"type": "unsubscribe",
"channels": ["book"],
"coins": ["NYCTMP1"]
}
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. The generated OpenAPI spec may include internal or admin routes until a filtered public spec is published. Where generated specs and the router differ, this page follows the public router behavior.
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.