Skip to content
Integration guides

Exchange rate API integration guides

Copy-paste examples for every major language and spreadsheet tool, plus best practices for caching, rate limits and rounding.

Quick start: your first request in two minutes

1. Get an API key. Create a free account and copy the key from your dashboard.

2. Make a request. Every endpoint is a GET request to https://api.fxapi.com/v1/ with the key in the apikey header:

curl -G "https://api.fxapi.com/v1/latest" \
  -d base_currency=EUR \
  -d currencies=USD,GBP,JPY \
  -H "apikey: $FXAPI_KEY"

3. Read the response.

{
  "meta": { "last_updated_at": "2026-10-08T09:31:00Z" },
  "data": {
    "USD": { "code": "USD", "value": 1.0924 },
    "GBP": { "code": "GBP", "value": 0.8348 },
    "JPY": { "code": "JPY", "value": 163.41 }
  }
}

Values are illustrative. meta.last_updated_at is the UTC timestamp of the data. data is keyed by currency code, and each value is the amount of that currency for one unit of the base currency – here, one euro. Leave out currencies to receive all 190+ currencies in a single call, and set base_currency to any supported code. The same request works from any language – Python, Node.js, PHP, Go, Ruby, C#, Java or Rust – and from Google Sheets or Excel, as the guides on this page show.

4. Go further. Add date=YYYY-MM-DD to /v1/historical for any day back to 1999, use /v1/convert for converted amounts, or /v1/average for monthly averages. Errors use standard status codes – 401 invalid key, 403 not in plan, 422 invalid parameters, 429 limit reached. The guides above show how to handle each one in your stack; the full reference is in the API documentation.

Frequently asked questions

Do I need an SDK to use the fxapi exchange rate API?
No. Any HTTP client works: send a GET request with your key in the apikey header and parse the JSON. Official SDKs exist for JavaScript, Python, PHP, Ruby, C# and Rust if you prefer a wrapper.
Which endpoints can I use on the free plan?
Latest, historical, rate, matrix, fluctuation, average, currencies and status, with 300 requests per month and daily updates. Convert needs Basic, and range and OHLC need Professional – see pricing.
Can I call the API from browser JavaScript?
Keep your key on a server or serverless function and let the browser call your endpoint. Keys embedded in frontend code can be copied and used against your quota. The JavaScript guide shows a Next.js route handler.
How often should my integration call the API?
Once per plan update interval, shared across all users: daily on Free, hourly on Basic, every 60 seconds on Professional and Enterprise. The caching guide explains how.
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.