From 8a2aa8478e4df9194eeadd018d66efc7a17f5b1f Mon Sep 17 00:00:00 2001 From: Avraham Sakal Date: Sun, 23 Jun 2024 17:48:40 -0400 Subject: [PATCH] truncate calendar prices to two decimal places --- server/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/index.ts b/server/src/index.ts index 3f02f0d..7cb733a 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -246,7 +246,7 @@ const appRouter = router({ ` SELECT toUnixTimestamp(tsStart) as x, - calendarPrice as y + truncate(calendarPrice, 2) as y FROM calendar_histories WHERE symbol = '${underlying}' AND daysToFrontExpiration = ${daysToFrontExpiration} @@ -285,7 +285,7 @@ const appRouter = router({ ` SELECT FLOOR(strikePercentageFromUnderlyingPrice, 1) as x, - calendarPrice as y + truncate(calendarPrice, 2) as y FROM calendar_histories WHERE symbol = '${underlying}' AND daysToFrontExpiration = ${daysToFrontExpiration}