Forex data API

Forex API

Get foreign exchange rates for 171 currencies as they move: the latest rate updated every 60 seconds (Medium plan and up) and intraday series at minute, quarter-hour or hour intervals. One rate per currency pair and point in time, as JSON or CSV.

Example request and response

The /v3/range endpoint, with the example response from the documentation. Add accuracy=minute, quarter_hour or hour for intraday data, or format=csv for one row per point and currency.

curl "https://api.currencyapi.com/v3/range?datetime_start=2021-11-30T23:59:59Z&datetime_end=2021-12-31T23:59:59Z&currencies=AED,EUR" \
  -H "apikey: YOUR-API-KEY"
{
  "data": [
    {
      "datetime": "2022-01-01T23:59:59Z",
      "currencies": {
        "AED": { "code": "AED", "value": 3.67306 },
        "EUR": { "code": "EUR", "value": 0.918456 }
      }
    },
    {
      "datetime": "2022-01-02T23:59:59Z",
      "currencies": {
        "AED": { "code": "AED", "value": 3.67308 },
        "EUR": { "code": "EUR", "value": 0.919012 }
      }
    }
  ]
}

Intraday accuracy and limits

accuracy=minute
Up to 6 hours per request, up to 7 days back.
accuracy=quarter_hour
Up to 24 hours per request, up to 7 days back.
accuracy=hour
Up to 7 days per request, up to 3 months back.
accuracy=day
Up to 366 days per request, back to 1999.
accuracy=week | month
The rate at the end of each week (up to 1,830 days) or month (any span back to 1999).

Use cases

Trading and treasury dashboards

Chart today's FX moves at minute resolution and compare them with the last weeks or years.

Payments and FX margins

Quote cross-border payments from rates that are at most 60 seconds old, and log the rate you used.

Backtesting and research

Download daily, weekly or month-end FX series as CSV for spreadsheets, notebooks and models.

Intraday data from the Medium plan

The range endpoint and 60-second updates are part of the Medium plan ($39.99 a month) and above. The free plan includes 300 requests a month of daily-updated latest and historical rates to try the API.

Frequently asked questions

Is this real-time forex data?

On the Medium plan and above the latest rates update every 60 seconds, and the range endpoint returns intraday points at minute, quarter-hour or hour accuracy for the last 7 days (hour: 3 months).

Do you return bid and ask prices or OHLC candles?

No. The API returns one exchange rate per currency and point in time, not bid/ask quotes or open-high-low-close candles.

Which currency pairs are covered?

Any pair of the 171 fiat currencies, 16 cryptocurrencies and 4 precious metals: choose the base with base_currency and the quote currencies with currencies.

Is there a free forex API plan?

Yes. The free plan includes 300 requests a month of daily-updated latest and historical rates for every currency pair, enough to build and test a forex data integration. 60-second updates and intraday series start with the Medium plan.

Can I get the data as CSV?

Yes. Add format=csv to /v3/range for one row per point and currency: datetime, base_currency, currency, value.

Related

More currency data

Free tools: currency converter · historical converter · bulk converter · converter widget

Get your free currency API key

Start with 300 free requests a month