Fetch currency exchange rate for a coin/fiat currency pair in nodejs.
Add to your application via npm
:
npm install coin-rates --save
This will install coin-rates
and add it to your application's package.json
file.
const coinRates = require('coin-rates');
coinRates.get({
provider: 'kraken',
currencies: {
from: 'BTC',
to: 'EUR',
},
}).then(rate => {
console.log(rate);
}).catch(error => {
console.error(error);
})
Run automated tests as follows:
npm test
See CHANGELOG.md
This software is MIT licensed:
A short, permissive software license. Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source. There are many variations of this license in use.