coinpit-index
This module listens to BTC/USD spot prices from different exchanges. (currently supported providers: Bitfinex, OKCoin, BitStamp)
install:
npm install coinpit-index --save
usage
var config = {
feed : ["bitfinex", "bitstamp", "okcoin"],
minExternalProviders: 1,
ticksize : 1,
bandUpperLimit : 2,
bandLowerLimit : 2,
logExternalPrice : true
}
var coinpitIndex = yield require('coinpit-index')(config)
var band = feed.getBand()
coinpitIndex.on('price', function(band){
var externalSpotPrice = band.price
var upperLimitSpotPrice = band.max
var lowerLimitSpotPrice = band.min
)