hedgequantx 2.9.170 → 2.9.172

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.170",
3
+ "version": "2.9.172",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -126,6 +126,7 @@ const fetchAllFrontMonths = (service) => {
126
126
  let frontMonthMsgCount = 0;
127
127
  let template114Count = 0;
128
128
  const templateIdsSeen = new Map();
129
+ const rawResponses = [];
129
130
  const frontMonthHandler = (msg) => {
130
131
  msgCount++;
131
132
  frontMonthMsgCount++;
@@ -134,6 +135,11 @@ const fetchAllFrontMonths = (service) => {
134
135
  const tid = msg.templateId;
135
136
  templateIdsSeen.set(tid, (templateIdsSeen.get(tid) || 0) + 1);
136
137
 
138
+ // Log first few non-112 messages to see what we're getting
139
+ if (tid !== 112 && rawResponses.length < 5) {
140
+ rawResponses.push({ templateId: tid, dataLen: msg.data?.length });
141
+ }
142
+
137
143
  if (msg.templateId !== 114) return;
138
144
  template114Count++;
139
145
 
@@ -188,20 +194,35 @@ const fetchAllFrontMonths = (service) => {
188
194
  }
189
195
 
190
196
  let sentCount = 0;
191
- for (const product of productsToCheck.values()) {
197
+ let sendErrors = [];
198
+ // Only send for first 5 products to test
199
+ const productsArray = Array.from(productsToCheck.values());
200
+ const testProducts = productsArray.slice(0, 60); // Limit to 60 for testing
201
+
202
+ for (const product of testProducts) {
192
203
  try {
193
- service.tickerConn.send('RequestFrontMonthContract', {
204
+ const reqData = {
194
205
  templateId: 113,
195
206
  userMsg: [product.productCode],
196
207
  symbol: product.productCode,
197
208
  exchange: product.exchange,
198
- });
209
+ };
210
+ // Log first request
211
+ if (sentCount === 0) {
212
+ brokerLog('First RequestFrontMonthContract', reqData);
213
+ }
214
+ service.tickerConn.send('RequestFrontMonthContract', reqData);
199
215
  sentCount++;
200
216
  } catch (err) {
201
- brokerLog('Failed to send RequestFrontMonthContract', { product: product.productCode, error: err.message });
217
+ sendErrors.push({ product: product.productCode, error: err.message });
202
218
  }
203
219
  }
204
- brokerLog('RequestFrontMonthContract sent', { sentCount, totalProducts: productsToCheck.size });
220
+ brokerLog('RequestFrontMonthContract sent', {
221
+ sentCount,
222
+ totalProducts: productsToCheck.size,
223
+ limitedTo: testProducts.length,
224
+ errors: sendErrors.length > 0 ? sendErrors.slice(0, 3) : 'none'
225
+ });
205
226
 
206
227
  // Collect results after timeout
207
228
  setTimeout(() => {
@@ -237,7 +258,8 @@ const fetchAllFrontMonths = (service) => {
237
258
  totalMsgs: msgCount,
238
259
  frontMonthMsgs: frontMonthMsgCount,
239
260
  template114Received: template114Count,
240
- templateIds: templateStats
261
+ templateIds: templateStats,
262
+ nonProductMsgs: rawResponses
241
263
  });
242
264
  resolve(results);
243
265
  }, TIMEOUTS.RITHMIC_PRODUCTS);