Handle edge with volumepairlist and empty pair_whitelist

closes #4779
This commit is contained in:
Matthias
2021-04-23 06:50:39 +02:00
parent 406c1267a2
commit 4005708f85
2 changed files with 27 additions and 5 deletions

View File

@@ -81,10 +81,15 @@ class Edge:
if config.get('fee'):
self.fee = config['fee']
else:
self.fee = self.exchange.get_fee(symbol=expand_pairlist(
self.config['exchange']['pair_whitelist'], list(self.exchange.markets))[0])
try:
self.fee = self.exchange.get_fee(symbol=expand_pairlist(
self.config['exchange']['pair_whitelist'], list(self.exchange.markets))[0])
except IndexError:
self.fee = None
def calculate(self, pairs: List[str]) -> bool:
if self.fee is None and pairs:
self.fee = self.exchange.get_fee(pairs[0])
heartbeat = self.edge_config.get('process_throttle_secs')