Don't hard-fail when fetch_ticker doesn't return a value

closes #5477
This commit is contained in:
Matthias
2021-08-25 07:13:09 +02:00
parent 60b476611c
commit 8a9407bac9
2 changed files with 26 additions and 1 deletions

View File

@@ -1038,7 +1038,7 @@ class Exchange:
logger.debug(f"Using Last {conf_strategy['price_side'].capitalize()} / Last Price")
ticker = self.fetch_ticker(pair)
ticker_rate = ticker[conf_strategy['price_side']]
if ticker['last']:
if ticker['last'] and ticker_rate:
if side == 'buy' and ticker_rate > ticker['last']:
balance = conf_strategy['ask_last_balance']
ticker_rate = ticker_rate + balance * (ticker['last'] - ticker_rate)