hedgequantx 2.9.169 → 2.9.170
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -125,9 +125,15 @@ const fetchAllFrontMonths = (service) => {
|
|
|
125
125
|
// Handler for FrontMonth responses
|
|
126
126
|
let frontMonthMsgCount = 0;
|
|
127
127
|
let template114Count = 0;
|
|
128
|
+
const templateIdsSeen = new Map();
|
|
128
129
|
const frontMonthHandler = (msg) => {
|
|
129
130
|
msgCount++;
|
|
130
131
|
frontMonthMsgCount++;
|
|
132
|
+
|
|
133
|
+
// Track all templateIds seen
|
|
134
|
+
const tid = msg.templateId;
|
|
135
|
+
templateIdsSeen.set(tid, (templateIdsSeen.get(tid) || 0) + 1);
|
|
136
|
+
|
|
131
137
|
if (msg.templateId !== 114) return;
|
|
132
138
|
template114Count++;
|
|
133
139
|
|
|
@@ -221,11 +227,17 @@ const fetchAllFrontMonths = (service) => {
|
|
|
221
227
|
// Sort alphabetically by base symbol
|
|
222
228
|
results.sort((a, b) => a.baseSymbol.localeCompare(b.baseSymbol));
|
|
223
229
|
|
|
230
|
+
// Convert Map to object for logging
|
|
231
|
+
const templateStats = {};
|
|
232
|
+
for (const [tid, count] of templateIdsSeen) {
|
|
233
|
+
templateStats[`t${tid}`] = count;
|
|
234
|
+
}
|
|
224
235
|
brokerLog('FrontMonth phase complete', {
|
|
225
236
|
contractsFound: results.length,
|
|
226
237
|
totalMsgs: msgCount,
|
|
227
238
|
frontMonthMsgs: frontMonthMsgCount,
|
|
228
|
-
template114Received: template114Count
|
|
239
|
+
template114Received: template114Count,
|
|
240
|
+
templateIds: templateStats
|
|
229
241
|
});
|
|
230
242
|
resolve(results);
|
|
231
243
|
}, TIMEOUTS.RITHMIC_PRODUCTS);
|