Visualizing Liquidation Events
We built an open-source Jupyter notebook that visualizes BTC liquidation events on Hyperliquid using historical data from 0xArchive.
What It Does
oxarchive Python SDKPrice vs time liquidation heatmap - density map of liquidation activity
Scatter plot with BTC price overlay - longs in red, shorts in green
Hourly liquidation volume distribution - when do liquidations cluster?
Size distribution with percentile stats - how large are typical liquidations?
Cascade detection - finds P99 liquidation bursts in 5-min windows
Long vs short imbalance over time with price subplot
Example Output (3-day window)
13,399 unique liquidations - shorts hit 2x harder (64.9%) than longs (35.1%), $143M total notional.
Get Started
pip install -r requirements.txtcp .env.example .envjupyter notebook liquidation_heatmap.ipynbWorks with a free API key from 0xarchive.io/dashboard (BTC, 30-day lookback).
Links
We're planning more examples - funding rate arb, OI divergence, market microstructure.
