update create order time

This commit is contained in:
zhiyong 2025-05-16 14:29:12 +08:00
parent b8025ec98f
commit 004f3aa370

View File

@ -1,6 +1,7 @@
import os
import json
import threading
from datetime import datetime
from logger_config import get_logger
from config import Config
from trade_constants import (
@ -83,7 +84,7 @@ class PositionManager:
return
with self._lock:
order = LocalOrder(order_id, code, price, amount, direction, order_type)
order = LocalOrder(order_id, code, price, amount, direction, order_type, created_time=datetime.now())
self.pending_orders[order_id] = order
if (order_type == ORDER_TYPE_LIMIT):
self.all_orders.append(order)