Agent skill

Liquidation Heatmap Analysis

by HKUDS in HKUDS/Vibe-Trading

Reads open-position data and liquidation heatmaps to find liquidation clusters, cascade risk and stop-hunt zones, and uses them as support and resistance signals.

MITAuto-check passedBusiness, Finance & HR

Install Liquidation Heatmap Analysis

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill liquidation-heatmap -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading liquidation-heatmap --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/liquidation-heatmap .claude/skills/liquidation-heatmap && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
liquidation-heatmap
GitHub stars
35k
Token cost
~3k tokens
SKILL.md length
567 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Reads open-position data and liquidation heatmaps to find liquidation clusters, cascade risk and stop-hunt zones, and uses them as support and resistance signals.

  • Works in 7 steps: Liquidation Mechanics → Liquidation Heatmap Interpretation → Liquidation Level Identification → …
  • Reading a liquidation heatmap for clusters of long and short forced orders
  • SKILL.md covers Overview, Core Concepts, Data Sources and Output Format, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The skill starts from liquidation mechanics, showing how the liquidation price of a long position depends on entry price, the borrowing multiple and maintenance margin, and tabulating how far price must move to liquidate at multiples from 2x up to 100x. A heatmap shows where long and short liquidations pile up across price levels, and the skill's premise is that large clusters act as magnets for price.

Interpretation rules cover cascades, where one cluster being hit pushes price into the next, and the tendency of a wiped-out level to become support or resistance because the overextended positions are gone. Code outlines estimate cluster locations from open interest and the spread of borrowing multiples and turn them into signals such as a liquidation magnet and cascade risk.

When your agent uses it

  • Reading a liquidation heatmap for clusters of long and short forced orders
  • Estimating how close a margin position is to liquidation
  • Assessing cascade risk around a large liquidation level
  • Using cleared liquidation levels as support or resistance

Example prompts

  • “Where are the biggest long and short liquidation clusters on this heatmap?”
  • “How far must price fall to liquidate a 10x long?”
  • “Is there cascade risk if price breaks below the nearest cluster?”
  • “Turn open interest by price into estimated liquidation clusters.”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Liquidation Mechanics
  2. Liquidation Heatmap Interpretation
  3. Liquidation Level Identification
  4. Liquidation-Based Trading Signals
  5. Liquidation Data Metrics
  6. Liquidation Cascade Anatomy
  7. Exchange-Level Liquidation Differences

What it can do on your machine

Read from SKILL.md and the folder at commit e532650. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Liquidation Heatmap Analysis loads about 3k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 567 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit e532650, republished under its MIT licence (© HKUDS). 567 words, ~2,989 tokens.

Download SKILL.mdSave it as .claude/skills/liquidation-heatmap/SKILL.md (or your agent's skills folder).
name
liquidation-heatmap
description
Liquidation level analysis and heatmap interpretation — identify leveraged position concentration, liquidation cascades, stop-hunt zones, and use liquidation data as support/resistance signals.
category
crypto

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:

python
# 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
python
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

python
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

python
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

python
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
Show full SKILL.md (242 more words)Show less
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

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agent/src/skills/liquidation-heatmap of HKUDS/Vibe-Trading.

Open the folder on GitHubat commit e532650

Compare with similar skills

Liquidation Heatmap Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Liquidation Heatmap Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Liquidation Heatmap Analysis this skillHKUDS/Vibe-Trading35k—~3kAutomated safety check: PassMIT
CCXT Crypto Exchange Library2025Emma/vibe-coding-cn23k1 repos~4.4kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Minara Crypto Trading and WalletMinara-AI/minara-skills362—~5.7kAutomated safety check: PassNone
AI-Trader Trade SyncHKUDS/AI-Trader23k—~1.1kAutomated safety check: PassNone
Okx Cex Marketdex-original/okx-agent-trade-kit1101 repos~2.7kAutomated safety check: PassMIT

Similar skills

  • CCXT Crypto Exchange Library

    2025Emma/vibe-coding-cn

    Reference help for the CCXT library covering crypto exchange APIs, market data, trading and order management across 150+ exchanges in JavaScript, Python and PHP.

    23k GitHub starsUsed in 1 repo~4.4k tokens
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Minara Crypto Trading and Wallet

    Minara-AI/minara-skills

    Drives the Minara CLI for crypto swaps, perps, limit orders, wallet transfers, deposits and withdrawals, plus AI market analysis.

    362 GitHub stars~5.7k tokensUpdated 22 days ago
    Business, Finance & HRAuto-check passed
  • AI-Trader Trade Sync

    HKUDS/AI-Trader

    Uploads positions and trade history to the AI-Trader copy-trading platform and pushes real-time buy, sell, short and cover signals to followers.

    23k GitHub stars~1.1k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Okx Cex Market

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…

    110 GitHub starsUsed in 1 repo~2.7k tokens
    Business, Finance & HRAuto-check passed
  • Bitget Wallet

    bitget-wallet-ai-lab/bitget-wallet-skill

    Interact with Bitget Wallet API for crypto market data, token info, swap quotes, RWA (real-world asset) stock trading, and security audits.

    245 GitHub stars~7.6k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Questions about Liquidation Heatmap Analysis

What does Liquidation Heatmap Analysis do?

Reads open-position data and liquidation heatmaps to find liquidation clusters, cascade risk and stop-hunt zones, and uses them as support and resistance signals. The skill starts from liquidation mechanics, showing how the liquidation price of a long position depends on entry price, the borrowing multiple and maintenance margin, and tabulating how far price must move to liquidate at multiples from 2x up to 100x. A heatmap shows where long and short liquidations pile up across price levels, and the skill's premise is that large clusters act as magnets for price.

When should I use Liquidation Heatmap Analysis?

Liquidation Heatmap Analysis fits situations like: reading a liquidation heatmap for clusters of long and short forced orders; estimating how close a margin position is to liquidation; assessing cascade risk around a large liquidation level; using cleared liquidation levels as support or resistance.

How do I install Liquidation Heatmap Analysis in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill liquidation-heatmap -a claude-code`. Or copy the skill folder (agent/src/skills/liquidation-heatmap in HKUDS/Vibe-Trading) into .claude/skills/liquidation-heatmap in your project. Claude Code loads it when a task matches its description.

How do I install Liquidation Heatmap Analysis in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill liquidation-heatmap -a codex`. Or copy the skill folder (agent/src/skills/liquidation-heatmap in HKUDS/Vibe-Trading) into .agents/skills/liquidation-heatmap in your project. Codex loads it when a task matches its description.

Can I use Liquidation Heatmap Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill liquidation-heatmap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/liquidation-heatmap, .gemini/skills/liquidation-heatmap, .github/skills/liquidation-heatmap and .opencode/skills/liquidation-heatmap in your project.

What does Liquidation Heatmap Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Liquidation Heatmap Analysis is instructions for the agent only.

Does Liquidation Heatmap Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Liquidation Heatmap Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Liquidation Heatmap Analysis use?

Liquidation Heatmap Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Liquidation Heatmap Analysis use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Liquidation Heatmap Analysis?

Skills that share tags, products or a category with Liquidation Heatmap Analysis: CCXT Crypto Exchange Library (2025Emma/vibe-coding-cn, 23k stars), Polyclaw (chainstacklabs/polyclaw, 359 stars), Minara Crypto Trading and Wallet (Minara-AI/minara-skills, 362 stars) and AI-Trader Trade Sync (HKUDS/AI-Trader, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Liquidation Heatmap Analysis?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,043 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.