get_summary
Retrieve a combined market summary for any cryptocurrency coin, including mark price, oracle price, funding rate, open interest, 24h volume, and 24h liquidation volumes in a single call.
Instructions
Get combined market summary for a coin in a single call. Returns mark price, oracle price, funding rate, open interest, 24h volume, and 24h liquidation volumes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Coin/market symbol, e.g. 'BTC', 'ETH', 'SOL' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Result data object |
Implementation Reference
- src/index.ts:613-619 (registration)Registration of the 'get_summary' tool via registerCurrentTool helper. The handler delegates to api().hyperliquid.summary(coin) for a combined Hyperliquid market summary.
registerCurrentTool( "get_summary", "Get combined market summary for a coin in a single call. Returns mark price, oracle price, funding rate, open interest, 24h volume, and 24h liquidation volumes.", (coin) => api().hyperliquid.summary(coin), CoinParam, normalizeHLCoin ); - src/index.ts:372-384 (helper)The registerCurrentTool helper function that wraps the actual handler logic for get_summary. It takes a coin parameter, normalizes it, calls the SDK's summary function, and formats the response using formatResponse with ObjectOutputSchema.
// Pattern 2: Current snapshot (coin only) function registerCurrentTool( name: string, description: string, sdkCall: (coin: string) => Promise<unknown>, coinSchema: z.ZodString, normFn: (coin: string) => string ): void { registerTool(name, description, { coin: coinSchema }, ObjectOutputSchema, async (params) => { const data = await sdkCall(normFn(params.coin)); return formatResponse(data); }); } - src/index.ts:53-55 (schema)Input schema (CoinParam) for the coin parameter used by get_summary tool.
const CoinParam = z .string() .describe("Coin/market symbol, e.g. 'BTC', 'ETH', 'SOL'"); - src/index.ts:139-141 (schema)Output schema (ObjectOutputSchema) for get_summary, which returns a single result object.
const ObjectOutputSchema: ZodRawShape = { data: z.record(z.unknown()).describe("Result data object"), };