Skip to main content
Glama

get_hip3_open_interest_history

Read-onlyIdempotent

Retrieve historical open interest snapshots for HIP-3 symbols over a specified time range. Supports multiple markets and aggregation intervals.

Instructions

Get HIP-3 open interest history over a time range. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns timestamped OI snapshots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesHIP-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.
startNoStart timestamp (Unix ms or ISO). Defaults to 24h ago.
endNoEnd timestamp (Unix ms or ISO). Defaults to now.
limitNoMax records to return (default 100, max 1000)
cursorNoPagination cursor from previous response's nextCursor
intervalNoAggregation interval. Omit for raw ~1 min data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordsYesArray of result records
countYesTotal number of records in the full result set
nextCursorNoCursor for next page, if more results available

Implementation Reference

  • The handler function for get_hip3_open_interest_history tool. It uses registerHistoryTool with Hip3CoinParam, normalizeHip3Coin, and an optional AggregationIntervalParam. The actual SDK call is api().hyperliquid.hip3.openInterest.history(coin, params).
    // 22. HIP-3 Open Interest History
    registerHistoryTool(
      "get_hip3_open_interest_history",
      "Get HIP-3 open interest history over a time range. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns timestamped OI snapshots.",
      (coin, params) =>
        api().hyperliquid.hip3.openInterest.history(coin, params as any),
      Hip3CoinParam,
      normalizeHip3Coin,
      { interval: AggregationIntervalParam }
    );
  • src/index.ts:408-438 (registration)
    The registerHistoryTool function (Pattern 4) that registers the tool on the MCP server. It builds the input schema with coin, HistoryParams, and any extraSchema, resolves time ranges and limits, calls the SDK, and formats the cursor response.
    function registerHistoryTool(
      name: string,
      description: string,
      sdkCall: (coin: string, params: Record<string, unknown>) => Promise<{ data: unknown; nextCursor?: string }>,
      coinSchema: z.ZodString,
      normFn: (coin: string) => string,
      extraSchema?: ZodRawShape
    ): void {
      const schema: ZodRawShape = { coin: coinSchema, ...HistoryParams };
      if (extraSchema) Object.assign(schema, extraSchema);
    
      registerTool(name, description, schema, ListOutputSchema, async (params) => {
        const { coin, start, end, limit, cursor, ...extra } = params;
    
        const timeRange = resolveTimeRange(start, end);
        const sdkParams: Record<string, unknown> = {
          ...timeRange,
          limit: resolveLimit(limit),
        };
    
        if (cursor) sdkParams.cursor = cursor;
    
        // Pass through extra params (interval, side, etc.)
        for (const [k, v] of Object.entries(extra)) {
          if (v !== undefined) sdkParams[k] = v;
        }
    
        const result = await sdkCall(normFn(coin), sdkParams);
        return formatCursorResponse(result);
      });
    }
  • The Hip3CoinParam schema used for the 'coin' input parameter. Defines HIP-3 coin symbols as case-sensitive strings with documentation about available markets.
    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."
      );
  • The AggregationIntervalParam schema used for the optional 'interval' parameter on this tool.
    const AggregationIntervalParam = z
      .enum(["5m", "15m", "30m", "1h", "4h", "1d"])
      .optional()
      .describe("Aggregation interval. Omit for raw ~1 min data.");
  • The normalizeHip3Coin helper function that normalizes HIP-3 coin symbols (case-sensitive, so identity function).
    function normalizeHip3Coin(coin: string): string {
      return coin; // Case-sensitive
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true. The description adds that it returns 'timestamped OI snapshots' and mentions time range and aggregation, providing behavioral context beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no filler. The primary purpose is front-loaded, and each sentence adds essential information (purpose, case-sensitivity, reference to instrument listing). Perfectly sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given high schema coverage, presence of output schema, and annotations, the description covers all necessary aspects: what it does, key constraints (case-sensitivity), and a pointer to related tool for enumeration. No gaps for a tool of moderate complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so description does not need to add extensive parameter details. It reiterates case-sensitivity and gives examples, which adds marginal value. Baseline 3 is appropriate; no significant additional semantic enrichment.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Get HIP-3 open interest history over a time range', identifying the specific resource (HIP-3 open interest) and action (history retrieval). The mention of case-sensitive symbols and examples further clarifies scope, differentiating it from sibling tools like get_open_interest_history and get_hip3_open_interest.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides guidance on symbol case-sensitivity and examples, and references get_hip3_instruments for a full list. However, does not explicitly contrast with other open interest history tools (e.g., get_open_interest_history for non-HIP-3), though the naming implies the context. Still, sufficient for an agent to determine proper use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xArchiveIO/0xarchive-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server