burakoner / OKX.Api

Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper
MIT License
39 stars 15 forks source link

Convert lever issue in getorderHistory #5

Closed overstartup closed 1 year ago

overstartup commented 1 year ago

It gives error when I want to access to orderHistoty

var ordrtHistory = api.Trade.GetOrderHistoryAsync(OkxInstrumentType.Swap, position.Instrument)

{: [2] Deserialize JsonReaderException: Could not convert string to integer: 70.0. Path 'data[0].lever', line 1, position 391. Path: data[0].lever, LineNumber: 1, LinePosition: 391

burakoner commented 1 year ago

Screenshot_1

Apparently they changed leverage data type from integer to float. I've fixed it and will release new verison in one hour.

Thanks for feedback

burakoner commented 1 year ago

you can check it https://github.com/burakoner/OKX.Api/commit/523cbc108a903ae556c107602e8996808798f0a9 and https://www.nuget.org/packages/OKX.Api/1.0.5