get_order_book
Fetch live L2 bids and asks for a coin, and optionally simulate a sized market order to see average fill, worst price, slippage %, and unfilled amount before large entries or exits.
Instructions
Get the live L2 order book for one coin: levels [bids, asks], up to 20 each, every level {px, sz, n orders}. Give size (in coins) or notional_usd, not both, to also walk the book for a market order of that size: average fill, worst price, slippage % and any unfilled amount; is_buy picks the side (default buy). Use before a large entry or exit to judge slippage. For the mid price alone use get_market. Read-only; needs no key. Returns {coin, time, levels}, or {book, impact: {avg_fill_px, worst_px, slippage_pct, filled_usd, unfilled_usd, book_exhausted}} when a size is given; an unknown coin returns {error}.
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": {
"coin": "<coin>"
},
"name": "get_order_book"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Coin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL). | |
| size | No | Order size in coins to simulate (or use notional_usd). | |
| is_buy | No | Side of the simulated order (default true: buy). | |
| notional_usd | No | Order size in USD to simulate (or use size). |