Skip to content
Historical FX data

Historical exchange rates API

Look up the exchange rate for any day since 1 January 1999, pull time series and measure how a currency moved between two dates – for 190+ currencies, as JSON or CSV.

HistorySince 1999
FormatsJSON · CSV
PlansAll
BaseAny
200 OK · GET /v1/historical · illustrative values
curl -G "https://api.fxapi.com/v1/historical" \
  -d date=2008-09-15 -d base_currency=USD \
  -d currencies=EUR,GBP,JPY \
  -H "apikey: YOUR_API_KEY"
{
  "meta": { "last_updated_at": "2008-09-15T23:59:59Z" },
  "data": {
    "EUR": { "code": "EUR", "value": 0.7027 },
    "GBP": { "code": "GBP", "value": 0.5577 },
    "JPY": { "code": "JPY", "value": 104.87 }
  }
}

Historical currency data for analysis, accounting and backtesting

Historical exchange rates answer questions that live rates can’t: What was the EUR/USD rate on the invoice date? How much did our Japanese revenue really grow once the yen moved? How did the pound react to a central-bank decision? The /v1/historical endpoint of the fxapi FX rates API gives you that data over a single, consistent REST interface – the same JSON format, currency codes and authentication as the real-time exchange rates API.

Every endpoint accepts a base_currency (USD by default), so you can request historical rates relative to EUR, GBP, CHF or any of the 190+ supported currencies without converting them yourself.

Exchange rate for a specific date

GET /v1/historical returns the end-of-day rates for one date. Pass the date in YYYY-MM-DD format; it must be at least one day in the past and not earlier than 1999-01-01.

ParameterRequiredDescription
dateyesDay you want rates for, e.g. 2020-03-16
base_currencynoBase currency, default USD
currenciesnoComma-separated list, e.g. EUR,GBP,CHF – default: all
typenoLimit to fiat, metal or crypto

Typical uses: booking foreign-currency invoices at the rate of the transaction date, recalculating historic orders in your reporting currency, or filling a gap in your own rate table.

Need more than one date?

  • Time series – every rate between two dates, from minute to monthly accuracy, as JSON or CSV: see the exchange rate time series API (Professional+).
  • Fluctuation – start rate, end rate and % change between two dates in one call: see the currency fluctuation API (all plans).

Monthly and yearly averages

Need an average rather than a closing rate – for example to translate an income statement? The average exchange rates API returns monthly, quarterly or yearly averages including the lowest and highest daily rate, back to 1999.

Python example: load ten years of EUR/USD into pandas

import io, os
import pandas as pd
import requests

frames = []
for year in range(2016, 2026):
    r = requests.get(
        "https://api.fxapi.com/v1/range",
        params={
            "datetime_start": f"{year}-01-01T00:00:00Z",
            "datetime_end": f"{year}-12-31T23:59:59Z",
            "accuracy": "day",
            "base_currency": "EUR",
            "currencies": "USD",
            "format": "csv",
        },
        headers={"apikey": os.environ["FXAPI_KEY"]},
        timeout=30,
    )
    r.raise_for_status()
    frames.append(pd.read_csv(io.StringIO(r.text)))

eurusd = pd.concat(frames)
print(eurusd.tail())

Ten requests, ten years of daily data. Because the maximum span for daily accuracy is 366 days, longer histories are fetched year by year – or in one call with accuracy=month.

Why developers choose fxapi for historical rates

  • 27+ years of daily history for fiat currencies, plus precious metals and major cryptocurrencies.
  • One format for everything – historical, live, converted and averaged rates share the same currency codes and code/value entries.
  • CSV output on range, fluctuation and average for analysts who don’t want to write a parser.
  • Fair billing – a time series is one request, and failed or invalid calls are never counted.
  • Available on every plan – the historical endpoint is included in the free exchange rate API plan.

Frequently asked questions

How far back does fxapi's historical exchange rate data go?
Daily historical exchange rates are available for every day since 1 January 1999. Intraday data (hourly, 15-minute and minute accuracy) is available for recent periods: hourly for the last three months, 15-minute and minute data for the last seven days.
Which rate does the historical endpoint return for a date?
The end-of-day rate for that date in UTC. The meta.last_updated_at field in the response shows the exact timestamp of the data point.
Can I download historical exchange rates as CSV?
Yes. The range, fluctuation and average endpoints accept format=csv, which returns rows you can import straight into Excel, Google Sheets, a database or a data warehouse.
Is historical data included in the free plan?
Yes. The historical endpoint is available on every plan, including Free. The range (time-series) endpoint is available from the Professional plan.
How many requests does a time series cost?
One request returns the whole series – up to 366 daily data points per call. Only successful calls count against your quota.
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.