'Create a tick from an order
:param order: The order that this tick represents
:param message_id: The message id for the tick
:return: The created tick
:rtype: Tick'

@classmethod
def from_order(cls, order, message_id):

    assert isinstance(order, Order), type(order)
    assert isinstance(message_id, MessageId), type(message_id)
    if order.is_ask():
        return Ask(message_id, order.order_id, order.price, (order.total_quantity - order.traded_quantity), order.timeout, order.timestamp)
    else:
        return Bid(message_id, order.order_id, order.price, (order.total_quantity - order.traded_quantity), order.timeout, order.timestamp)
