Skip to main content
Glama

get_hip3_l4_diffs

Read-onlyIdempotent

Retrieve raw order-level changes (diffs) for HIP-3 L4 orderbooks over a specified time range. Supports case-sensitive coin symbols across 125+ markets.

Instructions

Get HIP-3 L4 orderbook diffs (Pro+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns raw order-level changes over a time range.

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

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

  • Registration & handler for 'get_hip3_l4_diffs' tool. Uses the registerHistoryTool helper pattern. The actual handler is an inline arrow function that calls api().hyperliquid.hip3.l4Orderbook.diffs(coin, params).
    registerHistoryTool(
      "get_hip3_l4_diffs",
      "Get HIP-3 L4 orderbook diffs (Pro+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns raw order-level changes over a time range.",
      (coin, params) =>
        api().hyperliquid.hip3.l4Orderbook.diffs(coin, params as any),
      Hip3CoinParam,
      normalizeHip3Coin
    );
  • src/index.ts:1241-1248 (registration)
    Registration via registerHistoryTool helper. The tool is registered under the name 'get_hip3_l4_diffs' with description, input schema (Hip3CoinParam + HistoryParams), output schema (ListOutputSchema), and async handler.
    registerHistoryTool(
      "get_hip3_l4_diffs",
      "Get HIP-3 L4 orderbook diffs (Pro+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns raw order-level changes over a time range.",
      (coin, params) =>
        api().hyperliquid.hip3.l4Orderbook.diffs(coin, params as any),
      Hip3CoinParam,
      normalizeHip3Coin
    );
  • Input schema for the 'coin' parameter — a case-sensitive HIP-3 coin symbol string.
    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."
      );
  • Input schema for optional pagination cursor, included via HistoryParams spread.
    .optional()
    .describe("Pagination cursor from previous response's nextCursor");
  • Generic helper 'registerHistoryTool' used by get_hip3_l4_diffs. It builds the combined input schema (coin + history params + extra), constructs SDK params with time range resolution, and calls the provided sdkCall function.
    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);
      });
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds useful behavioral traits: Pro+ tier requirement and case-sensitive symbols. It does not mention rate limits or pagination behavior, but with annotations present, the bar is lower.

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 sentences with no wasted words. First sentence covers purpose and tier, second adds critical usage detail (case-sensitivity) and what is returned. Perfectly front-loaded.

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

Completeness4/5

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

Given the presence of an output schema and rich annotations, the description covers the essentials: purpose, tier, case-sensitivity, time range. However, it omits mention of pagination (cursor parameter) and does not clarify how 'diffs' differ from full snapshots. Minor gap but sufficient for a well-annotated, schema-rich tool.

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% with well-described parameters. The description adds the 'Pro+ tier' context and reinforces case-sensitivity with examples, but does not significantly augment the parameter meanings beyond what the schema provides. Hence baseline 3.

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?

The description clearly states the verb ('Get'), resource ('HIP-3 L4 orderbook diffs'), and scope ('over a time range'). It distinguishes from siblings like get_hip3_l4_orderbook (full snapshot) and get_hip3_l4_orderbook_history (historical snapshots) by focusing on incremental changes.

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?

It provides clear context: Pro+ tier requirement, case-sensitive symbols, examples, and a reference to get_hip3_instruments for listing symbols. However, it does not explicitly contrast with alternatives like get_hip3_l4_orderbook or get_l4_diffs, leaving some guesswork for the agent about when exactly to choose this tool.

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