Merge pull request #3249 from freqtrade/increase_rate_cache

[minor] Increase cache for rate limit to avoid delays
This commit is contained in:
hroff-1902
2020-05-05 19:08:31 +03:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -54,8 +54,11 @@ class FreqtradeBot:
# Init objects
self.config = config
self._sell_rate_cache = TTLCache(maxsize=100, ttl=5)
self._buy_rate_cache = TTLCache(maxsize=100, ttl=5)
# Cache values for 1800 to avoid frequent polling of the exchange for prices
# Caching only applies to RPC methods, so prices for open trades are still
# refreshed once every iteration.
self._sell_rate_cache = TTLCache(maxsize=100, ttl=1800)
self._buy_rate_cache = TTLCache(maxsize=100, ttl=1800)
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)