Implement ExchangeRateProvider for Czech National Bank#824
Open
NikBok wants to merge 1 commit into
Open
Conversation
Fetch exchange rates from two CNB public data sources: - Daily fixing (~30 major currencies: USD, EUR, JPY, etc.) - Other currencies (~160 additional currencies: KES, RUB, etc.) Rates are parsed from CNB's pipe-delimited text format and normalized to per-unit values (e.g. 100 JPY = 13.2 CZK becomes 1 JPY = 0.132 CZK). Only rates matching the requested currencies are returned; unknown currencies are silently ignored per the specification. Uses Polly for HTTP retry with exponential backoff to handle transient network failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fetch exchange rates from two CNB public data sources:
Key decisions
Data source: Used CNB's plain text format over XML — simpler to parse, lightweight, and the format has been stable for years. Both daily fixing (~30
currencies) and other currencies (~160) are fetched to maximize coverage.
Resilience: Added Polly for HTTP retry with exponential backoff rather than a manual retry loop. Polly is the industry standard in .NET and is
composable — adding circuit breaker, timeout, or jitter later requires a single line, not a rewrite.
Constructor design: HttpClient and ResiliencePipeline are injected via constructor for testability. A parameterless constructor provides sensible
defaults for direct usage.
AI Usage . Usage of Claude Code in order to research third party data and to analyze edge cases