-
Notifications
You must be signed in to change notification settings - Fork 125
Problem with orderbook data ? #119
Comments
Hey @Leobouloc ,
|
Hi, I am not sure which part I got wrong. Shouldn't the code below (the code that is executed when I call
( I believe what I am doing is: every 20 seconds, call |
Ah, my bad. This could be a race-condition - since you update the book only when you call Check if this also happens if you update the book continuously - it may still happen (updating continuously does not eliminate race conditions), but hopefully less often. If that's the case, you can take it from there and see how you can eliminate such a state in your code. Does that help? |
Hi Nils, I don't believe this is a speed issue as my code always exits the One surprising fact is that the orderbook seems to drift in a coherent manner between asks and bids since the gap between |
I am using
btfxwss
to regularly fetch orderbook data. On the past twelve days, the connection has been reset about 50 times. At each reset, I receive a new snapshot, and notice that my version of the orderbook was wrong with values being shifted up or down both for the bid and ask values (but the gap always seems coherent)...I believe I properly implemented the algorithm (code below) described in Bitfinex's API doc (https://docs.bitfinex.com/v2/reference#ws-public-order-books) and can't figure out what is wrong... Any ideas what could be the cause of this ?
Thank you for your help
I use the class above as follows:
The text was updated successfully, but these errors were encountered: