Get Order Future is not returning the right order id
binanceClient.futuresGetOrder is not returning the right id
Some orders have big integer as id like 4676302302390926857 for HNTUSDT
When executing
const order = await binanceClient.futuresGetOrder({
symbol:"HNTUSDT",
orderId: 4676302302390926857,
});
api is returning me the correct order but with the wrong id
{
orderId: 4676302302390927000,
symbol: 'HNTUSDT',
status: 'FILLED',
...
}
Looks like it is not handling big integer. Had someone already have this issue?
@camel113 perhaps binance is not able to manage that orderId number? Because javascript MAX_VALUE integer is 1.7976931348623157e+308 (Number.MAX_VALUE), So I expected that, on binance-node-api, it works.
Do you test it out directly to binance?
Problem is in encodeURIComponent. If i test in Chrome console:
encodeURIComponent(4676302302390926857)
'4676302302390927000'
The same result is if i use parseInt() function. Some overflow happens or something. I think that orderId should be string type to avoid these problems:
encodeURIComponent("4676302302390926857")
'4676302302390926857'