diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index cdfd8aa79..c192ca830 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1644,11 +1644,7 @@ class Exchange: return fee.get('rate') fee_curr = fee.get('currency') if fee_curr is None: - # Auto-currency only in futures mode - if self.trading_mode == TradingMode.FUTURES: - fee_curr = self.get_pair_quote_currency(symbol) - else: - return None + return None # Calculate fee based on order details if fee_curr == self.get_pair_base_currency(symbol): # Base currency - divide by amount diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index e0532a17d..3fd134078 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1777,12 +1777,19 @@ class FreqtradeBot(LoggingMixin): fee_abs = 0.0 fee_cost = 0.0 trade_base_currency = self.exchange.get_pair_base_currency(trade.pair) + fee_rate_array: List[float] = [] for exectrade in trades: amount += exectrade['amount'] if self.exchange.order_has_fee(exectrade): + # Prefer singular fee + fees = [exectrade['fee']] + else: + fees = exectrade.get('fees', []) + for fee in fees: + fee_cost_, fee_currency, fee_rate_ = self.exchange.extract_cost_curr_rate( - exectrade['fee'], exectrade['symbol'], exectrade['cost'], exectrade['amount'] + fee, exectrade['symbol'], exectrade['cost'], exectrade['amount'] ) fee_cost += fee_cost_ if fee_rate_ is not None: