“The euro gained 4% against the dollar this quarter” is a sentence finance teams, product managers and dashboards produce all the time. The fxapi currency fluctuation API gives you that number directly: for each currency it returns the rate at the start and end of a period and how much it changed, in absolute terms and as a percentage – without downloading and differencing a time series yourself.
Parameters and response
| Parameter | Required | Description |
|---|---|---|
date_from | yes | First day, YYYY-MM-DD, 1999-01-01 or later |
date_to | yes | Last day, on or after date_from, yesterday at the latest |
base_currency | no | Base currency, default USD |
currencies | no | Comma-separated targets – default: all |
type | no | fiat, metal or crypto |
format | no | json (default) or csv |
For every currency the response contains start_rate, end_rate, change (end_rate − start_rate) and change_pct (percent of start_rate, four decimals). Rates are end-of-day values in UTC. Reference: fluctuation docs.
Reading the sign. Values are quoted as “units of target per one unit of base”. With base_currency=USD, a positive change for EUR means one dollar buys more euros – the dollar strengthened against the euro.
What to build with it
- Top movers – call once with all currencies and sort by
change_pctto power a “biggest movers this week” widget. - FX exposure alerts – compare the rate at contract signature with yesterday’s rate and alert when a threshold is crossed.
- Variance commentary – explain how much of a revenue change came from currency movements in monthly or quarterly reports; pair with average rates.
- Pricing reviews – trigger a price-list review for markets where the local currency moved more than X%.
- Newsletters and content – generate monthly currency recaps automatically.
JavaScript: alert when a currency moves more than 3%
const params = new URLSearchParams({
date_from: "2026-09-01",
date_to: "2026-09-30",
base_currency: "EUR",
currencies: "USD,GBP,CHF,PLN,SEK",
});
const res = await fetch(`https://api.fxapi.com/v1/fluctuation?${params}`, {
headers: { apikey: process.env.FXAPI_KEY },
});
if (!res.ok) throw new Error(`fxapi ${res.status}`);
const { data } = await res.json();
for (const [code, f] of Object.entries(data)) {
if (Math.abs(f.change_pct) >= 3) {
console.log(`EUR/${code} moved ${f.change_pct}% (${f.start_rate} → ${f.end_rate})`);
}
}
Fluctuation vs. time series vs. averages
| Question | Best endpoint |
|---|---|
| How much did it move between two dates? | /v1/fluctuation |
| What did the path look like? | /v1/range |
| What was the typical rate in a period? | /v1/average |
| What was the rate on one date? | /v1/historical |
All four share currency codes and base-currency handling, so you can combine them freely. Fluctuation, averages and historical rates are included in the free plan.
This endpoint is part of the fxapi FX rates API – the same key, response format and 190+ currencies across every endpoint.
Frequently asked questions
How is the fluctuation calculated?
date_from and on date_to. change is end minus start; change_pct is the change as a percentage of the start rate, rounded to four decimals.Is the fluctuation endpoint free?
/v1/fluctuation is available on every plan, including the Free plan with 300 requests a month. Each call costs one request.Which dates can I compare?
date_to on or after date_from. If no rates are stored for one of the days, the API returns 404.Can I get fluctuation for every currency at once?
currencies and the response includes every supported currency, relative to your base_currency.