fix: problem with missing point

This commit is contained in:
Wojtek Rybakiewicz
2023-11-10 11:07:54 +01:00
parent 2054d43855
commit 570fe2030b

View File

@@ -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)}`