DEV Community

Declan
Declan

Posted on Edited on

How to Get DNIT Exchange Rates in Code (Daily, Official Table)

DNIT sets official exchange rates every business day. If you file taxes or customs declarations in Paraguay, convert foreign-currency invoices, or reconcile foreign-currency ledgers, the rate you need is usually not the market rate but the official DNIT rate for the period.

About DNIT

The daily exchange rates Paraguay's tax and customs authority (DNIT, Dirección Nacional de Aduanas) sets for converting declared foreign-currency values into guaraníes. Customs uses the rate in force on the declaration date to compute the taxable value of imports and exports.

Source: Daily exchange rates for customs and tax.

The official table dated 2026-11-28

Base Quote Type Rate
USD PYG reference 6401.17
EUR PYG reference 7008
GBP PYG reference 8394.49
CNY PYG reference 961.98
JPY PYG reference 40.14
CHF PYG reference 7662.4
AUD PYG reference 4254.21
CAD PYG reference 4493.62
INR PYG reference 68.84
AED PYG reference 1742.76
ZAR PYG reference 368.04
SGD PYG reference 4961.37

The full table has 30 rows across 30 currencies (18 more on the DNIT rates page).

When new rates arrive

DNIT updates every business day. Between updates the API keeps returning the table in force, with its own rate_date, so you always know which period a number belongs to.

On weekends and holidays there is no new table. The API returns the most recent one, which is what most tax and accounting rules ask you to use.

Get the rate from code

You need a free API key (register here, no card). Then:

curl "https://allratestoday.com/api/v1/central-bank/dnit/latest?source=USD&target=PYG" \
  -H "Authorization: Bearer art_live_your_key"
Enter fullscreen mode Exit fullscreen mode

The response, from the table in force on 2026-11-28:

{
  "bank": "dnit",
  "name": "Dirección Nacional de Ingresos Tributarios (Paraguay customs)",
  "rate_date": "2026-11-28",
  "source": "USD",
  "target": "PYG",
  "rate": 6401.17,
  "rate_type": "reference",
  "derived": false,
  "method": "published",
  "age_days": 2,
  "stale": false,
  "cadence": "daily",
  "disclaimer": "Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned."
}
Enter fullscreen mode Exit fullscreen mode

Node.js 18+ (built-in fetch):

const res = await fetch(
  "https://allratestoday.com/api/v1/central-bank/dnit/latest?source=USD&target=PYG",
  { headers: { Authorization: `Bearer ${process.env.ALLRATES_KEY}` } }
);
const r = await res.json();
console.log(r.rate_date, r.source, r.target, r.rate, r.derived ? "(derived)" : "");
Enter fullscreen mode Exit fullscreen mode

Things to check before you ship

  • Use rate_date, not today's date. The table in force can be days old by design (weekends, holidays, a daily schedule). Store rate_date next to every converted amount so an auditor can trace it.
  • Watch derived. If you ask for a pair DNIT does not quote, the API computes it from the official table (inverse or cross via PYG) and sets "derived": true. Filings that need the exact figure should only use rows where it is false.
  • History goes back to 1996. GET /api/v1/central-bank/dnit/{YYYY-MM-DD} returns the table for a past date, and /history returns a series (paid plans). Use it to re-run a period-end revaluation instead of scraping old pages.
  • Cache it. The rates change every business day, so one call per update is enough. Polling more often just uses quota.
  • Check the calendar. GET /api/v1/central-bank/dnit/availability lists the dates DNIT actually issued a table, which helps when you need to explain a gap.

Compare with bank boards in Paraguay

The official rate is the reference. What a customer actually pays is the buy or sell price on a commercial bank board, such as Banco Atlas, Banco Basa, Banco Familiar and Banco GNB Paraguay. Those boards are on the Paraguay bank rates page and in the same API, so you can show the spread next to the official figure.

Quick answers

Is there a DNIT exchange rate API?

Yes. GET /api/v1/central-bank/dnit/latest returns the official table as JSON on every plan, free included.

How many currencies does DNIT cover?

30 in the current table: AED, ARS, AUD, BOB, BRL, CAD, CHF, CLP, CNY, COP, DKK, EUR, GBP, HKD, HUF and more.

Can I get past DNIT rates?

Yes, from 1996 onward, by date or as a time series, on paid plans. CSV and Excel downloads are on the DNIT page.


Live table, history download and full endpoint list: DNIT exchange rates.

Top comments (0)