diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index c04947bdf..21baa9124 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -228,7 +228,7 @@ class Binance(Exchange): return try: - self._api.set_leverage(symbol=pair, leverage=leverage) + self._api.set_leverage(symbol=pair, leverage=round(leverage)) except ccxt.DDoSProtection as e: raise DDosProtection(e) from e except (ccxt.NetworkError, ccxt.ExchangeError) as e: diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index f5d2c6b2d..a284780ea 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1853,7 +1853,7 @@ class Exchange: return try: - self._api.set_leverage(symbol=pair, leverage=leverage) + self._api.set_leverage(symbol=pair, leverage=round(leverage)) except ccxt.DDoSProtection as e: raise DDosProtection(e) from e except (ccxt.NetworkError, ccxt.ExchangeError) as e: diff --git a/freqtrade/exchange/kraken.py b/freqtrade/exchange/kraken.py index 3516f41d5..0c3fe4e7b 100644 --- a/freqtrade/exchange/kraken.py +++ b/freqtrade/exchange/kraken.py @@ -170,7 +170,7 @@ class Kraken(Exchange): ) -> Dict: params = super()._get_params(ordertype, leverage, reduceOnly, time_in_force) if leverage > 1.0: - params['leverage'] = leverage + params['leverage'] = round(leverage) return params def calculate_funding_fees(