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.
Snapshot
Live updates
For real-time book updates use the WebSocketorderbook channel.
See WebSocket messages.
The snapshot carries a seq field; subsequent WS deltas carry an
incrementing seq. If your local copy drifts, request a fresh
snapshot.
Reconciliation with the WebSocket feed
Thehash field is a canonical 16-hex SHA-256 prefix over the
(bids, asks) pair — price + quantity only, computed by both
core-api (on this response) and ws-gateway (on book_snapshot and
book_update envelopes). For the same logical book state the two
sides produce identical hashes.
Typical reconciliation flow:
- Open the WebSocket and subscribe to
token_bookfor the tokenId you care about. - Buffer incoming
book_snapshot/book_updateframes keyed by their envelopeseq. - Call
GET /api/markets/{symbol}/orderbookand read the responsehash. - Walk the buffered WS frames to find one with a matching
hash— thatseqis your alignment point; drop earlier frames, apply later ones onto the REST snapshot. - From there each
book_updateyou apply must produce the samehashas the envelope. If they ever diverge, issueget_book_snapshotto force a fresh server-side snapshot and restart alignment.
count is excluded from the hash on both sides, so an aggregated
REST response (no count) and a book_snapshot.data (with count)
produce the same hash for the same (bids, asks).
Cross-reference
The orderbook is the matcher’s view of resting orders. For your own orders, always cross-reference withGET /api/me/orders/open — that
is authoritative from PG.