feat(live): D-3 sanguo实盘分支(影子下单)+D期设计文档

D-3 模式A影子下单(spec §5):
- bridge_client.py: QMT bridge HTTP客户端(urllib, X-Bridge-Token, 失败不抛返回None)
- live_orchestrator: _shadow_trades_to_bridge 当日成交POST bridge(默认enabled=false)
- persistence: paper_shadow_orders幂等表+save_shadow_order/is_trade_shadowed
- config: data_platform.yaml加live段, token走env(BRIDGE_TOKEN)
- to_bridge_code symbol转换与guess_exchange一致(2位前缀)
安全: enabled=false默认关+token走env+幂等防重复+影子失败不阻断live_step

docs: phase3d-live-trading-design.md(D期完整设计)
This commit is contained in:
2026-07-11 00:03:46 +08:00
parent eff9ed2ae9
commit ff84b3d4b0
6 changed files with 380 additions and 0 deletions
+7
View File
@@ -39,3 +39,10 @@ performance:
# 资金占用成本归因(spec §195):年化无风险利率,每策略占用资金按此日扣归因到 PnL
risk_free_rate: 0.02
# 实盘集成(D期,spec §5)— 默认关闭,D-4a 联调再开
# bridge_token 走环境变量 BRIDGE_TOKEN,不写入 yaml(不进 git
live:
enabled: false # 总开关(false=影子分支整个跳过,live_step 行为不变)
bridge_url: https://bridge.mysanguo.top
shadow: true # 模式A影子下单(模拟撮合为准,信号同步POST bridge影子)