mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
exchange._set_leverage rounds leverage
This commit is contained in:
parent
8a64f6a27f
commit
8e51360f75
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user