Skip to main content
Glama

get_hip3_orderbook

Read-onlyIdempotent

Access real-time orderbook data for HIP-3 prediction market symbols. Get bids, asks, and mid price for case-sensitive symbols like km:US500.

Instructions

Get the current HIP-3 orderbook snapshot. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns bids, asks, mid price. Free tier: km:US500 only. Build+: all HIP-3 symbols.

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.
depthNoOrderbook depth — number of price levels per side

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • src/index.ts:652-659 (registration)
    Registration of the get_hip3_orderbook tool using the registerOrderbookTool helper. The handler calls api().hyperliquid.hip3.orderbook.get(coin, params) via the SDK, accepts Hip3CoinParam (case-sensitive) and optional DepthParam, and outputs ObjectOutputSchema.
    // 17. HIP-3 Orderbook
    registerOrderbookTool(
      "get_hip3_orderbook",
      "Get the current HIP-3 orderbook snapshot. Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns bids, asks, mid price. Free tier: km:US500 only. Build+: all HIP-3 symbols.",
      (coin, params) => api().hyperliquid.hip3.orderbook.get(coin, params),
      Hip3CoinParam,
      normalizeHip3Coin
    );
  • The generic registerOrderbookTool helper function used by get_hip3_orderbook. It wraps registerTool, normalizes the coin via normFn, passes optional depth, and formats the response.
    // Pattern 3: Orderbook snapshot (coin + optional depth)
    function registerOrderbookTool(
      name: string,
      description: string,
      sdkCall: (coin: string, params?: { depth?: number }) => Promise<unknown>,
      coinSchema: z.ZodString,
      normFn: (coin: string) => string
    ): void {
      registerTool(
        name,
        description,
        { coin: coinSchema, depth: DepthParam },
        ObjectOutputSchema,
        async (params) => {
          const sdkParams = params.depth ? { depth: params.depth } : undefined;
          const data = await sdkCall(normFn(params.coin), sdkParams);
          return formatResponse(data);
        }
      );
    }
  • Input schema for HIP-3 coin parameter — a case-sensitive string. Used by get_hip3_orderbook as the coin input.
    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."
      );
  • Optional depth parameter for the orderbook, controlling the number of price levels per side.
    const DepthParam = z
      .number()
      .optional()
      .describe("Orderbook depth — number of price levels per side");
  • Normalization helper for HIP-3 coins — returns the coin as-is (case-sensitive, unlike Hyperliquid coins which are uppercased).
    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 readOnly=true, idempotent=true, and non-destructive. Description adds value by noting case sensitivity, free-tier restriction, and return structure (bids, asks, mid price). No contradiction with annotations.

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?

Three concise sentences: purpose, case sensitivity/example, tier restrictions. No redundant information; every sentence adds critical context.

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 output schema exists (not provided), description appropriately avoids duplicating return details. Covers purpose, parameter nuances, limitations, and references related tool for listing symbols. Adequate for a snapshot tool with robust annotations.

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

Parameters4/5

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

Schema coverage is 100% with descriptions. Description enriches 'coin' parameter with examples, case sensitivity warning, and market count (125+ across 6 builders). 'depth' parameter is minimally enhanced but schema already describes it sufficiently.

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?

Description clearly states 'Get the current HIP-3 orderbook snapshot' with specific verb and resource. Differentiates from siblings by emphasizing 'current snapshot' and mentioning specific symbol caveats like case sensitivity and free-tier limitation.

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 explicit usage guidance: free tier only supports 'km:US500', Build+ supports all HIP-3 symbols. Suggests using get_hip3_instruments to list symbols. Missing explicit when-not-to-use alternatives like history or L2-specific tools, but context is sufficient.

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