liquidations-mcp
by matestani
README.md
# liquidations-dev
[](https://www.npmjs.com/package/liquidations-dev)
[](https://www.npmjs.com/package/liquidations-dev)
[](LICENSE)
[](https://liquidations.dev?utm_source=github)
CLI and MCP server for the [liquidations.dev](https://liquidations.dev?utm_source=github) API. Crypto liquidation
events and minute totals in USD from 10 exchanges (Binance, Bybit, OKX, Bitget, Gate, Hyperliquid, HTX, Lighter,
Aster, Bitfinex), with history since November 2023.
One npm package, two binaries, zero dependencies, Node 18 or newer. Open source, MIT.
## Quick start
```bash
export LIQUIDATIONS_API_KEY=liq_… # free key: https://liquidations.dev/en/account
npx liquidations-dev recent --symbol BTC --limit 3
npx liquidations-dev summary --minutes 60
npx liquidations-dev coverage
npx liquidations-dev mcp # MCP server over stdio
```
What the terminal shows:
```
$ liquidations-dev recent --symbol BTC --limit 3
3 events, newest first, BTC
window 2026-12-03T15:03:48Z .. 2026-12-04T15:03:48Z, plan free
time (UTC) exchange symbol side price qty usd note
2026-12-04T15:03:45Z bitget BTCUSDT long 51,342.62 3.36 $172.5K partial
2026-12-04T15:03:06Z binance BTCUSDT long 51,607.30 0.01 $516 full
2026-12-04T15:02:57Z hyperliquid BTC-USD short 51,695.00 0.02 $1,075 full
$ liquidations-dev summary --minutes 30
Liquidation totals, 30 minutes from 2026-12-04T14:33:48Z to 2026-12-04T15:03:48Z, all exchanges and coins
events 2,568 long $22.07M short $4.08M total $26.15M
minute (UTC) events long short total
2026-12-04T15:02:00Z 52 $407.5K $275.2K $682.6K
2026-12-04T15:01:00Z 48 $233.4K $8,342 $241.8K
...
```
Install it globally with `npm i -g liquidations-dev`, or run it through npx as above.
## API key
Every call needs a key from your [account](https://liquidations.dev/en/account?utm_source=github). The free plan
allows 5 requests per minute and the last 24 hours of history. Paid plans raise both limits up to 1200 requests per
minute with the full history, see [pricing](https://liquidations.dev/en/pricing?utm_source=github).
```bash
export LIQUIDATIONS_API_KEY=liq_…
```
`--key liq_…` on the command line overrides the variable. `LIQUIDATIONS_API_URL` or `--url` point the tools at
another instance (default `https://stream.liquidations.dev`).
## CLI
```bash
liquidations-dev recent --symbol BTC --limit 5
liquidations-dev recent --exchange binance --side long --min-usd 1000000 --minutes 60
liquidations-dev summary --minutes 60
liquidations-dev summary --symbol ETH --exchange bybit --from 2026-12-01T00:00:00Z --to 2026-12-02T00:00:00Z --limit 1440
liquidations-dev coverage
liquidations-dev whoami
liquidations-dev help
```
| Command | What it does |
| --- | --- |
| `recent` | Latest liquidation events, newest first |
| `summary` | USD totals per minute for a window, default: the last 60 minutes |
| `coverage` | History depth, 24h totals per exchange, limits of the plan |
| `whoami` | Plan and limits of the current key |
| `mcp` | Starts the MCP server over stdio |
| `help`, `version` | Usage text and package version |
Options of `recent`: `--symbol BTC` (base coin, `BTC` and `BTCUSDT` both work), `--exchange binance`, `--side long` or
`short`, `--min-usd 100000`, `--from` and `--to` (ms epoch, ISO date or relative like `15m`, `2h`, `7d`),
`--limit 20` (1 to 1000).
Options of `summary`: `--symbol`, `--exchange`, `--minutes 60` (length of the window), `--from` and `--to` instead of
`--minutes`, `--limit 60` (rows to list, newest first; totals cover the whole window).
Common options: `--key liq_…`, `--url`, `--json` (print the JSON of the API as is), `-h`.
Exit codes: 0 ok, 1 wrong command line, 2 API error (the message names the code, for example `rate_limited`),
3 server unreachable.
`summary` fetches the whole window in pages of 1000 minutes and makes one API request per page. The window is
capped at 10,000 minutes.
## MCP server
`liquidations-dev mcp` (or `liquidations-mcp` after a global install) speaks the Model Context Protocol over stdio.
It exposes four read-only tools and works with any client that supports stdio servers: Claude Desktop, Claude Code,
Cursor, Windsurf and others. The key is read from `LIQUIDATIONS_API_KEY`.
Claude Code:
```bash
claude mcp add liquidations -e LIQUIDATIONS_API_KEY=liq_… -- npx --yes liquidations-dev mcp
```
Claude Desktop, Cursor, Windsurf and other clients with a JSON config: add this block to the config file of your
client (`claude_desktop_config.json`, `.cursor/mcp.json`, `.mcp.json`).
```json
{
"mcpServers": {
"liquidations": {
"command": "npx",
"args": ["--yes", "liquidations-dev", "mcp"],
"env": { "LIQUIDATIONS_API_KEY": "liq_…" }
}
}
}
```
| Tool | What it 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, `qty` is in the base coin. A failed call returns text with
`isError: true`; a missing key says so in that text. The server manifest for the MCP Registry is `server.json`.
## Limits
Free allows 5 requests per minute and the last 24 hours. Data: 120 per minute. Stream: 300 per minute.
Business: 1200 per minute. Paid plans include the full history since November 2023. Current prices are on the
[pricing page](https://liquidations.dev/en/pricing?utm_source=github).
## Links
| | |
| --- | --- |
| Website | https://liquidations.dev |
| REST API and WebSocket docs | https://liquidations.dev/en/api |
| CLI and MCP page (setup for more clients) | https://liquidations.dev/en/mcp |
| OpenAPI schema | https://liquidations.dev/openapi.json |
| Postman collection | https://liquidations.dev/postman/liquidations-dev.postman_collection.json |
| Data coverage | https://liquidations.dev/en/coverage |
| Pricing | https://liquidations.dev/en/pricing |
| Privacy policy | https://liquidations.dev/en/privacy |
| Terms of service | https://liquidations.dev/en/terms |
Bugs and wishes: [GitHub issues](https://github.com/matestani/liquidations-tools/issues). Questions about the data
or the plan: contact@liquidations.dev.
## Development
No build step, plain ES modules. The checks call the live API with your key and need a few of the free plan's
requests per minute:
```bash
LIQUIDATIONS_API_KEY=liq_… npm test
```
`LIQUIDATIONS_API_URL` points the checks at another instance of the API.
```
bin/cli.mjs CLI, installed as liquidations-dev (`liquidations-dev mcp` starts the server)
bin/mcp.mjs MCP server, installed as liquidations-mcp
lib/api.mjs HTTP client, argument parsing, formatting
test/smoke.mjs CLI and MCP checks against a live API
server.json Manifest for the MCP Registry
```
## License
MIT, Copyright 2026 liquidations.dev. The package is open source; the data itself is covered by the
[Terms of service](https://liquidations.dev/en/terms?utm_source=github) of the plan it is used with.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues