From b80597dc4290e91f6ccc47ff5bcbb280b8c7b147 Mon Sep 17 00:00:00 2001 From: DiTus Date: Wed, 18 Mar 2026 22:27:30 +0100 Subject: [PATCH] Support start/end query params in candles endpoint to prevent 404 for Hurst indicator --- api-server.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api-server.js b/api-server.js index 73b23d1..23cee36 100644 --- a/api-server.js +++ b/api-server.js @@ -5,8 +5,8 @@ const PORT = 8000; const HOST = '20.20.20.20'; app.get('/api/v1/candles', (req, res) => { - const { interval } = req.query; - // Return mock candle data; include a sample for 148m interval + const { symbol, interval, limit, start, end } = req.query; + // Return mock candle data const mockCandles = [ { time: Math.floor(Date.now() / 1000) - 86400, @@ -36,6 +36,11 @@ app.get('/api/v1/candles', (req, res) => { volume: 1100 }); } + // If start/end are provided, they are ignored in this mock implementation, + // but the endpoint now accepts them to prevent 404 errors. + res.json({ candles: mockCandles }); +}); + } res.json({ candles: mockCandles }); }); });