Skip to content

Commit

Permalink
check bad request api get candle
Browse files Browse the repository at this point in the history
  • Loading branch information
trungbach committed Sep 15, 2023
1 parent e348058 commit 011a65f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oraidex-server/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 3 additions & 0 deletions packages/oraidex-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 011a65f

Please sign in to comment.