real_trader/src/local_order.py
2025-05-09 18:31:41 +08:00

17 lines
482 B
Python

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()