-
Notifications
You must be signed in to change notification settings - Fork 0
Add real-time data streaming support via WebSocket #3
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Enable the backtesting engine to consume live market data through WebSocket connections, bridging the gap between historical backtests and live paper-trading.
Technical Approach
- Create a
streaming/module with aWebSocketFeedclass that connects to exchange WebSocket APIs (Binance, Bybit) and normalizes incoming ticks into the existing OHLCV bar format. - Implement a ring-buffer based bar aggregator that constructs 1m/5m/1h bars from raw tick data in real time.
- Wire the live feed into the existing strategy execution loop so the same strategy code runs identically in backtest and live modes (event-driven architecture).
- Add connection resilience with automatic reconnection, heartbeat monitoring, and message sequence gap detection.
- Include a paper-trading mode that logs simulated fills against live prices without touching any exchange account.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request