From 7592af32024670906ec51f548cc2146ce2563f1c Mon Sep 17 00:00:00 2001 From: Jack Waller Date: Thu, 16 Oct 2025 11:08:53 +1100 Subject: [PATCH 1/2] chore: add logging to group aggregation --- src/utils/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 9c69345..d8a1d56 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -312,6 +312,11 @@ export function publishGroupings( asks: aggregatedAsks, }); + if(aggregatedBids.length == 20 || aggregatedAsks.length == 20) { + logger.error(`Error aggregating dlob levels: group=${group}, bids=${fullAggregatedBids.length}, asks=${fullAggregatedAsks.length}`) + logger.error(`Response: ${JSON.stringify(l2Formatted_grouped20)}`) + } + redisClient.publish( `${clientPrefix}orderbook_${marketType}_${ marketArgs.marketIndex From 73278e02ea649a72a4556e5575a78ce1291c6bb4 Mon Sep 17 00:00:00 2001 From: Jack Waller Date: Thu, 16 Oct 2025 11:31:50 +1100 Subject: [PATCH 2/2] chore: update to only look at majors --- src/utils/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index d8a1d56..610e69a 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -311,8 +311,9 @@ export function publishGroupings( bids: aggregatedBids, asks: aggregatedAsks, }); + - if(aggregatedBids.length == 20 || aggregatedAsks.length == 20) { + if(['SOL-PERP', 'BTC-PERP', 'ETH-PERP'].includes(l2Formatted_grouped20.marketName) && aggregatedBids.length !== 20 || aggregatedAsks.length !== 20) { logger.error(`Error aggregating dlob levels: group=${group}, bids=${fullAggregatedBids.length}, asks=${fullAggregatedAsks.length}`) logger.error(`Response: ${JSON.stringify(l2Formatted_grouped20)}`) }