Skip to main content
Glama

get_hip3_order_history

Read-onlyIdempotent

Fetch HIP-3 order history with user attribution for case-sensitive coin symbols. Filter by status, type, time range, and user address.

Instructions

Get HIP-3 order history with user attribution (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns order lifecycle events with user addresses.

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
userNoUser wallet address filter (e.g., '0x1234...')
statusNoFilter orders by status
order_typeNoFilter orders by type

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

  • src/index.ts:1161-1174 (registration)
    Registration of the 'get_hip3_order_history' tool via registerHistoryTool. It uses the SDK call api().hyperliquid.hip3.orders.history with Hip3CoinParam, normalizeHip3Coin, and extra schema params for user, status, and order_type.
    // HIP-3 Order History
    registerHistoryTool(
      "get_hip3_order_history",
      "Get HIP-3 order history with user attribution (Build+ tier). Symbols are CASE-SENSITIVE (e.g. 'km:US500'). Returns order lifecycle events with user addresses.",
      (coin, params) =>
        api().hyperliquid.hip3.orders.history(coin, params as any),
      Hip3CoinParam,
      normalizeHip3Coin,
      {
        user: UserParam,
        status: OrderStatusParam,
        order_type: OrderTypeParam,
      }
    );
  • The registerHistoryTool helper function that serves as the handler for get_hip3_order_history. It constructs the SDK call parameters (coin, time range, limit, cursor, and extra params like user/status/order_type) and delegates to the SDK's hip3.orders.history method.
    // Pattern 4: History with cursor pagination (coin + time range)
    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 CoinParam, Hip3CoinParam, and other shared schema definitions used by get_hip3_order_history's input validation. Hip3CoinParam defines the CASE-SENSITIVE HIP-3 coin symbols. HistoryParams defines start/end/limit/cursor for time range queries.
    const TimestampParam = z
      .union([z.number(), z.string()])
      .optional()
      .describe("Timestamp as Unix milliseconds or ISO 8601 string");
    
    const LimitParam = z
      .number()
      .optional()
      .describe("Max records to return (default 100, max 1000)");
    
    const CursorParam = z
      .string()
      .optional()
      .describe("Pagination cursor from previous response's nextCursor");
  • The normalizeHip3Coin helper function used by get_hip3_order_history to pass through the coin symbol as-is (case-sensitive).
    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 provide readOnlyHint, so the description adds value by stating it returns 'order lifecycle events with user addresses' and that symbols are case-sensitive. 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?

Two concise sentences, front-loaded with purpose and a key usage note. Every sentence adds value; no redundancy.

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 8 parameters, output schema existence, and many siblings, the description covers core purpose, a critical constraint (case-sensitivity), and tier. It does not elaborate on filtering or pagination, but those are documented in the schema.

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?

Input schema has 100% coverage, describing all 8 parameters. The description adds emphasis on case-sensitivity and examples for the coin parameter, but does not provide additional meaning beyond the schema for other parameters.

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 tool retrieves HIP-3 order history with user attribution, mentions Build+ tier, and highlights case-sensitivity. It distinguishes from sibling tools like get_order_history (generic) and get_hip4_order_history by specifying HIP-3.

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?

The description implies usage for HIP-3 orders and Build+ tier, and emphasizes case-sensitivity. However, it does not explicitly guide when to use this over alternatives like get_order_history or get_spot_order_history, nor does it mention when not to use it.

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