{
  "info": {
    "_postman_id": "7c1d4e2a-9b36-4f5b-8a71-0e3c5d2b6f48",
    "name": "liquidations.dev API",
    "description": "Liquidation data from 10 exchanges: raw events, minute aggregates, coverage and limits.\n\n1. Set the collection variable `api_key` to the key from your account (https://liquidations.dev/en/account).\n2. Requests send it in the `X-API-Key` header. Free plan: 5 requests per minute, last 24 hours.\n\nDocs: https://liquidations.dev/en/api. OpenAPI: https://liquidations.dev/openapi.json.\nCLI and MCP server: npm package liquidations-dev (MIT), https://liquidations.dev/en/mcp, source https://github.com/matestani/liquidations-tools.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key"
      },
      {
        "key": "value",
        "value": "{{api_key}}"
      },
      {
        "key": "in",
        "value": "header"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// window for the \"last 60 minutes\" requests: now and now - 60 min in ms",
          "const now = Date.now();",
          "pm.collectionVariables.set('t', String(now));",
          "pm.collectionVariables.set('f', String(now - 60 * 60 * 1000));"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://stream.liquidations.dev"
    },
    {
      "key": "api_key",
      "value": "liq_paste_your_key_here"
    },
    {
      "key": "f",
      "value": ""
    },
    {
      "key": "t",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Coverage and limits",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/meta",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "meta"
          ]
        },
        "description": "GET /api/v1/meta\n\nHistory depth (first and last stored event, approximate number of events), per-exchange totals for the last 24 hours and the limits of the current plan. `history_window_ms` is null on paid plans."
      }
    },
    {
      "name": "Liquidation events (BTC, newest 5)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/liquidations?symbol=BTC&limit=5",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "liquidations"
          ],
          "query": [
            {
              "key": "symbol",
              "value": "BTC"
            },
            {
              "key": "limit",
              "value": "5"
            },
            {
              "key": "exchange",
              "value": "binance",
              "disabled": true
            },
            {
              "key": "side",
              "value": "long",
              "disabled": true
            },
            {
              "key": "min_vol",
              "value": "100000",
              "disabled": true
            },
            {
              "key": "f",
              "value": "{{f}}",
              "disabled": true
            },
            {
              "key": "t",
              "value": "{{t}}",
              "disabled": true
            }
          ]
        },
        "description": "GET /api/v1/liquidations\n\nNewest first. `symbol` is the base coin: BTC or BTCUSDT both work. Enable the other parameters when needed: `exchange`, `side` (long | short), `min_vol` (minimum USD value), `f` and `t` (ms epoch)."
      }
    },
    {
      "name": "Liquidation events (long side from $100k, last 60 min)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/liquidations?side=long&min_vol=100000&f={{f}}&t={{t}}&limit=100",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "liquidations"
          ],
          "query": [
            {
              "key": "side",
              "value": "long"
            },
            {
              "key": "min_vol",
              "value": "100000"
            },
            {
              "key": "f",
              "value": "{{f}}"
            },
            {
              "key": "t",
              "value": "{{t}}"
            },
            {
              "key": "limit",
              "value": "100"
            },
            {
              "key": "symbol",
              "value": "ETH",
              "disabled": true
            }
          ]
        },
        "description": "The window `f`..`t` is set by the collection pre-request script (last 60 minutes). The free plan cannot go further back than 24 hours: the answer is 403 `plan_window`."
      }
    },
    {
      "name": "Minute totals (all exchanges, newest 120)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/agg/1m?limit=120",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "agg",
            "1m"
          ],
          "query": [
            {
              "key": "limit",
              "value": "120"
            },
            {
              "key": "symbol",
              "value": "BTC",
              "disabled": true
            },
            {
              "key": "exchange",
              "value": "binance",
              "disabled": true
            },
            {
              "key": "f",
              "value": "{{f}}",
              "disabled": true
            },
            {
              "key": "t",
              "value": "{{t}}",
              "disabled": true
            }
          ]
        },
        "description": "GET /api/v1/agg/1m\n\nUSD totals per minute: number of events, long side, short side, total. Newest first. Cached for 60 seconds."
      }
    },
    {
      "name": "Minute totals (BTC on Binance)",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/agg/1m?symbol=BTC&exchange=binance&limit=60",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "agg",
            "1m"
          ],
          "query": [
            {
              "key": "symbol",
              "value": "BTC"
            },
            {
              "key": "exchange",
              "value": "binance"
            },
            {
              "key": "limit",
              "value": "60"
            }
          ]
        },
        "description": "With `symbol` and `exchange` both set, rows cover that pair only."
      }
    },
    {
      "name": "Error: no key (401 missing_key)",
      "request": {
        "method": "GET",
        "header": [],
        "auth": {
          "type": "noauth"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/meta",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "meta"
          ]
        },
        "description": "Errors are JSON: {\"detail\": {\"error\": \"missing_key\", \"message\": \"X-API-Key header is required\", \"upgrade\": \"https://liquidations.dev/en/api\"}}. Other codes: invalid_key, revoked (403), plan_window (403), rate_limited and ip_blocked (429)."
      }
    }
  ]
}
