from trade_constants import ORDER_STATUS_PENDING from datetime import datetime class LocalOrder: def __init__(self, order_id, code, price, amount, direction, order_type='limit'): self.order_id = order_id self.code = code self.price = price self.amount = amount self.filled = 0 self.direction = direction self.order_type = order_type self.status = ORDER_STATUS_PENDING self.created_time = datetime.now()