def reset_book(self):
    self._asks = SortedDict()
    self._bids = SortedDict()
    res = self._client.get_product_order_book(product_id=self.product_id, level=3)
    for bid in res['bids']:
        self.add({'id': bid[2], 'side': 'buy', 'price': Decimal(bid[0]), 'size': Decimal(bid[1])})
    for ask in res['asks']:
        self.add({'id': ask[2], 'side': 'sell', 'price': Decimal(ask[0]), 'size': Decimal(ask[1])})
    self._sequence = res['sequence']
def reset_book(self):
    self._asks = SortedDict()
    self._bids = SortedDict()
    res = self._client.get_product_order_book(product_id=self.product_id, level=3)
    for bid in res['bids']:
        self.add({'id': bid[2], 'side': 'buy', 'price': Decimal(bid[0]), 'size': Decimal(bid[1])})
    for ask in res['asks']:
        self.add({'id': ask[2], 'side': 'sell', 'price': Decimal(ask[0]), 'size': Decimal(ask[1])})
    self._sequence = res['sequence']