fawazahmed0 / exchange-api

Free Currency Exchange Rates API with 200+ Currencies & No Rate Limits
https://github.com/fawazahmed0/exchange-api#readme
Creative Commons Zero v1.0 Universal
708 stars 46 forks source link

Should @latest always return today's result? #96

Closed alexmicic closed 7 months ago

alexmicic commented 7 months ago

Hi there,

Should this endpoint - https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/eur.json always return today's results?

If so, when are the results updated, because it still shows "date": "2024-04-14", instead of "date": "2024-04-15"?

Thank you.

fawazahmed0 commented 7 months ago

Rates are updated daily at roughly 00:00 UTC. Also, jsdelivr caches the data for 12 hours. It will take some time before new data shows up. You can use cloudflare, which will always return latest data: https://latest.currency-api.pages.dev/v1/currencies/eur.json

alexmicic commented 7 months ago

Ok, thanks a lot for info.