API Reference
Full documentation for all xchangr8 endpoints, authentication, and rate limits.
Authentication
Every request must include your API key. Two methods are supported:
X-API-Key: xc8_live_YOUR_KEY
— HTTP header
?apikey=xc8_live_YOUR_KEY
— query parameter
Every response includes these headers so you can track your usage:
X-RateLimit-Limit: 333 X-RateLimit-Remaining: 312 X-RateLimit-Reset: 1749340860
Returns the latest exchange rates for all supported currencies (or a filtered subset). Rates are refreshed every 60 seconds on Starter and higher plans, and every 10 minutes on the Free plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
| base | string | Optional | Base currency code. All returned rates are relative to this currency. Default: USD |
| symbols | string | Optional | Comma-separated list of currency codes to include in the response. If omitted, all supported currencies are returned. |
curl "https://api.xchangr8.com/v1/latest?base=JPY&symbols=USD,EUR,AUD" \ -H "X-API-Key: xc8_live_YOUR_KEY"
{ "base": "JPY", "timestamp": 1749340800, "freshness": "1m ago", "source": "fastforex", "rates": { "USD": 0.006673, "EUR": 0.006140, "AUD": 0.010281 } }
Convert a specific amount from one currency to another using the latest available rate. Useful for checkout flows and single-shot conversions without needing to fetch the full rates object.
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | Required | Source currency code (e.g. USD) |
| to | string | Required | Target currency code (e.g. JPY) |
| amount | number | Required | The amount to convert, in the source currency |
curl "https://api.xchangr8.com/v1/convert?from=USD&to=JPY&amount=100" \ -H "X-API-Key: xc8_live_YOUR_KEY"
{ "from": "USD", "to": "JPY", "amount": 100, "result": 14985.00, "rate": 149.85, "timestamp": 1749340800 }
Returns exchange rates for a specific past date. Historical data is available from January 1, 2020. Useful for invoicing, auditing, and displaying past transaction values.
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Required | Date in YYYY-MM-DD format (e.g. 2025-01-15) |
| base | string | Optional | Base currency. Default: USD |
| symbols | string | Optional | Comma-separated currency codes to filter the response |
curl "https://api.xchangr8.com/v1/historical?date=2025-01-15&base=USD&symbols=JPY,EUR" \ -H "X-API-Key: xc8_live_YOUR_KEY"
{ "base": "USD", "date": "2025-01-15", "timestamp": 1736899200, "source": "fastforex", "rates": { "JPY": 157.42, "EUR": 0.9134 } }
Returns a daily rate series for a date range. Ideal for charts, trend analysis, and reporting dashboards. The maximum range depends on your plan.
Plan limits: Free plan — 7 days max. Starter plan — 365 days max.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | string | Required | Start of the date range in YYYY-MM-DD format |
| end_date | string | Required | End of the date range in YYYY-MM-DD format |
| base | string | Optional | Base currency. Default: USD |
| symbols | string | Optional | Comma-separated currency codes to filter the response |
curl "https://api.xchangr8.com/v1/timeseries?start_date=2025-01-01&end_date=2025-01-07&base=USD&symbols=JPY,EUR" \ -H "X-API-Key: xc8_live_YOUR_KEY"
{ "base": "USD", "start_date": "2025-01-01", "end_date": "2025-01-07", "rates": { "2025-01-01": { "JPY": 156.90, "EUR": 0.9120 }, "2025-01-02": { "JPY": 157.10, "EUR": 0.9115 }, "2025-01-03": { "JPY": 157.33, "EUR": 0.9108 }, // ... continues for each date in range } }
Returns a map of all currency codes to their full names. Useful for building currency pickers and validating input values. This endpoint is not rate-limited and may be cached aggressively.
No parameters. This endpoint takes no query parameters or headers beyond the API key.
curl https://api.xchangr8.com/v1/currencies \ -H "X-API-Key: xc8_live_YOUR_KEY"
{ "currencies": { "USD": "US Dollar", "EUR": "Euro", "JPY": "Japanese Yen", "GBP": "British Pound Sterling", "AUD": "Australian Dollar", "CAD": "Canadian Dollar", "CHF": "Swiss Franc", "CNY": "Chinese Yuan", "HKD": "Hong Kong Dollar", "SGD": "Singapore Dollar", "KRW": "South Korean Won", "INR": "Indian Rupee", // ... 31 currencies total } }