
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
prototype-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.
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
The npm package prototype-open-exchange-rates receives a total of 3 weekly downloads. As such, prototype-open-exchange-rates popularity was classified as not popular.
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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.