currency-js-sdk

0.0.2 • Public • Published

currency-js

API Usage

  • features
    • currency conversion

Currency Js Function

Request Parameters

  • to
  • from
  • amt[Optional]

Import API

    const api = require('currency-js')

convertAmt

    api.convertAmt({ to: 'INR', from: 'USD', amt: 247 }, (res) => {
        console.log(res);
    })

Response Format

{
    "date": "2019-10-17",
    "unit_converted_data": {
        "base": "USD",
        "currency": "INR",
        "numeric": 71.2494
    },
    "unit_inverted_data": {
        "base": "INR",
        "currency": "USD",
        "numeric": 0.01404
    },
    "total": {
        "USD": {
            "amt": "247.00"
        },
        "INR": {
            "amt": "17,598.60"
        }
    }
}

Contributing

  • Data Fetch From Exchange-Rates unofficialy.

  • If the API is not working properly, please open a issue.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    2
  • 0.0.1
    0

Package Sidebar

Install

npm i currency-js-sdk

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

3.27 kB

Total Files

5

Last publish

Collaborators

  • anujsinghwd