truncate calendar prices to two decimal places
This commit is contained in:
+2
-2
@@ -246,7 +246,7 @@ const appRouter = router({
|
|||||||
`
|
`
|
||||||
SELECT
|
SELECT
|
||||||
toUnixTimestamp(tsStart) as x,
|
toUnixTimestamp(tsStart) as x,
|
||||||
calendarPrice as y
|
truncate(calendarPrice, 2) as y
|
||||||
FROM calendar_histories
|
FROM calendar_histories
|
||||||
WHERE symbol = '${underlying}'
|
WHERE symbol = '${underlying}'
|
||||||
AND daysToFrontExpiration = ${daysToFrontExpiration}
|
AND daysToFrontExpiration = ${daysToFrontExpiration}
|
||||||
@@ -285,7 +285,7 @@ const appRouter = router({
|
|||||||
`
|
`
|
||||||
SELECT
|
SELECT
|
||||||
FLOOR(strikePercentageFromUnderlyingPrice, 1) as x,
|
FLOOR(strikePercentageFromUnderlyingPrice, 1) as x,
|
||||||
calendarPrice as y
|
truncate(calendarPrice, 2) as y
|
||||||
FROM calendar_histories
|
FROM calendar_histories
|
||||||
WHERE symbol = '${underlying}'
|
WHERE symbol = '${underlying}'
|
||||||
AND daysToFrontExpiration = ${daysToFrontExpiration}
|
AND daysToFrontExpiration = ${daysToFrontExpiration}
|
||||||
|
|||||||
Reference in New Issue
Block a user