cbr-rates
v0.3.5
Published
Get currency rates from Central Bank of Russia
Downloads
10
Maintainers
Readme
cbr-rates
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