truncate calendar prices to two decimal places

This commit is contained in:
Avraham Sakal
2024-06-23 17:48:40 -04:00
parent 7dd43b0a34
commit 8a2aa8478e
+2 -2
View File
@@ -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}