hedgequantx 1.8.29 → 1.8.30
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
|
@@ -57,7 +57,8 @@ const oneAccountMenu = async (service) => {
|
|
|
57
57
|
const selectedAccount = await prompts.selectOption('Select Account:', options);
|
|
58
58
|
if (!selectedAccount || selectedAccount === 'back') return;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
// Use the service attached to the account (from getAllAccounts), fallback to getServiceForAccount
|
|
61
|
+
const accountService = selectedAccount.service || connections.getServiceForAccount(selectedAccount.accountId) || service;
|
|
61
62
|
|
|
62
63
|
// Select symbol
|
|
63
64
|
const contract = await selectSymbol(accountService, selectedAccount);
|
|
@@ -150,6 +151,7 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
150
151
|
const stats = {
|
|
151
152
|
accountName, symbol: symbolName, contracts,
|
|
152
153
|
target: dailyTarget, risk: maxRisk,
|
|
154
|
+
propfirm: account.propfirm || 'Unknown',
|
|
153
155
|
pnl: 0, trades: 0, wins: 0, losses: 0,
|
|
154
156
|
latency: 0, connected: false
|
|
155
157
|
};
|
|
@@ -208,8 +210,11 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
208
210
|
if (stats.connected) {
|
|
209
211
|
ui.addLog('info', 'Starting algo...');
|
|
210
212
|
|
|
213
|
+
// Get Rithmic credentials from the account's service
|
|
211
214
|
let rithmicCreds = null;
|
|
212
|
-
if (service
|
|
215
|
+
if (service && service.getRithmicCredentials) {
|
|
216
|
+
rithmicCreds = service.getRithmicCredentials();
|
|
217
|
+
}
|
|
213
218
|
|
|
214
219
|
hqx.startAlgo({
|
|
215
220
|
accountId: account.accountId,
|