Skip to main content
Glama

get_hip3_l2_orderbook

Read-onlyIdempotent

Retrieve the full-depth L2 orderbook for HIP-3 markets, aggregated from L4 data. Supports historical timestamps and configurable depth for 125+ markets.

Instructions

Get HIP-3 L2 full-depth orderbook (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns aggregated price levels. Derived from L4 data.

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.
timestampNoTimestamp for historical state (Unix ms or ISO). Omit for current.
depthNoOrderbook depth — number of price levels per side

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • src/index.ts:1265-1284 (registration)
    Tool registration for 'get_hip3_l2_orderbook' — registers the tool with the MCP server with input schema (coin, optional timestamp, optional depth) and calls api().hyperliquid.hip3.l2Orderbook.get()
    registerTool(
      "get_hip3_l2_orderbook",
      "Get HIP-3 L2 full-depth orderbook (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns aggregated price levels. Derived from L4 data.",
      {
        coin: Hip3CoinParam,
        timestamp: TimestampParam.describe("Timestamp for historical state (Unix ms or ISO). Omit for current.").optional(),
        depth: DepthParam,
      },
      ObjectOutputSchema,
      async (params) => {
        const sdkParams: Record<string, unknown> = {};
        if (params.timestamp != null) sdkParams.timestamp = toUnixMs(params.timestamp);
        if (params.depth) sdkParams.depth = params.depth;
        const data = await api().hyperliquid.hip3.l2Orderbook.get(
          normalizeHip3Coin(params.coin),
          sdkParams as any
        );
        return formatResponse(data);
      }
    );
  • Handler function for get_hip3_l2_orderbook — normalizes the HIP-3 coin, builds SDK params with optional timestamp and depth, then calls the SDK's l2Orderbook.get() method
    async (params) => {
      const sdkParams: Record<string, unknown> = {};
      if (params.timestamp != null) sdkParams.timestamp = toUnixMs(params.timestamp);
      if (params.depth) sdkParams.depth = params.depth;
      const data = await api().hyperliquid.hip3.l2Orderbook.get(
        normalizeHip3Coin(params.coin),
        sdkParams as any
      );
      return formatResponse(data);
    }
  • Input schema for get_hip3_l2_orderbook: coin (Hip3CoinParam, case-sensitive), optional timestamp (Unix ms or ISO), optional depth (number of price levels)
    {
      coin: Hip3CoinParam,
      timestamp: TimestampParam.describe("Timestamp for historical state (Unix ms or ISO). Omit for current.").optional(),
      depth: DepthParam,
    },
  • Hip3CoinParam schema definition used by get_hip3_l2_orderbook for coin validation
    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."
      );
  • normalizeHip3Coin helper function used by get_hip3_l2_orderbook to preserve case-sensitive HIP-3 coin symbols
    function normalizeHip3Coin(coin: string): string {
      return coin; // Case-sensitive
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds minor context: 'Derived from L4 data' and 'Build+ tier' (access tier). No contradictions; the description does not reveal additional behavioral traits like rate limits or auth requirements beyond what annotations imply.

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

Conciseness4/5

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

Three sentences, concise and front-loaded with the core function. The phrase 'Build+ tier' is slightly jargon-heavy but not overly verbose. Could be slightly clearer about depth default, but overall efficient.

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

Completeness3/5

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

Output schema exists, so return values are defined. Annotations cover safety. The description mentions derivation from L4 and tier, but omits default depth behavior (if depth omitted, presumably full depth) and does not clarify if 'full-depth' implies unlimited levels. Adequate but has minor gaps relative to the tool's complexity (3 params, non-trivial market data).

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 detailed parameter descriptions (coin with examples, timestamp for historical, depth for levels). The description adds no extra parameter information; it only restates that symbols are case-sensitive, which is already in the schema. Baseline 3 is appropriate since schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states it retrieves the HIP-3 L2 full-depth orderbook, including case sensitivity and derivation from L4 data. It distinguishes from other orderbook tools by name and mentions 'Build+ tier', but does not explicitly differentiate among sibling tools like get_hip3_l2_diffs or get_hip3_l4_orderbook.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as get_hip3_l2_diffs for real-time updates or get_hip3_l2_orderbook_history for historical snapshots. The description implies it is for current or historical full-depth snapshots, but lacks explicit when-to-use or when-not-to-use instructions.

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