get_hip3_l4_orderbook
Retrieve a full level-4 orderbook snapshot for a HIP-3 coin at a specific timestamp, supporting 125+ markets across multiple builders. Requires Pro+ tier.
Instructions
Get HIP-3 L4 orderbook reconstruction (Pro+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns full order-level orderbook at a specific timestamp.
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 orderbook reconstruction (Unix ms or ISO) | |
| 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:1218-1238 (registration)Registration of the 'get_hip3_l4_orderbook' tool. Defines input schema (coin, timestamp, depth), output schema (ObjectOutputSchema), and the handler that calls api().hyperliquid.hip3.l4Orderbook.get().
// HIP-3 L4 Orderbook Reconstruction registerTool( "get_hip3_l4_orderbook", "Get HIP-3 L4 orderbook reconstruction (Pro+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns full order-level orderbook at a specific timestamp.", { coin: Hip3CoinParam, timestamp: TimestampParam.describe("Timestamp for orderbook reconstruction (Unix ms or ISO)"), 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.l4Orderbook.get( normalizeHip3Coin(params.coin), sdkParams as any ); return formatResponse(data); } ); - src/index.ts:1228-1237 (handler)Handler function for get_hip3_l4_orderbook. Builds SDK params from timestamp and depth, calls hyperliquid.hip3.l4Orderbook.get() with the normalized coin, and formats the response.
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.l4Orderbook.get( normalizeHip3Coin(params.coin), sdkParams as any ); return formatResponse(data); } - src/index.ts:1222-1227 (schema)Input schema: Hip3CoinParam (case-sensitive HIP-3 coin symbol), timestamp (required, for reconstruction), and optional depth parameter.
{ coin: Hip3CoinParam, timestamp: TimestampParam.describe("Timestamp for orderbook reconstruction (Unix ms or ISO)"), depth: DepthParam, }, ObjectOutputSchema, - src/index.ts:139-141 (schema)Output schema used by the tool - returns a single result data object.
const ObjectOutputSchema: ZodRawShape = { data: z.record(z.unknown()).describe("Result data object"), };