This commit is contained in:
2026-09-03 11:33:43 +08:00
parent d5303cc22b
commit e6a5096353
38 changed files with 1911 additions and 2742 deletions

View File

@@ -25,7 +25,6 @@ class PlaceOrderRequest:
client: Any
op: int
code: str
price: float
volume: int
order_id: str
strategy_name: str
@@ -52,9 +51,8 @@ class OrderBook:
key = f"{side}-{code}"
return key in self.lock
def refresh(self, client: Client) -> None:
"""从 QMT 刷新进行中和已完成委托,并撤销超时的活动委托。"""
orders = client.trade_detail_data("order")
def refresh(self, client: Client, orders: list[OrderItem]) -> None:
"""用账户快照刷新委托,并撤销超时的活动委托。"""
current = datetime.now()
now_timestamp = current.timestamp()
data: list[OrderItem] = []