Fix 0 division (if last = 0, something went wrong!)

This commit is contained in:
Matthias 2020-07-21 20:34:29 +02:00
parent 939f91734f
commit 6a10c715fa

View File

@ -56,7 +56,7 @@ class PriceFilter(IPairList):
:param ticker: ticker dict as returned from ccxt.load_markets()
:return: True if the pair can stay, false if it should be removed
"""
if ticker['last'] is None:
if ticker['last'] is None or ticker['last'] == 0:
self.log_on_refresh(logger.info,
f"Removed {ticker['symbol']} from whitelist, because "
"ticker['last'] is empty (Usually no trade in the last 24h).")