How does kline_refresh_rate differ from refresh_interval?
While both settings control how the bot receives market data, they serve different purposes in the Market Data Engine.
πΉ refresh_interval
- Controls lightweight, frequent price polling
- Retrieves recent price updates for quick signal reactions
- Very fast, low-latency polling
- Directly affects signal responsiveness
Example:
refresh_interval: 3 # poll prices every 3 seconds
πΉ kline_refresh_rate
- Controls full candle (kline) refresh cycles
- Fetches complete candle data including open, high, low, close, and volume
- Less frequent than
refresh_intervalto reduce API load - Ensures historical candle data is accurate for indicators and analytics
Example:
kline_refresh_rate: 10 # refresh full candles every 10 seconds
βοΈ Why Separating Them Matters
Performance
- Quick price polling allows fast signal detection without reloading full candle history every cycle.
API Efficiency
- Full candle fetches are heavier requests; separating them reduces rate-limit risks.
Accuracy & Stability
- Historical candles are updated on schedule for indicators and analytics
- Real-time price changes are captured immediately for trading decisions
π Summary
refresh_intervalβ frequent, lightweight price updates for rapid signal responsekline_refresh_rateβ full candle refresh for accurate historical data- Separating them optimizes speed, accuracy, and API usage
This distinction ensures the bot reacts fast while maintaining reliable indicator calculations and stable API behavior.
Related Topics
Ready to trade? Download MagicTradeBot free
and test in paper mode before going live.