List forex pairs

Return a filterable list of the forex pairs we quote. Each pair carries its qualified symbol, the ISO 4217 codes and human-readable names of both currencies, and whether it's synthetic. Use a pair's symbol with either forex price endpoint.

GET/v3.0.0/forex-pairs

Plan Access

Free

(Your plan)

Individual

$29/mo

Professional

$89/mo

Parameters

Query parameters

base_currencystringoptional

Return only pairs quoted from this base currency, given as a three-letter ISO 4217 code. Case-insensitive.

Example: EUR
quote_currencystringoptional

Return only pairs quoted into this quote currency, given as a three-letter ISO 4217 code. Case-insensitive.

Example: USD
currencystringoptional

Return every pair in which this currency appears, on either side. Use it instead of base_currency and quote_currency when direction does not matter.

Example: JPY
searchstringoptional

Case-insensitive substring match against the pair symbol, both currency codes, and the pair name.

Example: yen
orderstringoptional

Sort by qualified pair symbol (symbol).

Default: ascValues: ascdesc
limitintegeroptional

Maximum number of resources to return.

Default: 500Min: 1Max: 2000
pagestringoptional

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

Response

Results sort by qualified pair symbol in ascending order by default; pass order=desc to reverse them.

Response fields

dataarray of objects

Array of currency pair resources for the current page, ordered by symbol.

+ Show child attributes
symbolstring

Qualified pair symbol in FX:BASEQUOTE form, e.g. FX:EURUSD. Pass it to the forex price endpoints.

namestring

Human-readable pair name in <base name> / <quote name> form, e.g. EURO / U.S. DOLLAR.

base_currencystring

ISO 4217 code of the currency being priced, e.g. EUR. One unit of this currency costs close units of quote_currency.

base_currency_namestring

Human-readable name of the base currency, e.g. EURO. null when the pair name has no recognizable base half.

quote_currencystring

ISO 4217 code of the currency the pair is priced in, e.g. USD.

quote_currency_namestring

Human-readable name of the quote currency, e.g. U.S. DOLLAR. null when the pair name has no recognizable quote half.

is_syntheticboolean

Whether the pair is derived by crossing two directly quoted pairs rather than quoted on its own. Synthetic pairs extend coverage to currency combinations no venue quotes directly.

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.

Filtering

base_currency and quote_currency match one side of the pair each, so base_currency=EUR&quote_currency=USD resolves to a single pair. When direction doesn't matter, currency matches either side and returns every pair the currency appears in.

search is a case-insensitive substring match across the pair symbol, both currency codes, and the pair name, which makes it the right filter when you only know a currency by name.

Examples

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

Every pair quoted into US dollars:

curl "https://api.roic.ai/v3.0.0/forex-pairs?apikey=YOUR_API_KEY&quote_currency=USD"

One exact pair, by both sides:

curl "https://api.roic.ai/v3.0.0/forex-pairs?apikey=YOUR_API_KEY&base_currency=EUR&quote_currency=USD"

Every pair involving the Japanese yen, on either side:

curl "https://api.roic.ai/v3.0.0/forex-pairs?apikey=YOUR_API_KEY&currency=JPY"

Pairs matching a currency name:

curl "https://api.roic.ai/v3.0.0/forex-pairs?apikey=YOUR_API_KEY&search=yen&limit=10"
Request
curl "https://api.roic.ai/v3.0.0/forex-pairs?apikey=YOUR_API_KEY&base_currency=EUR&quote_currency=USD"
Response
200 OK
{
  "data": [
    {
      "symbol": "FX:EURUSD",
      "name": "EURO / U.S. DOLLAR",
      "base_currency": "EUR",
      "base_currency_name": "EURO",
      "quote_currency": "USD",
      "quote_currency_name": "U.S. DOLLAR",
      "is_synthetic": false
    }
  ],
  "next_page_url": null,
  "previous_page_url": null
}