feat dev
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user