DEV Community

Madhushan
Madhushan

Posted on • Originally published at allratestoday.com

Migrating from Open Exchange Rates to AllRatesToday: A Developer's Guide

Migrating from Open Exchange Rates to AllRatesToday: A Developer's Guide

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

  1. Get your AllRatesToday API key at allratestoday.com/register. Free tier, no credit card.
  2. Keep both keys active during migration so you can run a side-by-side comparison.
  3. Write a wrapper in one place. If your codebase has inline fetch calls to openexchangerates.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
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "disclaimer": "...",
  "license": "...",
  "timestamp": 1713702122,
  "base": "USD",
  "rates": {
    "EUR": 0.9234,
    "GBP": 0.7891,
    ...
  }
}
Enter fullscreen mode Exit fullscreen mode

AllRatesToday:

GET https://allratestoday.com/api/v1/rates?source=USD
Authorization: Bearer YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "source": "USD",
  "rates": {
    "EUR": 0.9234,
    "GBP": 0.7891,
    ...
  },
  "time": "2026-04-21T14:03:22Z"
}
Enter fullscreen mode Exit fullscreen mode

Differences:

  • basesource
  • timestamp (Unix epoch) → time (ISO 8601)
  • No disclaimer/license fields (they don't exist in AllRatesToday 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
Enter fullscreen mode Exit fullscreen mode

Response gives {base: "USD", rates: {EUR: 0.9234}}.

AllRatesToday:

GET https://allratestoday.com/api/v1/rates?source=USD&target=EUR
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "source": "USD",
  "target": "EUR",
  "rate": 0.9234,
  "time": "2026-04-21T14:03:22Z"
}
Enter fullscreen mode Exit fullscreen mode

Note: AllRatesToday 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
Enter fullscreen mode Exit fullscreen mode

On the free tier, this fails with 403 and message "Changing the APIbasecurrency is available for Developer, Enterprise and Unlimited plan clients."

AllRatesToday (all plans, including free):

GET https://allratestoday.com/api/v1/rates?source=EUR
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

AllRatesToday:

GET https://allratestoday.com/api/historical-rates?source=USD&target=EUR&from=2025-06-15&to=2025-06-15
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "base": "USD",
  "rates": {
    "2025-01-01": { "EUR": 0.9521 },
    "2025-01-02": { "EUR": 0.9534 },
    ...
  }
}
Enter fullscreen mode Exit fullscreen mode

AllRatesToday (1 request per range):

GET https://allratestoday.com/api/historical-rates?source=USD&target=EUR&from=2025-01-01&to=2025-12-31
Enter fullscreen mode Exit fullscreen mode

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 },
    ...
  ]
}
Enter fullscreen mode Exit fullscreen mode

Transformation (OXR → ART shape):

const oxrRates = oxrResponse.rates;
const artRates = Object.entries(oxrRates).map(([date, pair]) => ({
  time: date,
  rate: pair[target]
}));
Enter fullscreen mode Exit fullscreen mode

6. Currency conversion

Open Exchange Rates (paid plans only):

GET https://openexchangerates.org/api/convert/1000/USD/EUR?app_id=YOUR_APP_ID
Enter fullscreen mode Exit fullscreen mode

On the free tier, this returns 403 with "The requested feature is not available on your current plan.".

AllRatesToday (all plans, including free), via SDK:

await client.convert('USD', 'EUR', 1000);
// { from: 'USD', to: 'EUR', amount: 1000, rate: 0.9234, result: 923.4 }
Enter fullscreen mode Exit fullscreen mode

Or raw HTTP (fetch the rate and multiply client-side — same pattern you likely already have for OXR free tier):

const { rate } = await fetch('/api/v1/rates?source=USD&target=EUR').then(r => r.json());
const result = 1000 * rate;
Enter fullscreen mode Exit fullscreen mode

7. List of supported currencies

Open Exchange Rates:

GET https://openexchangerates.org/api/currencies.json
Enter fullscreen mode Exit fullscreen mode

Returns { "AED": "UAE Dirham", "AFN": "Afghan Afghani", ... }.

AllRatesToday:

GET https://allratestoday.com/api/v1/symbols
Authorization: Bearer YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Returns the same shape.

Authentication difference

Open Exchange Rates uses a query-string app_id parameter:

?app_id=YOUR_APP_ID
Enter fullscreen mode Exit fullscreen mode

AllRatesToday uses a standard Authorization: Bearer header:

Authorization: Bearer YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

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 AllRatesToday's SDK.

JavaScript / TypeScript

npm install @allratestoday/sdk
Enter fullscreen mode Exit fullscreen mode
import AllRatesToday from '@allratestoday/sdk';

const client = new AllRatesToday(process.env.ALLRATES_API_KEY!);

const { rate } = await client.getRate('USD', 'EUR');
const history = await client.getHistoricalRates('USD', 'EUR', '30d');
const { result } = await client.convert('USD', 'EUR', 1000);
Enter fullscreen mode Exit fullscreen mode

Python

pip install allratestoday
Enter fullscreen mode Exit fullscreen mode
from allratestoday import AllRatesToday

client = AllRatesToday("YOUR_API_KEY")
rate = client.get_rate("USD", "EUR")
history = client.get_historical_rates("USD", "EUR", "30d")
Enter fullscreen mode Exit fullscreen mode

PHP

composer require allratestoday/sdk
Enter fullscreen mode Exit fullscreen mode
use AllRatesToday\AllRatesToday;

$client = new AllRatesToday('YOUR_API_KEY');
$rate = $client->getRate('USD', 'EUR');
Enter fullscreen mode Exit fullscreen mode

Side-by-side validation

Keep both providers live for a week and compare results:

const [oxr, art] = await Promise.all([
  fetchOXR('USD', 'EUR'),
  fetchART('USD', 'EUR'),
]);
const diffBps = Math.abs(oxr - art) / art * 10000;
if (diffBps > 20) logger.warn({ oxr, art, diffBps }, 'rate mismatch');
Enter fullscreen mode Exit fullscreen mode

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 AllRatesToday:

  • 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.json workarounds for client.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 AllRatesToday.


Get your free AllRatesToday API key and start your migration today. Free tier, no credit card, 60-second rates.

Top comments (0)