hedgequantx 2.6.31 → 2.6.33

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.6.31",
3
+ "version": "2.6.33",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -221,16 +221,16 @@ const launchAlgo = async (service, account, contract, config) => {
221
221
  const accountName = showName
222
222
  ? (account.accountName || account.rithmicAccountId || account.accountId)
223
223
  : 'HQX *****';
224
- const symbolName = contract.name;
225
- const contractId = contract.id;
224
+ const symbolName = contract.name || contract.symbol;
225
+ // contractId: use id for ProjectX, symbol for Rithmic
226
+ const contractId = contract.id || contract.symbol || contract.name;
226
227
  const connectionType = account.platform || 'ProjectX';
227
228
 
228
229
  // Tick size/value from API - null if not available (RULES.md compliant)
229
230
  const tickSize = contract.tickSize ?? null;
230
231
  const tickValue = contract.tickValue ?? null;
231
232
 
232
- // Debug: log contract specs
233
- console.log(` DEBUG: Contract specs - tickSize=${tickSize}, tickValue=${tickValue}, baseSymbol=${contract.baseSymbol}`);
233
+
234
234
 
235
235
  // Determine execution path
236
236
  const useFastPath = isRithmicFastPath(service);
@@ -581,8 +581,8 @@ const launchAlgo = async (service, account, contract, config) => {
581
581
  });
582
582
 
583
583
  // Get momentum data from strategy if available
