Skip to main content
Glama

get_spot_pair

Read-onlyIdempotent

Retrieve detailed information for a Hyperliquid spot trading pair by its dashed canonical symbol, including base and quote assets, wire symbol, asset index, decimals, latest mark and mid price, and active status.

Instructions

Get details for a single Hyperliquid Spot pair by dashed canonical symbol (e.g. 'HYPE-USDC'). Returns base/quote asset, wire symbol, asset index, decimals, latest mark/mid price, and active status.

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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • The handler for the 'get_spot_pair' tool. Uses the registerCurrentTool helper which wraps the SDK call api().spot.pairs.get(coin) with the SpotCoinParam schema and normalizeSpotCoin normalization. Returns details for a single Hyperliquid Spot pair by dashed canonical symbol (e.g. 'HYPE-USDC').
    // Spot Pair (single)
    registerCurrentTool(
      "get_spot_pair",
      "Get details for a single Hyperliquid Spot pair by dashed canonical symbol (e.g. 'HYPE-USDC'). Returns base/quote asset, wire symbol, asset index, decimals, latest mark/mid price, and active status.",
      (coin) => api().spot.pairs.get(coin),
      SpotCoinParam,
      normalizeSpotCoin
    );
  • The SpotCoinParam Zod schema used as the input schema for get_spot_pair. It accepts a string describing a Hyperliquid Spot dashed canonical pair symbol (e.g. 'HYPE-USDC', 'PURR-USDC'). 294 pairs available.
    const SpotCoinParam = z
      .string()
      .describe(
        "Hyperliquid 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."
      );
  • The normalizeSpotCoin helper function used to normalize the coin symbol to uppercase before passing to the SDK.
    function normalizeSpotCoin(coin: string): string {
      return coin.toUpperCase();
    }
  • src/index.ts:328-357 (registration)
    The registerCurrentTool helper is the generic registration mechanism used by get_spot_pair. It accepts a name, description, coinSchema, normFn, and SDK call, and registers the tool via registerTool which handles API key checks, error formatting, and delegating to the SDK.
    function registerTool(
      name: string,
      description: string,
      inputSchema: ZodRawShape,
      outputSchema: ZodRawShape,
      handler: (params: any) => Promise<McpContent>
    ): void {
      server.registerTool(
        name,
        {
          description,
          inputSchema,
          outputSchema,
          annotations: TOOL_ANNOTATIONS,
        },
        async (params: any) => {
          if (!client) {
            return {
              content: [{ type: "text" as const, text: MISSING_KEY_MESSAGE }],
              isError: true,
            };
          }
          try {
            return await handler(params);
          } catch (err) {
            const error = err instanceof OxArchiveError ? err : new OxArchiveError(String(err), 500);
            return formatError(error);
          }
        }
      );
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the agent understands safety. The description adds value by detailing exactly what data is returned (mark/mid price, active status, etc.), which goes beyond 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 action and includes a list of return fields. No unnecessary words.

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?

With an output schema present and the tool being a simple lookup, the description covers the essential information: purpose, parameter format, and return components. No gaps noted.

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% and the parameter description is very detailed (example, format, internal resolution). The main description only repeats the example, adding minor value. Baseline score 3 is appropriate.

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 details for a single Hyperliquid Spot pair by dashed canonical symbol, listing specific return fields (base/quote asset, wire symbol, etc.) and distinguishing it from sibling get_spot_pairs.

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 parameter description explicitly directs users to use get_spot_pairs for listing all pairs, providing usage context. However, the main description does not state when not to use this tool, but the sibling set is clear.

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