If you've decided to move off Open Exchange Rates — for real-time rates, any-base-currency flexibility, official SDKs, or free historical data — the migration itself is usually a one-afternoon job. The JSON shapes are similar enough that most of the work is mechanical.
This guide walks you through every endpoint, shows the URL and response-shape differences, and ends with the SDK drop-in for each supported language.
Before you start
- Get your Exchange Rate API key at exchange-rateapi.com/register. Free tier, no credit card.
- Keep both keys active during migration so you can run a side-by-side comparison.
- Write a wrapper in one place. If your codebase has inline
fetchcalls toopenexchangerates.org, consolidate them before migrating. Then you'll only touch one file.
Endpoint-by-endpoint mapping
1. Latest rates
Open Exchange Rates:
GET https://openexchangerates.org/api/latest.json?app_id=YOUR_APP_ID
Response:
{
"disclaimer": "...",
"license": "...",
"timestamp": 1713702122,
"base": "USD",
"rates": {
"EUR": 0.9234,
"GBP": 0.7891,
...
}
}
Exchange Rate API:
GET https://exchange-rateapi.com/api/v1/rates?source=USD
Authorization: Bearer YOUR_API_KEY
Response:
{
"source": "USD",
"rates": {
"EUR": 0.9234,
"GBP": 0.7891,
...
},
"time": "2026-04-21T14:03:22Z"
}
Differences:
base→sourcetimestamp(Unix epoch) →time(ISO 8601)- No
disclaimer/licensefields (they don't exist in Exchange Rate API responses).
2. Specific currency pair
Open Exchange Rates (free tier is USD-only):
GET https://openexchangerates.org/api/latest.json?symbols=EUR&app_id=YOUR_APP_ID
Response gives {base: "USD", rates: {EUR: 0.9234}}.
Exchange Rate API:
GET https://exchange-rateapi.com/api/v1/rates?source=USD&target=EUR
Response:
{
"source": "USD",
"target": "EUR",
"rate": 0.9234,
"time": "2026-04-21T14:03:22Z"
}
Note: Exchange Rate API returns a scalar rate when a single target is specified, and a rates object when multiple are specified. Open Exchange Rates always returns a rates object.
3. Non-USD base currency
Open Exchange Rates (paid plans only):
GET https://openexchangerates.org/api/latest.json?base=EUR&app_id=YOUR_APP_ID
On the free tier, this fails with 403 and message "Changing the API `base` currency is available for Developer, Enterprise and Unlimited plan clients."
Exchange Rate API (all plans, including free):
GET https://exchange-rateapi.com/api/v1/rates?source=EUR
Just works. If you're currently doing cross-rate math client-side because of the USD-only restriction, you can delete all of that code.
4. Historical rate for a specific date
Open Exchange Rates:
GET https://openexchangerates.org/api/historical/2025-06-15.json?app_id=YOUR_APP_ID
Exchange Rate API:
GET https://exchange-rateapi.com/api/historical-rates?source=USD&target=EUR&from=2025-06-15&to=2025-06-15
Response returns an array with one entry.
5. Time-series / range historical
Open Exchange Rates (counts 1 request per day):
GET https://openexchangerates.org/api/time-series.json?start=2025-01-01&end=2025-12-31&base=USD&symbols=EUR&app_id=YOUR_APP_ID
Exchange Rate API (1 request per range):
GET https://exchange-rateapi.com/api/historical-rates?source=USD&target=EUR&from=2025-01-01&to=2025-12-31
Response:
{
"source": "USD",
"target": "EUR",
"from": "2025-01-01",
"to": "2025-12-31",
"rates": [
{ "time": "2025-01-01", "rate": 0.9521 },
{ "time": "2025-01-02", "rate": 0.9534 },
...
]
}
6. Currency conversion
Open Exchange Rates (paid plans only):
GET https://openexchangerates.org/api/convert/1000/USD/EUR?app_id=YOUR_APP_ID
On the free tier, this returns 403.
Exchange Rate API (all plans, including free), via SDK:
await client.convert('USD', 'EUR', 1000);
// { from: 'USD', to: 'EUR', amount: 1000, rate: 0.9234, result: 923.4 }
7. List of supported currencies
Open Exchange Rates:
GET https://openexchangerates.org/api/currencies.json
Exchange Rate API:
GET https://exchange-rateapi.com/api/v1/symbols
Authorization: Bearer YOUR_API_KEY
Returns the same shape.
Authentication difference
Open Exchange Rates uses a query-string app_id parameter:
?app_id=YOUR_APP_ID
Exchange Rate API uses a standard Authorization: Bearer header:
Authorization: Bearer YOUR_API_KEY
If your current code has URL builders that interpolate app_id, swap to an HTTP client that sets the auth header once globally. The SDKs do this for you.
SDK drop-in replacements
Instead of replacing URLs by hand, replace your OXR client with Exchange Rate API's SDK.
JavaScript / TypeScript
npm install @exchangerateapi/sdk
import ExchangeRateAPI from '@exchangerateapi/sdk';
const client = new ExchangeRateAPI(process.env.EXCHANGERATEAPI_KEY!);
const { rate } = await client.getRate('USD', 'EUR');
const history = await client.getHistoricalRates('USD', 'EUR', '30d');
const { result } = await client.convert('USD', 'EUR', 1000);
Python
pip install exchange-rateapi
from exchangerateapi import ExchangeRateAPI
client = ExchangeRateAPI("YOUR_API_KEY")
rate = client.get_rate("USD", "EUR")
history = client.get_historical_rates("USD", "EUR", "30d")
PHP
composer require exchangerateapi/sdk
use ExchangeRateAPI\ExchangeRateAPI;
$client = new ExchangeRateAPI('YOUR_API_KEY');
$rate = $client->getRate('USD', 'EUR');
Side-by-side validation
Keep both providers live for a week and compare results:
const [oxr, era] = await Promise.all([
fetchOXR('USD', 'EUR'),
fetchERA('USD', 'EUR'),
]);
const diffBps = Math.abs(oxr - era) / era * 10000;
if (diffBps > 20) logger.warn({ oxr, era, diffBps }, 'rate mismatch');
For major pairs, you should see the two within ~20 basis points during normal market hours. Larger diffs usually mean one of the sources is stale (OXR hourly cadence) or you're comparing different market timestamps.
After migration
Once you're on Exchange Rate API:
- Delete any cross-rate math that existed to work around OXR's USD-only free tier.
- Reduce historical calls to one-per-range (instead of one-per-day) and reclaim quota.
- Swap any
/api/convert.jsonworkarounds forclient.convert().
Rollback plan
Keep the OXR client wrapper behind a feature flag for two weeks. If anything goes wrong, flip back with a config change while you debug. Don't delete the OXR code until you've had a full billing cycle on Exchange Rate API.
Start Your Migration Today
Free tier, no credit card, 60-second rates, official SDKs for JS, Python, and PHP.
Get Your Free API Key →