mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Log Exchange responses for set_leverage
This commit is contained in:
parent
46e8d9a5e4
commit
075e9b8526
|
@ -2377,7 +2377,8 @@ class Exchange:
|
|||
return
|
||||
|
||||
try:
|
||||
self._api.set_leverage(symbol=pair, leverage=leverage)
|
||||
res = self._api.set_leverage(symbol=pair, leverage=leverage)
|
||||
self._log_exchange_response('set_leverage', res)
|
||||
except ccxt.DDoSProtection as e:
|
||||
raise DDosProtection(e) from e
|
||||
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
||||
|
@ -2441,7 +2442,8 @@ class Exchange:
|
|||
return
|
||||
|
||||
try:
|
||||
self._api.set_margin_mode(margin_mode.value, pair, params)
|
||||
res = self._api.set_margin_mode(margin_mode.value, pair, params)
|
||||
self._log_exchange_response('set_margin_mode', res)
|
||||
except ccxt.DDoSProtection as e:
|
||||
raise DDosProtection(e) from e
|
||||
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
||||
|
|
|
@ -148,7 +148,7 @@ class Wallets:
|
|||
# Position is not open ...
|
||||
continue
|
||||
size = self._exchange._contracts_to_amount(symbol, position['contracts'])
|
||||
collateral = position['collateral']
|
||||
collateral = position['collateral'] or 0.0
|
||||
leverage = position['leverage']
|
||||
self._positions[symbol] = PositionWallet(
|
||||
symbol, position=size,
|
||||
|
|
Loading…
Reference in New Issue
Block a user