Skip to content
CommonJS module for converting any Bitcoin amount to your preferred currency.
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
lib
src
.gitignore
README.markdown
gruntfile.coffee
package.json

README.markdown

Bitcoin Exchange Rates NPM version

Convert any Bitcoin amount to your preferred currency.

Installation

Using npm:

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

In Node.js:

var rates = require("bitcoin-exchange-rates");

Synopsis

var btcAmount, currency, rates;

rates = require('../lib/bitcoin-exchange-rates');

btcAmount = 0.100172;

currency = 'USD';

rates.fromBTC(btcAmount, currency, function (err, rate) {
  console.log(btcAmount + " BTC = " + rate + " " + currency);
});

API

rates.fromBTC(amount, currency, callback(err[, amount]))

Convert an amount of Bitcoins to currency.

Author

twitter/matthewgh
Matthew Hudson
Something went wrong with that request. Please try again.