Skip to content

修复最新汇率与多币种账户对账 - #2

Merged
ApeCodeLab merged 1 commit into
mainfrom
fix/latest-fx-multicurrency-reconcile
Sep 15, 2026
Merged

ApeCodeLab merged 1 commit into
mainfrom
fix/latest-fx-multicurrency-reconcile

Conversation

@ApeCodeLab

Copy link
Copy Markdown
Contributor

Summary

  • Select the latest stored FX rate by rate_date and created_at.
  • Preserve older FX history when updating today's rate.
  • Derive stored cross-currency rates through the configured base currency.
  • Value mixed-currency account cash and positions in a target currency.
  • Make broker reconciliation convert each position before comparing totals.
  • Add core and CLI regression tests for these cases.

Scope

This PR contains only FX and mixed-currency valuation/reconciliation changes. It does not include personal data, 九坤 material, internal endpoints, screenshot/OCR workflows, release metadata, or security hardening.

Verification

  • pnpm -r test
  • pnpm typecheck
  • pnpm -r build
  • CI skill-drift check
  • git diff --check

本次变更:
- 读取汇率时按 rate_date 与 created_at 选择最新记录
- 同一天更新汇率时保留历史日期记录
- 支持通过配置的基准币推导交叉汇率
- 为混合币种账户提供按目标币种估值
- 对账时转换现金和每个持仓后再比较券商总额
- 增加 FX、历史保留、混合币种估值和 CLI 对账回归测试

验证:
- pnpm -r test
- pnpm typecheck
- pnpm -r build
- CI skill-drift check
- git diff --check

范围:
- 仅处理 FX 与多币种估值/对账
- 不包含个人数据、九坤、内部 endpoint、截图 OCR、release 或安全强化
@ApeCodeLab
ApeCodeLab merged commit aa1115c into main Sep 15, 2026
1 check passed
@ApeCodeLab
ApeCodeLab deleted the fix/latest-fx-multicurrency-reconcile branch September 15, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant