hedgequantx 1.8.27 → 1.8.28

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.8.27",
3
+ "version": "1.8.28",
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": {
@@ -17,37 +17,43 @@ const { copyTradingMenu } = require('./copy-trading');
17
17
  const algoTradingMenu = async (service) => {
18
18
  log.info('Algo Trading menu opened');
19
19
 
20
- console.log();
21
- console.log(chalk.gray(getSeparator()));
22
- console.log(chalk.yellow.bold(' Algo-Trading'));
23
- console.log(chalk.gray(getSeparator()));
24
- console.log();
25
-
26
- const action = await prompts.selectOption(chalk.yellow('Select Mode:'), [
27
- { value: 'one_account', label: 'One Account' },
28
- { value: 'copy_trading', label: 'Copy Trading' },
29
- { value: 'back', label: '< Back' }
30
- ]);
31
-
32
- if (!action || action === 'back') {
33
- log.debug('User went back');
20
+ try {
21
+ console.log();
22
+ console.log(chalk.gray(getSeparator()));
23
+ console.log(chalk.yellow.bold(' Algo-Trading'));
24
+ console.log(chalk.gray(getSeparator()));
25
+ console.log();
26
+
27
+ const action = await prompts.selectOption(chalk.yellow('Select Mode:'), [
28
+ { value: 'one_account', label: 'One Account' },
29
+ { value: 'copy_trading', label: 'Copy Trading' },
30
+ { value: 'back', label: '< Back' }
31
+ ]);
32
+
33
+ log.debug('Algo mode selected', { action });
34
+
35
+ if (!action || action === 'back') {
36
+ return 'back';
37
+ }
38
+
39
+ switch (action) {
40
+ case 'one_account':
41
+ log.info('Starting One Account mode');
42
+ await oneAccountMenu(service);
43
+ break;
44
+ case 'copy_trading':
45
+ log.info('Starting Copy Trading mode');
46
+ await copyTradingMenu();
47
+ break;
48
+ }
49
+
50
+ return action;
51
+ } catch (err) {
52
+ log.error('Algo menu error:', err.message);
53
+ console.log(chalk.red(` Error: ${err.message}`));
54
+ await prompts.waitForEnter();
34
55
  return 'back';
35
56
  }
36
-
37
- log.debug('Algo mode selected', { action });
38
-
39
- switch (action) {
40
- case 'one_account':
41
- log.info('Starting One Account mode');
42
- await oneAccountMenu(service);
43
- break;
44
- case 'copy_trading':
45
- log.info('Starting Copy Trading mode');
46
- await copyTradingMenu();
47
- break;
48
- }
49
-
50
- return action;
51
57
  };
52
58
 
53
59
  module.exports = { algoTradingMenu };