hedgequantx 2.9.150 → 2.9.151

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.150",
3
+ "version": "2.9.151",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -301,12 +301,13 @@ const oneAccountMenu = async (service) => {
301
301
  */
302
302
  const selectMultipleSymbols = async (service, account) => {
303
303
  const spinner = ora({ text: 'Loading symbols...', color: 'yellow' }).start();
304
-
305
- // Debug: log service type
306
304
  const serviceType = service.constructor?.name || 'Unknown';
307
305
 
308
- // Ensure we have a logged-in service
309
- if (!service.loginInfo && service.credentials) {
306
+ // Check if service needs reconnection:
307
+ // - RithmicService: check loginInfo
308
+ // - RithmicBrokerClient: check connected (already connected to daemon)
309
+ const needsReconnect = !service.loginInfo && !service.connected && service.credentials;
310
+ if (needsReconnect) {
310
311
  spinner.text = 'Reconnecting to broker...';
311
312
  const loginResult = await service.login(service.credentials.username, service.credentials.password);
312
313
  if (!loginResult.success) {
@@ -383,12 +384,13 @@ const selectMultipleSymbols = async (service, account) => {
383
384
  */
384
385
  const selectSymbol = async (service, account) => {
385
386
  const spinner = ora({ text: 'Loading symbols...', color: 'yellow' }).start();
386
-
387
- // Debug: log service type
388
387
  const serviceType = service.constructor?.name || 'Unknown';
389
388
 
390
- // Ensure we have a logged-in service (for direct RithmicService, not BrokerClient)
391
- if (!service.loginInfo && service.credentials && typeof service.login === 'function') {
389
+ // Check if service needs reconnection:
390
+ // - RithmicService: check loginInfo
391
+ // - RithmicBrokerClient: check connected (already connected to daemon)
392
+ const needsReconnect = !service.loginInfo && !service.connected && service.credentials;
393
+ if (needsReconnect && typeof service.login === 'function') {
392
394
  spinner.text = 'Reconnecting to broker...';
393
395
  const loginResult = await service.login(service.credentials.username, service.credentials.password);
394
396
  if (!loginResult.success) {