mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Merge pull request #3249 from freqtrade/increase_rate_cache
[minor] Increase cache for rate limit to avoid delays
This commit is contained in:
commit
0340d7bf37
|
@ -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)
|
||||
|
||||
|
|
|
@ -304,7 +304,8 @@ def default_conf(testdatadir):
|
|||
"user_data_dir": Path("user_data"),
|
||||
"verbosity": 3,
|
||||
"strategy_path": str(Path(__file__).parent / "strategy" / "strats"),
|
||||
"strategy": "DefaultStrategy"
|
||||
"strategy": "DefaultStrategy",
|
||||
"internals": {},
|
||||
}
|
||||
return configuration
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user