Introduction
The Exchange Rate API provides accurate mid-market currency rates sourced from 15+ central banks, commercial banks, and financial data providers. The API is REST-based, returns JSON, and supports HTTPS only.
Base URL for all requests:
https://api.exchangerate-intel.com
All responses include a timestamp (Unix epoch) and source field indicating which data provider served the rate.
Authentication
All endpoints (except /v1/currencies) require an API key passed as a request header:
X-API-Key: er_live_your_api_key_here
Keys are prefixed with er_live_ for production and er_test_ for sandbox. Never expose keys in client-side code.
/v1/currencies endpoint is public and does not require authentication.Quickstart
Fetch the latest USD → EUR rate in under a minute:
curl -H "X-API-Key: er_live_YOUR_KEY" \ https://api.exchangerate-intel.com/v1/latest?base=USD&symbols=EUR,GBP,JPY
import requests headers = {"X-API-Key": "er_live_YOUR_KEY"} params = {"base": "USD", "symbols": "EUR,GBP,JPY"} r = requests.get( "https://api.exchangerate-intel.com/v1/latest", headers=headers, params=params ) data = r.json() print(data["rates"])
const res = await fetch( "https://api.exchangerate-intel.com/v1/latest?base=USD&symbols=EUR,GBP,JPY", { headers: { "X-API-Key": "er_live_YOUR_KEY" } } ); const data = await res.json(); console.log(data.rates);
req, _ := http.NewRequest("GET", "https://api.exchangerate-intel.com/v1/latest?base=USD&symbols=EUR,GBP,JPY", nil) req.Header.Set("X-API-Key", "er_live_YOUR_KEY") resp, _ := http.DefaultClient.Do(req)
Supported Sources
Exchange Rate API aggregates data from multiple authoritative sources to provide the most accurate mid-market rates. The source field in each response tells you which provider served that particular rate.
| Source ID | Provider | Update Frequency |
|---|---|---|
| ecb | European Central Bank | Daily (16:00 CET) |
| fed | US Federal Reserve | Daily (17:00 EST) |
| boe | Bank of England | Daily (16:30 GMT) |
| imf | International Monetary Fund | Daily |
| xe | XE Mid-Market | Every 60 seconds |
| reuters | Reuters FX | Every 60 seconds |
| bloomberg | Bloomberg FX | Every 60 seconds |
| coinbase | Coinbase Pro | Every 10 seconds (crypto) |
?source=ecb to pin requests to a specific provider. Omitting the parameter uses the highest-quality available source.Rate Limits
Rate limits are enforced per API key based on your plan:
| Plan | Monthly Quota | Requests / Second |
|---|---|---|
| Free | 1,000 | 1 |
| Starter | 100,000 | 10 |
| Growth | 1,000,000 | 50 |
| Business | 10,000,000 | 200 |
| Enterprise | Unlimited | Custom |
When you exceed the rate limit, the API returns 429 Too Many Requests. Check the X-RateLimit-Remaining and X-RateLimit-Reset headers to track usage.
Error Codes
| HTTP Code | Error | Description |
|---|---|---|
| 400 | invalid_params | Missing or invalid query parameters |
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | Feature not available on current plan |
| 404 | not_found | Currency code or date not found |
| 422 | unsupported_currency | Currency code not supported |
| 429 | rate_limit_exceeded | Monthly quota or per-second limit hit |
| 500 | server_error | Internal server error — retry with backoff |
{
"error": "unsupported_currency",
"message": "Currency code 'XYZ' is not supported",
"status": 422
}
API Playground
Test live requests directly from the browser. Your API key is sent securely.
Interactive Request Builder
GET/v1/latest
Returns the latest mid-market exchange rates for all or selected currencies relative to a base currency.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| baseoptional | string | Base currency ISO 4217 code. Default: USD |
| symbolsoptional | string | Comma-separated list of target currencies. Omit for all 170+ |
| sourceoptional | string | Preferred data source (e.g. ecb, xe) |
Response
{
"base": "USD",
"timestamp": 1711267200,
"source": "xe",
"rates": {
"EUR": 0.921834,
"GBP": 0.787261,
"JPY": 151.423,
"CAD": 1.35612,
"AUD": 1.52038,
"CHF": 0.89741,
"CNY": 7.22890
}
}
curl -H "X-API-Key: er_live_YOUR_KEY" \ "https://api.exchangerate-intel.com/v1/latest?base=USD&symbols=EUR,GBP,JPY"
r = requests.get(
"https://api.exchangerate-intel.com/v1/latest",
headers={"X-API-Key": "er_live_YOUR_KEY"},
params={"base": "USD", "symbols": "EUR,GBP,JPY"}
)
const res = await fetch( "https://api.exchangerate-intel.com/v1/latest?base=USD&symbols=EUR,GBP,JPY", { headers: { "X-API-Key": "er_live_YOUR_KEY" } } );
GET/v1/historical
Returns exchange rates for a specific historical date. Supported back to 1999-01-01 for major fiat pairs.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| daterequired | string | Date in YYYY-MM-DD format |
| baseoptional | string | Base currency code. Default: USD |
| symbolsoptional | string | Comma-separated target currencies |
Response
{
"base": "USD",
"date": "2020-01-15",
"source": "ecb",
"historical": true,
"rates": {
"EUR": 0.89720,
"GBP": 0.76381,
"JPY": 109.872
}
}
curl -H "X-API-Key: er_live_YOUR_KEY" \ "https://api.exchangerate-intel.com/v1/historical?date=2020-01-15&base=USD&symbols=EUR,GBP,JPY"
r = requests.get(
"https://api.exchangerate-intel.com/v1/historical",
headers={"X-API-Key": "er_live_YOUR_KEY"},
params={"date": "2020-01-15", "base": "USD"}
)
GET/v1/range
Returns day-by-day exchange rates between two dates. Ideal for chart rendering, trend analysis, and reporting.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| startrequired | string | Start date YYYY-MM-DD |
| endrequired | string | End date YYYY-MM-DD |
| baseoptional | string | Base currency. Default: USD |
| symbolsoptional | string | Target currencies to include |
Response
{
"base": "USD",
"start": "2024-01-01",
"end": "2024-01-03",
"rates": {
"2024-01-01": { "EUR": 0.91920, "GBP": 0.78801 },
"2024-01-02": { "EUR": 0.92031, "GBP": 0.78912 },
"2024-01-03": { "EUR": 0.91885, "GBP": 0.78734 }
}
}
curl -H "X-API-Key: er_live_YOUR_KEY" \ "https://api.exchangerate-intel.com/v1/range?start=2024-01-01&end=2024-01-03&base=USD&symbols=EUR,GBP"
GET/v1/convert
Converts an amount from one currency to another using the latest or a historical rate.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| fromrequired | string | Source currency ISO code (e.g. USD) |
| torequired | string | Target currency ISO code (e.g. EUR) |
| amountrequired | number | Amount to convert |
| dateoptional | string | Use historical rate for this date (YYYY-MM-DD) |
| precisionoptional | integer | Decimal places in result (2–8). Default: 6 |
Response
{
"from": "USD",
"to": "EUR",
"amount": 1000,
"rate": 0.921834,
"result": 921.834,
"timestamp": 1711267200,
"source": "xe",
"historical": false
}
curl -H "X-API-Key: er_live_YOUR_KEY" \ "https://api.exchangerate-intel.com/v1/convert?from=USD&to=EUR&amount=1000"
r = requests.get(
"https://api.exchangerate-intel.com/v1/convert",
headers={"X-API-Key": "er_live_YOUR_KEY"},
params={"from": "USD", "to": "EUR", "amount": 1000}
)
const res = await fetch( "https://api.exchangerate-intel.com/v1/convert?from=USD&to=EUR&amount=1000", { headers: { "X-API-Key": "er_live_YOUR_KEY" } } );
GET/v1/currencies
Returns the full list of all 170+ supported currencies with their ISO codes, names, and symbols. This endpoint is public — no API key required.
Response
{
"currencies": {
"USD": {
"name": "United States Dollar",
"symbol": "$",
"type": "fiat"
},
"EUR": {
"name": "Euro",
"symbol": "€",
"type": "fiat"
},
"BTC": {
"name": "Bitcoin",
"symbol": "₿",
"type": "crypto"
},
"XAU": {
"name": "Gold (troy ounce)",
"symbol": "Au",
"type": "metal"
}
},
"count": 172
}
curl https://api.exchangerate-intel.com/v1/currencies
GET/v1/sources
Returns metadata for all available data sources including their current status, last update time, and supported currencies.
Response
{
"sources": [
{
"id": "xe",
"name": "XE Mid-Market",
"status": "active",
"last_updated": 1711267140,
"update_frequency_seconds": 60,
"currency_count": 172
},
{
"id": "ecb",
"name": "European Central Bank",
"status": "active",
"last_updated": 1711224000,
"update_frequency_seconds": 86400,
"currency_count": 33
}
]
}
curl -H "X-API-Key: er_live_YOUR_KEY" \ https://api.exchangerate-intel.com/v1/sources
POST/v1/auth/register
Creates a new developer account and issues a free-tier API key.
Request Body
| Field | Type | Description |
|---|---|---|
| emailrequired | string | Developer email address |
| passwordrequired | string | Minimum 8 characters |
Response
{
"api_key": "er_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"plan": "free",
"quota": 1000,
"email": "you@example.com"
}
curl -X POST \ -H "Content-Type: application/json" \ -d '{"email":"you@example.com","password":"yourpassword"}' \ https://api.exchangerate-intel.com/v1/auth/register
POST/v1/auth/subscribe
Initiates a Stripe checkout session to upgrade your plan. On success, redirect the user to the returned checkout_url.
Request Headers
| Header | Description |
|---|---|
| X-API-Key | Your current API key (required) |
Request Body
| Field | Type | Description |
|---|---|---|
| planrequired | string | One of: starter, growth, business |
| success_urloptional | string | Redirect URL after successful payment |
| cancel_urloptional | string | Redirect URL if user cancels |
Response
{
"checkout_url": "https://checkout.stripe.com/pay/cs_live_...",
"session_id": "cs_live_a1b2c3d4e5f6"
}
curl -X POST \ -H "X-API-Key: er_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"plan":"starter"}' \ https://api.exchangerate-intel.com/v1/auth/subscribe