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,
          };
        }
      });
    }

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