hedgequantx 1.8.36 → 1.8.38

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.36",
3
+ "version": "1.8.38",
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
@@ -245,7 +245,12 @@ const run = async () => {
245
245
  }
246
246
  break;
247
247
  case 'algotrading':
248
- await algoTradingMenu(currentService);
248
+ try {
249
+ await algoTradingMenu(currentService);
250
+ } catch (algoErr) {
251
+ console.log(chalk.red(` Algo error: ${algoErr.message}`));
252
+ prepareStdin();
253
+ }
249
254
  break;
250
255
  case 'update':
251
256
  await handleUpdate();
@@ -24,7 +24,7 @@ const getReadline = () => {
24
24
  };
25
25
 
26
26
  /**
27
- * Ensure stdin is ready
27
+ * Ensure stdin is ready and flush any buffered input
28
28
  */
29
29
  const prepareStdin = () => {
30
30
  try {
@@ -32,6 +32,8 @@ const prepareStdin = () => {
32
32
  if (process.stdin.isTTY && process.stdin.setRawMode) {
33
33
  process.stdin.setRawMode(false);
34
34
  }
35
+ // Flush any buffered input by reading without waiting
36
+ process.stdin.read();
35
37
  } catch (e) {}
36
38
  };
37
39