jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.57k stars 767 forks source link

Futures ETHUSDT market has an issue in JSON.parse #539

Open wwforever opened 3 years ago

wwforever commented 3 years ago

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.

jaggedsoft commented 3 years ago

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

kalinbas commented 3 years ago

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?

jaggedsoft commented 3 years ago

these were all strings in the past if i remember correctly

Kuzmich100kM commented 3 years ago

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

изображение

But the real orderId is

изображение

cosmicdust471 commented 2 years ago

@jaggedsoft

Did you manage to fix this?

doppelgunner commented 1 year ago

@jaggedsoft please fix this

doppelgunner commented 1 year ago

I already made PR for this @jaggedsoft

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

doppelgunner commented 1 year ago

In themeantime i created node-binance-api-2 so that you can use this while the PR #890 is not merged: