Open DanielStroem opened 1 year ago
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)
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?
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
Whenever I try to get the latest currency rates from the API it only returns the ones from 2023-04-14