Stop calculating monthly averages in spreadsheets
Every month-end, finance teams in multinational companies need the same numbers: the closing rate to revalue monetary balances and the average rate to translate income and expenses of foreign subsidiaries. Too often that means downloading daily rates, pasting them into Excel and building averages by hand.
The /v1/average endpoint of the fxapi foreign exchange rates API returns those figures directly – per month, quarter or year – including the minimum and maximum daily rate so you can see at a glance whether a period was volatile.
The /v1/average endpoint
| Parameter | Required | Description |
|---|---|---|
date_from | yes | First day, YYYY-MM-DD, 1999-01-01 or later |
date_to | yes | Last day, yesterday at the latest, max. 1,830 days after date_from |
period | no | month (default), quarter, year or total |
base_currency | no | Your reporting/presentation currency, default USD |
currencies | no | Functional currencies of your entities, comma-separated |
type | no | fiat, metal or crypto |
format | no | json (default) or csv |
Each period in the response contains period, date_from, date_to and days, and every currency has value (the average), min and max.
Average vs. closing vs. historical rates
| You need… | Typical use | fxapi endpoint |
|---|---|---|
| Average rate for a period | Translating revenue and expenses (P&L) | /v1/average |
| Closing rate on a date | Revaluing receivables, payables, cash; balance sheet translation | /v1/historical |
| Rate on the transaction date | Initial recognition of a foreign-currency transaction | /v1/historical or /v1/convert |
| Change between two dates | FX impact analysis, variance commentary | /v1/fluctuation |
Month-end close workflow
- On the first working day, request
period=monthfor the closed month with your group currency asbase_currency. - Request the closing rate for the last day of the month from
/v1/historical. - Export as CSV (
format=csv) and load it into your ERP, consolidation tool or data warehouse – or let a scheduled script do it. - Keep the response. Each row carries its period and source, giving auditors a clear trail of where the rate came from.
Quarterly and yearly averages for board reporting
Switch period to quarter or year to get the averages you need for quarterly reports, budgets and year-on-year comparisons at constant currency. Use period=total for a single average over any custom span – for example a project’s duration.
curl -G "https://api.fxapi.com/v1/average" \
-d date_from=2025-01-01 -d date_to=2025-12-31 \
-d period=quarter -d base_currency=USD -d currencies=EUR,GBP,JPY,CNY \
-H "apikey: $FXAPI_KEY"
Built for finance systems
- Any base currency – average EUR rates for a German group, GBP for a UK group, USD for a US parent.
- Consistent methodology – the same data source and averaging logic for every currency and period.
- History to 1999 – restate prior years or audit old figures with the same source.
- CSV and JSON – for analysts and for engineers.
- Easy automation – plain HTTPS requests work from Python, Power Query, Google Apps Script or any ERP integration layer.
fxapi provides exchange rate data, not accounting advice. Check with your auditor which rates are appropriate for your reporting.
Frequently asked questions
How is the average exchange rate calculated?
base_currency; the arithmetic mean of those daily rates is the average. The response also returns the lowest (min) and highest (max) daily rate and the number of days in the period.What periods are supported?
month (default), quarter, year, or total for one average across the whole requested span. A single request can cover up to 1,830 days, and partial first and last periods are cut to your requested dates.Can I use these averages for IFRS or US GAAP reporting?
How far back do average rates go?
date_to can be yesterday at the latest.