# Range Historical Exchange Rates

Returns a range of exchange rates. Generally, we provide data going back to 1999.

Switching Accuracy

Depending on your subscription plan you can request different accuracies: day, hour, quarter_hour, minute

Request Method: GET
Request URL: https://api.fxapi.com/v1/range

# Request Parameters

Parameter Type Mandatory Description
apikey string Your API Key
datetime_start string Datetime for the start of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)
datetime_end string Datetime for the end of your requested range (format: 2021-12-31T23:59:59Z / ISO8601 Datetime)
accuracy string The accuracy you want to receive.
Possible Values: day, hour, quarter_hour, minute
Default: day
For valid time ranges see below
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 seperated currency codes which you want to get (EUR,USD,CAD)
By default all available currencies will be shown

# Valid Accuracy Time Ranges

# day

  • not more than 366 days back

# hour

  • not more than 7 days between start and end
  • not more than 3 months back

# quarter_hour

  • not more than 24 hours between start and end
  • not more than 7 days back

# minute

  • not more than 6 hours between start and end
  • not more than 7 days back

# Sample Response

The API response comes with an easy-to-read JSON format and contains currency pairs for all supported world currencies.

The datetime in each object holds the datetime when the entry was last updated. Daily accuracy would result in end-of-day values and accuracy of an hour would result in end-of-hour values, and so on.

{
    "data": [
        {
            "datetime": "2022-01-01T23:59:59Z",
            "currencies": {
                "AED": {
                    "code": "AED",
                    "value": 3.67306
                },
                "AFN": {
                    "code": "AFN",
                    "value": 91.80254
                },
                "ALL": {
                    "code": "ALL",
                    "value": 108.22904
                },
                "AMD": {
                    "code": "AMD",
                    "value": 480.41659
                },
                "...": "150+ more currencies"
            }
        },
        {
            "datetime": "2022-01-02T23:59:59Z",
            "currencies": {
                "AED": {
                    "code": "AED",
                    "value": 3.67306
                },
                "AFN": {
                    "code": "AFN",
                    "value": 91.80254
                },
                "ALL": {
                    "code": "ALL",
                    "value": 108.22904
                },
                "AMD": {
                    "code": "AMD",
                    "value": 480.41659
                },
                "...": "150+ more currencies"
            }
        },
        {
            "datetime": "2022-01-03T23:59:59Z",
            "currencies": {
                "AED": {
                    "code": "AED",
                    "value": 3.67306
                },
                "AFN": {
                    "code": "AFN",
                    "value": 91.80254
                },
                "ALL": {
                    "code": "ALL",
                    "value": 108.22904
                },
                "AMD": {
                    "code": "AMD",
                    "value": 480.41659
                },
                "...": "150+ more currencies"
            }
        }
    ]
}