Technology Apr 21, 2026 · 5 min read

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 ar...

DE
DEV Community
by Madhushan
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

Response:

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

AllRatesToday:

GET https://allratestoday.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:

  • 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

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

AllRatesToday:

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

Response:

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

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

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

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

AllRatesToday:

GET https://allratestoday.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

Response:

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

AllRatesToday (1 request per range):

GET https://allratestoday.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 },
    ...
  ]
}

Transformation (OXR → ART shape):

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

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 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 }

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;

7. List of supported currencies

Open Exchange Rates:

GET https://openexchangerates.org/api/currencies.json

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

AllRatesToday:

GET https://allratestoday.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

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

JavaScript / TypeScript

npm install @allratestoday/sdk
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);

Python

pip install allratestoday
from allratestoday import AllRatesToday

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

PHP

composer require allratestoday/sdk
use AllRatesToday\AllRatesToday;

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

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');

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.

DE
Source

This article was originally published by DEV Community and written by Madhushan .

Read original article on DEV Community
Back to Discover

Reading List