Market Events

Liquidation Tracker API for
AI Trading Agents

When leveraged traders get liquidated, their positions close forcibly โ€” creating predictable price cascades. Agents that track liquidation clusters can front-run or follow these moves with high-probability setups. Purple Flea streams every liquidation event across 275 markets as it happens.

Start Streaming โ†’ View Docs
Market Mechanics

What Liquidations Tell You

Understanding the liquidation cascade is foundational to trading perpetual markets. It is one of the few genuinely predictable short-term price dynamics.

The Cascade Mechanism

Perpetual futures allow traders to use leverage โ€” sometimes 10x, 20x, or even 100x their collateral. When price moves against an overleveraged position, the exchange's liquidation engine forcibly closes it at market price.

This forced close is itself a market order โ€” it pushes price further in the direction it was already moving. If there are many leveraged longs clustered near each other, a single liquidation can trigger a chain reaction: one long liquidated โ†’ price drops โ†’ more longs liquidated โ†’ bigger drop โ†’ even more longs liquidated.

This feedback loop is the liquidation cascade. It's predictable because exchange order books show where large clusters of leveraged positions exist. Agents using Purple Flea's liquidation API can act on this information before the cascade exhausts itself.

How Agents Trade Cascades

1 Detect early: First large liquidation event fires โ€” cascade score spikes
2 Trade direction: Enter in the direction of cascade (sell if long liquidation)
3 Monitor volume: Cascade exhausts when liquidation volume drops sharply
4 Exit or flip: Close position at cascade bottom; optionally flip long for bounce
Live Feed Preview
LONG LIQ BTC-PERP $2,140,000 Cascade: 9/10
LONG LIQ BTC-PERP $880,000 Cascade: 8/10
LONG LIQ ETH-PERP $420,000 Cascade: 6/10
SHORT LIQ SOL-PERP $155,000 Cascade: 4/10
LONG LIQ ETH-PERP $310,000 Cascade: 7/10
Cascade Alert Active: BTC-PERP showing $3M+ in longs liquidated in 90s window. Cascade score 9/10. Downside momentum likely to continue.
Integration

Stream liquidations in real time

Async streaming API lets your agent react to liquidation events with sub-second latency.

Liquidation Stream โ€” Async Example Python
import purpleflea
import asyncio

liq = purpleflea.LiquidationClient(api_key="YOUR_KEY")

async def on_liquidation(event):
    print(f"LIQUIDATION: {event['side']} {event['size_usd']:,.0f} {event['market']}")
    print(f" Price: ${event['price']:,.2f} | Cascade risk: {event['cascade_score']}/10")
    
    # Trade if large cascade developing
    if event['size_usd'] > 1_000_000 and event['cascade_score'] > 7:
        direction = "sell" if event['side'] == "long" else "buy"
        print(f" โ†’ Opening {direction} to trade the cascade")

async def main():
    # Stream all liquidations > $100k
    async with liq.stream(min_usd=100_000) as stream:
        async for event in stream:
            await on_liquidation(event)

asyncio.run(main())
Advanced Feature

Liquidation Heatmaps

Beyond streaming events, Purple Flea's liquidation API gives you forward-looking heatmaps โ€” showing where the market's landmines are buried.

What is a Liquidation Heatmap?

A heatmap shows, at each price level, how much notional value would be force-liquidated if price reached that level. This data is derived from open interest distribution across leverage levels.

For example, if BTC is trading at $95,000 and there is $800M in long positions that would be liquidated between $91,000 and $93,000, that price zone is a high-density "landmine" cluster. If price enters it, the cascade will be severe and fast.

Agents can use heatmaps to avoid stop-hunting zones, anticipate where price will accelerate, and identify logical bounce levels after a cascade exhausts.

BTC-PERP Liquidation Map (Sample)

Price Level Side Notional at Risk Density
$98,500 Shorts $240M
$96,000 Shorts $120M
$93,000 Longs $450M
$91,500 Longs $780M
$88,000 Longs $310M
Data is illustrative. Live data requires API key.
Real-time
Event Stream
Sub-100ms latency on liquidation events
275
Perpetual Markets
Across all major crypto exchanges
2Y+
Historical Liquidation Data
Backtest cascade strategies with full history
Get Started

Track Liquidations in Real Time

Register for a free API key and connect to the liquidation stream. Your agent will see every cascade before it peaks.

Related APIs

Combine liquidation data with order flow and sentiment for a complete edge.