hedgequantx 2.9.99 → 2.9.101

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.9.99",
3
+ "version": "2.9.101",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -87,6 +87,9 @@ const oneAccountMenu = async (service) => {
87
87
  selectedAccount = matchingAccount;
88
88
  accountService = selectedAccount.service || connections.getServiceForAccount(selectedAccount.accountId) || service;
89
89
 
90
+ // Show spinner while loading
91
+ const loadSpinner = ora({ text: 'Loading configuration...', color: 'yellow' }).start();
92
+
90
93
  // Load contracts to find the saved symbol (match by baseSymbol first, then exact symbol)
91
94
  const contractsResult = await accountService.getContracts();
92
95
  if (contractsResult.success && contractsResult.contracts.length > 0) {
@@ -105,23 +108,26 @@ const oneAccountMenu = async (service) => {
105
108
  contract = contractsResult.contracts.find(c => c.baseSymbol === extractedBase);
106
109
  }
107
110
  }
108
- }
109
-
110
- // Find strategy
111
- const strategies = getAvailableStrategies();
112
- strategy = strategies.find(s => s.id === lastConfig.strategyId);
113
-
114
- // Restore config
115
- if (contract && strategy) {
116
- config = {
117
- contracts: lastConfig.contracts,
118
- dailyTarget: lastConfig.dailyTarget,
119
- maxRisk: lastConfig.maxRisk,
120
- showName: lastConfig.showName
121
- };
122
- console.log(chalk.green(' ✓ Configuration loaded'));
111
+
112
+ // Find strategy
113
+ const strategies = getAvailableStrategies();
114
+ strategy = strategies.find(s => s.id === lastConfig.strategyId);
115
+
116
+ // Restore config
117
+ if (contract && strategy) {
118
+ config = {
119
+ contracts: lastConfig.contracts,
120
+ dailyTarget: lastConfig.dailyTarget,
121
+ maxRisk: lastConfig.maxRisk,
122
+ showName: lastConfig.showName
123
+ };
124
+ loadSpinner.succeed('Configuration loaded');
125
+ } else {
126
+ loadSpinner.fail('Symbol or strategy no longer available, please reconfigure');
127
+ selectedAccount = null;
128
+ }
123
129
  } else {
124
- console.log(chalk.yellow(' Symbol or strategy no longer available, please reconfigure'));
130
+ loadSpinner.fail('Failed to load contracts');
125
131
  selectedAccount = null;
126
132
  }
127
133
  }