fixer-rate

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i fixer-rate

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • bukinoshita