1.1.2 • Published 11 months ago

ratesjs v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

ratesjs Version License

Library for get currencies rates from different sources. The currently supported sources are Binance and Yahoo.

Install

npm i ratesjs

Usage

Example 1

const  currencyRates = new  CurrencyRates();

const  result = await  currencyRates
    .getProvider('yahoo')
    .setBase('USD')
    .setTargets(['RUB', 'RUB'])
    .getResult('latest');
{ RUB: '73.6008', GBP: '0.82162' }

Example 2

const  currencyRates = new  CurrencyRates();

const  result = await  currencyRates
    .getProvider('binance')
    .setBase('USDT')
    .setTargets(['BTC', 'ETH'])
    .getResult('latest');
{ BTC: '22175.80000000', ETH: '1552.45000000' }
1.1.1

11 months ago

1.1.0

11 months ago

1.0.9

11 months ago

1.1.2

11 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago