danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 732 forks source link

order_book.py and time.sleep(10) #238

Closed soukainahamidi closed 6 years ago

soukainahamidi commented 6 years ago

Hello,

I was wondering why do we need: time.sleep(10) (line:291 in order_book.py)?

Thanks!

mcardillo55 commented 6 years ago

When orderbook is initialized, it fetches the current order book from gdax first here, then it feeds all these open orders into the rbtree. These 2 operations take a little time, and the orderbook will not work correctly until they complete.