(self, msg)
on_book_delete_order.
on_book_delete_order.
on_book_delete_order .
def on_book_delete_order(self, msg):
        """" on_book_delete_order. """
        index = msg.get('MDEntryPositionNo') - 1
        side = msg.get('MDEntryType')

        if side == '0':
            del self.buy_side[index]
            if index == 0:
                if self.buy_side:
                    self.inst_status.set_best_bid(self.buy_side[0]['price'])
                else:
                    self.inst_status.set_best_bid(None)


        elif side == '1':
            del self.sell_side[index]
            if index == 0:
                if self.sell_side:
                    self.inst_status.set_best_ask(self.sell_side[0]['price'])
                else:
                  self.inst_status.set_best_ask(None)
def on_book_delete_order ( self , msg ) : index = msg . get ( 'MDEntryPositionNo' ) - 1 side = msg . get ( 'MDEntryType' ) if side == '0' : del self . buy_side [ index ] if index == 0 : if self . buy_side : self . inst_status . set_best_bid ( self . buy_side [ 0 ] [ 'price' ] ) else : self . inst_status . set_best_bid ( None ) elif side == '1' : del self . sell_side [ index ] if index == 0 : if self . sell_side : self . inst_status . set_best_ask ( self . sell_side [ 0 ] [ 'price' ] ) else : self . inst_status . set_best_ask ( None )