From f26ed1c8c1503457293dbdae6f0fb53c8251a317 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 25 Mar 2019 19:40:21 +0100 Subject: [PATCH] Check if added pair has correct stake-currency --- freqtrade/rpc/rpc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index cacca4e3c..a5601a502 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -464,10 +464,14 @@ class RPC(object): def _rpc_blacklist(self, add: List[str]) -> Dict: """ Returns the currently active blacklist""" if add: - self._freqtrade.pairlists.blacklist.extend(add) + stake_currency = self._freqtrade.config.get('stake_currency') + for pair in add: + if (pair.endswith(stake_currency) + and pair not in self._freqtrade.pairlists.blacklist): + self._freqtrade.pairlists.blacklist.append(pair) res = {'method': self._freqtrade.pairlists.name, 'length': len(self._freqtrade.pairlists.blacklist), - 'blacklist': self._freqtrade.pairlists.blacklist + 'blacklist': self._freqtrade.pairlists.blacklist, } return res