hedgequantx 1.8.3 → 1.8.5

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": "1.8.3",
3
+ "version": "1.8.5",
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": {
@@ -216,17 +216,16 @@ class RithmicService extends EventEmitter {
216
216
  * For now, returns common futures contracts that are available on Rithmic
217
217
  */
218
218
  async getContracts() {
219
- // These are the standard Rithmic contract symbols
220
- // In production, this should connect to TICKER_PLANT
219
+ // Standard futures contracts - same list as ProjectX for consistency
221
220
  const contracts = [
222
221
  { symbol: 'ESH5', name: 'E-mini S&P 500 (Mar 25)', exchange: 'CME' },
223
222
  { symbol: 'NQH5', name: 'E-mini NASDAQ-100 (Mar 25)', exchange: 'CME' },
224
223
  { symbol: 'MESH5', name: 'Micro E-mini S&P 500 (Mar 25)', exchange: 'CME' },
225
224
  { symbol: 'MNQH5', name: 'Micro E-mini NASDAQ-100 (Mar 25)', exchange: 'CME' },
226
- { symbol: 'RTYH5', name: 'E-mini Russell 2000 (Mar 25)', exchange: 'CME' },
227
- { symbol: 'YMH5', name: 'E-mini Dow Jones (Mar 25)', exchange: 'CBOT' },
228
225
  { symbol: 'CLG5', name: 'Crude Oil (Feb 25)', exchange: 'NYMEX' },
229
226
  { symbol: 'GCG5', name: 'Gold (Feb 25)', exchange: 'COMEX' },
227
+ { symbol: 'RTYH5', name: 'E-mini Russell 2000 (Mar 25)', exchange: 'CME' },
228
+ { symbol: 'YMH5', name: 'E-mini Dow Jones (Mar 25)', exchange: 'CBOT' },
230
229
  { symbol: 'SIH5', name: 'Silver (Mar 25)', exchange: 'COMEX' },
231
230
  { symbol: 'NGG5', name: 'Natural Gas (Feb 25)', exchange: 'NYMEX' },
232
231
  ];
@@ -91,36 +91,27 @@ const numberInput = async (message, defaultVal = 1, min = 1, max = 1000) => {
91
91
  };
92
92
 
93
93
  /**
94
- * Select - display options and text input, map to value
94
+ * Select - arrow keys navigation
95
95
  */
96
96
  const selectOption = async (message, options) => {
97
97
  prepareStdin();
98
98
 
99
- // Display options
100
- options.forEach((opt, i) => {
101
- console.log(` [${i + 1}] ${opt.label}`);
102
- });
103
- console.log();
99
+ const choices = options.map(opt => ({
100
+ name: opt.label,
101
+ value: opt.value
102
+ }));
104
103
 
105
104
  const { value } = await inquirer.prompt([{
106
- type: 'input',
105
+ type: 'list',
107
106
  name: 'value',
108
107
  message,
109
- prefix: ''
108
+ choices,
109
+ prefix: '',
110
+ loop: false,
111
+ pageSize: 15
110
112
  }]);
111
113
 
112
- const input = (value || '').toLowerCase().trim();
113
-
114
- // Find by value
115
- for (const opt of options) {
116
- if (String(opt.value).toLowerCase() === input) return opt.value;
117
- }
118
-
119
- // Find by index (1-based)
120
- const idx = parseInt(input) - 1;
121
- if (idx >= 0 && idx < options.length) return options[idx].value;
122
-
123
- return null;
114
+ return value;
124
115
  };
125
116
 
126
117
  module.exports = {