Don't use ticker['symbol'] but use "pair" instead

closes #7262
This commit is contained in:
Matthias
2022-09-02 20:08:38 +02:00
parent 6a5774b476
commit b26126cb57
2 changed files with 5 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ class PrecisionFilter(IPairList):
:return: True if the pair can stay, false if it should be removed
"""
if ticker.get('last', None) is None:
self.log_once(f"Removed {ticker['symbol']} from whitelist, because "
self.log_once(f"Removed {pair} from whitelist, because "
"ticker['last'] is empty (Usually no trade in the last 24h).",
logger.info)
return False
@@ -62,10 +62,10 @@ class PrecisionFilter(IPairList):
sp = self._exchange.price_to_precision(pair, stop_price)
stop_gap_price = self._exchange.price_to_precision(pair, stop_price * 0.99)
logger.debug(f"{ticker['symbol']} - {sp} : {stop_gap_price}")
logger.debug(f"{pair} - {sp} : {stop_gap_price}")
if sp <= stop_gap_price:
self.log_once(f"Removed {ticker['symbol']} from whitelist, because "
self.log_once(f"Removed {pair} from whitelist, because "
f"stop price {sp} would be <= stop limit {stop_gap_price}", logger.info)
return False