# Historical Exchange Rates

Returns exchange rates for a single given date. We provide data going back to 1999-01-01, up to and including yesterday. To get a range of historical data, please upgrade to currencyapi.com in your dashboard and use the /range endpoint (https://currencyapi.com/docs/range)

Request Method: GET
Request URL: https://api.freecurrencyapi.com/v1/historical

# Request Parameters

Parameter Type Mandatory Description
apikey string Your API Key
date string The date to retrieve historical rates for (format: 2021-12-31, between 1999-01-01 and yesterday)
Defaults to yesterday
base_currency string The base currency to which all results are behaving relative to
By default all values are based on USD
currencies string A list of comma-separated currency codes which you want to get (EUR,USD,CAD)
By default all available currencies will be shown

Range queries

Passing the range parameters date_from/date_to returns a 403 error on the free plan. For date ranges, upgrade to currencyapi.com and use its /range endpoint.

# Example Request

curl "https://api.freecurrencyapi.com/v1/historical?date=2022-01-01&currencies=EUR,GBP" \
    -H "apikey: YOUR-APIKEY"

# Sample Response

The API response comes in easy-to-read JSON format and contains the end-of-day data for the provided date parameter for all requested currencies. Because the example request filters to currencies=EUR,GBP, exactly those two codes are returned; omit the currencies parameter to receive all 33 supported currencies — see the full currency list (opens new window).

{
    "data": {
        "2022-01-01": {
            "EUR": 0.879908,
            "GBP": 0.739337
        }
    }
}