danpaquin / coinbasepro-python

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

Assert orderbook #362

Open edmondja opened 5 years ago

edmondja commented 5 years ago

I have :

Error: messages missing (1674798053 - 1674798080). Re-initializing book at sequence. Error: messages missing (1674798053 - 1674798081). Re-initializing book at sequence. Exception in thread Thread-693: Traceback (most recent call last): File "/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/anaconda3/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/anaconda3/lib/python3.7/site-packages/cbpro/websocket_client.py", line 41, in _go self._listen() File "/anaconda3/lib/python3.7/site-packages/cbpro/websocket_client.py", line 91, in _listen self.on_message(msg) File "/anaconda3/lib/python3.7/site-packages/cbpro/order_book.py", line 80, in on_message self.match(message) File "/anaconda3/lib/python3.7/site-packages/cbpro/order_book.py", line 142, in match assert bids[0]['id'] == order['maker_order_id'] AssertionError

because of https://github.com/danpaquin/coinbasepro-python/blob/0a9dbd86a25ae266d0e0eefeb112368c284b7dcc/cbpro/order_book.py#L142 .

What is this assert for ?

edmondja commented 5 years ago

It seems to run anyway despite this exception appearing

edmondja commented 5 years ago

As soon as this appears, no data comes in anymore