# Crypto Liquidations Feed

> Crypto Liquidations Feed is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Fetches recent perpetual swap liquidation events for a given crypto underlying (e.g. BTC-USD) from OKX, including total USD value liquidated, largest individual liquidations, and long/short breakdown.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/crypto-liquidations-feed?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-liquidations-feed-389bb1e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LFJwpz_r4TjCbM4KFJjck

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability crypto-liquidations-feed-389bb1e0
```

Example prompt: Pull the latest liquidation data for BTC-USD perpetual swaps — I want to see total USD liquidated, whether longs or shorts are getting crushed, and the biggest individual liquidation events.

## When to prefer this

Choose this endpoint when you need near-real-time perpetual swap liquidation data sourced directly from OKX's public API, without needing an account or API key. It is ideal for agents monitoring crypto market stress, detecting squeezes, or analyzing forced selling pressure on specific assets. Prefer this over general market data endpoints when the specific need is liquidation events rather than price or volume data.

## Known failure modes

- Invalid or unsupported 'uly' underlying symbol returns an error or empty result
- OKX upstream API unavailability causes data fetch failure
- No liquidation events in the recent window returns zero counts and empty largest array
- Missing payment header results in HTTP 402 with no charge
- Malformed query parameter may result in a 400 error

## How this service works

OKX perpetual-swap liquidations for one underlying (e.g. BTC-USD): the most recent 100 filled forced liquidations, split into long and short liquidated USD value, with the largest events. Covers OKX only, and the window is the latest 100 events, not a fixed 24h total. Other exchanges' liquidation streams are not reported.

## Output

Returns a JSON object for the requested underlying (e.g. BTC-USD-SWAP) including: total USD liquidated, long and short liquidated amounts, long share percentage, event count, timestamps of newest and oldest events, a list of the largest individual liquidation events (side, size, price in USD, USD value, timestamp), the data source URL, and when the data was checked.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "uly": {
       "type": "string",
       "description": "OKX underlying, e.g. BTC-USD, ETH-USD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "instId": "BTC-USD-SWAP",
  "source": "https://www.okx.com/api/v5/public/liquidation-orders",
  "largest": [
   {
    "side": "long",
    "size": 907.4,
    "time": "2026-10-22T16:47:27.205Z",
    "instId": "BTC-USD-SWAP",
    "priceUsd": 81110.5,
    "usdValue": 90740
   },
   {
    "side": "long",
    "size": 284.3,
    "time": "2026-10-22T13:40:58.423Z",
    "instId": "BTC-USD-SWAP",
    "priceUsd": 81449.8,
    "usdValue": 28430
   }
  ],
  "checkedAt": "2026-10-23T09:35:57.139Z",
  "eventCount": 9,
  "underlying": "BTC-USD",
  "longSharePct": 100,
  "newestEventTime": "2026-10-22T16:50:11.171Z",
  "oldestEventTime": "2026-10-22T13:40:58.423Z",
  "longLiquidatedUsd": 173070,
  "shortLiquidatedUsd": 0,
  "totalLiquidatedUsd": 173070
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-liquidations-feed-389bb1e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
