hedgequantx 1.2.115 → 1.2.116

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/pages/algo.js +17 -80
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.115",
3
+ "version": "1.2.116",
4
4
  "description": "Prop Futures Algo Trading CLI - Connect to Topstep, Alpha Futures, and other prop firms",
5
5
  "main": "src/app.js",
6
6
  "bin": {
package/src/pages/algo.js CHANGED
@@ -207,80 +207,22 @@ const selectSymbolMenu = async (service, account) => {
207
207
  }
208
208
  }
209
209
  } catch (e) {
210
- // Fallback to static list
211
- }
212
-
213
- for (const micro of microContracts) {
214
- const hasMicro = availableSymbols.some(s =>
215
- (s.symbol && s.symbol.toUpperCase().startsWith(micro.symbol)) ||
216
- (s.name && s.name.toUpperCase().includes(micro.symbol))
217
- );
218
- if (!hasMicro) {
219
- // Add micro contract with front month
220
- availableSymbols.push({
221
- id: `${micro.symbol}${currentMonthCode}${yearCode}`,
222
- name: `${micro.symbol}${currentMonthCode}${yearCode}`,
223
- symbol: `${micro.symbol}${currentMonthCode}${yearCode}`,
224
- description: micro.name,
225
- exchange: 'CME'
226
- });
227
- }
210
+ spinner.fail('Failed to load symbols from API: ' + e.message);
211
+ return;
228
212
  }
229
213
 
230
- // If no symbols found from API, use static list
214
+ // Only use REAL data from API - no mock/static data
231
215
  if (availableSymbols.length === 0) {
232
- spinner.warn('Using default symbol list');
233
- availableSymbols = FUTURES_SYMBOLS.map(s => ({
234
- id: s.value,
235
- name: s.name,
236
- symbol: s.value,
237
- searchText: s.searchText
238
- }));
239
- } else {
240
- spinner.succeed(`Found ${availableSymbols.length} available contracts`);
216
+ spinner.fail('No contracts available from API');
217
+ console.log(chalk.red(' Please check your connection and try again'));
218
+ return;
241
219
  }
242
220
 
243
- console.log();
221
+ spinner.succeed(`Found ${availableSymbols.length} available contracts`);
244
222
 
245
- // Symbol name descriptions
246
- const symbolDescriptions = {
247
- 'NQ': 'E-mini NASDAQ-100',
248
- 'MNQ': 'Micro E-mini NASDAQ-100',
249
- 'ES': 'E-mini S&P 500',
250
- 'MES': 'Micro E-mini S&P 500',
251
- 'YM': 'E-mini Dow Jones',
252
- 'MYM': 'Micro E-mini Dow Jones',
253
- 'RTY': 'E-mini Russell 2000',
254
- 'M2K': 'Micro E-mini Russell 2000',
255
- 'CL': 'Crude Oil WTI',
256
- 'MCL': 'Micro Crude Oil',
257
- 'NG': 'Natural Gas',
258
- 'QG': 'E-mini Natural Gas',
259
- 'QM': 'E-mini Crude Oil',
260
- 'GC': 'Gold',
261
- 'MGC': 'Micro Gold',
262
- 'SI': 'Silver',
263
- 'SIL': 'Micro Silver',
264
- 'HG': 'Copper',
265
- 'PL': 'Platinum',
266
- '6E': 'Euro FX',
267
- 'M6E': 'Micro Euro FX',
268
- '6B': 'British Pound',
269
- '6J': 'Japanese Yen',
270
- '6A': 'Australian Dollar',
271
- '6C': 'Canadian Dollar',
272
- '6M': 'Mexican Peso',
273
- '6S': 'Swiss Franc',
274
- 'ZB': '30-Year T-Bond',
275
- 'ZN': '10-Year T-Note',
276
- 'ZF': '5-Year T-Note',
277
- 'ZT': '2-Year T-Note',
278
- 'ZC': 'Corn',
279
- 'ZS': 'Soybeans',
280
- 'ZW': 'Wheat'
281
- };
223
+ console.log();
282
224
 
283
- // Format symbols for display - show ALL contracts from API
225
+ // Format symbols for display - show ALL contracts from API (REAL DATA ONLY)
284
226
  const seenIds = new Set();
285
227
  const symbolChoices = [];
286
228
 
@@ -290,26 +232,21 @@ const selectSymbolMenu = async (service, account) => {
290
232
  if (seenIds.has(contractId)) continue;
291
233
  seenIds.add(contractId);
292
234
 
293
- // Get the symbol code - API returns 'name' field with code like "NQH6"
235
+ // Get the symbol code from API - 'name' field contains code like "NQH6"
294
236
  const symbolCode = contract.name || contract.symbol || '';
295
237
  if (!symbolCode) continue;
296
238
 
297
- // Get description from API or our mapping
298
- let description = '';
299
- if (contract.description) {
300
- // API format: "E-mini NASDAQ-100: March 2026" -> extract instrument name
301
- description = contract.description.split(':')[0].trim();
239
+ // Get description from API ONLY
240
+ let description = contract.description || '';
241
+ if (description.includes(':')) {
242
+ // API format: "E-mini NASDAQ-100: March 2026" -> keep full description
243
+ description = description.trim();
302
244
  }
303
-
304
- // Fallback to our symbol descriptions
305
245
  if (!description) {
306
- // Extract base symbol (NQ from NQH6)
307
- const baseMatch = symbolCode.match(/^([A-Z0-9]{1,4})[FGHJKMNQUVXZ]\d{1,2}$/i);
308
- const baseSymbol = baseMatch ? baseMatch[1] : symbolCode;
309
- description = symbolDescriptions[baseSymbol] || symbolCode;
246
+ description = symbolCode; // Fallback to symbol code if no description
310
247
  }
311
248
 
312
- // Format: "NQH6 E-mini NASDAQ-100"
249
+ // Format: "NQH6 E-mini NASDAQ-100: March 2026"
313
250
  symbolChoices.push({
314
251
  name: chalk.yellow(symbolCode.padEnd(12)) + chalk.white(description),
315
252
  value: contract