How derickwilliams5457-droid/liq_trading_system works
This repository implements a liquidation-triggered futures trading bot with an optional Bybit mirror and a read-only performance dashboard. Its main workflow records Binance liquidation events, detects activity after a quiet streak, evaluates a market signal, then dispatches trade execution. Trade monitors persist performance and account state for the dashboard. The excerpts support these major stages and integrations; some internals and dashboard data sources are only partly shown, so uncertain wiring is omitted.
Main entry points: trader.py Binance execution · perfio.py Persistence access · run_bot.py Signal orchestrator · bybit_mirror.py Bybit execution
Components 19
Signal detection
- Liquidation stream
liq_stream.py - Liquidation events
- Activity bucketing
liq_bucket.py - Bucket state
- Signal stream
Decision and execution
- Signal orchestrator
run_bot.py - Market strategy
strategy.py - Binance execution
trader.py - Bybit execution
bybit_mirror.py
State and reporting
- Persistence access
perfio.py - Performance history
- Trade activity log
- Account and trade state
- Read-only dashboard
dash.py
Shared controls
- Request rate gate
ratelimit.py
Other components
- Binance stream
- Binance Futures
- Bybit API
- Dashboard viewer
Connections 25
- Binance stream → Liquidation stream: streams orders
- Liquidation stream → Liquidation events: appends events
- Liquidation events → Activity bucketing: reads events
- Activity bucketing → Bucket state: persists counters
- Activity bucketing → Signal stream: emits signals
- Signal stream → Signal orchestrator: tails signals
- Signal orchestrator → Market strategy: requests evaluation
- Market strategy → Binance Futures: fetches candles
- Market strategy → Request rate gate: serializes requests
- Signal orchestrator → Binance execution: dispatches trades
- Binance execution → Binance Futures: places and monitors
- Binance execution → Request rate gate: serializes requests
- Signal orchestrator → Bybit execution: mirrors trades
- Bybit execution → Bybit API: places and monitors
- Binance execution → Persistence access: records results
- Bybit execution → Persistence access: records results
- Binance execution → Account and trade state: updates positions
- Bybit execution → Account and trade state: updates positions
- Persistence access → Performance history: appends rows
- Persistence access → Trade activity log: appends events
- Persistence access → Account and trade state: reads and writes
- Read-only dashboard → Performance history: reads history
- Read-only dashboard → Trade activity log: reads activity
- Read-only dashboard → Account and trade state: reads snapshots
- Dashboard viewer → Read-only dashboard: views dashboard