hedgequantx 1.2.100 → 1.2.102

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 +34 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "1.2.100",
3
+ "version": "1.2.102",
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
@@ -159,25 +159,47 @@ const selectSymbolMenu = async (service, account) => {
159
159
 
160
160
  let availableSymbols = [];
161
161
 
162
- // Search for common symbols to get available contracts
163
- const commonSearches = ['NQ', 'ES', 'YM', 'RTY', 'CL', 'GC', 'SI', '6E', 'ZB', 'NG'];
162
+ // Search for common symbols to get available contracts (including micros)
163
+ const commonSearches = [
164
+ 'NQ', 'MNQ', // NASDAQ
165
+ 'ES', 'MES', // S&P 500
166
+ 'YM', 'MYM', // Dow Jones
167
+ 'RTY', 'M2K', // Russell 2000
168
+ 'CL', 'MCL', 'QM', // Crude Oil
169
+ 'GC', 'MGC', // Gold
170
+ 'SI', 'SIL', // Silver
171
+ '6E', 'M6E', // Euro FX
172
+ '6B', '6J', '6A', '6C', // Other currencies
173
+ 'ZB', 'ZN', 'ZF', 'ZT', // Treasuries
174
+ 'NG', 'QG', // Natural Gas
175
+ 'HG', 'PL' // Copper, Platinum
176
+ ];
164
177
 
165
178
  try {
166
179
  for (const search of commonSearches) {
167
180
  const result = await service.searchContracts(search, false);
168
181
  if (result.success && result.contracts && result.contracts.length > 0) {
169
182
  for (const contract of result.contracts) {
170
- // Only add active/front-month contracts
171
- if (contract.activeContract || contract.name) {
172
- const existing = availableSymbols.find(s => s.id === contract.id);
183
+ // Only add contracts that have valid data
184
+ if (contract.id || contract.contractId || contract.name) {
185
+ const contractId = contract.id || contract.contractId;
186
+ const existing = availableSymbols.find(s => s.id === contractId);
173
187
  if (!existing) {
188
+ // Extract symbol from name if not provided (e.g., "NQH6" from "CON.F.US.ENQ.H26")
189
+ let symbolCode = contract.symbol || search;
190
+ if (contract.name && contract.name.includes(' ')) {
191
+ // Try to extract from name like "E-mini NASDAQ-100 Mar 2026"
192
+ symbolCode = search;
193
+ }
194
+
174
195
  availableSymbols.push({
175
- id: contract.id || contract.contractId,
176
- name: contract.name || contract.symbol,
177
- symbol: contract.symbol || search,
196
+ id: contractId,
197
+ name: contract.name || contract.symbol || search,
198
+ symbol: symbolCode,
178
199
  tickSize: contract.tickSize,
179
200
  tickValue: contract.tickValue,
180
- exchange: contract.exchange || 'CME'
201
+ exchange: contract.exchange || 'CME',
202
+ activeContract: contract.activeContract || false
181
203
  });
182
204
  }
183
205
  }
@@ -449,7 +471,7 @@ const launchAlgo = async (service, account, contract, numContracts, dailyTarget,
449
471
 
450
472
  // Logs buffer - newest first display, show many logs
451
473
  const logs = [];
452
- const MAX_LOGS = 30;
474
+ const MAX_LOGS = 50;
453
475
 
454
476
  // Log colors
455
477
  const typeColors = {
@@ -654,8 +676,8 @@ const launchAlgo = async (service, account, contract, numContracts, dailyTarget,
654
676
  console.log(chalk.cyan(V) + chalk.white(actLeft) + dateSection + chalk.yellow(actRight) + chalk.cyan(V));
655
677
  console.log(chalk.cyan(BOT));
656
678
 
657
- // Logs (without borders) - newest first, fixed number of lines
658
- const MAX_VISIBLE_LOGS = 15;
679
+ // Logs (without borders) - newest first, show more logs
680
+ const MAX_VISIBLE_LOGS = 25;
659
681
  console.log();
660
682
 
661
683
  if (logs.length === 0) {