Closed rotemx closed 6 years ago
Hi
Can you confirm your node-binance-api
version please?
Hi, sure.
according to the package.json file in node_modules I am using "version": "0.4.17"
Thanks
On Fri, Feb 16, 2018 at 7:46 PM, Keith Kirton notifications@github.com wrote:
Hi
Can you confirm your node-binance-api version please?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/135#issuecomment-366323920, or mute the thread https://github.com/notifications/unsubscribe-auth/AFyCRu7ODgYRSsPF3NQY7DMFuKpdrut2ks5tVcz_gaJpZM4SIuS8 .
-- ►►Rotem Meiri rotemx@gmail.com
should I update to 0.4.20 ? would it solve the problem ?
On Fri, Feb 16, 2018 at 7:47 PM, Rotem Meiri rotemx@gmail.com wrote:
Hi, sure.
according to the package.json file in node_modules I am using "version": "0.4.17"
Thanks
On Fri, Feb 16, 2018 at 7:46 PM, Keith Kirton notifications@github.com wrote:
Hi
Can you confirm your node-binance-api version please?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/135#issuecomment-366323920, or mute the thread https://github.com/notifications/unsubscribe-auth/AFyCRu7ODgYRSsPF3NQY7DMFuKpdrut2ks5tVcz_gaJpZM4SIuS8 .
-- ►►Rotem Meiri rotemx@gmail.com
-- ►►Rotem Meiri rotemx@gmail.com
I can see now it was fixed in #129 ?
On Fri, Feb 16, 2018 at 7:48 PM, Rotem Meiri rotemx@gmail.com wrote:
should I update to 0.4.20 ? would it solve the problem ?
On Fri, Feb 16, 2018 at 7:47 PM, Rotem Meiri rotemx@gmail.com wrote:
Hi, sure.
according to the package.json file in node_modules I am using "version": "0.4.17"
Thanks
On Fri, Feb 16, 2018 at 7:46 PM, Keith Kirton notifications@github.com wrote:
Hi
Can you confirm your node-binance-api version please?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaggedsoft/node-binance-api/issues/135#issuecomment-366323920, or mute the thread https://github.com/notifications/unsubscribe-auth/AFyCRu7ODgYRSsPF3NQY7DMFuKpdrut2ks5tVcz_gaJpZM4SIuS8 .
-- ►►Rotem Meiri rotemx@gmail.com
-- ►►Rotem Meiri rotemx@gmail.com
-- ►►Rotem Meiri rotemx@gmail.com
Ah, excellent. Yeah that's right. The issue was resolved in #129 for v0.4.19
, so an upgrade to the latest (v0.4.20
) will sort you out.
@keith1024 , I'm afraid the bug is still there after updating to 0.4.20.
I tried running the socket and rest in parallel, and after a few minutes of I running the socket is out of sync:
The latest version will print an error when the cache is out of sync.
Note that the REST depth will return a sorted snapshot of asks/bids. The WebSocket version cannot, since you only receive diffs of the data per update, you should run those through binance.sortAsks
or binance.sortBids
when wanting to access the data in a sorted manner.
https://github.com/jaggedsoft/node-binance-api#maintain-market-depth-cache-locally-via-websocket
binance.websockets.depthCache('ETHBTC', (symbol, depth) => {
let bids = binance.sortBids(depth.bids);
let asks = binance.sortAsks(depth.asks);
console.log(symbol+" depth cache update");
console.log("bids", bids);
console.log("asks", asks);
console.log("best bid: "+binance.first(bids));
console.log("best ask: "+binance.first(asks));
});
I am facing this issue still. It does print out
[ 'depthHandler :LTCUSDT: !! DEPTH CACHE OUT OF SYNC !!' ]
But why does it come at all. Does it get resolved by itself ? what is the resolution.
Interesting: While working with the API since several weeks today was the first day I saw this error constantly popping up one one pair (instead of the somewhat usual one time only at the start of a subscription). I restarted the script and it was all okay. Could argue that there was some kind of problem on Binance side since it worked perfectly the last weeks...
In the past, if the depth cache got out of sync we would just restart seamlessly. I suppose this is not working?
Yeah I just saw my log a few minutes ago filled with out of sync errors (for both pair subscriptions I've been running) again. Manually restarted the script to get rid of them. I guess there is something wrong.
I wanted to see if there can be an error/exception object thrown such that it can be handled at client side accordingly. Currently i believe it only does log "DEPTH CACHE OUT OF SYNC" which client cannot handle seamlessly?
Are you guys having any issues with other websocket endpoints? I see that binance made some changes recently
Can't give you more info on that topic since I am just using the depthCache stream in a regular way. Today without one incident...
Bug report
Hi, Firstly, great lib ! thank you !
When using the depthCache method, I get old values, and it doesn't update for very long.
I tried comparing the result values with a normal REST api call, the received the following input. (in this example I select the first row in asks array and show it's price):
Note that the gap between them is getting higher if the price has changed dramatically.