hedgequantx 2.7.40 → 2.7.41

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": "2.7.40",
3
+ "version": "2.7.41",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/app.js CHANGED
@@ -185,9 +185,10 @@ const run = async () => {
185
185
  while (true) {
186
186
  try {
187
187
  prepareStdin();
188
- await banner();
189
188
 
190
189
  if (!connections.isConnected()) {
190
+ // Not connected - show banner + propfirm selection
191
+ await banner();
191
192
  // Not connected - show propfirm selection directly
192
193
  const boxWidth = getLogoWidth();
193
194
  const innerWidth = boxWidth - 2;
@@ -202,8 +203,8 @@ const run = async () => {
202
203
  const totalContentWidth = numCols * colWidth;
203
204
  const leftMargin = Math.max(2, Math.floor((innerWidth - totalContentWidth) / 2));
204
205
 
205
- // Continue from banner (connected rectangle)
206
- console.log(chalk.cyan('' + '═'.repeat(innerWidth) + ''));
206
+ // New rectangle (banner is always closed)
207
+ console.log(chalk.cyan('' + '═'.repeat(innerWidth) + ''));
207
208
  console.log(chalk.cyan('║') + chalk.white.bold(centerText('SELECT PROPFIRM', innerWidth)) + chalk.cyan('║'));
208
209
  console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
209
210
 
@@ -255,26 +256,26 @@ const run = async () => {
255
256
  const credentials = await loginPrompt(selectedPropfirm.name);
256
257
 
257
258
  if (credentials) {
258
- const spinner = ora({ text: 'Connecting to Rithmic...', color: 'yellow' }).start();
259
+ const spinner = ora({ text: 'CONNECTING TO RITHMIC...', color: 'yellow' }).start();
259
260
  try {
260
261
  const { RithmicService } = require('./services/rithmic');
261
262
  const service = new RithmicService(selectedPropfirm.key);
262
263
  const result = await service.login(credentials.username, credentials.password);
263
264
 
264
265
  if (result.success) {
265
- spinner.text = 'Fetching accounts...';
266
+ spinner.text = 'FETCHING ACCOUNTS...';
266
267
  const accResult = await service.getTradingAccounts();
267
268
  connections.add('rithmic', service, service.propfirm.name);
268
- spinner.succeed(`Connected to ${service.propfirm.name} (${accResult.accounts?.length || 0} accounts)`);
269
+ spinner.succeed(`CONNECTED TO ${service.propfirm.name.toUpperCase()} (${accResult.accounts?.length || 0} ACCOUNTS)`);
269
270
  currentService = service;
270
271
  await refreshStats();
271
272
  await new Promise(r => setTimeout(r, 1500));
272
273
  } else {
273
- spinner.fail(result.error || 'Authentication failed');
274
+ spinner.fail((result.error || 'AUTHENTICATION FAILED').toUpperCase());
274
275
  await new Promise(r => setTimeout(r, 2000));
275
276
  }
276
277
  } catch (error) {
277
- spinner.fail(`Connection error: ${error.message}`);
278
+ spinner.fail(`CONNECTION ERROR: ${error.message.toUpperCase()}`);
278
279
  await new Promise(r => setTimeout(r, 2000));
279
280
  }
280
281
  }
@@ -307,7 +308,7 @@ const run = async () => {
307
308
  try {
308
309
  await algoTradingMenu(currentService);
309
310
  } catch (err) {
310
- console.log(chalk.red(` Algo error: ${err.message}`));
311
+ console.log(chalk.red(` ALGO ERROR: ${err.message.toUpperCase()}`));
311
312
  prepareStdin();
312
313
  }
313
314
  break;
@@ -7,7 +7,7 @@ const ora = require('ora');
7
7
  const { execSync, spawn } = require('child_process');
8
8
 
9
9
  const { connections } = require('../services');
10
- const { getLogoWidth, centerText, prepareStdin } = require('../ui');
10
+ const { getLogoWidth, centerText, prepareStdin, displayBanner } = require('../ui');
11
11
  const { getCachedStats } = require('../services/stats-cache');
12
12
  const { prompts } = require('../utils');
13
13
 
@@ -17,6 +17,10 @@ const { prompts } = require('../utils');
17
17
  const dashboardMenu = async (service) => {
18
18
  prepareStdin();
19
19
 
20
+ // Clear screen and show banner (always closed)
21
+ console.clear();
22
+ displayBanner();
23
+
20
24
  const boxWidth = getLogoWidth();
21
25
  const W = boxWidth - 2;
22
26