Skip to content

Get a list of exchange rates for a list of currencies for a specific date (or close to it). Data source ECB.

Notifications You must be signed in to change notification settings

ddofborg/exchange_rates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Get a list of exchange rates for a given currency on a given date. Data is download from the European Central Bank history zipfile.

Usage:

>>> from exchange_rates import get_exchange_rates
>>> print( get_exchange_rates('USD', target_currencies=['EUR', 'CAD', 'USD'], on_date='2023-10-01') )
{'EUR': 0.9496676163342831, 'CAD': 1.3613485280151947, 'USD': 1.0}
>>> print( get_exchange_rates('EUR', target_currencies=['EUR', 'CAD', 'USD'], on_date='2023-10-01') )
{'EUR': 1.0, 'CAD': 1.4335, 'USD': 1.053}

Idea is based on @Andrewnolan13 comment: MicroPyramid/forex-python#149 (comment)

About

Get a list of exchange rates for a list of currencies for a specific date (or close to it). Data source ECB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages