Socket
Book a DemoInstallSign in
Socket

fixer-rate

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixer-rate

A foreign exchange rates and currency conversion API

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

fixer-rate

A foreign exchange rates and currency conversion API.

Codeship Status for bukinoshita/fixer-rate GitHub release GitHub license

The rates are updated daily around 4PM CET.

Install

$ npm install --save fixer-rate

Usage

import {getRates, convert} from 'fixer-rate'

getRates().then(rates => {
  console.log(rates)
})

convert(1000, {from: 'USD', to: 'BRL'}).then(res => {
  console.log(res)
})

API

.getRates(base)

base

Type: string
Default: USD
Options: options

get the latest rates

.convert(value, currencies)

value

Type: number
Default: 1
Required

currencies

Type: object
{from: CURRENCY_1, to: CURRENCY_2}
Required

convert from a currency to another.

License

MIT © Bu Kinoshita

FAQs

Package last updated on 10 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts