node-binance-api icon indicating copy to clipboard operation
node-binance-api copied to clipboard

Futures ETHUSDT market has an issue in JSON.parse

Open wwforever opened this issue 4 years ago • 8 comments

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.

wwforever avatar Dec 14 '20 13:12 wwforever

Thank you very much! https://github.com/jaggedsoft/node-binance-api/commit/40f3da30844783b89fcd8d914c167fda9d864761

jaggedsoft avatar Dec 18 '20 12:12 jaggedsoft

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?

kalinbas avatar Dec 22 '20 16:12 kalinbas

these were all strings in the past if i remember correctly

jaggedsoft avatar Dec 23 '20 07:12 jaggedsoft

Help me plz. At futures ETHUSDT market function order_update_callback return orderId like here

изображение

But the real orderId is

изображение

Kuzmich100kM avatar Feb 26 '21 21:02 Kuzmich100kM

@jaggedsoft

Did you manage to fix this?

cosmicdust471 avatar Dec 17 '21 21:12 cosmicdust471

@jaggedsoft please fix this

doppelgunner avatar May 27 '23 17:05 doppelgunner

I already made PR for this @jaggedsoft

Please merge: https://github.com/jaggedsoft/node-binance-api/pull/890

doppelgunner avatar May 27 '23 21:05 doppelgunner

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

doppelgunner avatar May 27 '23 22:05 doppelgunner