live_oi_history
Fetch historical open interest for Hyperliquid coins or global OI to detect accumulation, distribution, and market conviction shifts.
Instructions
Get historical open interest data for any coin on Hyperliquid, or global OI across all coins. Best for identifying accumulation/distribution phases, market conviction shifts, and whether a move was backed by positioning. Default 7 days, max 30 days.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useToonFormat | No | Return data in compact toon format (default: true). Set to false for standard JSON. | |
| coin | No | Coin symbol (e.g. BTC, ETH, SOL). Omit for global OI across all coins. | |
| hours | No | Number of hours of history (default 168 = 7 days, max 720 = 30 days) |
Implementation Reference
- src/index.ts:1003-1019 (registration)Registration of the 'live_oi_history' tool with the MCP server, including input schema definition for optional 'coin' (string) and 'hours' (number, default 168) parameters.
if (shouldRegister("live_oi_history")) server.registerTool( "live_oi_history", { description: "Get historical open interest data for any coin on Hyperliquid, or global OI across all coins. Best for identifying accumulation/distribution phases, market conviction shifts, and whether a move was backed by positioning. Default 7 days, max 30 days.", inputSchema: { useToonFormat: useToonFormatSchema, coin: z.string().optional().describe("Coin symbol (e.g. BTC, ETH, SOL). Omit for global OI across all coins."), hours: z.number().min(1).max(720).default(168).describe("Number of hours of history (default 168 = 7 days, max 720 = 30 days)"), }, }, async ({ useToonFormat, coin, hours }) => { if (coin) { return toolResult(await callAPI(useToonFormat, `/live/oi-history/${coin.toUpperCase()}`, { hours: String(hours) })); } return toolResult(await callAPI(useToonFormat, "/live/oi-history", { hours: String(hours) })); } ); - src/index.ts:1013-1018 (handler)Handler function for 'live_oi_history'. Calls the API at '/live/oi-history/{COIN}' if a coin is specified, otherwise calls '/live/oi-history' for global OI data. Delegates to the shared callAPI helper with retry/timeout logic.
async ({ useToonFormat, coin, hours }) => { if (coin) { return toolResult(await callAPI(useToonFormat, `/live/oi-history/${coin.toUpperCase()}`, { hours: String(hours) })); } return toolResult(await callAPI(useToonFormat, "/live/oi-history", { hours: String(hours) })); } - src/index.ts:1007-1011 (schema)Input schema for live_oi_history tool: optional 'coin' (string, e.g. BTC, ETH) and 'hours' (number, 1-720, default 168/7days) using Zod validation.
inputSchema: { useToonFormat: useToonFormatSchema, coin: z.string().optional().describe("Coin symbol (e.g. BTC, ETH, SOL). Omit for global OI across all coins."), hours: z.number().min(1).max(720).default(168).describe("Number of hours of history (default 168 = 7 days, max 720 = 30 days)"), },