Repository navigation
Version v0.32.82
This release brings a major rework and re-enablement of the convert_currency function, now powered by the Frankfurter ECB rates API. The update introduces robust input validation, improved caching logic, and clearer error handling for currency conversions. Documentation and API visibility have also been refined, and several bugs have been addressed to ensure correctness and compatibility with recent Python and pandas versions.
New Features
- Re-enabled
convert_currencyusing Frankfurter's ECB rates, removing the need for an API key and supporting keyless European Central Bank reference rates. The new implementation sendsfrom_currencyas the base and names the new column after the source column. (3df089, Cursor Agent, cahthuranag, Eric Ma) - Added date-aware currency checks: HRK, RUB, and BGN are only available for dates when the ECB published them, with clear errors after their removal. (
89b358, Cursor Agent, cahthuranag, Eric Ma) - Enhanced input and response validation for
convert_currency:- Raises a clear error if a column name selects multiple columns.
- Ensures the response row matches the requested base currency.
- Validates currency codes as three ASCII letters.
- Improves error messages for non-200 HTTP responses.
- Ensures results are shallow copies, preserving input DataFrame integrity under pandas 3. (
81e5cc, Eric Ma)
- Improved caching logic for exchange rates: rates are now cached only after a seven-day lag to avoid storing unpublished or stale rates, accounting for publication delays, time zones, and holidays. (
c72cfd, Eric Ma)
Bug Fixes
- Fixed handling of integer column labels and date validation in
convert_currency. Now writes results with a copied DataFrame and rejects invalid positional arguments. (5c08ec, Cursor Agent, cahthuranag, Eric Ma) - Fixed inclusive bound in strict timestamp sort test to prevent
IndexErroron Python 3.13. (253220, Cursor Agent, Eric Ma)
Deprecations
- Deprecated the
api_keyparameter inconvert_currency; it is now ignored and will be removed in a future release. (3df089, Cursor Agent, cahthuranag, Eric Ma)
Additional improvements:
- Documentation: The Finance API page now only lists public methods as defined by
__all__, improving clarity and maintainability. (9b5dd5, Eric Ma) - Documentation and changelog updates to reflect new caching behavior, error handling, and internal learnings. (
224eda, Eric Ma) - Internal: Dropped unused
_check_currencyand stopped listingcurrency_setin__all__as the set of codes is not closed. (81e5cc, Eric Ma) - Internal: Addressed review comments to drop HRK and RUB after their ECB removal, improved error handling for HTTP 422 and invalid URLs, and accepted timezone-aware dates. (
69b796, Cursor Agent, cahthuranag, Eric Ma)
Thanks to all contributors for their work on this release!