hedgequantx 1.2.126 → 1.2.128

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.126",
3
+ "version": "1.2.128",
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/app.js CHANGED
@@ -709,13 +709,20 @@ const handleUpdate = async () => {
709
709
  console.log();
710
710
  console.log(chalk.green(` ✓ Updated: v${currentVersion} -> v${latestVersion}`));
711
711
  console.log();
712
- console.log(chalk.cyan(' Restarting HQX...'));
712
+ console.log(chalk.cyan(' Restarting HedgeQuantX CLI...'));
713
713
  console.log();
714
714
 
715
715
  // Small delay so user can see the message
716
716
  await new Promise(resolve => setTimeout(resolve, 1500));
717
717
 
718
- // Exit so user can restart
718
+ // Restart the CLI automatically
719
+ const { spawn } = require('child_process');
720
+ const child = spawn('hedgequantx', [], {
721
+ stdio: 'inherit',
722
+ detached: true,
723
+ shell: true
724
+ });
725
+ child.unref();
719
726
  process.exit(0);
720
727
 
721
728
  } catch (error) {
@@ -7,6 +7,7 @@ const RITHMIC_ENDPOINTS = {
7
7
  TEST: 'wss://rituz00100.rithmic.com:443',
8
8
  PAPER: 'wss://ritpa11120.11.rithmic.com:443',
9
9
  LIVE: 'wss://ritpz01000.01.rithmic.com:443',
10
+ APEX: 'wss://ritpz01000.01.rithmic.com:443', // Apex uses live server
10
11
  };
11
12
 
12
13
  // System names for PropFirms
@@ -57,8 +57,14 @@ class RithmicService extends EventEmitter {
57
57
  // Connect to ORDER_PLANT
58
58
  this.orderConn = new RithmicConnection();
59
59
 
60
+ // Determine endpoint based on propfirm
61
+ let endpoint = RITHMIC_ENDPOINTS.PAPER;
62
+ if (this.propfirmKey === 'apex' || this.propfirmKey === 'apex_rithmic') {
63
+ endpoint = RITHMIC_ENDPOINTS.LIVE; // Apex uses live server
64
+ }
65
+
60
66
  const config = {
61
- uri: RITHMIC_ENDPOINTS.PAPER,
67
+ uri: endpoint,
62
68
  systemName: this.propfirm.systemName,
63
69
  userId: username,
64
70
  password: password,
@@ -139,8 +145,14 @@ class RithmicService extends EventEmitter {
139
145
  try {
140
146
  this.pnlConn = new RithmicConnection();
141
147
 
148
+ // Determine endpoint based on propfirm
149
+ let endpoint = RITHMIC_ENDPOINTS.PAPER;
150
+ if (this.propfirmKey === 'apex' || this.propfirmKey === 'apex_rithmic') {
151
+ endpoint = RITHMIC_ENDPOINTS.LIVE; // Apex uses live server
152
+ }
153
+
142
154
  const config = {
143
- uri: RITHMIC_ENDPOINTS.PAPER,
155
+ uri: endpoint,
144
156
  systemName: this.propfirm.systemName,
145
157
  userId: username,
146
158
  password: password,