JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q39359F
  • License MIT

Stockify is a module for obtaining real time currency exchange rate for any pair of physical currency(e.g. INR) or digital/crypto currency(e.g. bitcoin).

Package Exports

  • stockify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stockify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Stockify

NPM MIT

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

Installation

npm install stockify

Usage

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));
});

Notes

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

License

MIT License 2018 © Vikram Singh and contributors