Skip to main content
Glama
VENTURE-AI-LABS

CryptoDataAPI MCP Server

get_liquidations

Retrieve cross-exchange liquidation data to analyze forced position closures and market stress levels. Identify long/short liquidation ratios to gauge leveraged positioning pain across crypto markets.

Instructions

Get cross-exchange liquidation data showing long and short liquidation volumes over 24h. High liquidation volumes indicate forced position closures and market stress. A long/short liquidation ratio significantly above 1 means longs are being squeezed; below 1 means shorts are being squeezed. Useful for gauging leveraged positioning pain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeNoFilter by exchange name (e.g., 'binance', 'hyperliquid'). Omit for all exchanges.
typeNoMarket type filter (e.g., 'perps'). Omit for default.
limitNoNumber of results to return. Default 250.

Implementation Reference

  • The handler function for the get_liquidations tool, which calls the external API.
    export async function handler(args: z.infer<typeof schema>) {
      return apiGet("/api/v1/market-intelligence/liquidations", {
        exchange: args.exchange,
        type: args.type,
        limit: args.limit,
      });
    }
  • The Zod schema defining the input parameters for the get_liquidations tool.
    export const schema = z.object({
      exchange: z
        .string()
        .optional()
        .describe("Filter by exchange name (e.g., 'binance', 'hyperliquid'). Omit for all exchanges."),
      type: z
        .string()
        .optional()
        .describe("Market type filter (e.g., 'perps'). Omit for default."),
      limit: z
        .number()
        .optional()
        .describe("Number of results to return. Default 250."),
    });
  • src/index.ts:55-79 (registration)
    The MCP server registration loop where tools, including liquidations, are registered.
    for (const tool of tools) {
      server.tool(tool.name, tool.description, tool.schema.shape, async (args: Record<string, unknown>) => {
        const result = await tool.handler(args as any);
        if (result.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result.data, null, 2),
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: "text" as const,
                text: `API Error (${result.status}): ${result.error}`,
              },
            ],
            isError: true,
          };
        }
      });
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns data over a 24-hour period and explains the significance of liquidation volumes and ratios, adding useful behavioral context. However, it omits details like rate limits, authentication requirements, or data freshness, which are important for a data-fetching tool in a financial context.

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?

The description is efficiently structured in three sentences: the first states the purpose, the second explains the data's significance, and the third provides usage context. It avoids redundancy and is front-loaded with the core functionality, though it could be slightly more concise by integrating the usage hint into the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides adequate context for a data retrieval tool by explaining what the data represents and its analytical value. However, it lacks details on output format (e.g., structure of returned data, units like USD or BTC), which would be crucial for an agent to process the results effectively, leaving some gaps in completeness.

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 description coverage is 100%, so the schema already documents all three parameters (exchange, type, limit) with clear descriptions. The description does not add any parameter-specific information beyond what the schema provides, such as examples for the 'type' filter beyond 'perps' or default behaviors for omitted parameters, resulting in a baseline score of 3.

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 specific action ('Get cross-exchange liquidation data') and resource ('long and short liquidation volumes over 24h'). It distinguishes from siblings by focusing on liquidation metrics rather than other market data like funding rates, open interest, or ETF flows, making its purpose unambiguous.

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 usage for 'gauging leveraged positioning pain' and interpreting liquidation ratios, providing some context. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., get_funding_rates for funding pressure or get_market_health for broader stress indicators), leaving the agent to infer based on general market analysis needs.

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/VENTURE-AI-LABS/cryptodataapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server