From b26126cb57300cefb51222ddf185a4f929bdbba8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 2 Sep 2022 20:08:38 +0200 Subject: [PATCH] Don't use ticker['symbol'] but use "pair" instead closes #7262 --- docs/exchanges.md | 4 ++-- freqtrade/plugins/pairlist/PrecisionFilter.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index b55eaac74..b5470f65a 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -61,7 +61,7 @@ Binance supports [time_in_force](configuration.md#understand-order_time_in_force ### Binance Blacklist -For Binance, it is suggested to add `"BNB/"` to your blacklist to avoid issues, unless you are willing to maintain enough extra `BNB` on the account or, unless you're willing to disable using `BNB` for fees. +For Binance, it is suggested to add `"BNB/"` to your blacklist to avoid issues, unless you are willing to maintain enough extra `BNB` on the account or unless you're willing to disable using `BNB` for fees. Binance accounts may use `BNB` for fees, and if a trade happens to be on `BNB`, further trades may consume this position and make the initial BNB trade unsellable as the expected amount is not there anymore. ### Binance Futures @@ -205,7 +205,7 @@ Kucoin supports [time_in_force](configuration.md#understand-order_time_in_force) ### Kucoin Blacklists -For Kucoin, it is suggested to add `"KCS/"` to your blacklist to avoid issues, unless you are willing to maintain enough extra `KCS` on the account or, unless you're willing to disable using `KCS` for fees. +For Kucoin, it is suggested to add `"KCS/"` to your blacklist to avoid issues, unless you are willing to maintain enough extra `KCS` on the account or unless you're willing to disable using `KCS` for fees. Kucoin accounts may use `KCS` for fees, and if a trade happens to be on `KCS`, further trades may consume this position and make the initial `KCS` trade unsellable as the expected amount is not there anymore. ## Huobi diff --git a/freqtrade/plugins/pairlist/PrecisionFilter.py b/freqtrade/plugins/pairlist/PrecisionFilter.py index dcd153d8e..61150f03d 100644 --- a/freqtrade/plugins/pairlist/PrecisionFilter.py +++ b/freqtrade/plugins/pairlist/PrecisionFilter.py @@ -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