Hyperliquid L2 Book
hyperliquid_l2_bookLive level-2 order book (bids + asks, each with price, aggregate size, and order count) for one Hyperliquid perp or spot symbol, from Hyperliquid's public info API ({"type":"l2Book"}). Returns two arrays — bids (best first, descending price) and asks (best first, ascending price) — each entry {px, sz, n}. Use depth to trim to the top N levels per side; Hyperliquid itself returns the full book (often 20+ levels per side) when depth is omitted.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"coin": "BTC",
"depth": 3
},
"name": "hyperliquid_l2_book"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Perp symbol (e.g. "BTC") or spot pair id (e.g. "@0" from hyperliquid_spot_meta, or the canonical name like "PURR/USDC"). | |
| depth | No | Levels to keep per side, best-first (default: all levels Hyperliquid returns, typically 20+). Pass e.g. 5 for just the top of book. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asks | No | ||
| bids | No | ||
| coin | No | ||
| time | No | ||
| as_of | No | ||
| found | No | ||
| fields | No | ||
| source | No | ||
| asks_levels_available | No | ||
| bids_levels_available | No |