hedgequantx 1.8.35 → 1.8.36
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
package/src/pages/accounts.js
CHANGED
|
@@ -60,8 +60,8 @@ const showAccounts = async (service) => {
|
|
|
60
60
|
const acc1 = allAccounts[i];
|
|
61
61
|
const acc2 = allAccounts[i + 1];
|
|
62
62
|
|
|
63
|
-
const name1 = acc1.
|
|
64
|
-
const name2 = acc2 ? (acc2.
|
|
63
|
+
const name1 = acc1.accountId || `Account #${acc1.accountId}`;
|
|
64
|
+
const name2 = acc2 ? (acc2.accountId || `Account #${acc2.accountId}`) : '';
|
|
65
65
|
|
|
66
66
|
draw2ColHeader(name1.substring(0, col1 - 4), name2.substring(0, col2 - 4), boxWidth);
|
|
67
67
|
|
|
@@ -72,7 +72,7 @@ const copyTradingMenu = async () => {
|
|
|
72
72
|
// Step 1: Select Lead Account
|
|
73
73
|
console.log(chalk.cyan(' Step 1: Select LEAD Account'));
|
|
74
74
|
const leadOptions = allAccounts.map((a, i) => ({
|
|
75
|
-
label: `${a.propfirm} - ${a.account.
|
|
75
|
+
label: `${a.propfirm} - ${a.account.accountId}${a.account.balance !== null ? ` ($${a.account.balance.toLocaleString()})` : ''}`,
|
|
76
76
|
value: i
|
|
77
77
|
}));
|
|
78
78
|
leadOptions.push({ label: '< Cancel', value: -1 });
|
|
@@ -88,7 +88,7 @@ const copyTradingMenu = async () => {
|
|
|
88
88
|
.map((a, i) => ({ a, i }))
|
|
89
89
|
.filter(x => x.i !== leadIdx)
|
|
90
90
|
.map(x => ({
|
|
91
|
-
label: `${x.a.propfirm} - ${x.a.account.
|
|
91
|
+
label: `${x.a.propfirm} - ${x.a.account.accountId}${x.a.account.balance !== null ? ` ($${x.a.account.balance.toLocaleString()})` : ''}`,
|
|
92
92
|
value: x.i
|
|
93
93
|
}));
|
|
94
94
|
followerOptions.push({ label: '< Cancel', value: -1 });
|
|
@@ -249,8 +249,9 @@ const selectSymbol = async (service, label) => {
|
|
|
249
249
|
const launchCopyTrading = async (config) => {
|
|
250
250
|
const { lead, follower, dailyTarget, maxRisk, showNames } = config;
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
const
|
|
252
|
+
// NEVER show real name - only account ID or masked
|
|
253
|
+
const leadName = showNames ? lead.account.accountId : 'HQX Lead *****';
|
|
254
|
+
const followerName = showNames ? follower.account.accountId : 'HQX Follower *****';
|
|
254
255
|
|
|
255
256
|
const ui = new AlgoUI({ subtitle: 'HQX Copy Trading', mode: 'copy-trading' });
|
|
256
257
|
|
|
@@ -49,7 +49,7 @@ const oneAccountMenu = async (service) => {
|
|
|
49
49
|
|
|
50
50
|
// Select account
|
|
51
51
|
const options = activeAccounts.map(acc => ({
|
|
52
|
-
label: `${acc.
|
|
52
|
+
label: `${acc.accountId} (${acc.propfirm || 'Unknown'})${acc.balance !== null ? ` - $${acc.balance.toLocaleString()}` : ''}`,
|
|
53
53
|
value: acc
|
|
54
54
|
}));
|
|
55
55
|
options.push({ label: '< Back', value: 'back' });
|
|
@@ -146,7 +146,8 @@ const configureAlgo = async (account, contract) => {
|
|
|
146
146
|
*/
|
|
147
147
|
const launchAlgo = async (service, account, contract, config) => {
|
|
148
148
|
const { contracts, dailyTarget, maxRisk, showName } = config;
|
|
149
|
-
|
|
149
|
+
// NEVER show real name - only account ID or masked
|
|
150
|
+
const accountName = showName ? account.accountId : 'HQX *****';
|
|
150
151
|
const symbolName = contract.name || contract.symbol;
|
|
151
152
|
|
|
152
153
|
const ui = new AlgoUI({ subtitle: 'HQX Ultra-Scalping', mode: 'one-account' });
|
package/src/pages/orders.js
CHANGED
|
@@ -44,7 +44,7 @@ const showOrders = async (service) => {
|
|
|
44
44
|
const result = await account.service.getOrders(account.accountId);
|
|
45
45
|
if (result.success && result.orders?.length > 0) {
|
|
46
46
|
result.orders.forEach(order => {
|
|
47
|
-
allOrders.push({ ...order, accountName: account.
|
|
47
|
+
allOrders.push({ ...order, accountName: account.accountId, propfirm: account.propfirm });
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
} catch (e) {}
|
package/src/pages/positions.js
CHANGED
|
@@ -44,7 +44,7 @@ const showPositions = async (service) => {
|
|
|
44
44
|
const result = await account.service.getPositions(account.accountId);
|
|
45
45
|
if (result.success && result.positions?.length > 0) {
|
|
46
46
|
result.positions.forEach(pos => {
|
|
47
|
-
allPositions.push({ ...pos, accountName: account.
|
|
47
|
+
allPositions.push({ ...pos, accountName: account.accountId, propfirm: account.propfirm });
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
} catch (e) {}
|
|
@@ -118,8 +118,8 @@ const getTradingAccounts = async (service) => {
|
|
|
118
118
|
return {
|
|
119
119
|
accountId: hashAccountId(acc.accountId),
|
|
120
120
|
rithmicAccountId: acc.accountId,
|
|
121
|
-
accountName: acc.
|
|
122
|
-
name: acc.
|
|
121
|
+
accountName: acc.accountId, // Never expose real name - only account ID
|
|
122
|
+
name: acc.accountId, // Never expose real name - only account ID
|
|
123
123
|
balance: accountBalance,
|
|
124
124
|
profitAndLoss: dayPnL !== null ? dayPnL : (openPnL !== null || closedPnL !== null ? (openPnL || 0) + (closedPnL || 0) : null),
|
|
125
125
|
openPnL: openPnL,
|