Skip to content
cccskills
FreePublished on GitHub

liquidation-heatmap

Interpret crypto liquidation heatmaps, which show estimated price levels where leveraged positions may be forcibly closed. Organize major clusters, compare concentrations above and below the current price, and assess cascade risks and potential support or resistance zones.

OriginalShow the original description

Liquidation level analysis and heatmap interpretation — identify leveraged position concentration, liquidation cascades, stop-hunt zones, and use liquidation data as support/resistance signals.

See how to install

Good for

  • Identify price zones with concentrated forced liquidations
  • Assess the risk of cascading liquidations
  • Review potential support and resistance after large liquidations
  • Summarize daily liquidation totals and long/short imbalances

Files included (1)

  • SKILL.md11.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Liquidation Heatmap & Level Analysis

Overview

Analyze the distribution of leveraged positions and their liquidation price levels to identify zones where forced selling/buying will accelerate price moves. Liquidation clusters act as "magnets" — price tends to be attracted toward large liquidation concentrations because market makers and whales profit from triggering cascading liquidations.

Core Concepts

1. Liquidation Mechanics

How liquidation works:

# Long position liquidation
long_liquidation_price = entry_price * (1 - 1/leverage + maintenance_margin)

# Short position liquidation
short_liquidation_price = entry_price * (1 + 1/leverage - maintenance_margin)

# Example: BTC long at $65,000, 10x leverage, 0.5% maintenance margin
# Liquidation: $65,000 * (1 - 1/10 + 0.005) = $58,825
# A 9.5% move against the position triggers liquidation

Leverage and liquidation distance:

LeverageLiquidation Distance (Long)Liquidation Distance (Short)
2x~50% drop~50% rise
5x~20% drop~20% rise
10x~10% drop~10% rise
20x~5% drop~5% rise
50x~2% drop~2% rise
100x~1% drop~1% rise

2. Liquidation Heatmap Interpretation

A liquidation heatmap shows where liquidation orders are concentrated across different price levels, typically color-coded by density.

Reading the heatmap:

Price Level    Long Liquidations    Short Liquidations    Interpretation
$70,000        ░░░░░░░░░░          ████████████████      Heavy short liquidation zone
$68,000        ░░░░                ██████████            Moderate short liquidation
$66,000        ███████             ███████               Balanced (current price area)
$64,000        ██████████          ░░░░                  Moderate long liquidation
$62,000        ████████████████    ░░░░░░░░░░            Heavy long liquidation zone

Key principles:

  1. Liquidation clusters are magnets: price tends to gravitate toward large liquidation pools because the forced orders provide liquidity for whales to fill their positions
  2. Liquidation cascades: when a cluster gets hit, the forced selling/buying pushes price further, potentially triggering the next cluster → cascade effect
  3. After liquidation wipe: once a large cluster is liquidated, that price level often becomes support/resistance (overleveraged positions are gone)

3. Liquidation Level Identification

def identify_liquidation_clusters(open_interest_by_price, leverage_distribution):
    """
    Estimate where liquidation clusters exist based on
    open interest and leverage distribution.
    """
    clusters = []

    for price_level in price_range:
        # Long liquidations: positions opened above this level with high leverage
        long_liq_volume = estimate_long_liq_at_price(
            open_interest_by_price, leverage_distribution, price_level
        )

        # Short liquidations: positions opened below this level with high leverage
        short_liq_volume = estimate_short_liq_at_price(
            open_interest_by_price, leverage_distribution, price_level
        )

        total = long_liq_volume + short_liq_volume

        if total > significance_threshold:
            clusters.append({
                "price": price_level,
                "long_liq": long_liq_volume,
                "short_liq": short_liq_volume,
                "type": "long" if long_liq_volume > short_liq_volume else "short",
                "magnitude": total,
            })

    return sorted(clusters, key=lambda x: x["magnitude"], reverse=True)

4. Liquidation-Based Trading Signals

Signal 1: Liquidation Magnet

def liquidation_magnet_signal(current_price, clusters):
    """
    Price is likely to move toward the nearest large liquidation cluster.
    """
    # Find nearest cluster above and below
    above = [c for c in clusters if c["price"] > current_price]
    below = [c for c in clusters if c["price"] < current_price]

    nearest_above = min(above, key=lambda c: c["price"] - current_price) if above else None
    nearest_below = min(below, key=lambda c: current_price - c["price"]) if below else None

    if nearest_above and nearest_below:
        above_magnitude = nearest_above["magnitude"]
        below_magnitude = nearest_below["magnitude"]

        if above_magnitude > below_magnitude * 2:
            return "upward_magnet"      # Larger cluster above → price likely moves up
        elif below_magnitude > above_magnitude * 2:
            return "downward_magnet"    # Larger cluster below → price likely moves down
        else:
            return "balanced"           # Both sides have similar clusters

