forex-python icon indicating copy to clipboard operation
forex-python copied to clipboard

No data past 12th June 2021 for USD to EUR pair

Open pat42w opened this issue 3 years ago • 3 comments

Currently using v1.6 : When I run for dates before the 12th all is fine get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-11','%Y-%m-%d'))

0.8247422680412372

however when I try for 12th or later I get get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-12', '%Y-%m-%d'))

RatesNotAvailableError Traceback (most recent call last) ipython-input-54-01a85e164fe5 in module get_rate('USD','EUR' , datetime.datetime.strptime('2021-06-12', '%Y-%m-%d')) ~\AppData\Local\Continuum\anaconda3\lib\site-packages\forex_python\converter.py in get_rate(self, base_cur, dest_cur, date_obj) 77 base_cur, dest_cur, date_str)) 78 return rate 79 raise RatesNotAvailableError("Currency Rates Source Not Ready") 80 81 def convert(self, base_cur, dest_cur, amount, date_obj=None): RatesNotAvailableError: Currency Rates Source Not Ready

pat42w avatar Jun 22 '21 13:06 pat42w

Wait this is just weekends, is there is there a workaround for weekend data other than just the error using last days data etc?

pat42w avatar Jun 22 '21 14:06 pat42w

Usually rates are not updated over the weekends, so there isn't much you can do

zelenij avatar Jun 27 '21 04:06 zelenij

Best is to have at least a way to continue. Maybe take the last non weekend rate? Plus of course show a better error message. We also have this issue.

ddofborg avatar Aug 09 '22 17:08 ddofborg