Skip to content

feat: currency-aware UTA + FX rates UI#114

Merged
luokerenx4 merged 2 commits intomasterfrom
dev
Apr 9, 2026
Merged

feat: currency-aware UTA + FX rates UI#114
luokerenx4 merged 2 commits intomasterfrom
dev

Conversation

@luokerenx4
Copy link
Copy Markdown
Contributor

Summary

  • Currency tracking across UTA layer: Position.currency + AccountInfo.baseCurrency fields propagated through all 4 brokers (IBKR, Alpaca, CCXT, Mock), snapshots, and trading tools
  • FxService with dual-table architecture: hardcoded default rates for offline resilience + live cache from market-data currency client. UTA runs independently of external data sources
  • CCXT stablecoin normalization: USDT/USDC/BUSD mapped to USD at broker layer
  • Portfolio UI: currency column, USD value column for non-USD holdings, currency-aware formatting (HK$, €, £, etc.), dual-column layout with FX rates sidebar
  • New API endpoint: GET /api/trading/fx-rates serving live rates
  • E2E verified: IBKR paper with HKD position (700.HK) confirmed currency=HKD
  • Bump to 0.9.0-beta.10

Test plan

  • tsc --noEmit — zero errors
  • pnpm test — 974 passed (50 files), including 15 new FxService tests
  • pnpm test:e2e — IBKR currency tracking tests pass (HKD + USD positions)
  • Manual: portfolio page shows HK$ for 700, $ for AAPL, FX rates sidebar with live HKD rate

🤖 Generated with Claude Code

Ame and others added 2 commits April 9, 2026 14:34
Verify baseCurrency on account and currency field on positions
match contract.currency (confirmed HKD for HK stocks, USD for US).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Portfolio page: dual-column layout with FX rates sidebar (sticky)
- Positions table: Ccy column + USD Value column for non-USD holdings
- Currency-aware formatting (HK$, €, £, ¥, etc.) throughout
- New /api/trading/fx-rates endpoint serving live rates from FxService
- SnapshotDetail: currency column + localized formatting
- FxService added to EngineContext for route access
- Bump version to 0.9.0-beta.10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@luokerenx4 luokerenx4 merged commit f17659b into master Apr 9, 2026
2 checks passed
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