bitmex-candle-emitter
v1.0.1
Published
Custom candle data emitter based on eventEmitter.
Downloads
5
Readme
bitmex-candle-emitter
Custom timeframed candle emitter for Bitmex based on EventEmitter.
Installation
npm install bitmex-candle-emitter
or
yarn add bitmex-candle-emitter
Usage
import candleEmitter from 'bitmex-candle-emitter'
const client = candleEmitter({
symbols: ['XBTUSD', 'ETHUSD']
timeframe: 60 //(minute),
testnet: false //(default false)
})
client.on('candle', candle => {
/*
candle = {
symbol,
timeframe,
open,
high,
low,
close,
}
*/
console.log(candle)
})