hyperliquid_l2_book
Pack: hyperliquid · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/hyperliquid_l2_book for the schema, then POST the same URL with its arguments for the data.
The live bid/ask order book for one Hyperliquid market, from Hyperliquid’s own API.
Tool description as the model sees it
Live 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.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coin | string | 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 | number | 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. |
Example call
Arguments
{
"coin": "BTC",
"depth": 3
}
curl
curl -X POST https://gateway.pipeworx.io/hyperliquid/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hyperliquid_l2_book","arguments":{"coin":"BTC","depth":3}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('hyperliquid_l2_book', {
"coin": "BTC",
"depth": 3
});
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the hyperliquid pack
{
"mcpServers": {
"hyperliquid": {
"url": "https://gateway.pipeworx.io/hyperliquid/mcp"
}
}
}
See Getting Started for client-specific install steps.