diff --git a/index.js b/index.js index ed3e102..d03dc6e 100644 --- a/index.js +++ b/index.js @@ -18,6 +18,7 @@ const { calcRealizedPositionPnl, calcUnrealizedPositionPnl } = require('bfx-hf-s const EventEmitter = require('events') const CANDLE_FETCH_LIMIT = 1000 +const CANDLE_FETCH_SECTION = 'hist' const pt = new PromiseThrottle({ requestsPerSecond: 10.0 / 60.0, // taken from docs promiseImplementation: Promise @@ -193,6 +194,7 @@ class LiveStrategyExecution extends EventEmitter { const candles = await this._fetchCandles({ symbol, timeframe, + section: CANDLE_FETCH_SECTION, query: { start: start - (120 * 1000), // 2 min threshold end, @@ -238,6 +240,7 @@ class LiveStrategyExecution extends EventEmitter { const candles = await this._fetchCandles({ symbol, timeframe, + section: CANDLE_FETCH_SECTION, query: { limit: CANDLE_FETCH_LIMIT, start,