diff --git a/binance/depthcache.py b/binance/depthcache.py index 40848c035..95afc6fdf 100644 --- a/binance/depthcache.py +++ b/binance/depthcache.py @@ -324,10 +324,6 @@ async def _init_cache(self): # process bid and asks from the order book self._apply_orders(res) assert self._depth_cache - for bid in res['bids']: - self._depth_cache.add_bid(bid) - for ask in res['asks']: - self._depth_cache.add_ask(ask) # set first update id self._last_update_id = res['lastUpdateId'] @@ -368,10 +364,6 @@ async def _process_depth_message(self, msg): if msg['u'] <= self._last_update_id: # ignore any updates before the initial update id return - elif msg['U'] != self._last_update_id + 1: - # if not buffered check we get sequential updates - # otherwise init cache again - await self._init_cache() # add any bid or ask values self._apply_orders(msg)