diff --git a/indexer/packages/postgres/src/stores/pnl-ticks-table.ts b/indexer/packages/postgres/src/stores/pnl-ticks-table.ts index 30181a751e..99cffb05c3 100644 --- a/indexer/packages/postgres/src/stores/pnl-ticks-table.ts +++ b/indexer/packages/postgres/src/stores/pnl-ticks-table.ts @@ -537,7 +537,8 @@ export async function getLatestPnlTick( pnl_ticks WHERE "subaccountId" in (${subaccountIds.map((id: string) => { return `'${id}'`; }).join(',')}) AND - "blockTime" <= '${beforeOrAt.toUTC().toISO()}'::timestamp + "blockTime" <= '${beforeOrAt.toUTC().toISO()}'::timestamp AND + "blockTime" >= '${beforeOrAt.toUTC().minus({ hours: 4 }).toISO()}'::timestamp ORDER BY "subaccountId", "blockTime" DESC