fix(paper): 修复A股下单取价与人民币计价 - #155
Conversation
显式请求 data-service fresh ticker,保留报价失败后的审批 token 重试语义,并补齐跨服务回归测试与能力说明。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
让 paper 的交易日历与币种解析同时识别 sh.600519 和 600519.SH,避免 data 按A股取价而 paper 回退到美元记账。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Review base: bba4128 🤖 DeepSeek V4 Pro PR Review[medium] services/data/src/inalpha_data/connectors/baostock.py:70-138 — [medium] services/data/src/inalpha_data/schemas.py:90 — data-service |
交易执行统一请求 fresh ticker,并对 is_stale=true 或缺少 freshness 标记 fail-closed;报价恢复前不消费 plan approval token。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying inalpha-web with
|
| Latest commit: |
a25ed4a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e27a1c62.inalpha-web.pages.dev |
| Branch Preview URL: | https://fix-a-share-order-pricing.inalpha-web.pages.dev |
订单与 plan 入站统一把后缀代码和 legacy akshare 规范为 baostock/sh|sz 前缀,避免同一证券形成重复仓位或无法跨格式平仓。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
让腾讯 ticker 与 K 线共用进程锁和最小请求间隔,避免并发下单突发触发公开源站限流或封禁。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
只向 agent 声明已贯通 fresh ticker 的 spot 计划市场,明确排除 FRED,并禁止尚未持久化 tradingMode/leverage 的 perp plan。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
交易事务首次访问单个 legacy A 股仓位时原子迁到 canonical key;重复 active identity fail-closed。旧 plan 执行前同样规范化,确保升级后仍可平仓。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shield 无法终止的 to_thread,并在 caller 取消后等待后台线程退出再释放锁,防止慢请求与下一次 ticker 并发。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
fresh=true的跨服务契约,避免 A 股 K 线可用但下单因 DB-only ticker 返回NO_PRICE_AVAILABLE。sh.600519/600519.SH与 legacyakshareA 股身份,避免 data 按人民币行情取价而 paper 回退为 USD 记账。Test Coverage
Verification
services/paper: 937 tests passedpackages/orchestration: typecheck passedpackages/orchestration: 478 tests passedscripts/check-consistency.sh: 10 passed, 0 failedgit diff --check: passedScope
🤖 Generated with Claude Code