Use casesUse case

Show your shop's prices in several currencies

Fetch rates, set your price endings and keep an order record

5 Nov 2026 · 1 min read

Use the exchange rate API to convert your shop's base prices into the currencies you display to customers. Rates update about every 60 seconds on trading days, with a 15 minute delay on Free.

Get rates for your shop's base currency

GET /v1/latest/USD?symbols=EUR,GBP,JPY returns rates for a USD base in one call. The curl example shows how to request the currencies your shop displays.

Use GET /v1/convert/{FROM}/{TO}/{AMOUNT} to convert an amount between currencies.

Shell
curl "https://api.exchangerate.dev/v1/latest/USD?symbols=EUR,GBP,JPY" \  -H "X-API-Key: $EXCHANGERATE_API_KEY"

Fetch on the server and cache the rates

Fetch rates on your server, cache them and refresh them on a schedule. Use the cached rates for page views so each customer visit does not trigger a request.

Round prices for each currency

Convert the base price, then round to your shop's price endings for that currency. The JavaScript example uses showPrice(amountUsd, currency, rates) to show a converted price.

JavaScript
// rates: the cached answer's rates, units of each currency per US dollar ({ EUR: …, GBP: …, JPY: … }).function showPrice(amountUsd, currency, rates) {  const amount = currency === 'USD' ? amountUsd : amountUsd * rates[currency]  const digits = new Intl.NumberFormat('en', { style: 'currency', currency }).resolvedOptions().maximumFractionDigits  // Round up to the currency's smallest unit; apply your own price endings here.  const rounded = Math.ceil(amount * 10 ** digits) / 10 ** digits  return new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(rounded)}

Keep the rate used for each order

Store the exchange rate and the time used on each order. This records how you calculated the price when rates change later.

Decide which currency checkout charges

Decide whether checkout charges in the currency shown to the customer or in your shop's base currency. Make that choice clear before the customer pays.

For platform guidance, see Shopify and WooCommerce, or start with the currency converter API.

Questions

Should I request rates for every page view?

Fetch rates on the server, cache them and refresh them on a schedule. Use the cached rates when displaying prices.

How fresh are the rates on Free?

Rates update about every 60 seconds on trading days. Free rates are 15 minutes late.

What are the Free request limits?

Free includes 5,000 requests a month and 10 requests a minute.

Keep reading

Start with a free API key

Get 5,000 requests a month and 10 requests a minute on Free, with no card needed.

Get a free key