The refresh_interval setting defines how often the bot polls the exchange for market price updates (candles/klines and price data).
It determines the base heartbeat of your market data engine — essentially how frequently your system checks for new price changes.
Example:
refresh_interval: 3
This means the bot requests updated market data every 3 seconds.
⚙️ How It Affects Performance
🔹 Lower Values (e.g., 2–5 seconds)
- Faster reaction to market movements
- Quicker signal updates
- More responsive stop-loss / take-profit handling
- Higher API usage
- Increased server load
Best suited for:
- Scalping
- High-frequency trading
- Volatility-based strategies
🔹 Higher Values (e.g., 10–30 seconds)
- Slower reaction time
- Reduced API requests
- Lower CPU and memory usage
- More stable on limited infrastructure
Best suited for:
- Swing trading
- Position trading
- Long-term strategies
🎯 Why It’s Important
refresh_interval directly impacts:
- Signal timing
- Entry precision
- Exit responsiveness
- API rate consumption
- Overall system stability
If set too low:
- You risk API throttling or exchange rate limits.
If set too high:
- You may receive delayed signals and suboptimal trade execution.
⚖️ Finding the Right Balance
The ideal value depends on:
- Strategy type
- Number of symbols monitored
- Exchange rate limits
- Server performance
The goal is to balance:
- Speed
- Accuracy
- Resource efficiency
- API safety
🚀 Summary
refresh_interval controls how frequently the bot polls the exchange for price updates.
- Lower value → Faster reaction, higher API usage
- Higher value → Slower reaction, lower resource usage
It is a critical setting that determines how quickly your system sees and reacts to market changes.