Historical exchange rates
getHistoricalReturns the exchange rates for a specific date. Historical data is available back to 1999. The date must be at least one day in the past.
Send dates instead of date for up to 31 days in one request: data is then keyed by date and the request costs one request per date (see X-Cost). Takes the same optional representations as /v1/latest (shape, precision, inverse, format=csv).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date to retrieve historical rates for (format `YYYY-MM-DD`). Required unless `dates` is sent; not together with `dates`. | |
| type | No | Filter the returned currencies by type. | |
| dates | No | Up to 31 dates (format `YYYY-MM-DD`), comma-separated or as `dates[]=`. Each date is answered once, oldest first, and costs one request. | |
| shape | No | `default`: every rate as `{"code": "EUR", "value": 0.918456}`. `compact`: plain values, `"EUR": 0.918456`. | |
| format | No | `json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`. | |
| inverse | No | `true` adds `inverse` to every rate: the value of one unit of the currency in the base currency (1 / value). Not with `shape=compact`. | |
| precision | No | Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1). | |
| currencies | No | Comma-separated list of currency codes to include (e.g. `EUR,USD,CAD`). The array form `currencies[]=EUR¤cies[]=USD` is also accepted. By default all supported currencies are returned. | |
| base_currency | No | The base currency that all returned values are relative to. Defaults to `USD`. |