bfx-api-node-plugin-managed-candles
Version:
Maintains local candle datasets for the Bitfinex Node API
16 lines (13 loc) • 402 B
JavaScript
const { definePlugin } = require('bfx-api-node-core')
const onCandleData = require('./data/candles')
/**
* Maintains a collection of candle data on the plugin state, and emits entire
* candle sets for each incoming candle update.
*/
module.exports = definePlugin('bfx.managed-candles', {}, (h = {}, args = {}) => ({
type: 'ws2',
data: {
candles: onCandleData(h, args)
}
}))