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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| marketAppId | Yes | The market app ID (number) |