diff --git a/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts b/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts index eb9a7dd3f3..0a3148e59e 100644 --- a/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts +++ b/indexer/services/roundtable/src/helpers/pnl-ticks-helper.ts @@ -86,7 +86,7 @@ export async function getPnlTicksCreateObjects( const accountsToUpdate: string[] = [ ...getAccountsToUpdate(accountToLastUpdatedBlockTime, blockTime), ...newSubaccountIds, - ]; + ].slice(0, 200); stats.gauge( `${config.SERVICE_NAME}_get_ticks_accounts_to_update`, accountsToUpdate.length, @@ -172,6 +172,7 @@ export async function getPnlTicksCreateObjects( message: 'got subaccountTotalTransfersMap', }); + // Find open positions for subaccounts const openPerpetualPositions: SubaccountToPerpetualPositionsMap = await PerpetualPositionTable.findOpenPositionsForSubaccounts(