1.1.1 • Published 4 years ago

@asefux/exchange-rates v1.1.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
4 years ago

@asefux/exchange-rates

gather exchange-rates from muiltiplie national banks

Usage

const ExchangeRates = require('@asefux/exchange-rates');

const exchangeRates = ExchangeRates();

exchangeRates.matrix()
.then((ratesMatrix)=>{
        console.log(JSON.stringify(ratesMatrix, null, 2));
});

exchangeRates.rate(10, 'eur', 'usd').then(console.log); // will output how much USD is 10 EUR

Rates matrix of this format

{
        [base]: {
                [quote]: price
        }
}
// how much quote would you get for 1 unit of base

Sources


Changes

VersionChanges
1.0.0initial code
1.0.1update api
1.1.0Bank of Bulgaria
1.1.1on weekends get rates of last working day
1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago