Formicka / exchangerate.host

Exchange rates API is a simple and lightweight free service for current and historical foreign exchange rates & crypto exchange rates.
https://exchangerate.host
357 stars 33 forks source link

Missing exchange rate for certain days #217

Open spearmootz opened 1 year ago

spearmootz commented 1 year ago

we are testing to see if we can use this service. we ran into the following USD->UYU being missing for the following dates. 09-11-2019 -> 10-07-2019. i tried clearing the cache with the v=2019-09-11 and i also tried different sources but most failed except for the default.

any reason why this might be?

spearmootz commented 1 year ago

i was using the timeseries endpoint to get many quotes at a time. i do find that i have some of the data in the historial rate endpoint

spearmootz commented 1 year ago

the following calls have UYU -> USD but not USD -> UYU which is interesting

var requestURL = 'https://api.exchangerate.host/2019-09-11?base=USD'; var request = new XMLHttpRequest(); request.open('GET', requestURL); request.responseType = 'json'; request.send();

request.onload = function() { var response = request.response; console.log(response); }

var requestURL = 'https://api.exchangerate.host/2019-09-11?base=UYU'; var request = new XMLHttpRequest(); request.open('GET', requestURL); request.responseType = 'json'; request.send();

request.onload = function() { var response = request.response; console.log(response); }

spearmootz commented 1 year ago

so the reason why the base UYU seems to have data is because it in fact returns with a base EUR instead of erroring out

spearmootz commented 1 year ago

on this particular call which is a time series

var requestURL = 'https://api.exchangerate.host/timeseries?start_date=2019-09-11&end_date=2019-09-11&base=UYU'; var request = new XMLHttpRequest(); request.open('GET', requestURL); request.responseType = 'json'; request.send();

request.onload = function() { var response = request.response; console.log(response); }

the api returns saying the base is UYU, but then the data for that day is in fact in EUR.