hedgequantx 2.9.175 → 2.9.176

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.175",
3
+ "version": "2.9.176",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -99,6 +99,8 @@ const fetchAllFrontMonths = (service) => {
99
99
 
100
100
  // Handler for ProductCodes responses
101
101
  const sampleProducts = [];
102
+ let decodeErrors = 0;
103
+ let firstError = null;
102
104
  const productHandler = (msg) => {
103
105
  msgCount++;
104
106
  if (msg.templateId !== 112) return;
@@ -109,9 +111,15 @@ const fetchAllFrontMonths = (service) => {
109
111
  try {
110
112
  decoded = proto.decode('ResponseProductCodes', msg.data);
111
113
  } catch (e) {
112
- // Log first decode error
113
- if (sampleProducts.length === 0) {
114
- brokerLog('Decode error', { error: e.message });
114
+ decodeErrors++;
115
+ if (!firstError) {
116
+ firstError = e.message;
117
+ // Log raw buffer info for debugging
118
+ brokerLog('First decode error', {
119
+ error: e.message,
120
+ bufferLen: msg.data?.length,
121
+ first20bytes: msg.data?.slice(0, 20)?.toString('hex')
122
+ });
115
123
  }
116
124
  return;
117
125
  }
@@ -212,6 +220,8 @@ const fetchAllFrontMonths = (service) => {
212
220
  productsFound: productsToCheck.size,
213
221
  totalMsgs: msgCount,
214
222
  productMsgs: productMsgCount,
223
+ decodeErrors: decodeErrors,
224
+ firstError: firstError,
215
225
  sampleProducts: sampleProducts
216
226
  });
217
227