API · JSON / XML

Exchange data. Ready to integrate.

Public read API for Dominican rates, explicit provenance and freshness. Decimal amounts as text, with JSON and XML representations.

View OpenAPI contract ↗

A first query

curl 'https://api.divisa.do/v1/rates?currency=USD'

Compare an amount

const response = await fetch(
  'https://api.divisa.do/v1/convert?currency=USD&amount=100&operation=sell'
);
if (!response.ok) throw new Error('Request failed');
const { data } = await response.json();

operation=sell means the user selling foreign currency; operation=buy means the user buying it.

Resources

  • /v1/currencies · Currencies and coverage
  • /v1/institutions · Institutions
  • /v1/institutions/{id} · Institution detail
  • /v1/rates · Quotes and provenance
  • /v1/rates/best · Best current rates
  • /v1/rates/history · Historical observations
  • /v1/rates/history/series · Series, statistics and coverage
  • /v1/convert · Amount comparison

Daily series for charts

Every requested date appears with values or explicit nulls, decimal statistics and coverage. The default range is 15 days.

curl 'https://api.divisa.do/v1/rates/history/series?currency=USD'

Consistent queries

Use documented filters, q to search, sort to order and fields to project allowed fields. Paginated lists provide nextCursor. See OpenAPI for allowed values per resource.

JSON and XML

JSON is the default. Request application/xml through Accept to receive UTF-8 XML. Both preserve explicit nulls and decimals as text.

curl -H 'Accept: application/xml' 'https://api.divisa.do/v1/rates?currency=USD'

Responsible use

Respect HTTP 429 and Retry-After. Cache responses and retain provenance when reusing data. Sources are checked three times daily.