Closed MysteriousBaboon closed 1 year ago
Seems to be back up now. Please close if that's the case.
it is back up now, but some rates are not correct. for example:
GBP to EUR. It broke yesterday. 2 days ago it was the correct 1.16, now it's 0.126 or something which is completely off.
from forex_python.converter import *
from datetime import datetime, timedelta
yesterday = datetime.now() - timedelta(days=1)
now = datetime.now()
c = CurrencyRates()
start_currency='GBP'
end_currency='EUR'
money = 1.0
result = c.get_rate(base_cur=start_currency, dest_cur=end_currency, date_obj=yesterday) * money
print(result)
this prints out 0.13268758707622902
even more interestingly if you use convert instead of get_rate, it gets you the correct amount
When I'm trying to requests any URL from https://theforexapi.com i get an error 504. Seems like it went down 2 days ago