hedgequantx 1.2.133 → 1.2.134

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": "1.2.133",
3
+ "version": "1.2.134",
4
4
  "description": "Prop Futures Algo Trading CLI - Connect to Topstep, Alpha Futures, and other prop firms",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/pages/algo.js CHANGED
@@ -1906,6 +1906,19 @@ const launchCopyTrading = async (config) => {
1906
1906
 
1907
1907
  const propfirmToken = lead.service.getToken ? lead.service.getToken() : null;
1908
1908
  const propfirmId = lead.service.getPropfirm ? lead.service.getPropfirm() : (lead.account.propfirm || 'topstep');
1909
+
1910
+ // Get Rithmic credentials if this is a Rithmic account
1911
+ let rithmicCredentials = null;
1912
+ if (lead.service.getRithmicCredentials) {
1913
+ rithmicCredentials = lead.service.getRithmicCredentials();
1914
+ } else if (lead.account.rithmicUserId && lead.account.rithmicPassword) {
1915
+ rithmicCredentials = {
1916
+ userId: lead.account.rithmicUserId,
1917
+ password: lead.account.rithmicPassword,
1918
+ systemName: lead.account.rithmicSystem || 'Apex',
1919
+ gateway: lead.account.rithmicGateway || 'wss://rprotocol.rithmic.com:443'
1920
+ };
1921
+ }
1909
1922
 
1910
1923
  hqxServer.startAlgo({
1911
1924
  accountId: lead.account.accountId,
@@ -1916,6 +1929,7 @@ const launchCopyTrading = async (config) => {
1916
1929
  maxRisk: maxRisk,
1917
1930
  propfirm: propfirmId,
1918
1931
  propfirmToken: propfirmToken,
1932
+ rithmicCredentials: rithmicCredentials,
1919
1933
  copyTrading: true, // Flag for copy trading mode
1920
1934
  followerSymbol: follower.symbol.value,
1921
1935
  followerContracts: follower.contracts
@@ -275,7 +275,13 @@ class HQXServerService {
275
275
  dailyTarget: config.dailyTarget,
276
276
  maxRisk: config.maxRisk,
277
277
  propfirm: config.propfirm,
278
- propfirmToken: config.propfirmToken
278
+ propfirmToken: config.propfirmToken,
279
+ // Rithmic credentials (for Apex, TopstepTrader Rithmic, etc.)
280
+ rithmicCredentials: config.rithmicCredentials || null,
281
+ // Copy trading mode
282
+ copyTrading: config.copyTrading || false,
283
+ followerSymbol: config.followerSymbol,
284
+ followerContracts: config.followerContracts
279
285
  });
280
286
  }
281
287
 
@@ -625,6 +625,26 @@ class RithmicService extends EventEmitter {
625
625
  return this.loginInfo ? 'connected' : null;
626
626
  }
627
627
 
628
+ /**
629
+ * Get propfirm name
630
+ */
631
+ getPropfirm() {
632
+ return this.propfirmKey || 'apex';
633
+ }
634
+
635
+ /**
636
+ * Get Rithmic credentials for HQX Server
637
+ */
638
+ getRithmicCredentials() {
639
+ if (!this.credentials) return null;
640
+ return {
641
+ userId: this.credentials.username,
642
+ password: this.credentials.password,
643
+ systemName: this.propfirm.systemName,
644
+ gateway: this.propfirm.gateway || 'wss://rprotocol.rithmic.com:443'
645
+ };
646
+ }
647
+
628
648
  /**
629
649
  * Search contracts (stub - would need TICKER_PLANT)
630
650
  */