Trading Bot Refresh Interval Configuration Guide

## Overview

This guide helps you optimize refresh interval settings based on your trading strategy, timeframe, and number of monitored symbols. Proper configuration balances signal accuracy, system performance, and API rate limits.

## Understanding the Intervals

Parameter Purpose Impact
refresh_interval Core market data fetch cycle General bot operations, price updates
kline_refresh_rate Candle/OHLCV data loading Technical analysis, pattern detection
signal_refresh_interval Signal processing cycle Opportunity identification, indicator calculations
decision_making_interval Order execution cycle Trade placement, signal broadcasting

## Recommended Configurations by Trading Style

### 1. Scalping Strategy

Best for: Quick profits from small price movements, high-frequency trading

Timeframes: 1m, 3m, 5m

#### Configuration

Kline:
  refresh_interval: 2           # Very fast market data updates
  kline_refresh_rate: 5         # Frequent candle updates
  signal_refresh_interval: 10   # Rapid signal detection
  decision_making_interval: 3   # Quick order execution

Symbol Considerations:

  • 1-20 symbols: Use above settings for aggressive detection
  • 21-50 symbols: Increase refresh_interval to 3, signal_refresh_interval to 15
  • 51+ symbols: Increase to default or higher to avoid rate limits

Notes:

  • Scalping requires fastest response times
  • Monitor API rate limit warnings closely
  • Consider reducing symbol count for optimal performance
  • Lower timeframes (1m, 3m) need frequent updates

### 2. Day Trading Strategy

Best for: Intraday positions, capturing daily volatility

Timeframes: 5m, 15m, 30m, 1h

#### Configuration

Kline:
  refresh_interval: 5           # Moderate market data updates
  kline_refresh_rate: 15        # Balanced candle refresh
  signal_refresh_interval: 30   # Regular signal processing
  decision_making_interval: 10  # Measured order execution

Symbol Considerations:

  • 1-50 symbols: Use above settings
  • 51-150 symbols: Increase kline_refresh_rate to 20-30
  • 151+ symbols: Increase signal_refresh_interval to 45-60

Notes:

  • Balance between responsiveness and efficiency
  • 15m-1h candles don't require aggressive refresh rates
  • Can handle more symbols than scalping strategies

### 3. Swing Trading Strategy

Best for: Multi-day positions, riding trends

Timeframes: 1h, 2h, 4h, 6h

#### Configuration

Kline:
  refresh_interval: 10          # Relaxed market data updates
  kline_refresh_rate: 60        # Hourly candle refresh sufficient
  signal_refresh_interval: 180  # 3-minute signal processing
  decision_making_interval: 30  # Deliberate order execution

Symbol Considerations:

  • 1-100 symbols: Use above settings
  • 101-300 symbols: Increase kline_refresh_rate to 120-180
  • 300+ symbols (full exchange): Use kline_refresh_rate: 300, signal_refresh_interval: 300

Notes:

  • Higher timeframes require less frequent updates
  • Can monitor many symbols efficiently
  • Focus on quality signals over speed

### 4. Long-Term/Position Trading

Best for: Weeks to months holding periods, major trend following

Timeframes: 6h, 12h, 1d

#### Configuration

Kline:
  refresh_interval: 30          # Minimal market data updates
  kline_refresh_rate: 1800      # 30-minute refresh (daily candles update once per day)
  signal_refresh_interval: 1800 # 30-minute signal processing
  decision_making_interval: 300 # 5-minute execution (still responsive when needed)

Symbol Considerations:

  • Any number of symbols: Above settings work for 600+ symbols
  • Daily candles only update once every 24 hours - no need for aggressive refresh
  • Can sync all exchange symbols without performance issues

Notes:

  • Extremely efficient for API rate limits
  • Daily timeframes make frequent updates unnecessary
  • Perfect for monitoring entire exchange catalog
  • Lower decision_making_interval ensures timely execution when signals trigger

## Optimization Guidelines

### By Number of Symbols

Symbol Count Multiplier Strategy
1-20Use recommended base values
21-50Multiply intervals by 1.5x
51-100Multiply intervals by 2x
101-300Multiply intervals by 3-4x
300+Multiply intervals by 5x+

### By Timeframe Logic

Fast Timeframes (1m, 3m, 5m):

  • Candles complete quickly → Need frequent kline_refresh_rate
  • Price moves rapidly → Low refresh_interval critical

Medium Timeframes (15m, 30m, 1h):

  • Balanced approach → Moderate refresh rates
  • More time to analyze → Can process more symbols

Slow Timeframes (4h, 6h, 12h, 1d):

  • Candles take hours/day to complete → High kline_refresh_rate acceptable
  • Trends develop slowly → Minimal refresh_interval needed

### Performance vs. Aggression Trade-offs

More Aggressive (Lower Values):

  • ✅ Faster signal detection
  • ✅ Better entry/exit timing
  • ❌ Higher API usage
  • ❌ Increased system load
  • ❌ Rate limit risks

More Conservative (Higher Values):

  • ✅ Lower API usage
  • ✅ Better rate limit compliance
  • ✅ Handle more symbols
  • ❌ Slower signal detection
  • ❌ Potential missed opportunities

## Example Scenarios

### Scenario 1: Aggressive Scalper (10 symbols, 1m timeframe)

Kline:
  refresh_interval: 2
  kline_refresh_rate: 5
  signal_refresh_interval: 10
  decision_making_interval: 3

Rationale: Small symbol count allows maximum aggression


### Scenario 2: Conservative Day Trader (600 symbols, 15m timeframe)

Kline:
  refresh_interval: 15
  kline_refresh_rate: 60
  signal_refresh_interval: 120
  decision_making_interval: 30

Rationale: Many symbols require conservative intervals to stay within limits


### Scenario 3: Swing Trader (100 symbols, 4h timeframe)

Kline:
  refresh_interval: 10
  kline_refresh_rate: 120
  signal_refresh_interval: 300
  decision_making_interval: 60

Rationale: 4h candles update slowly, moderate symbol count


### Scenario 4: Long-Term Investor (Full exchange, 1d timeframe)

Kline:
  refresh_interval: 60
  kline_refresh_rate: 3600
  signal_refresh_interval: 3600
  decision_making_interval: 600

Rationale: Daily candles make frequent updates wasteful


## Fine-Tuning Tips

  1. Start Conservative: Begin with higher intervals, then gradually decrease while monitoring system performance
  2. Monitor Rate Limits: Watch for 429 errors or rate limit warnings from exchange API
  3. Test Under Load: Verify settings during high volatility periods when API usage spikes
  4. Symbol Priority: If monitoring many symbols, consider disabling sync and manually selecting high-priority pairs
  5. Decision Speed: Keep decision_making_interval relatively low (3-10s) even for slow strategies to ensure timely order execution
  6. Kline Logic: Remember: kline_refresh_rate doesn't make candles complete faster - it only checks for updates. Match it to your timeframe's natural completion rate.

## Quick Reference Table

Strategy Timeframe Symbols refresh kline_refresh signal_refresh decision
Scalp1m-5m<2025103
Scalp1m-5m50+310205
Day15m-1h<505153010
Day15m-1h150+10306015
Swing1h-6h<100106018030
Swing1h-6h300+1530030060
Long12h-1dAny3018001800300

## Conclusion

Optimal refresh intervals depend on three key factors:

  1. Trading timeframe - Lower timeframes need faster updates
  2. Number of symbols - More symbols require conservative settings
  3. Strategy aggression - Balance speed vs. API limits based on your needs
Start with the recommended configurations above and adjust based on your specific exchange rate limits, system resources, and trading requirements.

📎 Related Topics