Getting Started with Free Currency Exchange API

← Free Currency Exchange API

When to use this API

When you need exchange rates between fiat currencies, cryptocurrencies, or precious metals and don't want to deal with API keys, rate limits, or signup flows. This API is hosted on jsDelivr's CDN — there is no server, no auth, and no usage cap. It's surprisingly good for hyperinflated and niche currencies: Venezuelan bolivares, Iranian rials, Sierra Leonean leones, and 30+ crypto tokens all sit alongside the majors in the same response. For intraday or tick-by-tick rates, look elsewhere — this API updates once daily.

Getting exchange rates for a base currency

"How many Iranian rials is one euro worth right now?" The single-call endpoint for this is /currencies/{code}.json, where {code} is the lowercase currency code. The response returns every rate at once — fiat, crypto, and metals — in a flat key-value map. No auth. No key.

curl "https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/eur.json" | head -c 10000
{
  "date": "2026-04-09",
  "eur": {
    "usd": 1.166154,
    "gbp": 0.870825,
    "jpy": 185.220508,
    "chf": 0.923028,
    "ves": 553.243174,
    "irr": 1533492.540376,
    "try": 51.87776,
    "vnd": 30702.503131,
    "mnt": 4169.292682,
    "xdr": 0.815114,
    "bob": 8.05272,
    "btc": 1.639786e-05,
    "xau": 0.00038476,
    "xag": 0.03124
  }
}

The response wraps everything under a top-level key matching the base currency (eur here), preceded by a date field. That date is critical — these are daily snapshots, not live ticks, so the rate for Iranian rials (1.53 million per euro) reflects one day's close, not the current interbank price. The ves rate (553 bolivares per euro) understates street reality because Venezuela's official and parallel rates diverge widely; this API uses the official rate. Also note the scientific notation for BTC (1.639786e-05) — that is 0.0000164 BTC per euro, not 16.

One euro equals approximately 1,533,493 Iranian rials as of April 9, 2026. The rate is a daily snapshot, so it may lag behind the live market by up to 24 hours.

Looking up an unfamiliar currency code

"What currency is XDR, and does this API cover it?" The /currencies.json endpoint returns a flat map of every supported currency code to its human-readable name — 342 entries spanning fiat, crypto, and metals. Use it to validate a code before calling the rates endpoint, or to discover what's available.

curl "https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies.json" | head -c 10000
{
  "xdr": "IMF Special Drawing Rights",
  "xau": "Gold Ounce",
  "xag": "Silver Ounce",
  "ves": "Venezolanischer Bolvar",
  "irr": "Iranian Rial",
  "try": "Turkish Lira",
  "sll": "Sierra Leonean Leone",
  "pab": "Panamanian Balboa",
  "btc": "Bitcoin",
  "eth": "Ethereum",
  "1inch": "1inch",
  "aave": "Aave",
  "ada": "Cardano"
}

The list mixes fiat ISO codes (xdr, irr) with crypto ticker symbols (btc, 1inch, aave) and commodity units (xau, xag) in one flat namespace. Crypto codes are lowercase ticker symbols, not ISO 4217 — btc not XBT, eth not ETH. Some names appear in German or other languages (e.g., ves shows "Venezolanischer Bolvar" instead of "Venezuelan Bolvar"), because the upstream data source isn't fully English-normalized. If the code you need isn't in this list, the rates endpoint will return an empty or 404 response.

XDR stands for IMF Special Drawing Rights — it's a basket currency used by the International Monetary Fund. This API does cover it, along with 341 other currencies including gold and silver ounces.

Converting between two specific currencies

"Convert 5,000 Mongolian tugriks to US dollars." There is no dedicated conversion endpoint — take the rate for the base currency and do the math yourself. Fetch the base, extract the target, multiply.

curl "https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/mnt.json" | head -c 10000
{
  "date": "2026-04-09",
  "mnt": {
    "usd": 0.0002795
  }
}

5,000 MNT times 0.0002795 = 1.3975 USD. The rate is expressed as "how much of the target currency equals one unit of the base" — so mnt.usd of 0.0002795 means one tugrik buys 0.00028 dollars. You can also invert: fetch usd.json and use 1 / usd.mnt to get the same result. The direct approach (base = source currency) avoids a division and is less prone to floating-point rounding on very small numbers.

5,000 Mongolian tugriks equals approximately 1.40 US dollars as of April 9, 2026. One tugrik buys about 0.00028 dollars.

Pitfalls

One-line summary for the user

I can get daily exchange rates for 342 currencies — fiat, crypto, and precious metals — from a free CDN-hosted API with no auth and no rate limit, but the rates update once daily and the API has no historical or intraday endpoint.