项目作者: maverickjoy

项目描述 :
Stockify is a module for obtaining currency exchange rates for physical and digital/crypto currency.
高级语言: JavaScript
项目地址: git://github.com/maverickjoy/stockify.git
创建时间: 2018-03-27T07:54:10Z
项目社区:https://github.com/maverickjoy/stockify

开源协议:MIT License

下载


Stockify

NPM MIT

Stockify is a module for obtaining currency exchange rates for physical and digital/crypto currency.

Installation

  1. npm install stockify

Usage

  1. const rate = require("stockify");
  2. // convert function returns a promise
  3. // Parameters - { from currency(ISO 4217 format), to currency(ISO 4217 format), Amount(Optional Parameter)}
  4. rate.convert("INR", "USD").then( data => {
  5. console.log(JSON.stringify(data, null, 4));
  6. });
  7. rate.convert("INR", "USD", 5).then( data => {
  8. console.log(JSON.stringify(data, null, 4));
  9. });

Notes

  • It uses alphavantage
  • For currency code reference : wiki link

License

MIT License 2018 © Vikram Singh and contributors