prediction-orderbook message carries a full snapshot of a market’s order
book. It is not a delta — each message replaces your view entirely.
Subscribe
Fields
Each entry in
yesBids and noBids is a price level:
Example
Both sides are bids
There is no ask ladder. The book is expressed as two bid ladders, because a buy-NO order is an offer to sell YES.noBids is derived from the internal book as 100 − ask_price. To reconstruct
a conventional YES book:
So a NO bid at 37¢ is equivalent to a YES ask at 63¢.
This is why the two ladders do not overlap. If the best
yesBids price were
62 and the best noBids price were 39, that would imply a YES bid of 62 and a
YES ask of 61 — a crossed book, which the engine would have matched.Notes
- Replace, don’t merge. Every message is a complete snapshot. Discard your previous book and apply the new one wholesale.
- Do not rely on level ordering. The ladders are passed through in the
order the engine emits them. Sort by
priceyourself — descending foryesBids, descending fornoBids— rather than assuming[0]is the best level. - A price level absent from the snapshot has no resting size. There are no explicit zero-size entries to process.
- Snapshots are published on change, not on a fixed interval. A quiet market may go a long time between messages — that is not a stall.