Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't return any currency rates after 2023-04-14 #134

Open
DanielStroem opened this issue Apr 25, 2023 · 3 comments
Open

doesn't return any currency rates after 2023-04-14 #134

DanielStroem opened this issue Apr 25, 2023 · 3 comments

Comments

@DanielStroem
Copy link

Whenever I try to get the latest currency rates from the API it only returns the ones from 2023-04-14

@DanielStroem
Copy link
Author

I temporarily fixed my code to return the latest rates, even though latest in forex python doesn't work properly anymore. If you get today's date from the datetime module you'll get the latest currency rates. Here's an example for how you can get the latest currency rates right now:

#Imports
from forex_python.converter import CurrencyRates
import datetime

#Finds today's date
date=datetime.date.today()

#Gets the latest currency rates based on today's date
currency=CurrencyRates()
value=round(currency.get_rate('USD', 'EUR', date),5)

print(value)

@woutervd1
Copy link

When using the currency.get_rates('EUR', date) one gets a different rate for the USD then when using currency.get_rate('EUR', 'USD', date). Is it possible that the get_rates() function is down whilst the get_rate function still works?

@DanielStroem
Copy link
Author

When using the currency.get_rates('EUR', date) one gets a different rate for the USD then when using currency.get_rate('EUR', 'USD', date). Is it possible that the get_rates() function is down whilst the get_rate function still works?

Idk seems like my method doesn't work anymore either

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

No branches or pull requests

2 participants