require the module.
NOTE: Default fetchInterval value is set to one hour.
var cc = require('currency-converter')({ CLIENTKEY: YOUR_OPEN_EXCHANGE_RATES_KEY, [fetchInterval: 3600000] });
Usage
This module makes it extremely easy for you to convert currencies. The very basic input takes in two parameters. convertFrom & convertTo have to be valid country codes. See list here. The module fetches live rates on initialize, saves it locally, and retrieves locally saved rates by default, unless otherwise specificed.
.convert(amount, convertFrom, convertTo, [live])
converts an amount specificed to a specific currency. live is an optional parameter that uses live rates from openexchangerates.org