Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
prototype-open-exchange-rates
Advanced tools
Readme
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.
This fork allows having multiple oxr objects with different api keys and bases.
$ 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
We found that prototype-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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).