API ReferenceCentral bank exchange and interest rates

Central bank interest rates and exchange rates for one or more central banks.

GET
/v2/central_bank

Returns each requested central bank's policy interest rate and its exchange rates in one response, grouped by bank. To request one side only, use /v2/central_bank/interest_rate or /v2/central_bank/exchange_rate.

Requires the Central bank exchange & interest rates add-on. See Data plans.

A bank appears with an interestRate object only if it publishes a policy interest rate, and with an exchangeRates object only if it has exchange rates for the date. Use /v2/central_bank/metadata to see which banks publish what.

The European Central Bank sets the policy rate for the euro area, so the code of a euro area national bank (for example SVN) returns that bank's exchange rates under its own code and the European Central Bank's interest rate under ECB.

Exchange rates keep the direction the bank publishes them in, so fromCurrency is not always the bank's own currency.

Exchange rates are returned once their effective date has arrived in the bank's local time zone. Some banks publish the next day's rate in advance (for example RUS): /v1/central_bank_rate returns it as soon as it is published, this endpoint from the date it is effective for.

Each interest rate and each exchange rate pair returned counts as one rate request.

Also available as XML and CSV by appending .xml or .csv to the path. https://xecdapi.xe.com/v2/central_bank.csv?bank_code=ECB&iso=*

Authorization

AuthorizationBearer <token>

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

bank_code*string

REQUIRED - One or more central bank codes, comma-separated (for example CAN,ECB), or an asterisk * for every supported bank. Codes are case-insensitive. /v2/central_bank/metadata lists the codes. An asterisk returns every rate from every bank, which can use thousands of rate requests in one call, so list the codes of the banks you need or limit the currencies with iso.

iso?string

OPTIONAL - Comma-separated list of ISO 4217 currency codes that limits the exchange rates returned. A pair is returned when either of its currencies matches. Use an asterisk * or omit the parameter for all currencies.

date?string

OPTIONAL - YYYY-MM-DD format - request the rates in effect on a past date, in the bank's local time zone. Each bank returns the most recent rates published on or before that date, so check the date in the response. A future date returns 400. Unlike /v1/central_bank_rate, bid and ask are available for past dates. exchangeRates.ratesFrom in /v2/central_bank/metadata is the earliest date available.

fields?string

OPTIONAL - Comma-separated list of exchange rate fields, one or more of "mid", "bid" or "ask". Bid and ask are returned only for banks that publish them.

Default"mid"
inverse?boolean

OPTIONAL - If true, each exchange rate is inverted and its currencies swapped: mid becomes 1/mid, bid becomes 1/ask and ask becomes 1/bid. Inverted rates are rounded to 10 decimal places unless decimal_places is set.

Defaultfalse
amount?number

OPTIONAL - Amount to convert. Each exchange rate is multiplied by this amount. Must be greater than 0.

Default1
decimal_places?integer

OPTIONAL - Number of decimal places for exchange rates, from 1 to 20. If omitted, rates keep the precision the bank publishes.

Response Body

application/json

application/json

application/json

application/json

application/json

text/plain

curl -X GET "https://example.com/v2/central_bank?bank_code=string"
{  "terms": "https://www.xe.com/legal",  "privacy": "https://www.xe.com/privacy",  "centralBanks": [    {      "bankCode": "CAN",      "name": "Bank of Canada",      "currency": "CAD",      "timezone": "America/Toronto",      "interestRate": {        "currentRate": 2.25,        "decisionDate": "2026-09-02",        "lastBasisPointChange": 0,        "decisionType": "HOLD",        "nextMeetingDate": "2026-10-28"      },      "exchangeRates": {        "date": "2026-10-09",        "amount": 1,        "rates": [          {            "fromCurrency": "GBP",            "toCurrency": "CAD",            "mid": 1.8879          },          {            "fromCurrency": "USD",            "toCurrency": "CAD",            "mid": 1.4271          }        ]      }    },    {      "bankCode": "ECB",      "name": "European Central Bank",      "currency": "EUR",      "timezone": "Europe/Berlin",      "interestRate": {        "currentRate": 2.5,        "decisionDate": "2026-09-16",        "lastBasisPointChange": 25,        "decisionType": "HIKE",        "nextMeetingDate": "2026-10-29"      },      "exchangeRates": {        "date": "2026-10-12",        "amount": 1,        "rates": [          {            "fromCurrency": "EUR",            "toCurrency": "GBP",            "mid": 0.84478          },          {            "fromCurrency": "EUR",            "toCurrency": "USD",            "mid": 1.1181          }        ]      }    }  ]}

{  "code": 34,  "message": "Unsupported bank code 'ZZZ'",  "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": 16,  "message": "Endpoint not authorized. Feature missing: central-bank-rates-v2",  "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"

List the central banks and what each one publishes. GET

Returns every central bank the V2 endpoints support: its code, name, home currency and the countries it covers, whether it publishes a policy interest rate, and how it publishes exchange rates. Use the `bankCode` values as `bank_code` on the other V2 central bank endpoints. This endpoint takes no parameters. It works with any valid credentials and does not count towards your rate requests. Also available as XML and CSV by appending `.xml` or `.csv` to the path. [https://xecdapi.xe.com/v2/central_bank/metadata.csv](https://xecdapi.xe.com/v2/central_bank/metadata.csv)

Central bank exchange rates from currency of central bank to one or multiple counter currencies, provided by specified central bank. GET

Included with the Intermediate, Prime and Enterprise plans. Core and the free trial do not include this endpoint: on Core, add the Central bank exchange & interest rates add-on and use `/v2/central_bank` instead. See [Data plans](https://developers.xe.com/docs/currency-data-api/data-plans). In the example below, the endpoint converts from CAD to all available currencies for the Bank of Canada (the asterisk * represents ALL currencies). [https://xecdapi.xe.com/v1/central_bank_rate.csv/?central_bank=CAN&to=*&amount=1](https://xecdapi.xe.com/v1/central_bank_rate.csv/?central_bank=CAN&to=*&amount=1) *Note on Central Bank Data Coverage: Some Central Banks may experience temporary data gaps due to source website changes or access restrictions. For these banks, we continue to provide historical data and are working to restore full coverage.*

Get help