Average Exchange Rates

On this page, we’ll dive into the average endpoint you can use to get monthly, quarterly and yearly average exchange rates with their lows and highs, from market data or from a central bank’s official rates.

Accounting standards such as IFRS (IAS 21) and US GAAP (ASC 830) allow translating income and expenses at an average rate for the period instead of the rate of each transaction day. This endpoint returns exactly that figure, plus the period’s lowest and highest daily rate.


GET/v3/average

Average Exchange Rates

Groups the daily rates between date_from and date_to by calendar period and returns the average, low and high of each currency per period.

Required attributes

  • Name
    date_from
    Type
    string
    Description

    First day, format YYYY-MM-DD, 1999-01-01 or later.

  • Name
    date_to
    Type
    string
    Description

    Last day, format YYYY-MM-DD, yesterday at the latest (tomorrow with source, as some banks publish a day ahead). At most 1830 days (about five years) after date_from, or 366 days with source.

Optional attributes

  • Name
    period
    Type
    string
    Description

    How to group the days: month (default), quarter, year, or total for one average over the whole span.

  • Name
    source
    Type
    string
    Description

    Average a central bank’s official rates instead of market rates, e.g. ecb, boe or nbp. See /official/sources for all banks. Rates are then against the bank’s own currency unless you set base_currency, and days counts publications. Cannot be combined with type.

  • Name
    base_currency
    Type
    string
    Description

    The base currency all rates are expressed in. Defaults to USD, or to the bank’s currency with source.

  • Name
    currencies
    Type
    string
    Description

    A list of comma separated currency codes you want to get (EUR,GBP,JPY). By default all currencies are returned.

  • Name
    type
    Type
    string
    Description

    Limit the result to fiat, metal or crypto (market rates only).

  • Name
    format
    Type
    string
    Description

    json (default) or csv. The CSV has one row per period and currency: period,date_from,date_to,days,source,base_currency,currency,average,min,max, ready for spreadsheets.

How averages are computed

Every daily rate is first expressed against base_currency and only then averaged. The average EUR rate in GBP is therefore the mean of the daily EUR/GBP rates, not the ratio of the EUR and GBP averages against USD.

The first and last period are cut to your span: requesting 2026-01-15 to 2026-03-31 by month returns January from the 15th. Each period’s date_from, date_to and days tell you exactly which days went into it.

A request costs one request of your quota, however many periods and currencies it returns.

Request

GET
/v3/average
curl -G https://api.currencyapi.com/v3/average \
    -d date_from=2026-01-01 \
    -d date_to=2026-03-31 \
    -d period=month \
    -d base_currency=EUR \
    -d currencies=USD,GBP \
    -H "apikey: YOUR-API-KEY"

Response

{
    "meta": {
        "source": "market",
        "base_currency": "EUR",
        "period": "month",
        "date_from": "2026-01-01",
        "date_to": "2026-03-31"
    },
    "data": [
        {
            "period": "2026-01",
            "date_from": "2026-01-01",
            "date_to": "2026-01-31",
            "days": 31,
            "currencies": {
                "GBP": {"code": "GBP", "value": 0.8312, "min": 0.8254, "max": 0.8377},
                "USD": {"code": "USD", "value": 1.0405, "min": 1.0298, "max": 1.0521}
            }
        },
        {
            "period": "2026-02",
            "date_from": "2026-02-01",
            "date_to": "2026-02-28",
            "days": 28,
            "currencies": {
                "GBP": {"code": "GBP", "value": 0.8287, "min": 0.8231, "max": 0.8340},
                "USD": {"code": "USD", "value": 1.0461, "min": 1.0372, "max": 1.0553}
            }
        },
        {
            "period": "2026-03",
            "date_from": "2026-03-01",
            "date_to": "2026-03-31",
            "days": 31,
            "currencies": {
                "GBP": {"code": "GBP", "value": 0.8359, "min": 0.8301, "max": 0.8418},
                "USD": {"code": "USD", "value": 1.0820, "min": 1.0611, "max": 1.0956}
            }
        }
    ]
}

GET/v3/average?source=ecb

Official averages

Add source to average a central bank’s publications instead. This example returns the ECB’s 2025 yearly average for USD and GBP against the euro as a CSV file, the figure many European companies use to translate their annual results.

Central banks publish only on business days, so days counts the publications that went into each period (about 255 per year for the ECB).

Request

GET
/v3/average
curl -G https://api.currencyapi.com/v3/average \
    -d source=ecb \
    -d date_from=2025-01-01 \
    -d date_to=2025-12-31 \
    -d period=year \
    -d currencies=USD,GBP \
    -d format=csv \
    -H "apikey: YOUR-API-KEY"

Response (text/csv, example values)

period,date_from,date_to,days,source,base_currency,currency,average,min,max
2025,2025-01-02,2025-12-31,255,ecb,EUR,GBP,0.8457,0.8241,0.8733
2025,2025-01-02,2025-12-31,255,ecb,EUR,USD,1.1294,1.0198,1.1823