hedgequantx 2.3.8 → 2.3.10

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.8",
3
+ "version": "2.3.10",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -88,8 +88,8 @@ const showAccounts = async (service) => {
88
88
  const acc1 = allAccounts[i];
89
89
  const acc2 = allAccounts[i + 1];
90
90
 
91
- const name1 = String(acc1.accountId || acc1.accountName || `Account #${i + 1}`);
92
- const name2 = acc2 ? String(acc2.accountId || acc2.accountName || `Account #${i + 2}`) : '';
91
+ const name1 = String(acc1.accountName || acc1.rithmicAccountId || acc1.accountId || `Account #${i + 1}`);
92
+ const name2 = acc2 ? String(acc2.accountName || acc2.rithmicAccountId || acc2.accountId || `Account #${i + 2}`) : '';
93
93
 
94
94
  draw2ColHeader(name1.substring(0, col1 - 4), name2 ? name2.substring(0, col2 - 4) : '', boxWidth);
95
95
 
@@ -168,7 +168,7 @@ const selectAccount = async (message, accounts, excludeIdx) => {
168
168
  const acc = x.a.account;
169
169
  const balance = acc.balance !== null ? ` ($${acc.balance.toLocaleString()})` : '';
170
170
  return {
171
- label: `${x.a.propfirm} - ${acc.rithmicAccountId || acc.name || acc.accountId}${balance}`,
171
+ label: `${x.a.propfirm} - ${acc.accountName || acc.rithmicAccountId || acc.name || acc.accountId}${balance}`,
172
172
  value: x.i,
173
173
  };
174
174
  });
@@ -47,11 +47,18 @@ const oneAccountMenu = async (service) => {
47
47
 
48
48
  spinner.succeed(`Found ${activeAccounts.length} active account(s)`);
49
49
 
50
- // Select account
51
- const options = activeAccounts.map(acc => ({
52
- label: `${acc.rithmicAccountId || acc.name || acc.accountId} (${acc.propfirm || 'Unknown'})${acc.balance !== null ? ` - $${acc.balance.toLocaleString()}` : ''}`,
53
- value: acc
54
- }));
50
+ // Select account - display RAW API fields
51
+ const options = activeAccounts.map(acc => {
52
+ // Use what API returns: accountName for ProjectX, rithmicAccountId for Rithmic
53
+ const name = acc.accountName || acc.rithmicAccountId || acc.accountId;
54
+ const balance = acc.balance !== null && acc.balance !== undefined
55
+ ? ` - $${acc.balance.toLocaleString()}`
56
+ : '';
57
+ return {
58
+ label: `${name} (${acc.propfirm || acc.platform || 'Unknown'})${balance}`,
59
+ value: acc
60
+ };
61
+ });
55
62
  options.push({ label: '< Back', value: 'back' });
56
63
 
57
64
  const selectedAccount = await prompts.selectOption('Select Account:', options);
@@ -72,7 +79,7 @@ const oneAccountMenu = async (service) => {
72
79
  };
73
80
 
74
81
  /**
75
- * Symbol selection - grouped by category with indices first
82
+ * Symbol selection - RAW API data only
76
83
  */
77
84
  const selectSymbol = async (service, account) => {
78
85
  const spinner = ora({ text: 'Loading symbols...', color: 'yellow' }).start();
@@ -83,34 +90,15 @@ const selectSymbol = async (service, account) => {
83
90
  return null;
84
91
  }
85
92
 
86
- // Contracts are already sorted by category from getContracts()
87
93
  const contracts = contractsResult.contracts;
88
-
89
94
  spinner.succeed(`Found ${contracts.length} contracts`);
90
95
 
91
- // Build options from RAW API response - no static data
92
- const options = [];
93
- let currentGroup = null;
94
-
95
- for (const c of contracts) {
96
- // Category header from API field contractGroup
97
- if (c.contractGroup !== currentGroup) {
98
- currentGroup = c.contractGroup;
99
- if (currentGroup) {
100
- options.push({
101
- label: chalk.cyan.bold(`── ${currentGroup} ──`),
102
- value: null,
103
- disabled: true
104
- });
105
- }
106
- }
107
-
108
- // Display using RAW API fields only
109
- const label = ` ${c.name} - ${c.description} (${c.exchange})`;
110
- options.push({ label, value: c });
111
- }
96
+ // Display EXACTLY what API returns - no modifications
97
+ const options = contracts.map(c => ({
98
+ label: `${c.name} - ${c.description}`,
99
+ value: c
100
+ }));
112
101
 
113
- options.push({ label: '', value: null, disabled: true }); // Spacer
114
102
  options.push({ label: chalk.gray('< Back'), value: 'back' });
115
103
 
116
104
  const contract = await prompts.selectOption(chalk.yellow('Select Symbol:'), options);
@@ -68,7 +68,7 @@ const showOrders = async (service) => {
68
68
  let allOrders = [];
69
69
 
70
70
  for (const account of allAccounts) {
71
- const accName = String(account.accountId || account.accountName || 'Unknown').substring(0, 20);
71
+ const accName = String(account.accountName || account.rithmicAccountId || account.accountId || 'Unknown').substring(0, 20);
72
72
  spinner = ora({ text: `Fetching orders for ${accName}...`, color: 'yellow' }).start();
73
73
 
74
74
  try {
@@ -77,7 +77,7 @@ const showOrders = async (service) => {
77
77
  result.orders.forEach(order => {
78
78
  allOrders.push({
79
79
  ...order,
80
- accountName: account.accountId,
80
+ accountName: account.accountName || account.rithmicAccountId || account.accountId,
81
81
  propfirm: account.propfirm
82
82
  });
83
83
  });
@@ -68,7 +68,7 @@ const showPositions = async (service) => {
68
68
  let allPositions = [];
69
69
 
70
70
  for (const account of allAccounts) {
71
- const accName = String(account.accountId || account.accountName || 'Unknown').substring(0, 20);
71
+ const accName = String(account.accountName || account.rithmicAccountId || account.accountId || 'Unknown').substring(0, 20);
72
72
  spinner = ora({ text: `Fetching positions for ${accName}...`, color: 'yellow' }).start();
73
73
 
74
74
  try {
@@ -77,7 +77,7 @@ const showPositions = async (service) => {
77
77
  result.positions.forEach(pos => {
78
78
  allPositions.push({
79
79
  ...pos,
80
- accountName: account.accountId,
80
+ accountName: account.accountName || account.rithmicAccountId || account.accountId,
81
81
  propfirm: account.propfirm
82
82
  });
83
83
  });