fetchOrderBook
Retrieve live or historical order book snapshots for any prediction market outcome, with support for range queries and compact summaries.
Instructions
Fetch the order book (bids/asks) for a specific outcome. Supports live and historical queries. For historical data, pass since to get a single snapshot, or since + until to get an array of fully reconstructed L2 books from the archive. Range queries return up to limit snapshots (default 100, max 1000).
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": {
"exchange": "<exchange>",
"outcomeId": "<outcomeId>"
},
"name": "fetchOrderBook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | Yes | The prediction market exchange to target. | |
| outcomeId | Yes | ||
| limit | No | ||
| side | No | Outcome side: 'yes' or 'no'. Required for exchanges like Limitless where the API returns a single orderbook per market. | |
| outcome | No | Outcome alias: 'yes' or 'no', or an outcome token ID. When set, the first argument is treated as a market ID and this value selects which outcome's order book to fetch. Accepts the literal strings 'yes'/'no' (resolved via a market lookup) or a raw outcome token ID. | |
| since | No | Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with `until` (hosted API only). | |
| until | No | Unix timestamp (ms) — end of a historical range. When combined with `since`, returns an array of reconstructed L2 OrderBook snapshots between `since` and `until` (hosted API only). | |
| verbose | No | Return full uncompacted response. Default false returns a compact, agent-friendly summary. |