List historical forex prices

Return the historical exchange rates for one currency pair as a cursor-paginated series of daily open, high, low, and close quotes. Each rate is the price of one base-currency unit in quote-currency units, so for EURUSD a close of 1.1369 means one euro costs 1.1369 US dollars.

GET/v3.0.0/forex-prices/{identifier}

Plan Access

Free

(Your plan)

Individual

$29/mo

Professional

$89/mo

Plan History

Free

(Your plan)

2 years

Individual

$29/mo

5 years

Professional

$89/mo

All available

Parameters

Path parameters

identifierstringrequired

A pair code as BASEQUOTE or BASE/QUOTE, or a qualified pair symbol. The symbol of every List forex pairs result is accepted here.

Examples: EURUSDEUR/USDFX:EURUSD

Query parameters

datestringoptional

Pass a YYYY-MM-DD date directly for an exact quote-date match. For a range, combine the modifiers below, for example, date.gte=2025-01-01&date.lt=2026-01-01.

+ Show filter modifiers
date.gtestring

Return quotes whose date is greater than or equal to the given date.

date.gtstring

Return quotes whose date is strictly greater than the given date.

date.ltestring

Return quotes whose date is less than or equal to the given date.

date.ltstring

Return quotes whose date is strictly less than the given date.

orderstringoptional

Sort by quote date (date).

Default: descValues: ascdesc
limitintegeroptional

Maximum number of resources to return.

Default: 250Min: 1Max: 1000
pagestringoptional

Opaque page token from a previous response. Follow the returned page URL when possible.

Response

Results sort by quote date in descending order by default; pass order=asc for oldest first. open, high, and low can be null when the source publishes only a closing rate, but close is always present.

Rates are expressed in the pair's quote currency, which is the second half of symbol: for FX:EURUSD the values are US dollars per euro.

The most recent quote day can still be in progress, in which case its values can change before the day closes.

Response fields

dataarray of objects

Array of daily forex quote resources for the current page.

+ Show child attributes
symbolstring

Qualified pair symbol of the quoted pair, e.g. FX:EURUSD.

datestring

The quote day the prices refer to, in YYYY-MM-DD format.

opennumber

First exchange rate of the quote day, in quote-currency units per one base-currency unit. null when the source provides no opening rate.

highnumber

Highest exchange rate of the quote day. null when the source provides no high.

lownumber

Lowest exchange rate of the quote day. null when the source provides no low.

closenumber

Last exchange rate of the quote day. This is the field to use for a single daily rate, and it is always present.

next_page_urlnullable

URL of the next page of results, or null when there are no more pages. Request it unchanged to continue paging.

previous_page_urlnullable

URL of the previous page of results, or null on the first page.

Examples

Combine the filters below to answer common questions. Each request is runnable.

The most recent daily rates for one pair:

curl "https://api.roic.ai/v3.0.0/forex-prices/EURUSD?apikey=YOUR_API_KEY&order=desc&limit=10"

The rate on one exact date:

curl "https://api.roic.ai/v3.0.0/forex-prices/EURUSD?apikey=YOUR_API_KEY&date=2026-07-27"

One year of rates in ascending date order, using a date.gte=2025-01-01 lower bound and a date.lt=2026-01-01 upper bound:

curl "https://api.roic.ai/v3.0.0/forex-prices/EURUSD?apikey=YOUR_API_KEY&date.gte=2025-01-01&date.lt=2026-01-01&order=asc"

The same series addressed by qualified pair symbol instead of the bare code:

curl "https://api.roic.ai/v3.0.0/forex-prices/FX:EURUSD?apikey=YOUR_API_KEY&limit=30"
Request
curl "https://api.roic.ai/v3.0.0/forex-prices/EURUSD?apikey=YOUR_API_KEY&date.gte=2025-01-01&date.lt=2026-01-01&order=asc"
Response
200 OK
{
  "data": [
    {
      "symbol": "FX:EURUSD",
      "date": "2026-07-27",
      "open": 1.1386,
      "high": 1.14183,
      "low": 1.1367,
      "close": 1.1369
    }
  ],
  "next_page_url": null,
  "previous_page_url": null
}