Convert to a currency amount from one or multiple other currencies.
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
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
Comma separated list of to currencies ISO codes. This will limit the data returned to only those currencies you are interested in. Use an asterisk * to convert all currencies. Note: Obsolete currencies are replaced by their successor currency.
OPTIONAL - Currency you want to convert to ISO code. Note if this parameter is omitted, default is USD.
OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1 is assumed.
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 – Using one of the interval values below in your call request will return rates for that specific interval.
"daily" - Returns the latest daily rate at your pre-chosen daily lock-in time "hourly" - Returns rates for the most recent hour "15minutes" - Returns rates for the most recent 15 minute period "minutely" - Returns rates for the most recent minute
If omitted, we’ll default to your fastest rate frequency (i.e. live, 15-min, hourly, then daily) as per your subscription plan.
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.
OPTIONAL - Applicable to queries with rate intervals faster than daily. If 'true' then requests during the weekend will respond with the rate as of market close (Friday, 5pm America/New_York).
Response Body
application/json
application/json
application/json
application/json
application/json
text/plain
curl -X GET "https://example.com/v1/convert_to?from=string"{ "terms": "https://www.xe.com/legal", "privacy": "https://www.xe.com/privacy", "to": "GBP", "amount": 1, "timestamp": "2026-09-24T14:25:00Z", "from": [ { "quotecurrency": "EUR", "mid": 1.1623050132 }, { "quotecurrency": "USD", "mid": 1.32212641 } ]}{ "code": 42, "message": "Invalid interval requested: BOGUS", "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 from one base currency to one or multiple counter currencies. GET
In the example below, the Convert FROM API query endpoint is to convert from GBP to all available currencies (the asterisk * represents ALL currencies). [https://xecdapi.xe.com/v1/convert_from.csv/?from=GBP&to=*&amount=1](https://xecdapi.xe.com/v1/convert_from.csv/?from=GBP&to=*&amount=1)
Get historic rates for one base currency against one or more counter currencies over a period of time. GET
This endpoint returns a daily historic rate for a single base currency and one or more counter currencies over a period of time. [https://xecdapi.xe.com/v1/historic_rate/period.csv/?from=USD&to=CAD&start_timestamp=2017-09-01&end_timestamp=2017-11-30&per_page=30](https://xecdapi.xe.com/v1/historic_rate/period.csv/?from=USD&to=CAD&start_timestamp=2017-09-01&end_timestamp=2017-11-30&per_page=30)