Signal 2: Cascade Risk

def cascade_risk(current_price, clusters, direction="down"):
    """
    Assess risk of liquidation cascade — multiple clusters stacked close together.
    """
    if direction == "down":
        relevant = sorted([c for c in clusters if c["price"] < current_price and c["type"] == "long"],
                         key=lambda c: c["price"], reverse=True)
    else:
        relevant = sorted([c for c in clusters if c["price"] > current_price and c["type"] == "short"],
                         key=lambda c: c["price"])

    if len(relevant) < 2:
        return "low_cascade_risk"

    # Check if clusters are stacked within 5% of each other
    gaps = []
    for i in range(len(relevant) - 1):
        gap = abs(relevant[i]["price"] - relevant[i+1]["price"]) / current_price * 100
        gaps.append(gap)

    if min(gaps) < 2:
        return "high_cascade_risk"      # Clusters stacked tightly → cascade likely
    elif min(gaps) < 5:
        return "moderate_cascade_risk"
    else:
        return "low_cascade_risk"

Signal 3: Post-Liquidation Support/Resistance

def post_liquidation_sr(price_history, liquidation_events):
    """
    After a large liquidation event, that price level often becomes S/R.
    """
    sr_levels = []
    for event in liquidation_events:
        if event.total_liquidated > 100_000_000:  # >$100M liquidated
            sr_levels.append({
                "price": event.price_level,
                "type": "support" if event.liquidation_type == "long" else "resistance",
                "strength": event.total_liquidated,
                "date": event.date,
            })
    return sr_levels

5. Liquidation Data Metrics

Key metrics to track:

MetricDescriptionSignal
24h total liquidationsTotal USD liquidated across all exchanges> $500M = extreme, volatility spike
Long/Short liquidation ratioLongs liquidated / Shorts liquidated> 2 = longs squeezed, < 0.5 = shorts squeezed
Largest single liquidationBiggest individual position liquidated> $10M = whale liquidation
OI change post-liquidationOpen interest change after eventLarge OI drop = leverage washed out (healthy)
Exchange-specific liquidationWhich exchange had most liquidationsIndicates where leverage is concentrated

Liquidation volume interpretation:

24h LiquidationsMarket StateImplication
> $1BExtreme eventMajor leverage wipeout, potential V-reversal
$500M - $1BHigh volatilitySignificant positioning reset
$200M - $500MElevatedModerate leverage reduction
$50M - $200MNormalBackground noise
< $50MCalmLow volatility, leverage building

6. Liquidation Cascade Anatomy

Typical cascade sequence:

1. Initial trigger (macro event, whale selling, technical breakdown)
   ↓
2. Price hits first liquidation cluster ($65,000)
   → $200M in long liquidations forced to sell
   ↓
3. Forced selling pushes price to next cluster ($63,000)
   → $300M more in long liquidations
   ↓
4. Cascade accelerates → high-leverage positions ($62,000-$60,000)
   → $500M in rapid succession
   ↓
5. Eventually: open interest drops 20-30%, funding rate flips negative
   → Leverage is "washed out" → bottom forms
   ↓
6. Recovery begins (short-term) as no more forced sellers remain

Trading around cascades:

  • Before cascade: reduce leverage, set wider stops, avoid high-leverage longs near heavy liquidation zones
  • During cascade: do NOT try to catch the knife; wait for OI to stabilize
  • After cascade: when funding rate flips deeply negative + OI has dropped 20%+, contrarian long entry with tight risk

7. Exchange-Level Liquidation Differences

ExchangeLiquidation EngineKey Feature
OKXTiered auto-deleveragingPartial liquidation (reduce position size, not full close)
BinanceInsurance fund + ADLLargest insurance fund (~$1B+) reduces cascade severity
BybitADL (Auto-Deleveraging)ADL triggers when insurance fund depleted
dYdXOn-chain liquidationTransparent, anyone can liquidate (MEV opportunity)

Data Sources

SourceAccessData Available
CoinGlassFree (limited)Liquidation heatmap, 24h liquidations, OI
LaevitasFree/PaidOptions + futures liquidation levels
Kingfisher (Coinalyze)PaidReal-time liquidation level estimates
Hyblock CapitalPaidProfessional liquidation heatmaps
OKX APIFreeHistorical liquidation data
DeFi LlamaFreeDeFi protocol liquidation data

Output Format

