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
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | No | Filter by exchange name (e.g., 'binance', 'hyperliquid'). Omit for all exchanges. | |
| type | No | Market type filter (e.g., 'perps'). Omit for default. | |
| limit | No | Number of results to return. Default 250. |
Implementation Reference
- src/tools/liquidations.ts:27-33 (handler)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, }); } - src/tools/liquidations.ts:12-25 (schema)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, }; } }); }