nwitch-bitcoin-price

nwitch plugin for getting bitstamp's last sell price

nwitch-bitcoin-price

nwitch (and slate-irc) plugin for getting Bitstamp's last sell price.

15:44 <KenanY> !bitcoin
15:44 <nwitch> Last Bitcoin price: $636.36

As a nwitch plugin (using config.toml):

[plugins]
nwitch-bitcoin-price = true

Or through nwitch's API:

var Nwitch = require('nwitch');
var nwitchBitcoinPrice = require('nwitch-bitcoin-price');
 
var nwitch = new Nwitch({
  irc: {
    address: 'irc.freenode.org',
    port: 6667
  }
});
 
nwitch.use(nwitchBitcoinPrice());

Technically, all nwitch plugins are just slate-irc plugins, so you could also use this as a slate-irc plugin:

var net = require('net');
var irc = require('slate-irc');
var nwitchBitcoinPrice = require('nwitch-bitcoin-price');
 
var stream = net.connect({
  port: 6667,
  host: 'irc.freenode.org'
});
 
var client = irc(stream);
client.use(nwitchBitcoinPrice());
$ npm install nwitch-bitcoin-price
var nwitchBitcoinPrice = require('nwitch-bitcoin-price');

Returns a function that accepts an instance of slate-irc.