From 80781859367b97562b241c30b6fcbbf06a05ade4 Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Thu, 2 Dec 2021 23:11:24 -0500 Subject: [PATCH] increase spot stat time period from 1hr avg to 4hr avg to reduce response time --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7c82e6d..f6ef78e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,7 +18,7 @@ app.get("/spot", async (req, res) => { } const stats = await sequelize.query( - `SELECT time_bucket('60 minutes', time) AS "hourly", + `SELECT time_bucket('4 hours', time) AS "hourly", "name", avg("totalDeposits")::float AS "totalDeposits", avg("totalBorrows")::float AS "totalBorrows",