Get order book
get_order_bookRetrieve a market’s bid and ask price levels, cumulative totals, last trade, and 24-hour volume to assess liquidity and slippage before placing an order.
Instructions
Returns the order book of one market: resting bid levels (best price first, highest) and ask levels (best price first, lowest), each with the price (0 to 1), shares and amount at that level and the cumulative totals from the best price, plus the last trade price/time and 24-hour volume and trade count. Takes a MARKET id (an item of an event's markets), not an event id. Use it to judge liquidity and slippage before placing an order; only the best levels levels per side are returned, with *_levels_total giving the full depth.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "get_order_book"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Market id, from the `markets` of get_markets or get_market_details. | |
| levels | No | How many price levels to return per side, 1 to 100. Default 10. | |
| position | No | Which side of the market to view: "long" (default) or "short". Short prices are 1 minus long prices. | long |
| currency_mode | No | "play_money" (default, OOM) or "real_money" (USDC/USDT) book. | play_money |