get_hip3_funding_current
Retrieve the current HIP-3 funding rate for any coin symbol to assess real-time funding costs.
Instructions
Get the current HIP-3 funding rate for a coin. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns the latest funding rate and 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Result data object |
Implementation Reference
- src/index.ts:711-717 (registration)Registration of the 'get_hip3_funding_current' tool using registerCurrentTool pattern. It takes a HIP-3 coin symbol (case-sensitive), calls api().hyperliquid.hip3.funding.current(coin), uses Hip3CoinParam for input schema, normalizeHip3Coin for normalization, and ObjectOutputSchema for output.
registerCurrentTool( "get_hip3_funding_current", "Get the current HIP-3 funding rate for a coin. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns the latest funding rate and timestamp.", (coin) => api().hyperliquid.hip3.funding.current(coin), Hip3CoinParam, normalizeHip3Coin ); - src/index.ts:373-383 (handler)Handler logic via registerCurrentTool helper. This is the generic 'current snapshot' pattern that wraps the SDK call with coin normalization and response formatting. For get_hip3_funding_current, the SDK call is api().hyperliquid.hip3.funding.current(coin).
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:300-301 (helper)Coin normalization helper for HIP-3 symbols. Returns the coin as-is because HIP-3 symbols are case-sensitive.
function normalizeHip3Coin(coin: string): string { return coin; // Case-sensitive - src/index.ts:57-61 (schema)Input schema (Hip3CoinParam) used by get_hip3_funding_current. A case-sensitive string parameter describing HIP-3 coin symbols.
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:139-141 (schema)Output schema (ObjectOutputSchema) used by get_hip3_funding_current. Returns a single result object.
const ObjectOutputSchema: ZodRawShape = { data: z.record(z.unknown()).describe("Result data object"), };