hedgequantx 1.2.42 → 1.2.43

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/app.js +16 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.42",
3
+ "version": "1.2.43",
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
@@ -359,19 +359,24 @@ const rithmicMenu = async () => {
359
359
 
360
360
  if (result.success) {
361
361
  spinner.text = 'Fetching accounts...';
362
- await service.getTradingAccounts();
362
+ const accResult = await service.getTradingAccounts();
363
363
 
364
364
  connections.add('rithmic', service, service.propfirm.name);
365
365
  currentService = service;
366
366
  currentPlatform = 'rithmic';
367
- spinner.succeed(`Connected to ${service.propfirm.name}`);
367
+ spinner.succeed(`Connected to ${service.propfirm.name} (${accResult.accounts?.length || 0} accounts)`);
368
+
369
+ // Small pause to see the success message
370
+ await new Promise(r => setTimeout(r, 1500));
368
371
  return service;
369
372
  } else {
370
373
  spinner.fail(result.error || 'Authentication failed');
374
+ await new Promise(r => setTimeout(r, 2000));
371
375
  return null;
372
376
  }
373
377
  } catch (error) {
374
- spinner.fail(error.message);
378
+ spinner.fail(`Connection error: ${error.message}`);
379
+ await new Promise(r => setTimeout(r, 2000));
375
380
  return null;
376
381
  }
377
382
  };
@@ -583,10 +588,14 @@ const dashboardMenu = async (service) => {
583
588
  console.log(chalk.cyan('║') + chalk.white.bold(centerText('DASHBOARD', innerWidth)) + chalk.cyan('║'));
584
589
  console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
585
590
 
586
- // Connection info
587
- const connInfo = chalk.green('Connected to ' + service.propfirm.name);
588
- const connLen = ('Connected to ' + service.propfirm.name).length;
589
- console.log(chalk.cyan('║') + ' ' + connInfo + ' '.repeat(innerWidth - connLen - 2) + chalk.cyan(''));
591
+ // Connection info - show all active connections
592
+ const allConns = connections.getAll();
593
+ if (allConns.length > 0) {
594
+ const connNames = allConns.map(c => c.propfirm || c.type).join(', ');
595
+ const connText = `Connected to ${connNames}`;
596
+ const connInfo = chalk.green(connText);
597
+ console.log(chalk.cyan('║') + ' ' + connInfo + ' '.repeat(Math.max(0, innerWidth - connText.length - 2)) + chalk.cyan('║'));
598
+ }
590
599
 
591
600
  if (user) {
592
601
  const userInfo = 'Welcome, ' + user.userName.toUpperCase() + '!';