Skip to main content
Glama

get_order_flow

Read-onlyIdempotent

Aggregate Hyperliquid order placement, cancellation, and fill metrics over customizable time intervals. Input coin symbol and optional time range to retrieve order flow data.

Instructions

Get Hyperliquid order flow aggregation (Build+ tier). Returns aggregated order placement, cancellation, and fill metrics over time intervals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesCoin/market symbol, e.g. 'BTC', 'ETH', 'SOL'
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 (default '1h')

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 that executes the get_order_flow tool logic. It accepts coin, start, end, limit, cursor, and interval parameters, resolves the time range, builds SDK params, calls api().hyperliquid.orders.flow(), and formats the response.
    registerTool(
      "get_order_flow",
      "Get Hyperliquid order flow aggregation (Build+ tier). Returns aggregated order placement, cancellation, and fill metrics over time intervals.",
      {
        coin: CoinParam,
        ...HistoryParams,
        interval: z.enum(["1m", "5m", "15m", "30m", "1h", "4h", "1d"]).optional()
          .describe("Aggregation interval (default '1h')"),
      },
      ListOutputSchema,
      async (params) => {
        const { coin, start, end, limit, cursor, interval } = params;
        const timeRange = resolveTimeRange(start, end);
        const sdkParams: Record<string, unknown> = {
          ...timeRange,
          limit: resolveLimit(limit),
        };
        if (cursor) sdkParams.cursor = cursor;
        if (interval) sdkParams.interval = interval;
        const result = await api().hyperliquid.orders.flow(
          normalizeHLCoin(coin),
          sdkParams as any
        );
        return formatCursorResponse(result);
      }
    );
  • Input schema for get_order_flow: coin (string), history params (start, end, limit, cursor), and optional interval enum for aggregation.
    {
      coin: CoinParam,
      ...HistoryParams,
      interval: z.enum(["1m", "5m", "15m", "30m", "1h", "4h", "1d"]).optional()
        .describe("Aggregation interval (default '1h')"),
    },
    ListOutputSchema,
  • Output schema used by get_order_flow - returns records array, count, and optional nextCursor for pagination.
    const ListOutputSchema: ZodRawShape = {
      records: z.array(z.record(z.unknown())).describe("Array of result records"),
      count: z.number().describe("Total number of records in the full result set"),
      nextCursor: z
        .string()
        .optional()
        .describe("Cursor for next page, if more results available"),
    };
  • src/index.ts:1027-1052 (registration)
    Registration of the get_order_flow tool via the registerTool helper. The tool is registered under the 'Hyperliquid L4 Orders & Orderbook' section.
    registerTool(
      "get_order_flow",
      "Get Hyperliquid order flow aggregation (Build+ tier). Returns aggregated order placement, cancellation, and fill metrics over time intervals.",
      {
        coin: CoinParam,
        ...HistoryParams,
        interval: z.enum(["1m", "5m", "15m", "30m", "1h", "4h", "1d"]).optional()
          .describe("Aggregation interval (default '1h')"),
      },
      ListOutputSchema,
      async (params) => {
        const { coin, start, end, limit, cursor, interval } = params;
        const timeRange = resolveTimeRange(start, end);
        const sdkParams: Record<string, unknown> = {
          ...timeRange,
          limit: resolveLimit(limit),
        };
        if (cursor) sdkParams.cursor = cursor;
        if (interval) sdkParams.interval = interval;
        const result = await api().hyperliquid.orders.flow(
          normalizeHLCoin(coin),
          sdkParams as any
        );
        return formatCursorResponse(result);
      }
    );
  • Helper function used to format paginated cursor-based responses from get_order_flow.
    function formatCursorResponse(result: {
      data: unknown;
      nextCursor?: string;
    }): McpContent {
      return formatResponse(result.data, {
        nextCursor: result.nextCursor,
        paginated: true,
      });
    }
Behavior4/5

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

Annotations already convey readOnly, idempotent, and non-destructive behavior. The description adds that it returns aggregated metrics over intervals and notes the 'Build+ tier', providing context beyond the 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?

A single, well-structured sentence that front-loads the core purpose and includes a brief expansion on return content. No superfluous text.

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 complete annotations and an output schema, the description is nearly sufficient. It lacks details on access restrictions (Build+ tier) and how to interpret the aggregated metrics, but overall meets needs.

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 baseline is 3. The description only loosely maps to 'time intervals' for the interval parameter, adding minimal extra meaning beyond the schema.

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 aggregates order flow metrics (placements, cancellations, fills) over intervals, distinguishing it from sibling tools like get_order_history or get_trades that provide raw data.

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

Usage Guidelines3/5

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

The description implies use for aggregated order flow analysis but does not explicitly compare to siblings (e.g., get_hip3_order_flow) or state when to prefer this tool. No prerequisites or exclusions are mentioned.

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