---
title: "Currency Fluctuation API: Change, % Change, High and Low"
description: "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."
canonical: https://allratestoday.com/currency-fluctuation-api/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-11-23T18:10:20.442Z
---

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

By [Madhushan](https://allratestoday.com/authors/madhushan/), Founder & Lead Developer · Updated 16 Oct 2026

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"
```

| Parameter | Meaning |
| --- | --- |
| `source` | Base currency (any of 160+) |
| `target` | The quote currency (one per request for a daily series) |
| `from`, `to` | Period start and end, `YYYY-MM-DD` |
| `group` | `day` for one rate per day |
| `format` | Optional: `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](https://allratestoday.com/docs/) 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](https://allratestoday.com/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](https://allratestoday.com/blog/excel-exchange-rates/).

## Track currency moves

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

 [Get free API key](https://allratestoday.com/register/) [See pricing](https://allratestoday.com/pricing/)

## Related

  [Exchange rate API with XMLXML, CSV and XLSX output](https://allratestoday.com/exchange-rate-api-xml/) [IP to currency APIDetect a visitor's currency](https://allratestoday.com/ip-to-currency-api/) [Fixer.io alternativeFixer comparison](https://allratestoday.com/compare/fixer-alternative/) [Exchange rate APIEndpoints overview](https://allratestoday.com/exchange-rate-api/)
