Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

cbr-rates

0.3.5 • Public • Published

cbr-rates Build Status

Get currency rates from Central Bank of Russia

cbr-rates-cli - CLI for this module.

Install

npm install --save cbr-rates

Usage

import cbrRates from 'cbr-rates';
 
cbrRates().then(rates => {
  console.log(rates.usd); // {par: ..., value: ...}
});
 
cbrRates(new Date()).then(rates => {
  console.log(rates.usd); // {par: ..., value: ...}
});

API

cbrRates([date])

Return a promise that resolves to last currency rates or rates for specified date.

date

Type: date
Default: new Date()

Date for which to get rates.

License

MIT

install

npm i cbr-rates

Downloadsweekly downloads

4

version

0.3.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar