hedgequantx 2.9.172 → 2.9.174

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.172",
3
+ "version": "2.9.174",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -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'];
@@ -186,7 +197,8 @@ const fetchAllFrontMonths = (service) => {
186
197
  brokerLog('ProductCodes phase complete', {
187
198
  productsFound: productsToCheck.size,
188
199
  totalMsgs: msgCount,
189
- productMsgs: productMsgCount
200
+ productMsgs: productMsgCount,
201
+ sampleProducts: sampleProducts
190
202
  });
191
203
 
192
204
  if (productsToCheck.size === 0) {
@@ -309,9 +321,9 @@ const decodeProductCodes = (buffer) => {
309
321
  } else if (wireType === 2) {
310
322
  const [val, newOff] = readString(data, offset);
311
323
  offset = newOff;
312
- // Field IDs from Rithmic API
324
+ // Field IDs from Rithmic API (response_product_codes.proto)
313
325
  if (fieldNumber === 110101) result.exchange = val; // exchange
314
- if (fieldNumber === 100749) result.productCode = val; // product_code (ES, MES, MNQ, etc.)
326
+ if (fieldNumber === 110102) result.productCode = val; // product_code (ES, MES, MNQ, etc.)
315
327
  if (fieldNumber === 110103) result.productName = val; // product_name
316
328
  } else {
317
329
  break;