{"id":40622606,"url":"https://github.com/abstractapi/javascript-exchange-rates","last_synced_at":"2026-01-21T07:04:44.625Z","repository":{"id":57094263,"uuid":"371620810","full_name":"abstractapi/javascript-exchange-rates","owner":"abstractapi","description":"Javascript library for Abstract's Exchange Rate API (free)","archived":false,"fork":false,"pushed_at":"2021-05-29T07:01:48.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T22:14:51.314Z","etag":null,"topics":["currency-conversion","currency-converter","currency-exchange","currency-exchange-rates","exchange-rate","exchange-rates","exchange-rates-api","javascript","javascript-exchange-rates"],"latest_commit_sha":null,"homepage":"https://www.abstractapi.com/exchange-rate-api","language":"JavaScript","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/abstractapi.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}},"created_at":"2021-05-28T07:41:05.000Z","updated_at":"2021-06-02T22:51:36.000Z","dependencies_parsed_at":"2022-08-22T23:10:07.938Z","dependency_job_id":null,"html_url":"https://github.com/abstractapi/javascript-exchange-rates","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abstractapi/javascript-exchange-rates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-exchange-rates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-exchange-rates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-exchange-rates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-exchange-rates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abstractapi","download_url":"https://codeload.github.com/abstractapi/javascript-exchange-rates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractapi%2Fjavascript-exchange-rates/sbom","scorecard":{"id":161900,"data":{"date":"2025-08-11","repo":{"name":"github.com/abstractapi/javascript-exchange-rates","commit":"ed9a064e73212db85bd8f0b2c8504a369682ee10"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/unittest.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-exchange-rates/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-exchange-rates/npm-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-exchange-rates/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-exchange-rates/unittest.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/abstractapi/javascript-exchange-rates/unittest.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/npm-publish.yml:25","Warn: npmCommand not pinned by hash: .github/workflows/unittest.yml:27","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"23 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T13:42:59.396Z","repository_id":57094263,"created_at":"2025-08-16T13:42:59.396Z","updated_at":"2025-08-16T13:42:59.396Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["currency-conversion","currency-converter","currency-exchange","currency-exchange-rates","exchange-rate","exchange-rates","exchange-rates-api","javascript","javascript-exchange-rates"],"created_at":"2026-01-21T07:04:43.995Z","updated_at":"2026-01-21T07:04:44.618Z","avatar_url":"https://github.com/abstractapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AbstractAPI javascript-exchange-rates library\n\nIntegrate the powerful [Exchange Rates API from Abstract](https://www.abstractapi.com/exchange-rate-api) in your Javascript or NodeJS project in a few lines of code.\n\nThe Exchange Rate API is an REST API that allows you to:\n\n- look up the latest exchange rates for 80+ currencies via the *live* endpoint\n- get historical exchange rates using the *historical* endpoint\n- convert an arbitrary amount from one currency to another using the *convert* endpoint\n\nIt's very simple to use: you only need to submit your API key and a currency symbol (such as \"USD\"), and the API will respond with current exchange rate, historical data, or convertion rates.\n\n# Documentation\n\n## Installation\n\nYou can install **javascript-exchange-rates** via npm, from our CDN, or download the source into your project.\n\n### ES6\n\nDownload and install the library from npm:\n\n```\nnpm install @abstractapi/javascript-exchange-rates --save\n```\n\nIn your project, import it and configure your `API_KEY`:\n\n```js\nimport {AbstractExchangeRates} from 'javascript-exchange-rates'\n\nAbstractExchangeRates.configure('API_KEY')\n```\n\n### Browser, from the CDN\n\nYou can have the browser download the library from its closest location through jsDeliver CDN:\n\n```js\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@abstractapi/javascript-core@latest/dist/javascript-core.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@abstractapi/javascript-exchange-rates@latest/dist/javascript-exchange-rates.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractExchangeRates.configure('API_KEY');\n\n    // use the library\n\u003c/script\u003e\n```\n\n### Browser, from the built file\n\nYou can build the library yourself, or get the already built file from the `dist` directory and load it:\n\n```js\n\u003cscript src=\"dist/javascript-exchange-rates.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    AbstractExchangeRates.configure('API_KEY');\n\n    // use the library\n\u003c/script\u003e\n```\n\n## API key\n\nGet your API key for free and without hassle from the [Abstact website](https://app.abstractapi.com/users/signup?target=/api/exchange-rates/pricing/select).\n\n## Quickstart\n\nAbstractAPI **javascript-exchange-rates** library returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) so you can use one of the following approaches:\n\n### Async/Await\n\n```js\nasync function getLiveRates(currency) {\n  let response = await AbstractExchangeRates.live(currency);\n  console.log(response);\n}\n\nasync function getHistoricalRates(currency, date) {\n  let response = await AbstractExchangeRates.historical(currency, date);\n  console.log(response);\n}\n\nasync function getConvertion(currency, target) {\n  let response = await AbstractExchangeRates.convert(currency, target);\n  console.log(response);\n}\n```\n\n### Using .then()\n\n```js\nfunction getLiveRates(currency) {\n  AbstractExchangeRates.live(currency)\n    .then(response =\u003e {\n      console.log(response);\n    })\n}\n\nfunction getHistoricalRates(currency, date) {\n  AbstractExchangeRates.historical(currency, date)\n    .then(response =\u003e {\n      console.log(response);\n    })\n}\n\nfunction getConvertion(currency, target) {\n  AbstractExchangeRates.convert(currency, target)\n    .then(response =\u003e {\n      console.log(response);\n    })\n}\n```\n\n## API response\n\nThe API response contains the following fields:\n\n### `live` response parameters\n| Parameter| Type| Details |\n| - | - | - |\n| base | String | The base currency used to get the exchange rates. |\n| last_updated | String | The Unix timestamp of when the returned data was last updated. |\n| exchange_rates | Object | A JSON Object containing each of the target currency as the key and its exchange rate versus the base currency as that key's value. |\n\n### `historical` response parameters\n\n| Parameter | Type | Details |\n| - | - | - |\n| base | String | The base currency used to get the exchange rates. |\n| date | String | The date the currencies were pulled from, per the successful request. |\n| exchange_rates | Object | A JSON Object containing each of the target currency as the key and its exchange rate versus the base currency as that key's value. |\n\n### `convert` response parameters\n\n| Parameter | Type | Details |\n| - | - | - |\n| base | String | The base currency used to get the exchange rates. |\n| target | String | The target currency that the base_amount was converted into. |\n| date | String | The date the currencies were pulled from, per the successful request. |\n| base_amount | Float | The amount of the base currency from the request. |\n| converted_amount | Float | The amount of the target currency that the base_amount has been converted into |\n| exchange_rate | Float | The exchange rate used to convert the base_amount from the base currency to the target currency |\n\n## Detailed documentation\n\nYou will find additional information and request examples in the [Abstract help page](https://app.abstractapi.com/api/exchange-rates/documentation).\n\n## Getting help\n\nIf you need help installing or using the library, please contact [Abstract's Support](https://app.abstractapi.com/api/exchange-rates/support).\n\nFor bug report and feature suggestion, please use [this repository issues page](https://github.com/abstractapi/javascript-exchange-rates/issues).\n\n# Contribution\n\nContributions are always welcome, as they improve the quality of the libraries we provide to the community.\n\nPlease provide your changes covered by the appropriate unit tests, and post them in the [pull requests page](https://github.com/abstractapi/javascript-exchange-rates/pulls).\n\n## NPM\n\n### Installation\n\nRun `npm install` in the command line to install the dependencies. To update those dependencies you need to run `npm update`.\n\n### Building\n\nTo build the library and generate the minified file in the *dist* directory, you need to run `npm run build`.\n\nTo build the lib, you need to run `npm run build:lib`.\n\n### Test\n\nTo run the test suite, you need the API key from the abstract website and you can run:\n\n    EXCHANGE_RATES_API_KEY=(your key here) npm run test\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-exchange-rates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabstractapi%2Fjavascript-exchange-rates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractapi%2Fjavascript-exchange-rates/lists"}