forexify
v1.0.4
Published
a minimal package for forex rates
Downloads
1
Readme
forexify
Minimal package for Forex rates.
forexify uses fixer.io internally.
Fixer.io is a free JSON API for current and historical foreign exchange rates published by the European Central Bank. The rates are updated daily around 4PM CET.
Usage
Async methods
forexify provides two async methods
convert(amount=1, fromCurrency="EUR", toCurrency="EUR", callback)
forexify.convert(5,'EUR','INR', function(err,data){
console.log("5 EUR = "+data+" INR");
})
supportedCurrencies(callback)
forexify.supportedCurrencies(function(err,data){
console.log("The following currencies are supported");
console.log(data);
})
historicalRates:function(baseCurrency="EUR", dayString, callback)
//The datestring has to be in YYYY-MM-DD format
forexify.historicalRates("INR", "2013-10-30", function(error,data){
console.log(data);
})