hedgequantx 1.2.132 → 1.2.133

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/pages/algo.js +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.132",
3
+ "version": "1.2.133",
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
@@ -1880,13 +1880,23 @@ const launchCopyTrading = async (config) => {
1880
1880
  });
1881
1881
 
1882
1882
  hqxServer.on('error', (data) => {
1883
- addLog('error', data.message || 'Unknown error');
1883
+ const errorMsg = data.message || 'Unknown error';
1884
+ addLog('error', errorMsg);
1885
+
1886
+ // If algo failed to start, switch to monitor mode
1887
+ if (errorMsg.includes('Failed to start') || errorMsg.includes('WebSocket failed') || errorMsg.includes('Échec')) {
1888
+ if (hqxConnected) {
1889
+ hqxConnected = false;
1890
+ addLog('warning', 'Switching to Monitor Mode (watching Lead positions)');
1891
+ displayUI();
1892
+ }
1893
+ }
1884
1894
  });
1885
1895
 
1886
1896
  hqxServer.on('disconnected', () => {
1887
1897
  hqxConnected = false;
1888
1898
  if (!stopReason) {
1889
- addLog('error', 'HQX Server disconnected');
1899
+ addLog('warning', 'HQX Server disconnected - Switching to Monitor Mode');
1890
1900
  }
1891
1901
  });
1892
1902