Get Bitcoin exchange rate by Alpha 3 currency code.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.editorconfig
.gitattributes
.gitignore
.jshintrc
.npmignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

btcxr Build Status

NPM

btcxr is a wrapper around the Blockchain api ticker method

Installing globally as binary

$ npm install btcxr -g

Usage as binary

bitcoin JPY
//=> JPY: ¥28930.17

Installing as module

$ npm install --save btcxr

Usage as module

var btcxr = require('btcxr');

function bitcoinCallback(bitcoin){
  console.log('GBP: ' + bitcoin.symbol + bitcoin.last);
}

btcxr("GBP", bitcoinCallback);

API

btcxr(currency, callback)

currency

Required
Type: string

Possible values: USD,ISK,HKD,TWD,CHF,EUR,DKK,CLP,CAD,CNY,THB,AUD,SGD,KRW,JPY,PLN,GBP,SEK,NZD,BRL,RUB

Defaults to: USD

callback(bitcoin)

Type: function

bitcoin properties:

  • 15m
  • last
  • buy
  • sell
  • symbol

License

MIT © afj176