bitcoin-exchange-rates

Convert any Bitcoin amount to your preferred currency.

Bitcoin Exchange Rates

Using npm:

$ npm [-g] install bitcoin-exchange-rates

In Node.js:

var rates = require("bitcoin-exchange-rates");
var btcAmount, currency, rates;
 
rates = require('../lib/bitcoin-exchange-rates');
 
btcAmount = 0.100172;
 
currency = 'USD';
 
rates.fromBTC(btcAmount, currency, function (errrate) {
  console.log(btcAmount + " BTC = " + rate + " " + currency);
});

Convert an amount of Bitcoins to currency.

Matthew Hudson