{"id":19044550,"url":"https://github.com/crissdev/curs-bnr","last_synced_at":"2026-06-23T11:32:16.546Z","repository":{"id":173060890,"uuid":"647585871","full_name":"crissdev/curs-bnr","owner":"crissdev","description":"Cursul valutar comunicat de BNR","archived":false,"fork":false,"pushed_at":"2025-02-27T20:05:15.000Z","size":963,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-12T11:10:14.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crissdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-31T05:18:13.000Z","updated_at":"2025-02-27T20:05:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b7e51fe-1d55-4133-a29c-ccffc8b50bbb","html_url":"https://github.com/crissdev/curs-bnr","commit_stats":null,"previous_names":["crissdev/curs-bnr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crissdev/curs-bnr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fcurs-bnr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fcurs-bnr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fcurs-bnr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fcurs-bnr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crissdev","download_url":"https://codeload.github.com/crissdev/curs-bnr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fcurs-bnr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:46:36.319Z","updated_at":"2026-06-23T11:32:16.520Z","avatar_url":"https://github.com/crissdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CURS-BNR\n\n[![npm version](https://badge.fury.io/js/curs-bnr.svg)](https://badge.fury.io/js/curs-bnr)\n[![CI](https://github.com/crissdev/curs-bnr/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/crissdev/curs-bnr/actions/workflows/node.js.yml)\n\nRetrieve the BNR exchange rates for a specific date or the most recent BNR exchange rates.\n\n## Installation\n\n```sh\nnpm install curs-bnr\n```\n\n## How to use\n\n**Retrieve the most recent BNR exchange rates**\n\n```js\nconst { getMostRecentExchangeRates } = require(\"curs-bnr\");\nconst rates = await getMostRecentExchangeRates();\nconsole.log(rates);\n// [\n//   { date: '2023-06-02', value: 4.9633, currency: 'EUR' },\n//   { date: '2023-06-02', value: 5.7790, currency: 'GBP' }\n//   ...\n// ]\n```\n\n**Retrieve the BNR exchange rates for a specific year**\n\n```js\nconst { getExchangeRatesOfYear } = require(\"curs-bnr\");\nconst rates = await getExchangeRatesOfYear(2023);\nconsole.log(rates);\n// [\n//    { date: '2023-01-03', value: 4.9273, currency: 'EUR' },\n//    { date: '2023-01-04', value: 4.9264, currency: 'EUR' },\n//    ...\n// ]\n```\n**Retrieve the BNR exchange rates for a specific date**\n\n```js\nconst { getExchangeRatesForDate } = require(\"curs-bnr\");\nconst rates = await getExchangeRatesForDate('2023-06-12');\nconsole.log(rates);\n// [\n//    { date: '2023-06-12', value: 4.9568, currency: 'EUR' },\n//    { date: '2023-06-12', value: 5.7893, currency: 'GBP' },\n//    { date: '2023-06-12', value: 3.3022, currency: 'JPY', multiplier: 100 },\n//    ...\n// ]\n```\n\n## Configuration\n\nBy default, the API is configured to use the well-known BNR endpoints. If you want to use different endpoints, you\ncan configure them via environment variables. Note that `BNR_FX_RATES_OF_YEAR_URL` must have the same structure as the\ndefault value, with the `{year}` placeholder.\n\n```env\nBNR_FX_RATES_MOST_RECENT_URL=\"https://www.bnr.ro/nbrfxrates.xml\"\nBNR_FX_RATES_OF_YEAR_URL=\"https://bnr.ro/files/xml/years/nbrfxrates{year}.xml\"\n```\n\n## License\n\nMIT © [Cristian Trifan](https://cristian-trifan.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fcurs-bnr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrissdev%2Fcurs-bnr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fcurs-bnr/lists"}