Skip to main content

Sequence Handling

Each subscribed market stream includes a server_seq:
  1. you receive a snapshot at sequence N
  2. deltas should arrive as N+1, N+2, and so on
  3. if you observe a gap, send a resync request for that market

Book State

StateMeaning
freshData is current
staleNo update arrived within stale_after_ms
needs_refreshRequest a resync immediately

Feed State

StateMeaning
healthyExchange feed is healthy
degradedPartial connectivity or delayed data
disconnectedNo active upstream feed

When to Resync

Request a full snapshot when:
  • you detect a sequence gap
  • the server sends resync_required
  • the local book has gone stale or inconsistent
The next orderbook snapshot re-establishes the full book state.

WebSocket Error Codes

CodeTypeDescription
1001auth_requiredAuthentication required or duplicate auth attempt
1002auth_invalidInvalid API key or terminal token
2001invalid_marketInvalid message shape or malformed market selector
2002market_not_foundMarket does not exist
2003exchange_unavailableExchange stream unavailable
2005invalid_outcomeInvalid outcome value
3001rate_limitedSubscribe / unsubscribe / resync rate limit exceeded
3002max_subscriptionsSubscription limit reached for your tier

Limits

LimitFreeProScale
Max subscriptions35002,000
Max orderbook depth10 levels/side100 levels/side100 levels/side
Default orderbook depth50, clamped to tier max5050
Subscribe / unsubscribe / resync rate3 req/sec3 req/sec3 req/sec
Auth timeout15 sec15 sec15 sec
When you exceed the subscription limit, the server returns:
{ "type": "error", "code": 3002, "message": "max subscriptions reached (limit: 3, tier: free)" }

Supported Exchanges

ExchangeOrderbookTradesFills
PolymarketStreamingStreamingStreaming
KalshiStreamingStreamingStreaming
LimitlessStreamingNoNo
OpinionPolling-backedNoNo
Predict.funPolling-backedNoNo