hedgequantx 2.7.13 → 2.7.14

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.13",
3
+ "version": "2.7.14",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -219,8 +219,8 @@ const selectSymbol = async (service) => {
219
219
  });
220
220
  }
221
221
 
222
- // Use RAW API fields: name (symbol), description (full name), exchange
223
- const label = ` ${c.name} - ${c.description} (${c.exchange})`;
222
+ // Use RAW API fields: symbol (trading symbol), name (product name), exchange
223
+ const label = ` ${c.symbol} - ${c.name} (${c.exchange})`;
224
224
  options.push({ label, value: c });
225
225
  }
226
226
 
@@ -101,12 +101,12 @@ const selectSymbol = async (service, account) => {
101
101
  const popularPrefixes = ['ES', 'NQ', 'MES', 'MNQ', 'M2K', 'RTY', 'YM', 'MYM', 'NKD', 'GC', 'SI', 'CL'];
102
102
 
103
103
  contracts.sort((a, b) => {
104
- const nameA = a.name || '';
105
- const nameB = b.name || '';
104
+ const baseA = a.baseSymbol || a.symbol || '';
105
+ const baseB = b.baseSymbol || b.symbol || '';
106
106
 
107
- // Check if names start with popular prefixes
108
- const idxA = popularPrefixes.findIndex(p => nameA.startsWith(p));
109
- const idxB = popularPrefixes.findIndex(p => nameB.startsWith(p));
107
+ // Check if baseSymbol matches popular prefixes
108
+ const idxA = popularPrefixes.findIndex(p => baseA === p || baseA.startsWith(p));
109
+ const idxB = popularPrefixes.findIndex(p => baseB === p || baseB.startsWith(p));
110
110
 
111
111
  // Both are popular - sort by popularity order
112
112
  if (idxA !== -1 && idxB !== -1) return idxA - idxB;
@@ -114,15 +114,15 @@ const selectSymbol = async (service, account) => {
114
114
  if (idxA !== -1) return -1;
115
115
  // Only B is popular - B first
116
116
  if (idxB !== -1) return 1;
117
- // Neither - alphabetical
118
- return nameA.localeCompare(nameB);
117
+ // Neither - alphabetical by baseSymbol
118
+ return baseA.localeCompare(baseB);
119
119
  });
120
120
 
121
121
  spinner.succeed(`Found ${contracts.length} contracts`);
122
122
 
123
- // Display sorted contracts from API
123
+ // Display sorted contracts from API: symbol - name (exchange)
124
124
  const options = contracts.map(c => ({
125
- label: `${c.name} - ${c.description}`,
125
+ label: `${c.symbol} - ${c.name} (${c.exchange})`,
126
126
  value: c
127
127
  }));
128
128