hedgequantx 2.9.171 → 2.9.173
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
|
@@ -98,12 +98,23 @@ const fetchAllFrontMonths = (service) => {
|
|
|
98
98
|
let productMsgCount = 0;
|
|
99
99
|
|
|
100
100
|
// Handler for ProductCodes responses
|
|
101
|
+
const sampleProducts = [];
|
|
101
102
|
const productHandler = (msg) => {
|
|
102
103
|
msgCount++;
|
|
103
104
|
if (msg.templateId !== 112) return;
|
|
104
105
|
productMsgCount++;
|
|
105
106
|
|
|
106
107
|
const decoded = decodeProductCodes(msg.data);
|
|
108
|
+
|
|
109
|
+
// Log first 5 decoded products
|
|
110
|
+
if (sampleProducts.length < 5 && decoded.productCode) {
|
|
111
|
+
sampleProducts.push({
|
|
112
|
+
code: decoded.productCode,
|
|
113
|
+
exchange: decoded.exchange,
|
|
114
|
+
name: decoded.productName?.substring(0, 30)
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
107
118
|
if (!decoded.productCode || !decoded.exchange) return;
|
|
108
119
|
|
|
109
120
|
const validExchanges = ['CME', 'CBOT', 'NYMEX', 'COMEX', 'NYBOT', 'CFE'];
|
|
@@ -126,6 +137,7 @@ const fetchAllFrontMonths = (service) => {
|
|
|
126
137
|
let frontMonthMsgCount = 0;
|
|
127
138
|
let template114Count = 0;
|
|
128
139
|
const templateIdsSeen = new Map();
|
|
140
|
+
const rawResponses = [];
|
|
129
141
|
const frontMonthHandler = (msg) => {
|
|
130
142
|
msgCount++;
|
|
131
143
|
frontMonthMsgCount++;
|
|
@@ -134,6 +146,11 @@ const fetchAllFrontMonths = (service) => {
|
|
|
134
146
|
const tid = msg.templateId;
|
|
135
147
|
templateIdsSeen.set(tid, (templateIdsSeen.get(tid) || 0) + 1);
|
|
136
148
|
|
|
149
|
+
// Log first few non-112 messages to see what we're getting
|
|
150
|
+
if (tid !== 112 && rawResponses.length < 5) {
|
|
151
|
+
rawResponses.push({ templateId: tid, dataLen: msg.data?.length });
|
|
152
|
+
}
|
|
153
|
+
|
|
137
154
|
if (msg.templateId !== 114) return;
|
|
138
155
|
template114Count++;
|
|
139
156
|
|
|
@@ -180,7 +197,8 @@ const fetchAllFrontMonths = (service) => {
|
|
|
180
197
|
brokerLog('ProductCodes phase complete', {
|
|
181
198
|
productsFound: productsToCheck.size,
|
|
182
199
|
totalMsgs: msgCount,
|
|
183
|
-
productMsgs: productMsgCount
|
|
200
|
+
productMsgs: productMsgCount,
|
|
201
|
+
sampleProducts: sampleProducts
|
|
184
202
|
});
|
|
185
203
|
|
|
186
204
|
if (productsToCheck.size === 0) {
|
|
@@ -252,7 +270,8 @@ const fetchAllFrontMonths = (service) => {
|
|
|
252
270
|
totalMsgs: msgCount,
|
|
253
271
|
frontMonthMsgs: frontMonthMsgCount,
|
|
254
272
|
template114Received: template114Count,
|
|
255
|
-
templateIds: templateStats
|
|
273
|
+
templateIds: templateStats,
|
|
274
|
+
nonProductMsgs: rawResponses
|
|
256
275
|
});
|
|
257
276
|
resolve(results);
|
|
258
277
|
}, TIMEOUTS.RITHMIC_PRODUCTS);
|