Detect sudden liquidity gaps in order books before they move the market.
Get ahead of price spikes and crashes—alerts that lead, not lag.
Liquidity gaps—when large buy or sell walls suddenly vanish from order books—often precede rapid price moves. Big players don't announce their exits. They pull orders quietly. By the time traditional indicators react, the move has already started.
This bot watches order books in real time, detects when significant walls disappear, and alerts you before the market moves.
| What You Get | Why It Matters |
|---|---|
| Early signal | Liquidity changes often move markets before RSI, MACD, or volume react |
| Multi-exchange | Monitors Binance and Coinbase simultaneously |
| Configurable thresholds | Track walls from $100k to $10M+ — tune to your style |
| Confidence scores | AI-inspired scoring based on wall size, removal speed, and proximity to mid |
"When big players pull their orders, it can signal an imminent move."
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────┐
│ Order Books │ ──► │ AI Analyzer │ ──► │ Real-time │
│ Binance │ │ Detects wall │ │ Alerts │
│ Coinbase │ │ disappearances │ │ Console / Log │
└─────────────────┘ └─────────────────────┘ └─────────────────┘
- Monitors order books from Binance and Coinbase via WebSocket
- AI analyzes large buy/sell walls (≥ $500k by default) and tracks when they disappear
- Alerts traders before potential price spikes or crashes
Understanding order book dynamics helps you get the most from this bot. Here are some excellent resources:
| Resource | Description |
|---|---|
| 📹 Order Book in Crypto Explained Simply | Full tutorial on how order books work |
| 📹 Buy & Sell Walls (and How They're Manipulated) | Deep dive into walls and market manipulation |
| 📹 Order Book Heatmaps & Market Depth | Visualizing liquidity with heatmaps |
flowchart LR
subgraph Exchanges
B[Binance]
C[Coinbase]
end
subgraph Bot
A[AI Analyzer]
D[Alert Manager]
end
B --> A
C --> A
A -->|Liquidity gap detected| D
D -->|Console & Log| E[Trader]
==================================================
🔔 Liquidity Gap Detected
==================================================
Symbol: BTC/USDT
Exchange: Binance
Event: Buy wall removed
Direction: Possible upward breakout
Confidence: 82%
==================================================
# Clone and enter the project
cd liquidity_gap_bot
# Install dependencies
pip install -r requirements.txt
# Run the bot
python main.pyThe bot starts monitoring immediately. Press Ctrl+C to stop.
Edit config.py to customize behavior:
| Option | Default | Description |
|---|---|---|
symbols_binance |
["BTC/USDT", "ETH/USDT"] |
Pairs to monitor on Binance |
symbols_coinbase |
["BTC/USD", "ETH/USD"] |
Pairs to monitor on Coinbase |
exchanges |
["binance", "coinbase"] |
Which exchanges to watch |
min_wall_size_usd |
500_000 |
Minimum wall size to track (USD) |
wall_removal_threshold |
0.8 |
% of wall that must disappear (80%) |
time_window_seconds |
60 |
Max time for "sudden" removal |
min_confidence |
0.6 |
Minimum confidence to alert (0–1) |
liquidity_gap_bot/
├── main.py # Entry point
├── config.py # Configuration
├── requirements.txt
├── src/
│ ├── exchanges/ # Order book monitors (WebSocket)
│ │ ├── binance.py
│ │ └── coinbase.py
│ ├── analyzer/ # Liquidity gap detection
│ │ └── liquidity_analyzer.py
│ └── alerts/ # Alert output
│ └── alert_manager.py
The AI-inspired confidence (0–100%) considers:
- Wall size — Larger walls = more significant
- Removal speed — Faster disappearance = more suspicious
- Proximity to mid — Closer to current price = more impactful
- Console — Alerts print to stdout in real time
- File — Alerts append to
alerts.log(configurable)
To add Discord or Telegram alerts, extend src/alerts/alert_manager.py.