get_orderbook
Retrieve a unified YES-perspective orderbook for any prediction market, merging all bid and ask sides while calculating the current spread.
Instructions
Fetch the on-chain orderbook as a unified YES-perspective view. Merges all 4 sides (YES bids/asks + NO bids/asks) into a single book: NO bids become YES asks at $(1-X), NO asks become YES bids at $(1-X). Asks sorted low-to-high, bids sorted high-to-low. Includes spread calculation.
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": {
"marketAppId": "<marketAppId>"
},
"name": "get_orderbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| marketAppId | Yes | The market app ID (number) |