Skip to content
Currency conversion API

Currency converter API

Convert any amount between 190+ currencies at the latest rate or at the rate of any date since 1999 – in a single request to /v1/convert. Convert into one currency or into many at once.

RateLatest or any date
TargetsMany per call
HistorySince 1999
PlanBasic+
200 OK · GET /v1/convert
curl -G "https://api.fxapi.com/v1/convert" \
  -d value=250 -d base_currency=USD \
  -d currencies=EUR,GBP,JPY \
  -H "apikey: YOUR_API_KEY"
{
  "meta": { "last_updated_at": "2026-10-08T09:31:00Z" },
  "data": {
    "EUR": { "code": "EUR", "value": 228.85 },
    "GBP": { "code": "GBP", "value": 191.05 },
    "JPY": { "code": "JPY", "value": 37052.5 }
  }
}

Build a currency converter without writing conversion logic

Converting currencies sounds trivial – multiply by the rate. In practice you need the right rate for the right moment, a consistent base currency, cross rates for pairs that don’t involve USD, and correct rounding for each currency. The fxapi currency converter API handles all of that server-side: send an amount, a base currency and the target currencies, and get the converted values back as JSON.

The /v1/convert endpoint

ParameterRequiredDescription
valueyesAmount to convert, a number greater than 0
base_currencynoCurrency you are converting from, default USD
currenciesnoCurrencies you are converting to, comma-separated – default: all
datenoYYYY-MM-DD to convert at a historical rate (1999-01-01 to yesterday)
typenoLimit targets to fiat, metal or crypto

Cross rates are calculated for you: converting CHF to SEK or BRL to INR works exactly like USD to EUR.

Convert at the invoice date

Accounting systems usually need the rate of the transaction date, not today’s rate. Add date and the API converts using the end-of-day rate of that day:

curl -G "https://api.fxapi.com/v1/convert" \
  -d value=12500 -d base_currency=GBP -d currencies=EUR \
  -d date=2026-06-30 \
  -H "apikey: $FXAPI_KEY"

For period averages used in financial statements, see the average exchange rates API.

Python

import os, requests

def convert(amount, from_ccy, to_ccy, date=None):
    params = {"value": amount, "base_currency": from_ccy, "currencies": to_ccy}
    if date:
        params["date"] = date
    r = requests.get(
        "https://api.fxapi.com/v1/convert",
        params=params,
        headers={"apikey": os.environ["FXAPI_KEY"]},
        timeout=10,
    )
    r.raise_for_status()
    return r.json()["data"][to_ccy]["value"]

print(convert(99.90, "EUR", "USD"))

JavaScript (Node.js)

async function convert(amount, from, to) {
  const url = new URL("https://api.fxapi.com/v1/convert");
  url.search = new URLSearchParams({ value: amount, base_currency: from, currencies: to });
  const res = await fetch(url, { headers: { apikey: process.env.FXAPI_KEY } });
  const { data } = await res.json();
  return data[to].value;
}

console.log(await convert(99.9, "EUR", "USD"));

PHP

<?php
$query = http_build_query(["value" => 99.90, "base_currency" => "EUR", "currencies" => "USD"]);
$ch = curl_init("https://api.fxapi.com/v1/convert?$query");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ["apikey: " . getenv("FXAPI_KEY")],
]);
echo json_decode(curl_exec($ch), true)["data"]["USD"]["value"];

Prefer an SDK? Official libraries are available for JavaScript, Python, PHP, Go module, Ruby, C# and Rust.

Where a currency conversion API fits

  • Checkout and invoicing – show and charge the right amount in the customer’s currency.
  • Expense and travel tools – convert receipts at the rate of the day they were issued.
  • Marketplaces and payouts – calculate seller payouts across currencies in one call.
  • Spreadsheets and no-code tools – call the endpoint from Google Sheets, Zapier, Make or n8n with a plain HTTPS request.
  • Chatbots and AI agents – let an agent answer “how much is 500 CHF in yen?” via the MCP server.

Need live rates instead of converted amounts?

If you convert inside your own application, call the real-time exchange rates API once, cache the rates and multiply locally. That is available on every plan, including the free plan.

This endpoint is part of the fxapi foreign exchange rates API – the same key, response format and 190+ currencies across every endpoint.

Frequently asked questions

Can I convert at a historical exchange rate?
Yes. Add date=YYYY-MM-DD to the convert request to use the end-of-day rate of that date. Any date from 1999-01-01 up to yesterday is supported.
Can I convert one amount into several currencies at once?
Yes. Pass a comma-separated list in currencies – for example EUR,GBP,JPY – and you get all converted amounts in one response, for the cost of one request.
Which plan includes the convert endpoint?
Currency conversion is included in the Basic, Professional and Enterprise plans. On the Free plan you can call /v1/latest and multiply the rate yourself.
How do I round converted amounts?
The API returns full precision. Use the decimal_digits and rounding fields from the currencies endpoint to round each currency correctly – JPY has 0 decimals, KWD has 3.
Free plan · no credit card

Get your free exchange rate API key

300 requests a month, latest and historical rates, fluctuation and averages – free forever. Upgrade when you need faster updates or more requests.