hedgequantx 1.2.36 → 1.2.37

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.2.36",
3
+ "version": "1.2.37",
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": {
@@ -70,21 +70,22 @@ class RithmicService extends EventEmitter {
70
70
  // Login
71
71
  return new Promise((resolve, reject) => {
72
72
  const timeout = setTimeout(() => {
73
- reject(new Error('Login timeout'));
74
- }, 15000);
73
+ resolve({ success: false, error: 'Login timeout - server did not respond' });
74
+ }, 30000);
75
75
 
76
76
  this.orderConn.once('loggedIn', async (data) => {
77
77
  clearTimeout(timeout);
78
78
  this.loginInfo = data;
79
- this.user = { userName: username };
79
+ this.user = { userName: username, fcmId: data.fcmId, ibId: data.ibId };
80
80
 
81
+ // Try to get accounts but don't fail if it doesn't work
81
82
  try {
82
- // Get accounts
83
83
  await this.fetchAccounts();
84
- resolve({ success: true });
85
84
  } catch (e) {
86
- resolve({ success: false, error: e.message });
85
+ // Accounts fetch failed, but login succeeded
86
+ console.log('Note: Could not fetch accounts');
87
87
  }
88
+ resolve({ success: true });
88
89
  });
89
90
 
90
91
  this.orderConn.once('loginFailed', (data) => {