DEV Community

Daniel Igel
Daniel Igel

Posted on

Free-tier currency conversion straight from the ECB feed

Most currency APIs gate the daily ECB reference rates behind a paid plan — even though the source feed is public. If you just need "convert 100 USD to EUR" for a checkout or dashboard, that's overkill.

curl --request GET \
  --url 'https://currency-exchange-rate-api11.p.rapidapi.com/api/v1/convert?from=USD&to=EUR&amount=100' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --header 'x-rapidapi-host: currency-exchange-rate-api11.p.rapidapi.com'
Enter fullscreen mode Exit fullscreen mode

Returns the converted amount + the rate used. Also /api/v1/rates (all rates for a base), /api/v1/currencies (supported list), and /api/v1/history (a currency's historical rates).

Free tier on RapidAPI: https://rapidapi.com/danieligel/api/currency-exchange-rate-api11

Built this on top of the ECB daily feed so small projects don't pay for reference rates. What do you use FX conversion for?

Top comments (0)