A bot that scrapes open-interest and liquidation heatmaps to alert traders when a "Short Squeeze" or "Long Squeeze" is imminent.
Liquidation Cluster Signal Scraper
Automated crypto liquidation heatmap signal detector for Binance, Bybit, and OKX futures markets.

Liquidation Cluster Signal Scraper is an open-source crypto trading signal tool that detects potential short squeeze and long squeeze events by monitoring liquidation heatmaps and open interest (OI) data across major derivatives exchanges.
The system continuously analyzes liquidation clusters, price proximity, and open interest acceleration to identify areas where leveraged traders are likely to be liquidated. These zones often act as liquidity magnets and can trigger rapid price moves in futures markets.
The scraper collects data from:
- Binance Futures
- Bybit Perpetuals
- OKX derivatives markets
- liquidation heatmap sources such as Coinglass
- price approaches a high-density liquidation cluster
- open interest increases rapidly near that level
- cluster density exceeds a configurable threshold
๐ง How the Squeeze Detector Works
Most traders watch liquidation heatmaps manually. They see a bright cluster on Coinglass, think "that looks like a magnet," and either act on instinct or hesitate too long.
This bot removes the human latency from that loop.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LIQUIDATION CLUSTER SIGNAL PIPELINE โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ Exchange APIs / Heatmap Scrapers โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Binance Futures OI Feed โโโโโโโโ โ
โ โ Bybit Liquidation WS โ โ โ
โ โ OKX Open Interest REST โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Cluster Parser โ โ
โ Heatmap Visual Scraper โ + OI Delta โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Correlator โ โ
โ โ Coinglass DOM Scraper โโโโถโ โ โ
โ โ Hyblock Heatmap Parser โ โโโโโโโโโโฆโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Squeeze Signal โ โ
โ โ Engine โ โ
โ โ SHORT / LONG โ โ
โ โโโโโโโโโโฆโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ โ
โ โผ โผ โผ โ
โ Console Alert Log File [Private] โ
โ + Threshold + History Telegram Push โ
โ Trigger Replay + Discord โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The core insight: Liquidation clusters are not random. They form where leveraged traders placed stops โ and where price is statistically attracted once momentum builds toward them. By tracking both the heatmap density (where clusters sit) and OI delta (whether new positions are being added into resistance), the bot distinguishes between clusters that will be swept and clusters that will hold.
๐ก Live Signal Output Samples
What the bot actually prints when it fires. These are representative outputs from paper-mode runs.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
LIQUIDATION CLUSTER SIGNAL SCRAPER | v0.3.1
Asset: BTCUSDT | Exchange: Binance Futures
Scan Interval: 30s | Mode: PAPER
UTC: 2026-03-11 14:22:07
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[14:22:07] OI SNAPSHOT BTC/USDT โ OI: $14.82B ฮ+1h: +$312M (+2.15%) [14:22:07] HEATMAP PARSE Cluster detected @ $84,200 โ Density: โโโโโโโโโโ HIGH [14:22:07] HEATMAP PARSE Cluster detected @ $81,500 โ Density: โโโโโโโโโโ MED [14:22:07] PRICE Current: $83,440 | Dist to upper cluster: 0.90%
[14:22:37] OI DELTA +$48M in 30s โ ACCELERATION DETECTED [14:22:37] SIGNAL ENGINE โก SHORT SQUEEZE SETUP FORMING โโ Cluster proximity: 0.90% above current price โโ OI acceleration: +$48M / 30s (threshold: $30M) โโ Cluster density score: 8.2 / 10 โโ Confidence: HIGH
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ด ALERT: SHORT SQUEEZE IMMINENT โ BTCUSDT @ $83,440 Target cluster: $84,200 (+0.90%) Recommendation: Monitor for long entry on confirmation candle Paper mode โ no order placed โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[14:24:11] PRICE $84,190 โ Cluster approached [14:24:11] OI DELTA -$187M in 90s โ SHORT LIQUIDATIONS FIRING [14:24:11] SIGNAL ENGINE โ
SQUEEZE CONFIRMED โ cluster swept โโ Move: +$750 (+0.90%) in 94 seconds
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Asset: ETHUSDT | Exchange: Bybit Perpetuals
UTC: 2026-03-11 09:47:33
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[09:47:33] HEATMAP PARSE Cluster @ $3,105 โ Density: โโโโโโโโโโ EXTREME [09:47:33] OI SNAPSHOT ETH/USDT โ OI: $8.1B ฮ+1h: -$220M (-2.64%) [09:47:33] SIGNAL ENGINE โก LONG SQUEEZE SETUP FORMING โโ Cluster proximity: 1.2% below current price ($3,143) โโ OI declining into support โ longs adding at resistance โโ Cluster density score: 9.7 / 10 โโ Confidence: HIGH
[09:48:44] ALERT: LONG SQUEEZE IMMINENT โ ETHUSDT @ $3,143 Target cluster: $3,105 (-1.2%) Paper mode โ no order placed
[09:51:02] SQUEEZE CONFIRMED โ ETH swept to $3,098 in 138 seconds
๐ฌ Key Features of the Liquidation Cluster Signal Scraper
| Feature | What It Does | |---|---| | Heatmap DOM Parser | Scrapes live liquidation heatmap data from major sources โ no paid API required | | OI Delta Engine | Tracks open-interest change rate per configurable interval (15s / 30s / 60s) | | Cluster Proximity Trigger | Fires alert when price enters configurable % range of a high-density cluster | | Squeeze Classifier | Distinguishes SHORT squeeze setups from LONG squeeze setups based on OI direction | | Confidence Scoring | Combines cluster density + OI acceleration + price distance into a single score | | Paper Mode | Full signal pipeline runs without any trade execution โ validate before you deploy | | History Logger | Every signal written to JSON log with outcome tracking for backreview | | Configurable Thresholds | All sensitivity values tunable per asset in config.yaml |
โก Why Not Just Use Coinglass?
This is the honest answer to the most common question.
Coinglass is excellent at showing you the heatmap. It does not alert you when a cluster is about to be hit, correlate it with OI acceleration, or make any programmatic decision. You are still the bottleneck โ watching a browser tab.
| Capability | Coinglass | Hyblock | TradingView Script | This Bot | |---|:---:|:---:|:---:|:---:| | Live liquidation heatmap | โ | โ | โ | โ | | Automated proximity alert | โ | โ | Partial | โ | | OI delta correlation | Manual | Manual | โ | โ | | Short vs Long squeeze classification | โ | โ | โ | โ | | Confidence scoring per cluster | โ | โ | โ | โ | | Runs locally (your machine) | โ | โ | โ | โ | | Open source & auditable | โ | โ | Partial | โ | | No monthly subscription | โ ($30-50/mo) | โ ($200+/mo) | Partial | โ | | Push alerts (Telegram/Discord) | โ | โ | โ | ๐ Private build | | Multi-asset parallel scan | โ Manual | โ Manual | โ | ๐ Private build | | ML cluster scoring | โ | โ | โ | ๐ Private build |
๐๏ธ Architecture Deep-Dive
The signal pipeline has four distinct layers. Understanding each one helps you tune it intelligently.
Layer 1 โ Data Ingestion Two parallel streams feed the parser: exchange WebSocket/REST feeds for live OI snapshots, and a Selenium-based DOM scraper for heatmap density values. Both streams are normalized into a common internal format before the cluster engine sees them.
Layer 2 โ Cluster Parser The parser identifies price levels where liquidation density exceeds a configurable threshold. It scores each cluster on a 1โ10 scale using density magnitude, cluster width, and recency of formation. Only clusters above the score floor are passed to the signal engine.
Layer 3 โ Signal Engine The engine evaluates proximity (current price vs. nearest high-score cluster), OI delta direction and acceleration, and whether OI is net increasing or decreasing into the cluster. This combination separates a genuine squeeze setup from a cluster that price has already neutralized.
Layer 4 โ Alert Dispatch Console output with structured formatting in the public build. The private build adds Telegram bot integration, Discord webhook, and a local SQLite log with win-rate tracking per signal type.
๐ ๏ธ Installation
Requirements: Python 3.11+, Chrome/Chromium (for Selenium scraper), a terminal.
Step 1 โ Clone the repository
git clone https://github.com/Leionion/liquidation-cluster-signal-scraper.git cd liquidation-cluster-signal-scraper
Step 2 โ Create a virtual environment
python3 -m venv venv source venv/bin/activate # Linux / macOS venv\Scripts\activate # Windows
Step 3 โ Install dependencies
pip install -r requirements.txt
Step 4 โ Configure your targets
cp config.example.yaml config.yaml nano config.yaml # or open in any editor
Step 5 โ Run in paper mode first (strongly recommended)
python3 main.py --mode paper
Paper mode runs the full signal pipeline with live data โ alerts fire to console and log, but no orders are sent and no exchange credentials are required.
โ๏ธ Configuration
# config.yaml โ Liquidation Cluster Signal Scraper
โโ Assets to monitor โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
assets:
- symbol: BTCUSDT
exchange: binance # binance | bybit | okx
interval: 30 # OI snapshot interval in seconds
- symbol: ETHUSDT
exchange: bybit
interval: 30
โโ Cluster Detection Thresholds โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
cluster:
mindensityscore: 6.0 # 1โ10 โ clusters below this score are ignored
proximity_pct: 1.5 # Alert when price is within 1.5% of cluster
lookback_candles: 24 # How many periods of OI history to load on start
โโ OI Acceleration Trigger โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
oi_delta:
acceleration_usd: 30000000 # $30M OI change per interval triggers flag
direction_confirm: true # Require OI direction to match squeeze type
โโ Signal Engine โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
signal:
min_confidence: 7.0 # Minimum composite score to fire an alert
cooldown_seconds: 120 # Min time between alerts for same asset
โโ Output โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
output:
log_file: logs/signals.json # Signal history log path
console: true # Print alerts to terminal
# telegram: false # Available in private build
# discord: false # Available in private build
โโ Runtime โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
mode: paper # paper | live (live requires exchange API keys)
log_level: INFO # DEBUG | INFO | WARNING
๐ Supported Exchanges & Data Sources
| Source | Type | OI Data | Heatmap Data | Status | |---|---|:---:|:---:|:---:| | Binance Futures | WebSocket + REST | โ | โ (scraper) | Stable | | Bybit Perpetuals | WebSocket + REST | โ | โ (scraper) | Stable | | OKX Futures | REST | โ | ๐ v0.5 | In Progress | | Coinglass | DOM Scraper | โ | โ | Stable | | Hyblock | DOM Scraper | โ | ๐ v0.5 | Planned | | dYdX | REST | ๐ v0.6 | โ | Planned |
๐บ๏ธ Roadmap
โ
SHIPPED
v0.1.0 โ Binance OI delta engine + console alerts
v0.2.0 โ Selenium heatmap scraper (Coinglass)
v0.3.0 โ Cluster density scoring (1โ10 composite)
v0.3.1 โ Short vs Long squeeze classifier
v0.3.2 โ Paper mode + JSON signal logger
๐จ ACTIVE DEVELOPMENT v0.4.0 โ Bybit heatmap scraper integration v0.4.1 โ OI acceleration threshold tuning UI v0.4.2 โ Signal confidence backreview report generator
๐ PLANNED (public build) v0.5.0 โ OKX support + multi-source cluster consensus v0.5.1 โ Hyblock DOM parser v0.6.0 โ CLI dashboard with real-time cluster map
๐ PRIVATE BUILD (in active development โ contact for access) โ Telegram + Discord push alert integration โ Parallel multi-asset scanner (unlimited symbols) โ ML cluster scoring model (trained on 18 months of sweep data) โ Win-rate tracker with per-signal-type breakdown โ Webhook output for integration with any trading system โ Exchange order execution module (paper-validated before live)
๐ Security & Privacy Architecture
This bot runs entirely on your machine. Understanding exactly what touches the network:
- Exchange WebSocket / REST calls โ read-only public endpoints. No API key required in paper mode. In live mode, keys stay in your local
config.yamland are never transmitted anywhere except to the exchange. - Heatmap scraper (Selenium) โ opens a local Chrome instance and reads DOM data from the heatmap site. No credentials stored or sent.
- Log files โ written to your local filesystem. Never uploaded.
- No telemetry, no phone-home, no analytics. The codebase is fully auditable.
๐ผ Want the Full Version?
The public repo gives you the complete signal detection pipeline โ data ingestion, cluster parsing, OI correlation, and paper-mode alerting.
The private build adds the layer that turns signals into workflow: push alerts the moment a squeeze sets up, parallel scanning across every asset you care about simultaneously, and an ML scoring layer that has been trained on 18 months of confirmed sweep events to reduce noise.
This is built for:
| Profile | Why They Use the Full Build | |---|---| | Crypto futures traders running intraday plays on BTC, ETH, and alts โ who are tired of missing squeezes because they weren't watching the right chart at the right second | Real-time Telegram alerts mean the setup finds you, not the other way around | | Algorithmic traders who already have execution infrastructure and need a reliable, auditable signal feed they can pipe into their own system | Webhook output + JSON signal format integrates with any stack in under an hour | | Multi-asset traders scanning 10+ perpetuals simultaneously | Parallel scanner handles N assets with no degradation in signal latency | | Systematic traders who want to know whether a signal type actually has edge before sizing into it | Win-rate breakdown per signal type, per asset, per session โ in a local dashboard |
How to reach me:
โ GitHub: @Leionion
When you message, mention three things:
- Which assets or exchanges you're primarily trading
- Whether you need the alerts only, or alerts + execution
- Whether you've run the public build already (not required โ just helps me calibrate)