diff --git a/packages/oraidex-server/package.json b/packages/oraidex-server/package.json index 789069ab..df6b239c 100644 --- a/packages/oraidex-server/package.json +++ b/packages/oraidex-server/package.json @@ -1,6 +1,6 @@ { "name": "@oraichain/oraidex-server", - "version": "1.0.6", + "version": "1.0.7", "main": "dist/index.js", "bin": "dist/index.js", "license": "MIT", diff --git a/packages/oraidex-server/src/index.ts b/packages/oraidex-server/src/index.ts index 7a478b42..4bae65c4 100644 --- a/packages/oraidex-server/src/index.ts +++ b/packages/oraidex-server/src/index.ts @@ -227,6 +227,9 @@ app.get("/volume/v2/historical/chart", async (req, res) => { app.get("/v1/candles/", async (req: Request<{}, {}, {}, GetCandlesQuery>, res) => { try { + if (!req.query.pair || !req.query.tf || !req.query.startTime || !req.query.endTime) + return res.status(400).send("Not enough query params"); + const candles = await duckDb.getOhlcvCandles(req.query); res.status(200).send(candles); } catch (error) {