Check exchange rates

Find a provider, check its current rate when one is available, or read captured history. Current rates appear only when the service has recent data; the API does not guarantee a live bank offer.

Start with the explorer above. If no current quote is available, use the history request in Read history. The default pair is USD/DOP.

Understand the response

Each quote includes the provider, currency pair, buy, sell, and observation date. A missing price side or observation time is returned as null.

  • buy is the rate the provider uses when it buys the base currency from you.
  • sell is the rate the provider uses when it sells the base currency to you.
  • channel identifies where the quote applies, such as an office or online channel.
Get a quote in your app

First discover the provider ID, supported currency pairs, channels, and source availability:

curl '__API_ORIGIN__/v1/exchange-rate-providers'

Then request a specific series. This example asks for the provider's USD/DOP office quote:

curl '__API_ORIGIN__/v1/exchange-rates?provider=banreservas&base=USD&channel=office'
const apiOrigin = '__API_ORIGIN__';
const response = await fetch(`${apiOrigin}/v1/exchange-rates?provider=banreservas&base=USD&channel=office`);
if (!response.ok) throw new Error(`Exchange-rate lookup failed: ${response.status}`);
const { rates, unavailable } = await response.json();
console.log({ rates, unavailable });

Keep buy and sell as decimal strings until your application has chosen a rounding rule. Do not use binary floating-point values for accounting or settlement decisions.

The response can contain several rates and an unavailable list for requested series that have no eligible result. A request for a specific series can return 503 when the service cannot produce a reliable current answer. Use the history request when you need captured observations instead.

Choose direct or secondary sources

The default latest request uses a fresh direct source, such as the provider's own qualified feed or publication. It does not silently replace an office quote with an online quote or combine buy and sell values from different sources.

To include a qualified intermediary source, opt in explicitly:

curl '__API_ORIGIN__/v1/exchange-rates?base=USD&allowSecondary=true'

Keep the returned source and sourceKind with the quote. Direct, secondary, and legacy observations describe different evidence and should not be presented as the same series.

Read captured history

Request one provider and currency pair over a maximum 31-day range:

curl '__API_ORIGIN__/v1/exchange-rates/history?provider=banreservas&base=USD&from=2024-01-01&to=2024-01-31'

History preserves captured changes, including multiple observations on the same day when the source supports them. Older records may have only an observation date and therefore a null timestamp. The service records what its collectors captured; an empty interval does not prove that the rate stayed unchanged.

History accepts optional channel and source filters. The default page contains 100 observations and the maximum is 500. For another page, send the returned nextCursor with the same filters. Restart without a cursor when you want observations ingested after the first page.

Handle unavailable or stale quotes

400 means a filter needs correction. 404 means the provider ID is unknown. 503 means the service cannot produce a reliable current answer; a failed collection does not make an older quote appear fresh. A provider can have history without a current quote, so check currentAvailable in the provider catalog.

Successful responses can be cached for up to 60 seconds, subject to the freshness reported by the service. Do not cache errors. This API reports published or captured quotes; it does not convert money, execute transactions, or certify a bank's current offer.