Closed danielhw2 closed 7 months ago
You need to also pass in either the asset or symbol parameter
Hello, thanks for the answer.
I managed to work passing the symbol parameter, but with the asset it returns this error:
"Parameter mgnMode error"
The code:
ClienteRest.UnifiedApi.Account.SetAccountLeverageAsync(7, OKXMarginMode.Isolated, "BTC", null, OKXPositionSide.Long, CancellationToken.None).Result;
Hm not sure why that is, but I think it might not be a valid scenario. See https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage for possible options
Ok. I resolved the issue by only using the symbol parameter... Thanks!
When I call this code
ClienteRest.UnifiedApi.Account.SetAccountLeverageAsync(7, OKX.Net.Enums.OKXMarginMode.Isolated).Result;
It gives me this Exception:
CryptoExchange.Net 6.2.1 JK.OKX.Net 1.4.3 .NET 8.0