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

Cancel open order on spot doesnt work #13

Closed kayahasa closed 1 year ago

kayahasa commented 1 year ago

Cancel order doesnt work response is order not found. But the orderId is correct

kayahasa commented 1 year ago

I have realized that, somehow the orderId is being changed after serializing it to the frontend. The last three digits are changing.

Now i am trying to find a solution to that. But be aware that, when we fetch open orders and lets say the orderId is:

588591686646136846

After serialization to the frontend, it is becoming to: 588591686646136800

Somehow it is rounding but i dont know why. Thats why, the cancel order response was 'Order not found'.

Note: This stuation is not related to this library.

burakoner commented 1 year ago

I'll inspect deeply

burakoner commented 1 year ago

Which library do you use?

kayahasa commented 1 year ago

It is related to javascript. Even in Swagger, it is changing. Javascript cannot handle such big numbers.

I have converted it into string and problem fixed

burakoner commented 1 year ago

I'm happy for you. Have a nice day.