hedgequantx 2.7.94 → 2.7.95

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.94",
3
+ "version": "2.7.95",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -130,12 +130,11 @@ const showAccounts = async (service) => {
130
130
  const pnlColor2 = pnl2 === null || pnl2 === undefined ? chalk.gray : (pnl2 >= 0 ? chalk.green : chalk.red);
131
131
  console.log(chalk.cyan('║') + fmtRow('P&L:', pnlColor1(pnlStr1), col1) + chalk.cyan(sep) + (acc2 ? fmtRow('P&L:', pnlColor2(pnlStr2), col2) : ' '.repeat(col2)) + chalk.cyan('║'));
132
132
 
133
- // Status - numeric 0 = Active for Rithmic
133
+ // Status - from API only, N/A if not available
134
134
  const getStatusDisplay = (status) => {
135
- if (status === null || status === undefined) return { text: '--', color: 'gray' };
136
- if (status === 0) return { text: 'Active', color: 'green' };
135
+ if (status === null || status === undefined) return { text: 'N/A', color: 'gray' };
137
136
  if (typeof status === 'number') {
138
- return ACCOUNT_STATUS[status] || { text: `Status ${status}`, color: 'yellow' };
137
+ return ACCOUNT_STATUS[status] || { text: String(status), color: 'yellow' };
139
138
  }
140
139
  if (typeof status === 'string') {
141
140
  const lowerStatus = status.toLowerCase();
@@ -144,16 +143,16 @@ const showAccounts = async (service) => {
144
143
  if (lowerStatus.includes('halt')) return { text: status, color: 'red' };
145
144
  return { text: status, color: 'yellow' };
146
145
  }
147
- return { text: '--', color: 'gray' };
146
+ return { text: 'N/A', color: 'gray' };
148
147
  };
149
148
  const status1 = getStatusDisplay(acc1.status);
150
149
  const status2 = acc2 ? getStatusDisplay(acc2.status) : null;
151
150
  console.log(chalk.cyan('║') + fmtRow('Status:', chalk[status1.color](status1.text), col1) + chalk.cyan(sep) + (acc2 ? fmtRow('Status:', chalk[status2.color](status2.text), col2) : ' '.repeat(col2)) + chalk.cyan('║'));
152
151
 
153
- // Type - from accountType or algorithm field
152
+ // Type - from API only (algorithm or accountType field), N/A if not available
154
153
  const getTypeDisplay = (acc) => {
155
154
  const value = acc.algorithm || acc.accountType || acc.type;
156
- if (value === null || value === undefined) return { text: 'Live', color: 'green' }; // Default for Rithmic
155
+ if (value === null || value === undefined) return { text: 'N/A', color: 'gray' };
157
156
  if (typeof value === 'string') {
158
157
  const lowerValue = value.toLowerCase();
159
158
  if (lowerValue.includes('eval')) return { text: value, color: 'yellow' };
@@ -163,9 +162,9 @@ const showAccounts = async (service) => {
163
162
  return { text: value, color: 'cyan' };
164
163
  }
165
164
  if (typeof value === 'number') {
166
- return ACCOUNT_TYPE[value] || { text: `Type ${value}`, color: 'white' };
165
+ return ACCOUNT_TYPE[value] || { text: String(value), color: 'white' };
167
166
  }
168
- return { text: 'Live', color: 'green' };
167
+ return { text: 'N/A', color: 'gray' };
169
168
  };
170
169
  const type1 = getTypeDisplay(acc1);
171
170
  const type2 = acc2 ? getTypeDisplay(acc2) : null;