Exchange rate API
API documentation for Dominican Republic exchange rates, historical data and currency conversions.
Start here
- Verify your email with the received code.
- In My console, choose Create API key. Select an application or create one for your integration.
- Name the key, generate it and store it as DIVISA_API_KEY on your backend. It is shown only once.
- Run the request below. It uses real rates and consumes quota.
- Open Usage and find the received X-Request-Id. It may take a few seconds to appear.
Base URL
https://api.divisa.doMake your first request
Request USD quotes in Dominican pesos. The response includes data and pagination metadata.
curl --fail-with-body 'https://api.divisa.do/v1/rates?currency=USD&freshness=current&fields=entityId,currency,buy,sell,channel,kind,stale,effectiveDate,publishedAt,datePrecision,lastCheckedAt,expiresAt,provenance&limit=5' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $DIVISA_API_KEY"Live production request: consumes quota. Your key stays in memory until this page is closed or reloaded.
const response = await fetch(
'https://api.divisa.do/v1/rates?currency=USD&freshness=current&fields=entityId,currency,buy,sell,channel,kind,stale,effectiveDate,publishedAt,datePrecision,lastCheckedAt,expiresAt,provenance&limit=5',
{ headers: { Accept: 'application/json', Authorization: `Bearer ${process.env.DIVISA_API_KEY}` } }
);
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
const { data, meta } = await response.json();
console.log(data);What you need to do
Preserve precision
Keep rates as decimal strings. Use a decimal library for monetary calculations. Do not multiply money with floating-point arithmetic or replace null with zero.