
Research
Security News
Malicious npm Packages Target BSC and Ethereum to Drain Crypto Wallets
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
open-exchange-rates
Advanced tools
nodeJS/npm wrapper for the Open Exchange Rates API service. Loads up-to-date or historical currency/exchange rate data from the API, for seamless server-side integration.
Requires a free or paid App ID to connect to the service, available here.
$ npm install open-exchange-rates
To install, type npm install open-exchange-rates
in the terminal.
Requires: http-agent
See the example.js script in this repository for a basic, working example.
var oxr = require('open-exchange-rates');
var oxr = require('open-exchange-rates');
oxr.set({ app_id: 'YOUR_APP_ID' })
oxr.latest(function() {
// You can now use `oxr.rates`, `oxr.base` and `oxr.timestamp`
});
var oxr = require('open-exchange-rates');
oxr.set({ app_id: 'YOUR_APP_ID' })
oxr.historical('2001-02-03', function() {
// You can now use `oxr.rates`, `oxr.base` and `oxr.timestamp`
});
money.js (npm install money
) is a tiny JavaScript currency-conversion library for web and nodeJS.
var oxr = require('open-exchange-rates'),
fx = require('money');
oxr.set({ app_id: 'YOUR_APP_ID' })
oxr.latest(function() {
// Apply exchange rates and base rate to `fx` library object:
fx.rates = oxr.rates;
fx.base = oxr.base;
// money.js is ready to use:
fx(100).from('HKD').to('GBP'); // ~8.0424
});
Advanced API features (such as Time Series requests and real-time value conversion) will be added to this module in future.
For more information, documentation, examples and showcase, check out the Open Exchange Rates homepage
Date
objects for historical queries0.3
0.2
0.1 - first version
FAQs
nodeJS/npm wrapper for the Open Exchange Rates API
The npm package open-exchange-rates receives a total of 719 weekly downloads. As such, open-exchange-rates popularity was classified as not popular.
We found that open-exchange-rates demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovered four malicious npm packages that exfiltrate up to 85% of a victim’s Ethereum or BSC wallet using obfuscated JavaScript.
Security News
TC39 advances 9 JavaScript proposals, including Array.fromAsync, Error.isError, and Explicit Resource Management, which are now headed into the ECMAScript spec.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.