Currency Fluctuation API: Change, % Change, High and Low

Measure how much a currency moved over any period with one API call: a daily series from /api/v1/rates gives start, end, change, percent change, high and low. JavaScript and Python examples.

A fluctuation figure answers "how much did this currency move?": the rate at the start of a period, the rate at the end, the absolute and percentage change, and the high and low in between. With AllRatesToday you get all of it from one request: ask /api/v1/rates for a daily series between two dates and compute the figures from the rows. There's no separate fluctuation endpoint to pay for, and you control the maths, including high/low and volatility, which most fluctuation endpoints don't return.

1. Request a daily series

curl "https://allratestoday.com/api/v1/rates?source=EUR&target=USD&from=2026-09-16&to=2026-10-16&group=day" \
  -H "Authorization: Bearer YOUR_API_KEY"
ParameterMeaning
sourceBase currency (any of 160+)
targetThe quote currency (one per request for a daily series)
from, toPeriod start and end, YYYY-MM-DD
groupday for one rate per day
formatOptional: csv, xml or xlsx instead of JSON

2. The response

An array of daily rates, newest first. The current day is not included until it closes:

[
  { "rate": 1.1196,  "source": "EUR", "target": "USD", "time": "2026-10-15T00:00:00+0000" },
  ...
  { "rate": 1.15375, "source": "EUR", "target": "USD", "time": "2026-09-16T00:00:00+0000" }
]

3. Compute the fluctuation

JavaScript

async function fluctuation(source, target, from, to) {
  const url = `https://allratestoday.com/api/v1/rates?source=${source}&target=${target}` +
              `&from=${from}&to=${to}&group=day`;
  const rows = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.ALLRATES_KEY}` },
  }).then(r => r.json());

  // Rows arrive newest first; sort oldest first.
  rows.sort((a, b) => a.time.localeCompare(b.time));
  const rates = rows.map(r => r.rate);
  const start = rates[0], end = rates[rates.length - 1];

  return {
    start_rate: start,
    end_rate: end,
    change: +(end - start).toFixed(6),
    change_pct: +(((end - start) / start) * 100).toFixed(3),
    high: Math.max(...rates),
    low: Math.min(...rates),
  };
}

await fluctuation('EUR', 'USD', '2026-09-16', '2026-10-16');
// => { start_rate: 1.15375, end_rate: 1.1196, change: -0.03415,
//      change_pct: -2.96, high: ..., low: ... }

Python

import os, requests

def fluctuation(source, target, start, end):
    rows = requests.get(
        "https://allratestoday.com/api/v1/rates",
        params={"source": source, "target": target,
                "from": start, "to": end, "group": "day"},
        headers={"Authorization": f"Bearer {os.environ['ALLRATES_KEY']}"},
        timeout=10,
    ).json()
    rows.sort(key=lambda r: r["time"])          # oldest first
    rates = [r["rate"] for r in rows]
    first, last = rates[0], rates[-1]
    return {
        "start_rate": first,
        "end_rate": last,
        "change": round(last - first, 6),
        "change_pct": round((last - first) / first * 100, 3),
        "high": max(rates),
        "low": min(rates),
    }

print(fluctuation("EUR", "USD", "2026-09-16", "2026-10-16"))

Several currencies

A daily series covers one pair per request, so run one call per currency pair (in parallel if you like) and cache the results. Daily history doesn't change once a day has closed.

What it costs

A date-range request is one API call per pair, whatever the length of the period. Historical rates are included on every paid plan, from €4.99/mo for 5,000 requests. For a ready-made series over a fixed window (1 day, 7 days, 30 days or 1 year), the historical rates endpoint returns the same data with a period parameter.

Fluctuation of an official rate

If you need the movement of a published rate, such as the ECB reference rate or the RBI reference rate, read the bank's history from the central bank rates API and apply the same calculation. Use this for reporting FX gains and losses against the official rate your accounts use.

FAQ

Is there a dedicated /fluctuation endpoint?

No. One date-range call returns the daily series and the figures take a few lines of code, as shown above. You also get high, low and every daily point, not just start and end.

Which rate is used for each day?

One mid-market rate per day, from rates aggregated from institutional foreign exchange market data.

Can I get the series as a spreadsheet?

Yes. Add format=xlsx or format=csv. See the Excel guide.

Track currency moves

Get a free API key in 30 seconds. Historical ranges from €4.99/mo.

Get free API key See pricing

Related