{"id":24539130,"url":"https://github.com/suchlab/currenzy","last_synced_at":"2025-04-15T04:22:21.555Z","repository":{"id":64386589,"uuid":"575407809","full_name":"suchlab/currenzy","owner":"suchlab","description":"Get the exchange rates for currencies","archived":false,"fork":false,"pushed_at":"2025-04-11T02:14:42.000Z","size":2557,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T03:24:43.018Z","etag":null,"topics":["currency","currency-converter","currency-exchange-rates","exchange-rates"],"latest_commit_sha":null,"homepage":"https://npmjs.com/currenzy","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suchlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-12-07T12:54:14.000Z","updated_at":"2025-04-11T02:14:45.000Z","dependencies_parsed_at":"2023-09-24T05:00:16.989Z","dependency_job_id":"6162d224-27b9-4623-a207-3925cb603081","html_url":"https://github.com/suchlab/currenzy","commit_stats":{"total_commits":224,"total_committers":3,"mean_commits":74.66666666666667,"dds":0.1205357142857143,"last_synced_commit":"b9cb884b79e1c44fa24cffd43aaf01c258daaa6e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suchlab%2Fcurrenzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suchlab%2Fcurrenzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suchlab%2Fcurrenzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suchlab%2Fcurrenzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suchlab","download_url":"https://codeload.github.com/suchlab/currenzy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248337243,"owners_count":21086982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["currency","currency-converter","currency-exchange-rates","exchange-rates"],"created_at":"2025-01-22T16:15:23.878Z","updated_at":"2025-04-15T04:22:21.527Z","avatar_url":"https://github.com/suchlab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Currenzy - Exchange Rates\n![CI](https://github.com/currenzy/currenzy/actions/workflows/ci.yml/badge.svg)\n\nFree module to get the conversion rates for dozens of currencies. Conversion rates are updated via GitHub Actions every 12 hours.\n\nNote: The module fetches the latest rates from a URL, not the local file (i.e. there is no need to update the package to get the newest rates).\n\n## Installation\n```sh\nnpm install currenzy\n```\n\n## Usage\nInitialize Currenzy with the base currency. If not provided, the base currency by default is EUR. Currency uses the ISO 4217 standard.\n\n```js\nimport Currenzy from 'currenzy';\n\nconst currenzy = new Currenzy('EUR');\n```\n\n## Methods\n### Conversion\nTo make a conversion, add the amount and the target currency:\n\n```js\nconst amountInUSD = await currenzy.convert(5, 'USD');\n// 5.266205\n```\n\n### Refresh rates\nThe class instance downloads the latest rates from this repo, but saves the results in memory.\n\nThe `convert()` method automatically checks if the data is older than 6 hours. If so, it fetches again the data.\n\nHowever, you can re-fetch the latest rates using the `refreshRates` method:\n\n```js\nawait currenzy.refreshRates();\n```\n\n## Currencies\nThis is the list of supported currencies by Currenzy:\n\n|     |     |     |     |     |     |     |     |     |\n|-----|-----|-----|-----|-----|-----|-----|-----|-----|\n| AED | BRL | CZK | GYD | KHR | MMK | PGK | SOS | UZS |\n| AFN | BSD | DJF | HKD | KMF | MNT | PHP | SRD | VEF |\n| ALL | BTC | DKK | HNL | KPW | MOP | PKR | STD | VES |\n| AMD | BTN | DOP | HRK | KRW | MRO | PLN | SVC | VND |\n| ANG | BWP | DZD | HTG | KWD | MUR | PYG | SYP | VUV |\n| AOA | BYN | EGP | HUF | KYD | MVR | QAR | SZL | WST |\n| ARS | BYR | ERN | IDR | KZT | MWK | RON | THB | XAF |\n| AUD | BZD | ETB | ILS | LAK | MXN | RSD | TJS | XAG |\n| AWG | CAD | EUR | IMP | LBP | MYR | RUB | TMT | XAU |\n| AZN | CDF | FJD | INR | LKR | MZN | RWF | TND | XCD |\n| BAM | CHF | FKP | IQD | LRD | NAD | SAR | TOP | XDR |\n| BBD | CLF | GBP | IRR | LSL | NGN | SBD | TRY | XOF |\n| BDT | CLP | GEL | ISK | LTL | NIO | SCR | TTD | XPF |\n| BGN | CNY | GGP | JEP | LVL | NOK | SDG | TWD | YER |\n| BHD | COP | GHS | JMD | LYD | NPR | SEK | TZS | ZAR |\n| BIF | CRC | GIP | JOD | MAD | NZD | SGD | UAH | ZMK |\n| BMD | CUC | GMD | JPY | MDL | OMR | SHP | UGX | ZMW |\n| BND | CUP | GNF | KES | MGA | PAB | SLE | USD | ZWL |\n| BOB | CVE | GTQ | KGS | MKD | PEN | SLL | UYU |     |\n\n## CLI support\nYou can also use Currenzy from your terminal!\n\nInstall the package globally:\n```sh\nnpm install currenzy@latest -g\n```\n\nUse as follows:\n```sh\ncur \u003cfromAmount\u003e \u003cfromCurrency\u003e \u003ctargetCurrency\u003e\n```\n\nExample:\n```sh\ncur 1 eur usd\n```\n\nWould output: `1.081233 USD`\n\n----\n\n### Template\nUsed the `package` template from [get-template](https://github.com/suchlab/package-template)\n\n```sh\nnpx get-template@latest package\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuchlab%2Fcurrenzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuchlab%2Fcurrenzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuchlab%2Fcurrenzy/lists"}