## Liquidation Analysis — [Asset] — [Date]

### Liquidation Overview (24h)
- **Total liquidated**: $XXX M
- **Long liquidated**: $XXX M (XX%)
- **Short liquidated**: $XXX M (XX%)
- **Largest single**: $XX M [exchange]
- **Market state**: [extreme / elevated / normal / calm]

### Key Liquidation Levels
| Price Level | Type | Est. Volume | Distance from Current | Priority |
|------------|------|-------------|----------------------|----------|
| $XX,XXX | Short liq cluster | $XXX M | +X.X% | High |
| $XX,XXX | Long liq cluster | $XXX M | -X.X% | High |
| $XX,XXX | Long liq cluster | $XXX M | -X.X% | Medium |

### Heatmap Summary
- **Strongest upside magnet**: $XX,XXX (short liquidation cluster, $XXX M)
- **Strongest downside magnet**: $XX,XXX (long liquidation cluster, $XXX M)
- **Asymmetry**: [upside magnet stronger / downside stronger / balanced]

### Cascade Risk
- **Downside cascade risk**: [high / moderate / low]
  - [X clusters stacked within X% below current price]
- **Upside cascade risk**: [high / moderate / low]

### Post-Liquidation S/R Levels
- **Recent support formed**: $XX,XXX (long liquidation wipeout on DATE)
- **Recent resistance formed**: $XX,XXX (short liquidation wipeout on DATE)

### Trading Implications
- **Bias**: [upward magnet stronger → mild bullish / downward → bearish]
- **Risk**: [high leverage zone within X% → reduce position size]
- **Key level**: [$XX,XXX — if broken, cascade risk activates]

Notes

  • Liquidation data is estimated, not exact — exchanges do not publish real-time liquidation level details for all users
  • Heatmap providers use statistical models based on OI and leverage distribution to estimate liquidation prices
  • Liquidation levels shift constantly as traders open/close positions — treat as dynamic zones, not fixed prices
  • "Stop hunts" (price briefly touching a liquidation cluster then reversing) are common — market makers deliberately trigger clusters
  • DeFi liquidations are fully transparent (on-chain) but CEX liquidations are opaque
  • This framework is for research purposes only and does not constitute investment advice

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

adr-hshare

FreeSummary

Compare a Chinese company's US depositary receipts, Hong Kong shares, and mainland shares after adjusting for exchange rates and share ratios. Analyze pricing gaps, valuation differences, and delisting risks to support research into its different listings.

  • Compare A-share and H-share pricing gaps
  • Measure ADR premiums against Hong Kong shares
  • Review US delisting risks and Hong Kong listing alternatives
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

akshare

FreeSummary

Retrieve stock prices, futures quotes, exchange rates, and economic indicators with the free Python library AKShare. The skill explains market-specific functions, symbol formats, and data preparation for analysis and testing strategies against historical data.

  • Retrieve historical prices for Chinese, US, and Hong Kong stocks
  • Collect Chinese GDP and consumer price data
  • Check futures quotes and foreign exchange rates
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

alpha-zoo

FreeSummary

Explore bundled libraries of investment factors, signals used to compare securities, and inspect individual formulas and metadata. Evaluate a factor or an entire library across a chosen universe and period, producing aggregate performance statistics and an HTML report.

  • Find bundled momentum or reversal factors
  • Inspect a named factor's formula and metadata
  • Compare a factor library across a chosen universe and period
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

Assess whether a Chinese A-share company may receive ST or *ST risk warnings next financial year. Review financial forecasts, dividends, audit opinions, and regulatory penalties, then report risk severity separately from confidence in the prediction.

  • Reviewing a Chinese A-share company's future ST risk
  • Assessing escalation risk for an existing ST or *ST stock
  • Checking revenue, equity, and dividend warning signs
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

asset-allocation

FreeSummary

Plan portfolio allocations across assets using risk, correlations, return forecasts, and trading costs. Compare five optimization methods, produce settings for config.json, and define rebalancing rules that adjust holdings back toward their target weights.

  • Comparing allocations across stocks, bonds, and gold
  • Choosing an optimizer based on return forecasts and correlations
  • Preparing portfolio settings for config.json
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

Diagnose failed or abnormal backtests, which test trading strategies on historical data. Inspect result files, strategy code, and configuration to identify bugs, make targeted repairs, rerun tests, and verify the updated metrics.

  • Investigating backtest execution errors
  • Finding why a strategy produces no trades
  • Checking delayed trades or low capital usage
HKUDS/Vibe-Trading36.3KUpdated Oct 22, 2026

See all skills by HKUDS

Report a problem with this skill