584
- const modelValues = strategy.getModelValues?.(contractId);
585
- if (modelValues) {
584
+ const modelValues = strategy.getModelValues?.() || strategy.getModelValues?.(contractId);
585
+ if (modelValues && typeof positionManager.updateMomentum === 'function') {
586
586
  positionManager.updateMomentum(symbolName, {
587
587
  ofi: modelValues.ofi || 0,
588
588
  zscore: modelValues.zscore || 0,
@@ -25,60 +25,64 @@ const { logger } = require('../../utils/logger');
25
25
  const log = logger.scope('Rithmic');
26
26
 
27
27
  /**
28
- * CME Contract Specifications - Official exchange tick sizes and values
28
+ * CME Contract Specifications - Official exchange tick sizes, values, and names
29
29
  * These are technical constants defined by the exchange, not market data.
30
30
  * Source: CME Group contract specifications
31
31
  */
32
32
  const CME_CONTRACT_SPECS = {
33
33
  // E-mini Index Futures (CME)
34
- ES: { tickSize: 0.25, tickValue: 12.50 }, // E-mini S&P 500
35
- NQ: { tickSize: 0.25, tickValue: 5.00 }, // E-mini NASDAQ-100
36
- RTY: { tickSize: 0.10, tickValue: 5.00 }, // E-mini Russell 2000
37
- YM: { tickSize: 1.00, tickValue: 5.00 }, // E-mini Dow ($5)
34
+ ES: { tickSize: 0.25, tickValue: 12.50, name: 'E-mini S&P 500' },
35
+ NQ: { tickSize: 0.25, tickValue: 5.00, name: 'E-mini NASDAQ-100' },
36
+ RTY: { tickSize: 0.10, tickValue: 5.00, name: 'E-mini Russell 2000' },
37
+ YM: { tickSize: 1.00, tickValue: 5.00, name: 'E-mini Dow' },
38
38
 
39
39
  // Micro Index Futures (CME)
40
- MES: { tickSize: 0.25, tickValue: 1.25 }, // Micro E-mini S&P 500
41
- MNQ: { tickSize: 0.25, tickValue: 0.50 }, // Micro E-mini NASDAQ-100
42
- M2K: { tickSize: 0.10, tickValue: 0.50 }, // Micro E-mini Russell 2000
43
- MYM: { tickSize: 1.00, tickValue: 0.50 }, // Micro E-mini Dow
40
+ MES: { tickSize: 0.25, tickValue: 1.25, name: 'Micro E-mini S&P 500' },
41
+ MNQ: { tickSize: 0.25, tickValue: 0.50, name: 'Micro E-mini NASDAQ-100' },
42
+ M2K: { tickSize: 0.10, tickValue: 0.50, name: 'Micro E-mini Russell 2000' },
43
+ MYM: { tickSize: 1.00, tickValue: 0.50, name: 'Micro E-mini Dow' },
44
44
 
45
45
  // Energy Futures (NYMEX)
46
- CL: { tickSize: 0.01, tickValue: 10.00 }, // Crude Oil
47
- QM: { tickSize: 0.025, tickValue: 12.50 }, // E-mini Crude Oil
48
- MCL: { tickSize: 0.01, tickValue: 1.00 }, // Micro Crude Oil
49
- NG: { tickSize: 0.001, tickValue: 10.00 }, // Natural Gas
50
- QG: { tickSize: 0.005, tickValue: 12.50 }, // E-mini Natural Gas
46
+ CL: { tickSize: 0.01, tickValue: 10.00, name: 'Crude Oil' },
47
+ QM: { tickSize: 0.025, tickValue: 12.50, name: 'E-mini Crude Oil' },
48
+ MCL: { tickSize: 0.01, tickValue: 1.00, name: 'Micro Crude Oil' },
49
+ NG: { tickSize: 0.001, tickValue: 10.00, name: 'Natural Gas' },
50
+ QG: { tickSize: 0.005, tickValue: 12.50, name: 'E-mini Natural Gas' },
51
51
 
52
52
  // Metal Futures (COMEX)
53
- GC: { tickSize: 0.10, tickValue: 10.00 }, // Gold
54
- MGC: { tickSize: 0.10, tickValue: 1.00 }, // Micro Gold
55
- SI: { tickSize: 0.005, tickValue: 25.00 }, // Silver
56
- SIL: { tickSize: 0.005, tickValue: 2.50 }, // Micro Silver (1000oz)
57
- HG: { tickSize: 0.0005, tickValue: 12.50 }, // Copper
58
- MHG: { tickSize: 0.0005, tickValue: 1.25 }, // Micro Copper
53
+ GC: { tickSize: 0.10, tickValue: 10.00, name: 'Gold' },
54
+ MGC: { tickSize: 0.10, tickValue: 1.00, name: 'Micro Gold' },
55
+ SI: { tickSize: 0.005, tickValue: 25.00, name: 'Silver' },
56
+ SIL: { tickSize: 0.005, tickValue: 2.50, name: '1000oz Silver' },
57
+ HG: { tickSize: 0.0005, tickValue: 12.50, name: 'Copper' },
58
+ MHG: { tickSize: 0.0005, tickValue: 1.25, name: 'Micro Copper' },
59
59
 
60
60
  // Treasury Futures (CBOT)
61
- ZB: { tickSize: 0.03125, tickValue: 31.25 }, // 30-Year T-Bond
62
- ZN: { tickSize: 0.015625, tickValue: 15.625 }, // 10-Year T-Note
63
- ZF: { tickSize: 0.0078125, tickValue: 7.8125 }, // 5-Year T-Note
64
- ZT: { tickSize: 0.0078125, tickValue: 15.625 }, // 2-Year T-Note
61
+ ZB: { tickSize: 0.03125, tickValue: 31.25, name: '30-Year T-Bond' },
62
+ ZN: { tickSize: 0.015625, tickValue: 15.625, name: '10-Year T-Note' },
63
+ ZF: { tickSize: 0.0078125, tickValue: 7.8125, name: '5-Year T-Note' },
64
+ ZT: { tickSize: 0.0078125, tickValue: 15.625, name: '2-Year T-Note' },
65
65
 
66
66
  // Agricultural Futures (CBOT)
67
- ZC: { tickSize: 0.25, tickValue: 12.50 }, // Corn
68
- ZS: { tickSize: 0.25, tickValue: 12.50 }, // Soybeans
69
- ZW: { tickSize: 0.25, tickValue: 12.50 }, // Wheat
70
- ZL: { tickSize: 0.01, tickValue: 6.00 }, // Soybean Oil
71
- ZM: { tickSize: 0.10, tickValue: 10.00 }, // Soybean Meal
67
+ ZC: { tickSize: 0.25, tickValue: 12.50, name: 'Corn' },
68
+ ZS: { tickSize: 0.25, tickValue: 12.50, name: 'Soybeans' },
69
+ ZW: { tickSize: 0.25, tickValue: 12.50, name: 'Wheat' },
70
+ ZL: { tickSize: 0.01, tickValue: 6.00, name: 'Soybean Oil' },
71
+ ZM: { tickSize: 0.10, tickValue: 10.00, name: 'Soybean Meal' },
72
72
 
73
73
  // Currency Futures (CME)
74
- '6E': { tickSize: 0.00005, tickValue: 6.25 }, // Euro FX
75
- '6J': { tickSize: 0.0000005, tickValue: 6.25 }, // Japanese Yen
76
- '6B': { tickSize: 0.0001, tickValue: 6.25 }, // British Pound
77
- '6A': { tickSize: 0.0001, tickValue: 10.00 }, // Australian Dollar
78
- '6C': { tickSize: 0.00005, tickValue: 5.00 }, // Canadian Dollar
74
+ '6E': { tickSize: 0.00005, tickValue: 6.25, name: 'Euro FX' },
75
+ '6J': { tickSize: 0.0000005, tickValue: 6.25, name: 'Japanese Yen' },
76
+ '6B': { tickSize: 0.0001, tickValue: 6.25, name: 'British Pound' },
77
+ '6A': { tickSize: 0.0001, tickValue: 10.00, name: 'Australian Dollar' },
78
+ '6C': { tickSize: 0.00005, tickValue: 5.00, name: 'Canadian Dollar' },
79
+ '6M': { tickSize: 0.0001, tickValue: 5.00, name: 'Mexican Peso' },
80
+
81
+ // Nikkei (CME)
82
+ NKD: { tickSize: 5.0, tickValue: 25.00, name: 'Nikkei 225' },
79
83
 
80
84
  // VIX Futures (CFE)
81
- VX: { tickSize: 0.05, tickValue: 50.00 }, // VIX Futures
85
+ VX: { tickSize: 0.05, tickValue: 50.00, name: 'VIX Futures' },
82
86
  };
83
87
 
84
88
  /** PropFirm configurations */
@@ -825,14 +829,15 @@ class RithmicService extends EventEmitter {
825
829
  const product = productsToCheck.get(productKey);
826
830
 
827
831
  // API data + CME contract specs (technical constants)
828
- const productName = product?.productName || baseSymbol;
829
832
  const specs = CME_CONTRACT_SPECS[baseSymbol] || null;
833
+ // Use CME spec name first, then API productName, then baseSymbol as fallback
834
+ const productName = specs?.name || product?.productName || baseSymbol;
830
835
 
831
836
  results.push({
832
837
  symbol: contract.symbol,
833
838
  baseSymbol,
834
839
  name: contract.symbol, // Use trading symbol as name
835
- description: productName, // Product name as description (like ProjectX)
840
+ description: productName, // Product name as description
836
841
  exchange: contract.exchange,
837
842
  // CME contract specifications (official exchange constants)
838
843
  tickSize: specs?.tickSize ?? null,