Stockify is a module for obtaining currency exchange rates for physical and digital/crypto currency.
npm install stockify
const rate = require("stockify");
// convert function returns a promise
// Parameters - { from currency(ISO 4217 format), to currency(ISO 4217 format), Amount(Optional Parameter)}
rate.convert("INR", "USD").then( data => {
console.log(JSON.stringify(data, null, 4));
});
rate.convert("INR", "USD", 5).then( data => {
console.log(JSON.stringify(data, null, 4));
});
- It uses
alphavantage
- For currency code reference : wiki link
MIT License 2018 © Vikram Singh and contributors