diff --git a/index.js b/index.js index a5ba6b4..4a041e0 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ let curPrice = null; async function bootstrap() { try { - const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 50); + const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 336); bars = ohlcv.map(c => ({ t: c[0], o: c[1], @@ -82,7 +82,7 @@ function initWs() { }; bars.push(bar); - if (bars.length > 50) bars.shift(); + if (bars.length > 336) bars.shift(); logger.debug('새로운 분봉 수신', { timestamp: new Date(bar.t).toISOString(), diff --git a/test.js b/test.js index 66f241b..af54753 100644 --- a/test.js +++ b/test.js @@ -11,7 +11,7 @@ const ex = new ccxt.bybit({ options: { defaultType: 'swap' } }); -const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 50); +const ohlcv = await ex.fetchOHLCV(cfg.cctxSymbol, cfg.ohlcvInterval, undefined, 300); const bars = ohlcv.map(c => ({ t: c[0], o: c[1],