node-binance-api
node-binance-api copied to clipboard
Futures ETHUSDT market has an issue in JSON.parse
Futures ETHUSDT market has an issue in JSON.parse (I don't know if it occurs in Spot or Coin-m, etc.)
The order id value of Ethereum has been changed from Number to Bigint. It seems to have occurred around December 9, 2020. It is believed that the issue occurred after Binance supported Ethereum 2.0 staking.
I solved it using JSON-bigint. https://github.com/sidorares/json-bigint
Change JSON.parse to JSONbig.parse in line 182 reqHandler function. Change JSON.parse to JSONbig.parse.In line 509 promiseRequest function.
Thank you very much! https://github.com/jaggedsoft/node-binance-api/commit/40f3da30844783b89fcd8d914c167fda9d864761
This should be changed anywhere (e.g. also in WS Streams). Another issue here is that when I have a BigNumber OrderId and want to call CancelOrder with it, can i be sure it is serialized in the correct way?
these were all strings in the past if i remember correctly
Help me plz. At futures ETHUSDT market function order_update_callback return orderId like here
But the real orderId is
@jaggedsoft
Did you manage to fix this?
@jaggedsoft please fix this
I already made PR for this @jaggedsoft
Please merge: https://github.com/jaggedsoft/node-binance-api/pull/890
In themeantime i created node-binance-api-2 so that you can use this while the PR #890 is not merged:
- https://www.npmjs.com/package/node-binance-api-2