From 570fe2030bc445ea67c042e80a9c579b86cba2ac Mon Sep 17 00:00:00 2001 From: Wojtek Rybakiewicz Date: Fri, 10 Nov 2023 11:07:54 +0100 Subject: [PATCH] fix: problem with missing point --- routes/prices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/prices.ts b/routes/prices.ts index 77f0764..36a351b 100644 --- a/routes/prices.ts +++ b/routes/prices.ts @@ -416,7 +416,7 @@ export const prices = (router: Router) => { throw new Error(`Param fromTimestamp is required when using interval`); } - const start = Math.ceil(params.fromTimestamp / 1000); + const start = Math.ceil((params.fromTimestamp - params.interval) / 1000); const stop = params.toTimestamp !== undefined ? `${Math.floor(params.toTimestamp / 1000)}`