Skip to main content
A market has one order book with two sides, each a list of price levels — an implied price and the total stake resting at it:
  • percentageOdds is implied probability scaled by 1020"52000000000000000000" is 52.000%.
  • size is stake in base units — USDC has 6 decimals, so "2000000" is 2 USDC. It is the resting party’s stake, not the amount you can bet against it.
Note that the side here is the side the resting order is betting. So if you were to match, you would be betting the opposite. To bet an outcome, you consume the orders resting on the other outcome. Someone resting on outcome one wants outcome one. They are not offering it to you. They offer outcome two instead, funded by their stake. Orders at the same odds collapse into one level. Each level sums the unfilled part of every order at that price. Levels are sorted by price, then time, then id.

Odds must sit on the ladder

percentageOdds on a new order must be on the ladder or the order will be rejected. Odds rounding has the full rules

Fetching the book

Both read the same book. Use best odds to simply get the best odds available on each side and the snapshot to size and price a bet.

Convert a level into what you can bet

A level’s size is the resting party’s stake. The stake you can put up against it is:
and the price you pay is 10^20 − percentageOdds. Do both calculations using BigInt. Examples:
Both produce:

Aggregate depth across a side

Levels are already aggregated by exact price, so a depth ladder is a running total.
Against the same book:

Staying up to date

Polling the snapshot works, but the book changes on every match, cancel and expiry. The channel orderbook_v3:{marketHash} sends immediate real-time updates. It carries the same book and the same version the snapshot route serves, and the exchange publishes one message per book change.
Each publication is a complete replacement for that market’s book, not a delta. To apply one, overwrite both arrays. The channel is always from the maker’s perspective The full seed-and-subscribe order is on Real-time. The version comparison is on Book versioning.

Posting orders

Sign and submit an order onto the book.

Fetching odds

Scanning many markets, and getting a live client its first snapshot.

Book versioning

Applying live updates in the right order.

Time in force

GTC, IOC, FOK — and what happens when there is not enough depth.
Last modified on August 11, 2026