diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 6964986b0..cc0ecc6cd 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -334,7 +334,7 @@ class Exchange: logger.warning(f"Pair {pair} is restricted for some users on this exchange." f"Please check if you are impacted by this restriction " f"on the exchange and eventually remove {pair} from your whitelist.") - if not self.markets[pair].get('quote') == self._config['stake_currency']: + if not self.get_pair_quote_currency(pair) == self._config['stake_currency']: invalid_pairs.append(pair) if invalid_pairs: raise OperationalException( diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 424a6a220..c3b642095 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -938,7 +938,8 @@ class FreqtradeBot: """ # Update wallets to ensure amounts tied up in a stoploss is now free! self.wallets.update() - wallet_amount = self.wallets.get_free(self.exchange.get_pair_base_currency(pair)) + trade_base_currency = self.exchange.get_pair_base_currency(pair) + wallet_amount = self.wallets.get_free(trade_base_currency) logger.debug(f"{pair} - Wallet: {wallet_amount} - Trade-amount: {amount}") if wallet_amount >= amount: return amount @@ -1145,7 +1146,6 @@ class FreqtradeBot: return order_amount amount = 0 fee_abs = 0 - trade_base_currency = self.exchange.get_pair_base_currency(trade.pair) for exectrade in trades: amount += exectrade['amount'] if ("fee" in exectrade and exectrade['fee'] is not None and diff --git a/freqtrade/pairlist/IPairList.py b/freqtrade/pairlist/IPairList.py index 7d489ece7..d45a329dd 100644 --- a/freqtrade/pairlist/IPairList.py +++ b/freqtrade/pairlist/IPairList.py @@ -100,7 +100,7 @@ class IPairList(ABC): f"{self._exchange.name}. Removing it from whitelist..") continue - if markets[pair]['quote'] != self._config['stake_currency']: + if self._exchange.get_pair_quote_currency(pair) != self._config['stake_currency']: logger.warning(f"Pair {pair} is not compatible with your stake currency " f"{self._config['stake_currency']}. Removing it from whitelist..") continue