Sequence Handling
Each subscribed market stream includes aserver_seq:
- you receive a snapshot at sequence
N - deltas should arrive as
N+1,N+2, and so on - if you observe a gap, send a
resyncrequest for that market
Book State
| State | Meaning |
|---|---|
fresh | Data is current |
stale | No update arrived within stale_after_ms |
needs_refresh | Request a resync immediately |
Feed State
| State | Meaning |
|---|---|
healthy | Exchange feed is healthy |
degraded | Partial connectivity or delayed data |
disconnected | No 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
orderbook snapshot re-establishes the full book state.
WebSocket Error Codes
| Code | Type | Description |
|---|---|---|
1001 | auth_required | Authentication required or duplicate auth attempt |
1002 | auth_invalid | Invalid API key or terminal token |
2001 | invalid_market | Invalid message shape or malformed market selector |
2002 | market_not_found | Market does not exist |
2003 | exchange_unavailable | Exchange stream unavailable |
2005 | invalid_outcome | Invalid outcome value |
3001 | rate_limited | Subscribe / unsubscribe / resync rate limit exceeded |
3002 | max_subscriptions | Subscription limit reached for your tier |
Limits
| Limit | Free | Pro | Scale |
|---|---|---|---|
| Max subscriptions | 3 | 500 | 2,000 |
| Max orderbook depth | 10 levels/side | 100 levels/side | 100 levels/side |
| Default orderbook depth | 50, clamped to tier max | 50 | 50 |
| Subscribe / unsubscribe / resync rate | 3 req/sec | 3 req/sec | 3 req/sec |
| Auth timeout | 15 sec | 15 sec | 15 sec |
Supported Exchanges
| Exchange | Orderbook | Trades | Fills |
|---|---|---|---|
| Polymarket | Streaming | Streaming | Streaming |
| Kalshi | Streaming | Streaming | Streaming |
| Limitless | Streaming | No | No |
| Opinion | Polling-backed | No | No |
| Predict.fun | Polling-backed | No | No |