JKorf / OKX.Net

A C# .netstandard client library for the OKX REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/OKX.Net/
MIT License
32 stars 16 forks source link

Bug in GetMaximumLoanAmountAsync #49

Closed hcanak closed 2 months ago

hcanak commented 2 months ago

Hello @JKorf ,

When i call GetMaximumLoanAmountAsync with following parameters it gives the error in picture...

UnifiedApi.Account.GetMaximumLoanAmountAsync("BTC-USDT", OKX.Net.Enums.MarginMode.Isolated);

image

JKorf commented 2 months ago

Hi, there are 2 issues. The first is that error responses aren't parsed correctly causing this error. This has been fixed in the latest version, but I'm not yet able to release it on NuGet. The second is that the serialization of the marginMode parameter is incorrect, which is why the server returns an error. I'll fix that one for next version.

hcanak commented 2 months ago

Thanks for your quick responce @JKorf

JKorf commented 2 months ago

Fixed in latest version