feat(shadow-desk): P1-b/c 影子柜台常驻进程+本地撮合broker+前端引擎选择: ShadowBroker(实时价±滑点即时成交/佣金印花最低佣金/A股整手/T+1日锁/资金不足拒单/均价加权/duck-typed BrokerBase协议); runner挂bullet_trade LiveEngine同实盘唯一差=broker_factory换影子(双轨对账基础),成交落paper_trades+30s快照落持仓净值; CLI单实例文件锁(python -m sanguo_trader.shadow); paper_accounts加engine列(eod_replay/shadow迁移); 前端:模拟盘新建组合卡撮合引擎单选+列表影子/日终徽标; 10 broker单测 [vps]
CI/CD / test (push) Successful in 12s
CI/CD / nas-deploy (push) Successful in 25s
CI/CD / nas-verify (push) Successful in 9s

This commit is contained in:
2026-08-14 12:16:05 +08:00
parent 861c7faa8c
commit 8e7e7282de
12 changed files with 632 additions and 4 deletions
+3
View File
@@ -21,6 +21,8 @@ export interface PaperCreate {
pool?: string
max_pool?: number
benchmark?: string
// 撮合引擎(影子柜台 P1):eod_replay=日终回放 / shadow=影子柜台
engine?: string
}
export interface PaperAccount {
@@ -30,6 +32,7 @@ export interface PaperAccount {
interval: string
status: string
strategy_type?: string
engine?: string
symbols?: string
initial_capital?: number
start_date?: string
+2
View File
@@ -13,6 +13,8 @@ export interface PortfolioBacktestReq {
stamp_duty_rate?: number
min_commission?: number
slippage?: number
// K线周期(组合回放暂仅日线 d)
interval?: string
}
export interface EquityPoint {