Historical Exchange Rates
On this page, we’ll dive into the historical exchange rates endpoint you can use to retrieve historical exchangen rates for a specific date. Data are available all the way back to 1999.
GET/v3/historical
Historical Exchange Rates
This historical exchange rates endpoint provides currency rates for a specified date.
Required attributes
- Name
date
- Type
- string
- Description
Date to retrieve historical rates from (format: 2021-12-31)
Optional attributes
- Name
base_currency
- Type
- string
- Description
The base currency to which all results are behaving relative to By default all values are based on USD
- Name
currencies
- Type
- string
- Description
A list of comma seperated currency codes which you want to get (EUR,USD,CAD) By default all available currencies will be shown
- Name
type
- Type
- string
- Description
They type of currency you want to get (fiat, metal or crypto) By default all types will be shown
Response Properties
The response is equal to the response from /latest
endpoint.
Request
GET
/v3/historicalcurl -G https://api.currencyapi.com/v3/historical?date=2022-01-01 \
-H "apikey: YOUR-API-KEY"
Full Response
{
"meta": {
"last_updated_at": "2022-01-01T23:59:59Z"
},
"data": {
"AED": {
"code": "AED",
"value": 3.67306
},
"AFN": {
"code": "AFN",
"value": 91.80254
},
"ALL": {
"code": "ALL",
"value": 108.22904
},
"AMD": {
"code": "AMD",
"value": 480.41659
},
"...": "170+ more currencies"
}
}