hedgequantx 2.9.184 → 2.9.185

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.184",
3
+ "version": "2.9.185",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -112,12 +112,18 @@ const connections = {
112
112
  },
113
113
 
114
114
  /**
115
- * Sanitize account data
115
+ * Sanitize account data for caching
116
+ * IMPORTANT: Keep rithmicAccountId for PnL lookups
116
117
  */
117
118
  _sanitizeAccount(acc) {
118
- if (!acc || typeof acc !== 'object' || !acc.accountId) return null;
119
+ if (!acc || typeof acc !== 'object') return null;
120
+
121
+ // Get the real Rithmic account ID (text like "APEX-130042-63")
122
+ const rithmicId = acc.rithmicAccountId || acc.accountId;
123
+ if (!rithmicId) return null;
124
+
119
125
  return {
120
- accountId: String(acc.accountId),
126
+ accountId: rithmicId, // Use the real Rithmic ID, not the hash
121
127
  fcmId: acc.fcmId ? String(acc.fcmId) : undefined,
122
128
  ibId: acc.ibId ? String(acc.ibId) : undefined,
123
129
  accountName: acc.accountName ? String(acc.accountName) : undefined,