hedgequantx 1.3.10 → 1.3.12

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.3.10",
3
+ "version": "1.3.12",
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/app.js CHANGED
@@ -286,7 +286,7 @@ const run = async () => {
286
286
  await banner();
287
287
 
288
288
  // Try to restore session
289
- const spinner = ora('Restoring session...').start();
289
+ const spinner = ora({ text: 'Restoring session...', color: 'yellow' }).start();
290
290
  const restored = await connections.restoreFromStorage();
291
291
 
292
292
  if (restored) {
@@ -136,7 +136,7 @@ const projectXMenu = async () => {
136
136
  const selectedPropfirm = numbered[selectedIdx];
137
137
 
138
138
  const credentials = await loginPrompt(selectedPropfirm.name);
139
- const spinner = ora('Authenticating...').start();
139
+ const spinner = ora({ text: 'Authenticating...', color: 'yellow' }).start();
140
140
 
141
141
  try {
142
142
  const service = new ProjectXService(selectedPropfirm.key);
@@ -232,7 +232,7 @@ const rithmicMenu = async () => {
232
232
  const selectedPropfirm = numbered[selectedIdx];
233
233
 
234
234
  const credentials = await loginPrompt(selectedPropfirm.name);
235
- const spinner = ora('Connecting to Rithmic...').start();
235
+ const spinner = ora({ text: 'Connecting to Rithmic...', color: 'yellow' }).start();
236
236
 
237
237
  try {
238
238
  const service = new RithmicService(selectedPropfirm.key);
@@ -317,7 +317,7 @@ const tradovateMenu = async () => {
317
317
  const selectedPropfirm = numbered[selectedIdx];
318
318
 
319
319
  const credentials = await loginPrompt(selectedPropfirm.name);
320
- const spinner = ora('Connecting to Tradovate...').start();
320
+ const spinner = ora({ text: 'Connecting to Tradovate...', color: 'yellow' }).start();
321
321
 
322
322
  try {
323
323
  const service = new TradovateService(selectedPropfirm.key);
@@ -178,7 +178,7 @@ const handleUpdate = async () => {
178
178
  currentVersion = 'unknown';
179
179
  }
180
180
 
181
- spinner = ora('Checking for updates...').start();
181
+ spinner = ora({ text: 'Checking for updates...', color: 'yellow' }).start();
182
182
 
183
183
  // Check latest version on npm with timeout
184
184
  spinner.text = 'Checking npm registry...';
@@ -235,7 +235,7 @@ const handleUpdate = async () => {
235
235
  }
236
236
 
237
237
  // Update via npm
238
- spinner = ora(`Updating v${currentVersion} -> v${latestVersion}...`).start();
238
+ spinner = ora({ text: `Updating v${currentVersion} -> v${latestVersion}...`, color: 'yellow' }).start();
239
239
 
240
240
  try {
241
241
  execSync('npm install -g hedgequantx@latest 2>/dev/null', {
@@ -16,7 +16,7 @@ const { getLogoWidth, getColWidths, drawBoxHeader, drawBoxFooter, draw2ColHeader
16
16
  * @param {Object} service - Current service
17
17
  */
18
18
  const showAccounts = async (service) => {
19
- const spinner = ora('Fetching accounts...').start();
19
+ const spinner = ora({ text: 'Fetching accounts...', color: 'yellow' }).start();
20
20
  const boxWidth = getLogoWidth();
21
21
  const { col1, col2 } = getColWidths(boxWidth);
22
22
 
@@ -33,6 +33,8 @@ const copyTradingMenu = async () => {
33
33
  console.log();
34
34
 
35
35
  // Get all active accounts from all connections
36
+ const spinner = ora({ text: 'Fetching accounts...', color: 'yellow' }).start();
37
+
36
38
  const allAccounts = [];
37
39
  for (const conn of allConns) {
38
40
  try {
@@ -52,11 +54,13 @@ const copyTradingMenu = async () => {
52
54
  }
53
55
 
54
56
  if (allAccounts.length < 2) {
55
- console.log(chalk.yellow(' Need at least 2 active accounts'));
57
+ spinner.fail('Need at least 2 active accounts');
56
58
  await inquirer.prompt([{ type: 'input', name: 'c', message: 'Press Enter...' }]);
57
59
  return;
58
60
  }
59
61
 
62
+ spinner.succeed(`Found ${allAccounts.length} active accounts`);
63
+
60
64
  // Step 1: Select Lead Account
61
65
  console.log(chalk.cyan(' Step 1: Select LEAD Account (source of trades)'));
62
66
  const leadChoices = allAccounts.map((a, i) => ({
@@ -249,7 +253,7 @@ const launchCopyTrading = async (config) => {
249
253
  // Connect to HQX Server
250
254
  const hqx = new HQXServerService();
251
255
 
252
- const spinner = ora('Connecting to HQX Server...').start();
256
+ const spinner = ora({ text: 'Connecting to HQX Server...', color: 'yellow' }).start();
253
257
 
254
258
  try {
255
259
  const auth = await hqx.authenticate(lead.account.accountId.toString(), lead.propfirm || 'topstep');
@@ -17,7 +17,7 @@ const { AlgoUI, checkMarketStatus } = require('./ui');
17
17
  * One Account Menu - Select account and launch
18
18
  */
19
19
  const oneAccountMenu = async (service) => {
20
- const spinner = ora('Fetching active accounts...').start();
20
+ const spinner = ora({ text: 'Fetching active accounts...', color: 'yellow' }).start();
21
21
 
22
22
  // Get ALL accounts from ALL connections
23
23
  const allAccounts = await connections.getAllAccounts();
@@ -76,7 +76,7 @@ const oneAccountMenu = async (service) => {
76
76
  * Symbol selection
77
77
  */
78
78
  const selectSymbol = async (service, account) => {
79
- const spinner = ora('Loading contracts...').start();
79
+ const spinner = ora({ text: 'Loading contracts...', color: 'yellow' }).start();
80
80
 
81
81
  const contractsResult = await service.getContracts();
82
82
  if (!contractsResult.success) {
@@ -199,7 +199,7 @@ const launchAlgo = async (service, account, contract, config) => {
199
199
  // Connect to HQX Server
200
200
  const hqx = new HQXServerService();
201
201
 
202
- const spinner = ora('Connecting to HQX Server...').start();
202
+ const spinner = ora({ text: 'Connecting to HQX Server...', color: 'yellow' }).start();
203
203
 
204
204
  try {
205
205
  const auth = await hqx.authenticate(account.accountId.toString(), account.propfirm || 'topstep');
@@ -16,7 +16,7 @@ const { getLogoWidth, drawBoxHeader, drawBoxFooter, drawBoxRow, drawBoxSeparator
16
16
  * @param {Object} service - Current service
17
17
  */
18
18
  const showOrders = async (service) => {
19
- const spinner = ora('Fetching orders...').start();
19
+ const spinner = ora({ text: 'Fetching orders...', color: 'yellow' }).start();
20
20
  const boxWidth = getLogoWidth();
21
21
 
22
22
  // Get all accounts first
@@ -16,7 +16,7 @@ const { getLogoWidth, drawBoxHeader, drawBoxFooter, drawBoxRow, drawBoxSeparator
16
16
  * @param {Object} service - Current service
17
17
  */
18
18
  const showPositions = async (service) => {
19
- const spinner = ora('Fetching positions...').start();
19
+ const spinner = ora({ text: 'Fetching positions...', color: 'yellow' }).start();
20
20
  const boxWidth = getLogoWidth();
21
21
  const innerWidth = boxWidth - 2;
22
22
 
@@ -24,7 +24,7 @@ const {
24
24
  * Show Stats Page
25
25
  */
26
26
  const showStats = async (service) => {
27
- const spinner = ora('Fetching stats for all accounts...').start();
27
+ const spinner = ora({ text: 'Fetching stats for all accounts...', color: 'yellow' }).start();
28
28
 
29
29
  let allAccountsData = [];
30
30
 
package/src/pages/user.js CHANGED
@@ -15,7 +15,7 @@ const { getLogoWidth, getColWidths, drawBoxHeader, drawBoxFooter, draw2ColHeader
15
15
  * @param {Object} service - Current service
16
16
  */
17
17
  const showUserInfo = async (service) => {
18
- const spinner = ora('Fetching user info...').start();
18
+ const spinner = ora({ text: 'Fetching user info...', color: 'yellow' }).start();
19
19
  const boxWidth = getLogoWidth();
20
20
  const { col1, col2 } = getColWidths(boxWidth);
21
21