fix(trading212): normalize GBX/ZAc/ILA fractional currencies#159
Conversation
…(÷100) Trading 212 reports prices in GBX (pence) for UK stocks. The ECB only publishes GBP rates, so the parser must normalize GBX→GBP and divide amounts by 100. Also handles ZAc→ZAR and ILA→ILS. Closes #86
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Trading 212 parser gains support for fractional currencies by normalizing GBX/ZAc/ILA codes to GBP/ZAR/ILS and scaling amounts by 100 during parsing and calculation. ChangesFractional Currency Normalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
=======================================
Coverage 97.63% 97.64%
=======================================
Files 38 38
Lines 7622 7637 +15
Branches 1549 1552 +3
=======================================
+ Hits 7442 7457 +15
Misses 179 179
Partials 1 1
🚀 New features to boost your workflow:
|
Summary
getEcbRate("GBX", ...)failsCloses #86
Test plan
Summary by CodeRabbit