btcxr
v0.0.6
Published
Get Bitcoin exchange rate by Alpha 3 currency code.
Downloads
8
Maintainers
Readme
btcxr
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