Open olegrain opened 2 years ago
One big problem with this API is that it caches every request. So latest
is likely not latest but potentially very old. See #123.
However, even with the un-cached call https://api.exchangerate.host/latest?base=USD&symbols=XAU&v=7c7536a4-cd63-11ec-9d64-0242ac120002
it returns XAU=0.001764
. The inverse value (1/0.001764
) is 566.9
. That's also what this API returns from the request base=XAU&symbols=USD
. (At least this is consistent)
Here the values XAU->USD
from the same time from other platforms:
1883.7
(Bloomberg)1883.1
(Tradingview)1883.7
(XE)1883.2
(Wallstreet Online)So, yeah.. That is extremely off and should be addressed.
I have unfortunately been caught by this too — worse I didn't know I was affected until I saw this issue! My gold holdings are small and typically reference them through a different set of currencies (grams of gold valued in Turkish Lira) so the affect on my ledgers when estimated in USD was small.
I am not using the latest
API endpoint at all, only historical queries on specific dates, but the result seems to be off similarly to the results mentioned here.
I also caught it and the problem starts on the 24th of July 2021:
"2021-07-20"=>{"USD"=>1809.956989},
"2021-07-21"=>{"USD"=>1803.2263},
"2021-07-22"=>{"USD"=>1808.463902},
"2021-07-23"=>{"USD"=>1802.679939},
"2021-07-24"=>{"USD"=>994.453547},
"2021-07-25"=>{"USD"=>592.126258}
Prices until 2021-07-23 seems to be legit but then something went wrong I think
URL which I tested: https://api.exchangerate.host/timeseries?start_date=2021-07-20&end_date=2021-07-25&base=XAU&symbols=USD
Unfortunately the conversion endpoint gives wrong values as well...
{"from":"XAU","to":"USD","amount":1},"info":{"rate":666.18262},"historical":false,"date":"2022-06-23","result":666.18262}
Please fix XAU rates.
Hello! I find a free solution to get a correct rates: https://moneyconvert.net/pages/api Since the developers here don't fix this issue for a long time, I think we should switch to another free API.
Hello! I find a free solution to get a correct rates: https://moneyconvert.net/pages/api Since the developers here don't fix this issue for a long time, I think we should switch to another free API.
As I see it's a converter for currencies, what about gold prices?
Hello! I find a free solution to get a correct rates: https://moneyconvert.net/pages/api Since the developers here don't fix this issue for a long time, I think we should switch to another free API.
As I see it's a converter for currencies, what about gold prices?
It is API for all currencies rates, including gold prices: https://cdn.moneyconvert.net/api/latest.json You can find here XAU and it is rate for now is 0.00054553, the main currency used is USD. And you can easily convert cross rates from/to different currencies by easy math. But this is only current rates, not historical.
Hello! I find a free solution to get a correct rates: https://moneyconvert.net/pages/apiSince the developers here don't fix this issue for a long time, I think we should switch to another free API.As I see it's a converter for currencies, what about gold prices?
It is API for all currencies rates, including gold prices: https://cdn.moneyconvert.net/api/latest.jsonYou can find here XAU and it is rate for now is 0.00054553, the main currency used is USD. And you can easily convert cross rates from/to differs currencies by easy math. But this is only current rates, not historical.—You are receiving this because you commented.[ { ***@***.***": "schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "github.com/Formicka/exchangerate.host/issues/129#issuecomment-1164191622", "url": "github.com/Formicka/exchangerate.host/issues/129#issuecomment-1164191622", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "github.com" } } ]
It is API for all currencies rates, including gold prices: https://cdn.moneyconvert.net/api/latest.json You can find here XAU and it is rate for now is 0.00054553, the main currency used is USD. And you can easily convert cross rates from/to different currencies by easy math. But this is only current rates, not historical.
Ah yes, you are right, I didn't see it, but if this API does not support historical data, I don't know whether this is a sufficient replacement...
It is API for all currencies rates, including gold prices: https://cdn.moneyconvert.net/api/latest.json You can find here XAU and it is rate for now is 0.00054553, the main currency used is USD. And you can easily convert cross rates from/to different currencies by easy math. But this is only current rates, not historical.
Ah yes, you are right, I didn't see it, but if this API does not support historical data, I don't know whether this is a sufficient replacement...
As for me I only need current rates. If you need historical data, you can use other service: https://docs.openexchangerates.org/docs/historical-json but their free plan provides only hourly updates (with base currency USD) and up to 1,000 requests/month. So, if you math 1000 requests / 30 days / 24 hour = 1.38, so you can make a request every hour and get the rates you need.
The same problem also appears on XPD.
If you try to use https://api.exchangerate.host/latest?base=USD and find XAU rate, you can see it is 0.001338. But If you math 1/0.001338 you get 747.38 USD for one gold Ounce. But it is wrong, the now rate near the 1900 USD for one Ounce. But if you make the same math with XAG (Silver) rate is it Ok. Please, fix the wrong XAU value.