get_hip3_l2_orderbook
Retrieve the full-depth L2 orderbook for HIP-3 markets, aggregated from L4 data. Supports historical timestamps and configurable depth for 125+ markets.
Instructions
Get HIP-3 L2 full-depth orderbook (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns aggregated price levels. Derived from L4 data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | HIP-3 coin symbol (CASE-SENSITIVE). 125+ markets across 6 builders: xyz, flx, hyna, km, vntl, cash. Examples: 'km:US500', 'xyz:GOLD', 'hyna:BTC', 'vntl:SPACEX', 'flx:TSLA', 'cash:NVDA'. Use get_hip3_instruments to list all. | |
| timestamp | No | Timestamp for historical state (Unix ms or ISO). Omit for current. | |
| depth | No | Orderbook depth — number of price levels per side |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Result data object |
Implementation Reference
- src/index.ts:1265-1284 (registration)Tool registration for 'get_hip3_l2_orderbook' — registers the tool with the MCP server with input schema (coin, optional timestamp, optional depth) and calls api().hyperliquid.hip3.l2Orderbook.get()
registerTool( "get_hip3_l2_orderbook", "Get HIP-3 L2 full-depth orderbook (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns aggregated price levels. Derived from L4 data.", { coin: Hip3CoinParam, timestamp: TimestampParam.describe("Timestamp for historical state (Unix ms or ISO). Omit for current.").optional(), depth: DepthParam, }, ObjectOutputSchema, async (params) => { const sdkParams: Record<string, unknown> = {}; if (params.timestamp != null) sdkParams.timestamp = toUnixMs(params.timestamp); if (params.depth) sdkParams.depth = params.depth; const data = await api().hyperliquid.hip3.l2Orderbook.get( normalizeHip3Coin(params.coin), sdkParams as any ); return formatResponse(data); } ); - src/index.ts:1274-1283 (handler)Handler function for get_hip3_l2_orderbook — normalizes the HIP-3 coin, builds SDK params with optional timestamp and depth, then calls the SDK's l2Orderbook.get() method
async (params) => { const sdkParams: Record<string, unknown> = {}; if (params.timestamp != null) sdkParams.timestamp = toUnixMs(params.timestamp); if (params.depth) sdkParams.depth = params.depth; const data = await api().hyperliquid.hip3.l2Orderbook.get( normalizeHip3Coin(params.coin), sdkParams as any ); return formatResponse(data); } - src/index.ts:1268-1272 (schema)Input schema for get_hip3_l2_orderbook: coin (Hip3CoinParam, case-sensitive), optional timestamp (Unix ms or ISO), optional depth (number of price levels)
{ coin: Hip3CoinParam, timestamp: TimestampParam.describe("Timestamp for historical state (Unix ms or ISO). Omit for current.").optional(), depth: DepthParam, }, - src/index.ts:57-61 (helper)Hip3CoinParam schema definition used by get_hip3_l2_orderbook for coin validation
const Hip3CoinParam = z .string() .describe( "HIP-3 coin symbol (CASE-SENSITIVE). 125+ markets across 6 builders: xyz, flx, hyna, km, vntl, cash. Examples: 'km:US500', 'xyz:GOLD', 'hyna:BTC', 'vntl:SPACEX', 'flx:TSLA', 'cash:NVDA'. Use get_hip3_instruments to list all." ); - src/index.ts:300-302 (helper)normalizeHip3Coin helper function used by get_hip3_l2_orderbook to preserve case-sensitive HIP-3 coin symbols
function normalizeHip3Coin(coin: string): string { return coin; // Case-sensitive }