'Update your tick in the order book according to a specific transaction.
Afterwards, send the updated tick.'

def update_ticks(self, transaction, end_transaction_timestamp):

    self._logger.debug('Updating    own    tick    and    sending    it    to    other    traders')
    self.order_book.trade_tick(transaction.order_id, transaction.partner_order_id, transaction.transferred_quantity, end_transaction_timestamp)
    if self.order_book.tick_exists(transaction.order_id):
        tick = self.order_book.get_tick(transaction.order_id).tick
        tick.update_timestamp()
        tick.sign(self.my_member)
        self.send_tick(tick)
        if (tick.quantity == Quantity(0, tick.quantity.wallet_id)):
            self.order_book.remove_tick(transaction.order_id)
    if self.order_book.tick_exists(transaction.partner_order_id):
        tick = self.order_book.get_tick(transaction.partner_order_id)
        if (tick.quantity == Quantity(0, tick.quantity.wallet_id)):
            self.order_book.remove_tick(transaction.order_id)
