Add response_log for set_leverage
This commit is contained in:
parent
d19ee9c95f
commit
997df2032e
@ -118,13 +118,15 @@ class Okx(Exchange):
|
|||||||
if self.trading_mode != TradingMode.SPOT and self.margin_mode is not None:
|
if self.trading_mode != TradingMode.SPOT and self.margin_mode is not None:
|
||||||
try:
|
try:
|
||||||
# TODO-lev: Test me properly (check mgnMode passed)
|
# TODO-lev: Test me properly (check mgnMode passed)
|
||||||
self._api.set_leverage(
|
res = self._api.set_leverage(
|
||||||
leverage=leverage,
|
leverage=leverage,
|
||||||
symbol=pair,
|
symbol=pair,
|
||||||
params={
|
params={
|
||||||
"mgnMode": self.margin_mode.value,
|
"mgnMode": self.margin_mode.value,
|
||||||
"posSide": self._get_posSide(side, False),
|
"posSide": self._get_posSide(side, False),
|
||||||
})
|
})
|
||||||
|
self._log_exchange_response('set_leverage', res)
|
||||||
|
|
||||||
except ccxt.DDoSProtection as e:
|
except ccxt.DDoSProtection as e:
|
||||||
raise DDosProtection(e) from e
|
raise DDosProtection(e) from e
|
||||||
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user