CLI and MCP server
Liquidation data in your terminal and in your AI assistant
The npm package liquidations-dev wraps the REST API in a command line tool and in an MCP server for Claude, Cursor, Claude Code, Windsurf and other clients. Liquidation events and minute totals from 10 exchanges, with history since November 2023. Node 18 or newer, no dependencies.
Install
Every call needs an API key from the account. A free key allows 5 requests per minute and the last 24 hours of history; paid plans raise both limits.
Install and set the key
npm i -g liquidations-dev export LIQUIDATIONS_API_KEY=liq_… # free key from liquidations.dev/en/account
Events, totals, coverage
liquidations-dev recent --symbol BTC --limit 5 liquidations-dev summary --minutes 60 liquidations-dev coverage
Without a global install, run the same commands through npx liquidations-dev …. liquidations-dev help lists every option. Exit codes: 0 ok, 1 wrong command line, 2 API error, 3 server unreachable.
MCP server
The MCP server speaks the Model Context Protocol over stdio and exposes four read-only tools. It works with any client that supports stdio servers; the key is read from the LIQUIDATIONS_API_KEY environment variable.
Claude Desktop, Cursor, Windsurf (JSON config)
{
"mcpServers": {
"liquidations": {
"command": "npx",
"args": ["--yes", "liquidations-dev", "mcp"],
"env": { "LIQUIDATIONS_API_KEY": "liq_…" }
}
}
}Claude Code
claude mcp add liquidations -e LIQUIDATIONS_API_KEY=liq_… -- npx --yes liquidations-dev mcp
Claude Desktop on Windows needs cmd /c npx --yes liquidations-dev mcp as the command, because desktop apps cannot start npx directly there. A global install also provides the shorter liquidations-mcp binary.
Tools
| Tool | Returns | Parameters |
|---|---|---|
| get_liquidations | Latest events, newest first: time, exchange, symbol, side, price, qty, USD value, completeness | symbol, exchange, side, min_usd, minutes (default 60), from_ms, to_ms, limit (default 20, max 1000) |
| get_liquidation_summary | Totals for a window (events, long, short, total in USD) and up to 120 per-minute points | symbol, exchange, minutes (default 60), from_ms, to_ms |
| get_coverage | First and last stored event, number of events, 24h totals per exchange, limits of the plan | none |
| get_plan | Plan and limits of the key, links to the account and pricing | none |
- Amounts are USD, times are UTC ISO strings,
qtyis in the base coin, events come newest first. symboltakes the base coin (BTCorBTCUSDTboth work); the event keeps the symbol as the exchange lists it.get_liquidation_summaryfetches the whole window in pages of 1000 minutes, one API request per page, and returns up to 120 points.- A failed call returns text with
isError: true; a missing key says so in that text. A good first call isget_coverage, it reports the limits of the key.
Limits follow the plan
| Plan | Requests | History |
|---|---|---|
| Free | 5 requests per minute | last 24 hours |
| Data | 120 per minute | full history |
| Stream | 300 per minute | full history |
| Business | 1200 per minute | full history |
The CLI and the MCP server use the same key and the same limits as the REST API. Prices are on the pricing page.
Source, license, feedback
The package is open source under the MIT licence. The code, the issues and the release notes live on GitHub, every release is published on npm. Questions about the package or the API go to [email protected].
FAQ
+Which exchanges does it cover?
The same ten as the REST API: Binance, Bybit, OKX, Bitget, Gate, Hyperliquid, HTX, Lighter, Aster and Bitfinex, with stored history since November 2023.
+Does it work with a free key?
Yes. A free key allows 5 requests per minute and the last 24 hours of history. The tools work the same way on paid plans, with more requests per minute and the full history.
+What does an AI assistant see?
Each call returns compact JSON: events with time, exchange, symbol, side, price, quantity and USD value, or minute rows with long, short and total USD. Amounts are USD, times are UTC ISO strings, events come newest first.
+Where is the source code?
The package is open source under the MIT license at https://github.com/matestani/liquidations-tools. It makes plain HTTPS calls to the REST API and ships no dependencies.