Skip to main content
Glama

get_spot_trades_recent

Read-onlyIdempotent

Retrieve the latest Hyperliquid Spot trades for a dashed canonical pair (e.g., HYPE-USDC). Returns recent trades without needing a time range.

Instructions

Get the most recent Hyperliquid Spot trades for a pair. Symbols are dashed canonical (e.g. 'HYPE-USDC'). Returns the latest trades without needing a time range. Live since 2026-05-05.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesHyperliquid Spot dashed canonical pair symbol (e.g. 'HYPE-USDC', 'PURR-USDC'). 294 pairs available. The server resolves the dashed form to Hyperliquid's wire format ('PURR/USDC', '@107') internally. Use get_spot_pairs to list all.
limitNoMax records to return (default 100, max 1000)

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:1362-1378 (registration)
    Registration of the 'get_spot_trades_recent' tool on the MCP server via server.registerTool(). Defines name, description, input schema (coin + limit), and handler.
    // Spot Recent Trades
    registerTool(
      "get_spot_trades_recent",
      "Get the most recent Hyperliquid Spot trades for a pair. Symbols are dashed canonical (e.g. 'HYPE-USDC'). Returns the latest trades without needing a time range. Live since 2026-05-05.",
      {
        coin: SpotCoinParam,
        limit: LimitParam,
      },
      ListOutputSchema,
      async (params) => {
        const data = await api().spot.trades.recent(
          normalizeSpotCoin(params.coin),
          params.limit
        );
        return formatResponse(data);
      }
    );
  • Input schema for get_spot_trades_recent: SpotCoinParam (dashed canonical pair, e.g. 'HYPE-USDC') and optional LimitParam.
    {
      coin: SpotCoinParam,
      limit: LimitParam,
    },
    ListOutputSchema,
  • Output schema: ListOutputSchema with records array, count, and optional nextCursor.
    ListOutputSchema,
  • Handler function that calls api().spot.trades.recent() with the normalized coin symbol and limit, then formats the response.
    async (params) => {
      const data = await api().spot.trades.recent(
        normalizeSpotCoin(params.coin),
        params.limit
      );
      return formatResponse(data);
    }
  • Helper normalizeSpotCoin function that uppercases the coin symbol before API call.
    function normalizeSpotCoin(coin: string): string {
      return coin.toUpperCase();
    }
Behavior3/5

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

Annotations already indicate readOnly, non-destructive, idempotent, open-world. Description adds that it's 'live since 2026-05-05' and mentions dashed symbol resolution, but no additional behavioral traits beyond annotations. No contradiction.

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, front-loaded with purpose, then symbol format, then behavioral note. No fluff, efficient.

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 output schema exists, description need not detail return values. It correctly identifies scope (Spot, pair) and distinguishes from siblings. Could explicitly mention when to prefer this over get_spot_trades, but adequate for simple endpoint.

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 descriptions for both parameters (coin format, internal resolution; limit defaults and max). Description adds minor context about dashed symbols and 'without time range' but does not provide new semantics beyond 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?

Description clearly states it gets the most recent Hyperliquid Spot trades for a pair, using dashed canonical symbols. Distinguishes from siblings like get_spot_trades (which likely requires time range) and get_trades (perpetual).

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?

Description says 'returns the latest trades without needing a time range,' implying when to use but does not explicitly state when not to use or compare with alternatives like get_spot_trades. No explicit guidance on context.

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