bfx-api-node-plugin-wd
Version:
Connection watchdog plugin for the official Bitfinex Node API
19 lines (13 loc) • 326 B
JavaScript
process.env.DEBUG = '*'
const debug = require('debug')('bfx:api:plugins:wd:example')
const { Manager } = require('bfx-api-node-core')
const WDPlugin = require('..')
const mgr = new Manager({
transform: true,
plugins: [WDPlugin()]
})
mgr.onWS('open', {}, (state = {}) => {
debug('open')
})
mgr.openWS()