This commit is contained in:
2026-08-30 15:29:21 +08:00
parent 6334f10904
commit a946c5b53d
8 changed files with 38 additions and 109 deletions

View File

@@ -74,7 +74,7 @@ def StartTrend() -> None:
assets = client.assets()
_, positions = client.positions()
order_book = OrderBook()
order_book.refresh()
order_book.refresh(client)
storeState = State.for_strategy(
config.global_config.qmt_data_dir,
@@ -149,8 +149,7 @@ def RunOnce(run: Runtime, signals) -> None:
previous_state_codes = set(run.state.codes)
try:
broker_orders = run.client.trade_detail_data("order")
broker_deals = run.client.deals()
run.state.reconcile(positions, broker_orders, broker_deals)
run.state.reconcile(positions, broker_orders)
except Exception:
logging.exception("订单状态对账失败,本轮禁止自动交易")
return