Library for get currencies rates from different sources. The currently supported sources are Binance and Yahoo.
npm i ratesjs
const currencyRates = new CurrencyRates();
const result = await currencyRates
.getProvider('yahoo')
.getLatest('USD', ['RUB', 'GBP']);
{ RUB: '73.6008', GBP: '0.82162' }
const currencyRates = new CurrencyRates();
const result = await currencyRates
.getProvider('binance')
.getLatest('USDT', ['BTC', 'ETH']);
{ BTC: '22175.80000000', ETH: '1552.45000000' }