n0mad01 / node.bittrex.api

No longer maintained
MIT License
183 stars 187 forks source link

How to get the full order book and keep to up to date? #87

Open Fuzzyma opened 6 years ago

Fuzzyma commented 6 years ago

Is it enough to subscribe to the updates of obe market to have a complete order book or do I have to pull all orders with getorderbook first? If the last is true: How can I achieve that I dont miss an update between pulling the book and subscribing to the update channel?

pptp commented 6 years ago

Hi, @Fuzzyma. I have to spend some time to understand how Bittrex API works.

I think, the best way is to subscribe on bittrex socket and when you will have the connection established you have to call getorderbook method. When you will have getorderbook results you have to start process socket signals (which you are already recieving). In this way you will not miss data. Notice, that BUYS and SELLS (in socket signals) - is a current values of market AND NOT the markets changes! "Quantity" - is a number you see in column "SIZE" on the Bittrex site in order book

Fuzzyma commented 6 years ago

That's exactly how I handled it. Thanks for the confirmation!