Currency API

Currency API for apps: convert amounts, show prices in a visitor's currency, list 160+ currencies, and pull official central bank rates. SDKs for JavaScript, Python, PHP, Go and Rust. Free key, no credit card.

Everything an app needs to handle more than one currency: convert amounts, localize prices, list currencies, record the official rate for accounting. 160+ currencies, official SDKs in five languages, free key with no card.

Convert an amount

Fetch the pair, multiply. With the JavaScript SDK:

import { AllRatesToday } from "@allratestoday/sdk";
const api = new AllRatesToday({ apiKey: process.env.ALLRATES_API_KEY });

const [q] = await api.rates({ source: "USD", target: "EUR" });
const eur = 49.99 * q.rate;        // 49.99 USD in EUR

The rate is mid-market, refreshed every 60 seconds, with no spread added. If you need to show what a bank or card would charge, add your own margin on top; the API never hides one.

Show prices in the visitor's currency

One request quotes many targets, so a whole price list converts with a single call. Cache it for an hour and every visitor is served from it:

import requests

# Quote a USD price list in the visitor's currency: one request, many targets
r = requests.get(
    "https://allratestoday.com/api/v1/rates",
    params={"source": "USD", "target": "EUR,GBP,INR,JPY,BRL"},
    headers={"Authorization": "Bearer art_live_your_key"},
)
rates = {q["target"]: q["rate"] for q in r.json()}
print(round(49.99 * rates["INR"], 2), "INR")

For a client-side version that detects the visitor's country and rewrites prices, use react-currency-localizer-realtime, which works keyless by default.

List the currencies

Populate a dropdown or validate input from the symbols endpoint:

curl "https://allratestoday.com/api/v1/symbols" -H "Authorization: Bearer art_live_your_key"
[
  { "code": "AED", "name": "United Arab Emirates Dirham" },
  { "code": "AFN", "name": "Afghan Afghani" },
  ...
]

Record the official rate

Accounting, VAT and customs usually need the rate a named institution published for a date rather than the market rate. Those tables are open, no key needed:

// The rate a tax return needs: HMRC's monthly rate, no key required
const r = await fetch("https://allratestoday.com/api/open/central-bank/hmrc?source=GBP&target=EUR")
  .then(r => r.json());
// r.rate, r.rate_date, r.rate_type === "monthly"

100+ central banks and tax authorities are covered; see the central bank rates API and the tax authority rates.

SDKs

LanguagePackageInstall
JavaScript / TypeScript@allratestoday/sdknpm i @allratestoday/sdk
Pythonallratestodaypip install allratestoday
PHPallratestoday/sdkcomposer require allratestoday/sdk
Goallratestoday-gogo get github.com/AllRates-Today/allratestoday-go
Rustallratestodaycargo add allratestoday
Reactreact-currency-localizer-realtimenpm i react-currency-localizer-realtime
AI agentsMCP servernpx @allratestoday/mcp-server

PHP:

$api = new AllRatesToday\Client('art_live_your_key');
$quote = $api->rates('USD', ['EUR'])[0];

Go:

client := allratestoday.New(os.Getenv("ALLRATES_API_KEY"))
quotes, err := client.Rates(ctx, "USD", []string{"EUR"})

Starter projects for Next.js, React, Python and Google Sheets are on GitHub with the "Use this template" button.

Three habits that keep a currency feature correct

Frequently asked questions

What is a currency API?

A web service that gives software what it needs to work in more than one currency: rates, currency codes and names, and conversion between pairs.

How do I convert with it?

Request the pair from the rates endpoint and multiply. Several targets can be requested in one call.

Which currencies are supported?

Over 160 ISO currencies for live rates, listed by the symbols endpoint, plus whatever each central bank publishes on its official table.

Can I call it from the browser?

The keyless official-rate endpoints, yes. Keyed live rates should go through your server so the key stays private.

Is there a free plan?

Yes, with a request quota and no credit card. Details on the free currency API page.

Add currency support to your app

Free key in 30 seconds. SDKs for five languages. Official rates need no key at all.

Get Free API Key Read the Docs