Historical exchange rates for a time range
getRangeReturns exchange rates for every interval between datetime_start and datetime_end at the requested accuracy. Requires a plan that includes the range endpoint (medium and up). The allowed span and look-back depend on the chosen accuracy:
day: not more than 366 days between start and end.hour: not more than 7 days between start and end, and not more than 3 months back.quarter_hour: not more than 24 hours between start and end, and not more than 7 days back.minute: not more than 6 hours between start and end, and not more than 7 days back.week: the daily rate at the end of each week (Sunday), not more than 1830 days between start and end.month: the daily rate at the end of each month, any span back to
For week and month the last point is datetime_end itself when it falls inside a period. Add format=csv for one row per point and currency: datetime,base_currency,currency,value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter the returned currencies by type. | |
| format | No | `json` (default) or `csv`. CSV has a header line and one row per currency (and point in time), values without exponent notation. | |
| accuracy | No | The interval accuracy of the returned data. | |
| 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. | |
| datetime_end | Yes | End of the range as an ISO 8601 datetime (e.g. `2021-12-31T23:59:59Z`). Must be after or equal to `datetime_start`. | |
| base_currency | No | The base currency that all returned values are relative to. Defaults to `USD`. | |
| datetime_start | Yes | Start of the range as an ISO 8601 datetime (e.g. `2021-11-30T23:59:59Z`). Must be before or equal to `datetime_end`. |