Use 30min rate cache
This commit is contained in:
parent
b38f9ed5e7
commit
648723fb83
@ -54,11 +54,11 @@ class FreqtradeBot:
|
|||||||
# Init objects
|
# Init objects
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
||||||
_process_throttle_secs = self.config['internals'].get('process_throttle_secs',
|
# Cache values for 1800 to avoid frequent polling of the exchange for prices
|
||||||
constants.PROCESS_THROTTLE_SECS)
|
# Caching only applies to RPC methods, so prices for open trades are still
|
||||||
# Use 3x process_throttle_secs for caching to avoid delays in RPC methods.
|
# refreshed once every iteration.
|
||||||
self._sell_rate_cache = TTLCache(maxsize=100, ttl=_process_throttle_secs * 3)
|
self._sell_rate_cache = TTLCache(maxsize=100, ttl=1800)
|
||||||
self._buy_rate_cache = TTLCache(maxsize=100, ttl=_process_throttle_secs * 3)
|
self._buy_rate_cache = TTLCache(maxsize=100, ttl=1800)
|
||||||
|
|
||||||
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user