Skip to content

Conversation

@divyambhagchandani
Copy link

This implementation fetches exchange rate data from the Czech National Bank's public XML API. The data is parsed and filtered to return rates only for the requested currencies. I chose the CNB's official XML endpoint because it's free, reliable, and maintained by the Czech government. The API updates daily and provides all major currency pairs against CZK.
I used a static HttpClient instance to prevent socket exhaustion through connection reuse. I also added a 10-second timeout since the default 100-second wait is excessive for a simple API call.

Future Improvements
Since CNB rates only update once per day, adding a cache layer would reduce unnecessary API calls. Other potential improvements include async/await for better scalability.

@divyambhagchandani divyambhagchandani marked this pull request as ready for review November 9, 2025 23:59
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