refactor QMT client and optimize API

This commit is contained in:
2026-08-28 22:46:04 +08:00
parent d09f271569
commit 29fee85b3d
18 changed files with 1239 additions and 519 deletions

View File

@@ -6,6 +6,7 @@ from dataclasses import dataclass, field
from config import AccountConfig, GlobalConfig
from sdk import Client
from libs.grid_take_profit import GridTrailingTracker
from .order import OrderBook
from .state import State
@@ -27,7 +28,7 @@ class Runtime:
orders: 当前活动委托和证券方向锁。
open_watch: 新开仓使用的价格反弹观察器。
add_watch: 亏损补仓使用的价格反弹观察器。
peak_grids: ``证券代码|仓位类型`` 到最高盈利网格的映射
profit_tracker: 跨轮保存的账户持仓最高盈利网格跟踪器
"""
# 外部服务与账户配置。
@@ -40,4 +41,4 @@ class Runtime:
orders: OrderBook
open_watch: DipWatch
add_watch: DipWatch
profit_tracker: GridTrailingTracker