Every reference exchange rate published by the National Bank of Romania (BNR) since 2005, kept in this repository and updated every working day by GitHub Actions. Use it as a free API: plain JSON and CSV files, no key, no sign-up, no server.
const res = await fetch("https://robert-georgedev.github.io/CursRO/data/latest.json");
const { date, rates } = await res.json();
console.log(`1 EUR = ${rates.EUR} lei on ${date}`);All rates are in lei (RON) for one unit of the currency. BNR quotes some currencies (such as HUF and JPY) per 100 units; CursRO converts those to one unit, without rounding errors.
| File | What it holds |
|---|---|
data/latest.json |
The most recent day, plus the day before it |
data/daily/<year>/<date>.json |
One day, for example data/daily/2025/2025-01-03.json |
data/currencies/<CODE>.json |
Full history of one currency, for example data/currencies/EUR.json |
data/rates.csv |
Every rate in one file: date,currency,rate |
data/index.json |
Available currencies and the date range |
Base URL: https://robert-georgedev.github.io/CursRO/data/. The same files are in the data folder of this repository.
There is no rate on weekends and public holidays, because BNR does not publish one. Look for the most recent date on or before the day you need.
- A scheduled workflow runs every working day after BNR publishes, at about 13:00 Romanian time, plus a later backup run.
scripts/update.mjsdownloads BNR's ten-day file and adds any missing days. After a longer gap it fills the hole from BNR's yearly archives; on the very first run it downloads everything since 2005.scripts/check-data.mjschecks the files before anything is committed. If BNR changes its format, the update stops instead of saving bad data.- The new data is committed and the site is redeployed to GitHub Pages.
No dependencies: only Node.js 20 or newer.
npm test # parser and update tests, with BNR-format fixtures
npm run update # download missing rates into data/
npm run check # validate the data folder
npm run site # build the site into _site/The rates are published by Banca Națională a României. CursRO is an independent project, not affiliated with BNR. The data is provided as is; for official or legal use, check the values on bnr.ro.
Bug reports and ideas are welcome in issues. See CONTRIBUTING.md.
The code is MIT. The exchange rates come from BNR; see Source and disclaimer.
