Get historic rates for one base currency against one or more counter currencies over a period of time.
This endpoint returns a daily historic rate for a single base currency and one or more counter currencies over a period of time.
API key created on your Xe Currency Data account's API page, sent as a Bearer token in the Authorization header.
In: header
Query Parameters
OPTIONAL – Currency you want to convert from ISO code. Note if this parameter is omitted, default is USD.
Comma separated list of to currencies based on ISO 4217 codes. This will limit the data returned to only those currencies you are interested in. Note: Obsolete currencies are replaced by their precursor or successor currency.
OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1.00 is assumed.
OPTIONAL - ISO 8601 timestamp in the format yyyy-mm-ddThh:mm giving the UTC date and time of the start of the period for which you would like rates returned.
If you’re querying using a daily interval, the time value will be ignored & the endpoint will return rates at your preferred daily lock-in time starting on the date specified in your request. If your account does not have a preferred daily lock-in time then rates will return as of 00:00 UTC. If you’re querying using a faster rate interval than daily rate interval, your endpoint will return rates starting at 00:00 UTC if no time portion is specified.
OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-ddThh:mm giving the UTC date and time of the end of the period for which you would like rates returned. If a time in the future is specified, the current time will be used. If no end_time is specified, the time specified in the “start_timestamp" parameter will also be used for the "end_timestamp". If your query is using a daily rate interval, your endpoint will return rates at your preferred daily lock-in time ending on the date specified in your request. If your account does not have a preferred daily lock-in time then rates will return as of 00:00 UTC. If your query is using a faster rate interval than daily, your endpoint will return daily rates at your specified lock-in time or 00:00 UTC by default, unless you specify a time parameter in your rate request.
OPTIONAL – Using one of the interval values below in your call request will return rates for that specific interval.
"daily" - Returns one rate for the days specified in your time period "hourly" - Returns rates for every hour in the time period you specify "15minutes" - Returns rates for each 15 minute interval in the time period you specify, available for 7 days from current date ”minutely” - Returns minutely rates for the time period, available for 7 days from current date
If omitted, "daily" is used. This parameter is only used if both the "start_timestamp" and "end_timestamp" parameters have been specified.
OPTIONAL – You can specify the page number you want to request. Note: that page numbering is 1-based (the first page being page 1). Omitting this parameter will return the first page.
OPTIONAL – You can specify the number of days per page. The default is 30 days of rates per page with a maximum of 500 days of rates per page.
OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
OPTIONAL – If ‘true’ then endpoint will display the inverse of the converted value. If ‘false‘ then it will not be displayed.
OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
OPTIONAL – This parameter can be used to add a margin (-/+) to XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint and the API will return our mid-market rates plus the margin of 2.05 percent.
OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, ARB, AVAX, BCH, BNB, BTC, DAI, DOGE, DOT, ETH, EURC, LINK, LTC, LUNA, POL, SOL, TRX, UNI, USDC, USDP, USDT, XLM and XRP.
Note: Historical crypto data varies by currency. Most start from May 2022 onward.
Response Body
application/json
application/json
application/json
application/json
text/plain
curl -X GET "https://example.com/v1/historic_rate/period?to=string"{ "terms": "https://www.xe.com/legal", "privacy": "https://www.xe.com/privacy", "from": "USD", "amount": 1, "to": { "EUR": [ { "mid": 0.8711750189, "timestamp": "2026-09-18T03:00:00Z" }, { "mid": 0.870650765, "timestamp": "2026-09-19T03:00:00Z" } ], "GBP": [ { "mid": 0.7485201486, "timestamp": "2026-09-18T03:00:00Z" }, { "mid": 0.7466271079, "timestamp": "2026-09-19T03:00:00Z" } ] }}{ "code": 12, "message": "Date range error: start date 2026-01-01T00:00:00Z is after end date 2020-01-01T00:00:00Z", "documentation_url": "https://developers.xe.com/docs/currency-data-api"}{ "code": 1, "message": "Bad credentials", "documentation_url": "https://developers.xe.com/docs/currency-data-api"}{ "code": 3, "message": "Monthly rate limit exceeded.", "documentation_url": "https://developers.xe.com/docs/currency-data-api"}{ "code": 4, "message": "Current interval rate limit exceeded.", "documentation_url": "https://developers.xe.com/docs/currency-data-api"}"An unexpected error occurred"Convert to a currency amount from one or multiple other currencies. GET
In the example below, the Convert TO API query endpoint is to convert to GBP from all available currencies (the asterisk * represents ALL currencies). [https://xecdapi.xe.com/v1/convert_to.csv/?to=GBP&from=*&amount=1](https://xecdapi.xe.com/v1/convert_to.csv/?to=GBP&from=*&amount=1)
Get historic rates for one base currency against one or more counter currencies. GET
The Currency Data API provides you with access to daily historical rates back to 1998. When retrieving historical rates through our Currency Data API, you would specify your requested currencies along with the date and/or date range and time (hh:mm). Minutely and 15 minute rates are available for the past 7 days. Outside of 7 days you have access to rates on the hour. Historical rates are available with all API packages. The time parameter (hh:mm) is applicable only for packages with access to rate updates faster than daily. The endpoint returns the historic rate for a single base currency and one or more counter currencies. [https://xecdapi.xe.com/v1/historic_rate.csv/?from=USD&date=2011-03-05&to=CAD,EUR](https://xecdapi.xe.com/v1/historic_rate.csv/?from=USD&date=2011-03-05&to=CAD,EUR)