hedgequantx 2.3.7 → 2.3.8

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/dist/lib/api.jsc CHANGED
Binary file
package/dist/lib/api2.jsc CHANGED
Binary file
package/dist/lib/core.jsc CHANGED
Binary file
Binary file
package/dist/lib/data.jsc CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/lib/n/r1.jsc CHANGED
Binary file
package/dist/lib/n/r2.jsc CHANGED
Binary file
package/dist/lib/n/r3.jsc CHANGED
Binary file
package/dist/lib/n/r4.jsc CHANGED
Binary file
package/dist/lib/n/r5.jsc CHANGED
Binary file
package/dist/lib/n/r6.jsc CHANGED
Binary file
package/dist/lib/n/r7.jsc CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -449,8 +449,21 @@ const showStats = async (service) => {
449
449
  };
450
450
 
451
451
  if (allTrades.length > 0) {
452
- const header = ' Time | Symbol | Price | P&L | Side ';
453
- console.log(chalk.cyan('\u2551') + chalk.white(header.padEnd(innerWidth)) + chalk.cyan('\u2551'));
452
+ // Calculate column widths to fill the entire row
453
+ // Fixed columns: Time(10), Symbol(12), Price(12), P&L(12), Side(6) = 52 + separators(4*3=12) + padding(2) = 66
454
+ // Remaining space goes to Account column
455
+ const colTime = 10;
456
+ const colSymbol = 12;
457
+ const colPrice = 12;
458
+ const colPnl = 12;
459
+ const colSide = 6;
460
+ const separators = 15; // 5 separators " | " = 5*3
461
+ const fixedWidth = colTime + colSymbol + colPrice + colPnl + colSide + separators;
462
+ const colAccount = Math.max(10, innerWidth - fixedWidth);
463
+
464
+ // Header
465
+ const header = ` ${'Time'.padEnd(colTime)}| ${'Symbol'.padEnd(colSymbol)}| ${'Price'.padEnd(colPrice)}| ${'P&L'.padEnd(colPnl)}| ${'Side'.padEnd(colSide)}| ${'Account'.padEnd(colAccount - 2)}`;
466
+ console.log(chalk.cyan('\u2551') + chalk.white(header) + chalk.cyan('\u2551'));
454
467
  console.log(chalk.cyan('\u2551') + chalk.gray('\u2500'.repeat(innerWidth)) + chalk.cyan('\u2551'));
455
468
 
456
469
  const recentTrades = allTrades.slice(-10).reverse();
@@ -462,22 +475,28 @@ const showStats = async (service) => {
462
475
  const price = (trade.price || 0).toFixed(2);
463
476
  const pnl = trade.profitAndLoss || trade.pnl || 0;
464
477
  const pnlText = pnl >= 0 ? `+$${pnl.toFixed(0)}` : `-$${Math.abs(pnl).toFixed(0)}`;
465
- const pnlColored = pnl >= 0 ? chalk.green(pnlText.padEnd(10)) : chalk.red(pnlText.padEnd(10));
466
478
  const side = trade.side === 0 ? 'BUY' : trade.side === 1 ? 'SELL' : 'N/A';
467
- const sideColored = trade.side === 0 ? chalk.green(side.padEnd(6)) : chalk.red(side.padEnd(6));
479
+ const accountName = (trade.accountName || 'N/A').substring(0, colAccount - 3);
468
480
 
469
- const row = ` ${time.padEnd(9)} | ${symbol.padEnd(9)} | ${price.padEnd(10)} | ${pnlText.padEnd(10)} | ${side.padEnd(6)}`;
470
- const coloredRow = ` ${time.padEnd(9)} | ${symbol.padEnd(9)} | ${price.padEnd(10)} | ${pnlColored} | ${sideColored}`;
481
+ // Build row with exact widths
482
+ const timeStr = time.padEnd(colTime);
483
+ const symbolStr = symbol.padEnd(colSymbol);
484
+ const priceStr = price.padEnd(colPrice);
485
+ const pnlStr = pnlText.padEnd(colPnl);
486
+ const sideStr = side.padEnd(colSide);
487
+ const accountStr = accountName.padEnd(colAccount - 2);
471
488
 
472
- const visLen = row.length;
473
- const padding = Math.max(0, innerWidth - visLen);
489
+ // Colored versions
490
+ const pnlColored = pnl >= 0 ? chalk.green(pnlStr) : chalk.red(pnlStr);
491
+ const sideColored = trade.side === 0 ? chalk.green(sideStr) : chalk.red(sideStr);
474
492
 
475
- console.log(chalk.cyan('\u2551') + coloredRow + ' '.repeat(padding) + chalk.cyan('\u2551'));
493
+ const row = ` ${timeStr}| ${symbolStr}| ${priceStr}| ${pnlColored}| ${sideColored}| ${accountStr}`;
494
+ console.log(chalk.cyan('\u2551') + row + chalk.cyan('\u2551'));
476
495
  }
477
496
 
478
497
  if (allTrades.length > 10) {
479
498
  const moreMsg = ` ... and ${allTrades.length - 10} more trades`;
480
- console.log(chalk.cyan('\u2551') + chalk.gray(moreMsg.padEnd(innerWidth)) + chalk.cyan('\u2551'));
499
+ console.log(chalk.cyan('\u2551') + moreMsg.padEnd(innerWidth) + chalk.cyan('\u2551'));
481
500
  }
482
501
  } else {
483
502
  const msg = connectionTypes.rithmic > 0