(self, msg)
on_md_incremental.
on_md_incremental.
on_md_incremental .
def on_md_incremental(self, msg):
        """" on_md_incremental. """
        if msg.get('MDBkTyp') == '3':  # Order Depth
            group = msg.get('MDIncGrp')

            for entry in group:
                entry_type = entry.get('MDEntryType')

                signal_order_depth_entry(
                    self.symbol +
                    '.3.' +
                    entry_type,
                    entry)

                if entry_type == '0' or entry_type == '1':
                    update_action = entry.get('MDUpdateAction')
                    if update_action == '0':
                        self.on_book_new_order(entry)
                    elif update_action == '1':
                        self.on_book_update_order(entry)
                    elif update_action == '2':
                        self.on_book_delete_order(entry)
                    elif update_action == '3':
                        self.on_book_delete_orders_thru(entry)
                elif entry_type == '2':
                    self.on_trade(entry)
            signal_publish_md_order_depth_incremental(
                self.symbol + '.3', {"MsgType": "X"})
def on_md_incremental ( self , msg ) : if msg . get ( 'MDBkTyp' ) == '3' : # Order Depth group = msg . get ( 'MDIncGrp' ) for entry in group : entry_type = entry . get ( 'MDEntryType' ) signal_order_depth_entry ( self . symbol + '.3.' + entry_type , entry ) if entry_type == '0' or entry_type == '1' : update_action = entry . get ( 'MDUpdateAction' ) if update_action == '0' : self . on_book_new_order ( entry ) elif update_action == '1' : self . on_book_update_order ( entry ) elif update_action == '2' : self . on_book_delete_order ( entry ) elif update_action == '3' : self . on_book_delete_orders_thru ( entry ) elif entry_type == '2' : self . on_trade ( entry ) signal_publish_md_order_depth_incremental ( self . symbol + '.3' , { "MsgType" : "X" } )