The chunk_size setting defines how many symbols the bot fetches per market data update cycle.
It is part of the market data engine’s rate-limit management to prevent overloading the exchange with too many simultaneous requests.
⚙️ How It Works
- If you monitor many symbols, fetching all data at once can trigger API rate limits or temporary bans.
- The bot divides symbols into chunks and fetches each group sequentially.
- Example:
chunk_size: 20
- If monitoring 100 symbols → the bot fetches them in 5 chunks of 20 symbols each per cycle.
⚖️ Why It’s Important
Sync Speed for Large Symbol Lists
- Larger chunk_size → faster overall synchronization
- Smaller chunk_size → slower updates but safer
Burst API Request Safety
- Prevents sending too many simultaneous requests
- Reduces risk of hitting exchange rate limits
- Helps maintain stable trading operations
🔧 Best Practices
- Monitor your exchange API limits
- Start with moderate chunk_size (e.g., 10–20 symbols)
- Increase only if API usage is safe and server resources allow
🚀 Summary
chunk_size controls how many symbols are fetched per update cycle:
- Balances data sync speed for large symbol lists
- Ensures API rate-limit safety
- Helps the bot operate efficiently without triggering exchange restrictions