A professional cryptocurrency liquidation heatmap visualization tool similar to Coinglass, built with Python, CCXT, and Streamlit.
- π Real-time Data: Live order book and price data from major exchanges
- π Interactive Heatmap: Plotly-based visualizations with hover details
- βοΈ Leverage Analysis: Support for 5x, 10x, 25x, 50x, 100x, 125x leverage
- π Multi-Exchange: Binance, OKX, Bybit support via CCXT
- π° Multiple Pairs: BTC/USDT, ETH/USDT, SOL/USDT, and more
- π Web Interface: Professional Streamlit dashboard
- π± Mobile Responsive: Works on desktop and mobile
The liquidation heatmap visualizes potential liquidation levels based on:
- Current order book depth from live exchanges
- Leverage calculations for different position sizes
- Volume concentration at critical price levels
- Support/Resistance zones where liquidations cluster
Red zones = Long liquidations (price goes down)
Green zones = Short liquidations (price goes up)
Hot spots = High liquidation density
- Fork this repository
- Go to share.streamlit.io
- Deploy your forked repo
- Done! β¨
# Clone the repository
git clone https://github.com/yourusername/liquidation-heatmap.git
cd liquidation-heatmap
# Install dependencies
pip install -r requirements.txt
# Run Streamlit app
streamlit run streamlit_app.py
# Or run CLI version
python src/main.py --symbol BTC/USDTstreamlit run streamlit_app.pyThen open http://localhost:8501 in your browser.
# Basic usage
python src/main.py
# Custom symbol and exchange
python src/main.py --symbol ETH/USDT --exchange binance
# Generate static charts
python src/main.py --output static --save-path ./charts/heatmap
# Both interactive and static
python src/main.py --output both --save-path ./output/analysisCurrent BTC price: $107,836.90
Heatmap data points: 100
Long liquidation levels:
5x: $86,269.52 (20.00% down)
10x: $97,053.21 (10.00% down)
25x: $103,523.42 (4.00% down)
Short liquidation levels:
5x: $129,404.28 (20.00% up)
10x: $118,620.59 (10.00% up)
25x: $112,150.38 (4.00% up)
liquidation_heatmap/
βββ streamlit_app.py # Web interface (main entry point)
βββ src/
β βββ main.py # CLI interface
β βββ data_fetcher.py # CCXT data fetching
β βββ visualizer.py # Plotly/matplotlib charts
βββ data/ # Cached data
βββ output/ # Generated charts
βββ requirements.txt # Dependencies
- Binance (default)
- OKX
- Bybit
- BTC/USDT, ETH/USDT, BNB/USDT
- SOL/USDT, ADA/USDT, DOT/USDT
- Any pair supported by the exchange
- 5x, 10x, 25x, 50x, 100x, 125x (customizable)
One-command deployment:
curl -fsSL https://raw.githubusercontent.com/vsching/liquidation-heatmap/main/deploy-digitalocean.sh | bash- β Real API access - No restrictions
- β $4-6/month - Very affordable
- β Custom domain - Professional setup
- β Full control - Your own server
# Clone and run with Docker
git clone https://github.com/vsching/liquidation-heatmap.git
cd liquidation-heatmap
docker-compose up -drailway up
# or
git push heroku mainLong Liquidation Price = Entry Price Γ (1 - 1/Leverage)
Short Liquidation Price = Entry Price Γ (1 + 1/Leverage)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational and research purposes only. Not financial advice. Always do your own research before making trading decisions.
- CCXT - Cryptocurrency trading API
- Streamlit - Web framework
- Plotly - Interactive visualizations
- Coinglass - Inspiration for the heatmap design
β Star this repo if you found it helpful!