hedgequantx 2.3.8 → 2.3.10
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/dist/lib/api.jsc +0 -0
- package/dist/lib/api2.jsc +0 -0
- package/dist/lib/core.jsc +0 -0
- package/dist/lib/core2.jsc +0 -0
- package/dist/lib/data.jsc +0 -0
- package/dist/lib/data2.jsc +0 -0
- package/dist/lib/decoder.jsc +0 -0
- package/dist/lib/m/mod1.jsc +0 -0
- package/dist/lib/m/mod2.jsc +0 -0
- package/dist/lib/n/r1.jsc +0 -0
- package/dist/lib/n/r2.jsc +0 -0
- package/dist/lib/n/r3.jsc +0 -0
- package/dist/lib/n/r4.jsc +0 -0
- package/dist/lib/n/r5.jsc +0 -0
- package/dist/lib/n/r6.jsc +0 -0
- package/dist/lib/n/r7.jsc +0 -0
- package/dist/lib/o/util1.jsc +0 -0
- package/dist/lib/o/util2.jsc +0 -0
- package/package.json +1 -1
- package/src/pages/accounts.js +2 -2
- package/src/pages/algo/copy-trading.js +1 -1
- package/src/pages/algo/one-account.js +18 -30
- package/src/pages/orders.js +2 -2
- package/src/pages/positions.js +2 -2
package/dist/lib/api.jsc
CHANGED
|
Binary file
|
package/dist/lib/api2.jsc
CHANGED
|
Binary file
|
package/dist/lib/core.jsc
CHANGED
|
Binary file
|
package/dist/lib/core2.jsc
CHANGED
|
Binary file
|
package/dist/lib/data.jsc
CHANGED
|
Binary file
|
package/dist/lib/data2.jsc
CHANGED
|
Binary file
|
package/dist/lib/decoder.jsc
CHANGED
|
Binary file
|
package/dist/lib/m/mod1.jsc
CHANGED
|
Binary file
|
package/dist/lib/m/mod2.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r1.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r2.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r3.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r4.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r5.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r6.jsc
CHANGED
|
Binary file
|
package/dist/lib/n/r7.jsc
CHANGED
|
Binary file
|
package/dist/lib/o/util1.jsc
CHANGED
|
Binary file
|
package/dist/lib/o/util2.jsc
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/pages/accounts.js
CHANGED
|
@@ -88,8 +88,8 @@ const showAccounts = async (service) => {
|
|
|
88
88
|
const acc1 = allAccounts[i];
|
|
89
89
|
const acc2 = allAccounts[i + 1];
|
|
90
90
|
|
|
91
|
-
const name1 = String(acc1.
|
|
92
|
-
const name2 = acc2 ? String(acc2.
|
|
91
|
+
const name1 = String(acc1.accountName || acc1.rithmicAccountId || acc1.accountId || `Account #${i + 1}`);
|
|
92
|
+
const name2 = acc2 ? String(acc2.accountName || acc2.rithmicAccountId || acc2.accountId || `Account #${i + 2}`) : '';
|
|
93
93
|
|
|
94
94
|
draw2ColHeader(name1.substring(0, col1 - 4), name2 ? name2.substring(0, col2 - 4) : '', boxWidth);
|
|
95
95
|
|
|
@@ -168,7 +168,7 @@ const selectAccount = async (message, accounts, excludeIdx) => {
|
|
|
168
168
|
const acc = x.a.account;
|
|
169
169
|
const balance = acc.balance !== null ? ` ($${acc.balance.toLocaleString()})` : '';
|
|
170
170
|
return {
|
|
171
|
-
label: `${x.a.propfirm} - ${acc.rithmicAccountId || acc.name || acc.accountId}${balance}`,
|
|
171
|
+
label: `${x.a.propfirm} - ${acc.accountName || acc.rithmicAccountId || acc.name || acc.accountId}${balance}`,
|
|
172
172
|
value: x.i,
|
|
173
173
|
};
|
|
174
174
|
});
|
|
@@ -47,11 +47,18 @@ const oneAccountMenu = async (service) => {
|
|
|
47
47
|
|
|
48
48
|
spinner.succeed(`Found ${activeAccounts.length} active account(s)`);
|
|
49
49
|
|
|
50
|
-
// Select account
|
|
51
|
-
const options = activeAccounts.map(acc =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
// Select account - display RAW API fields
|
|
51
|
+
const options = activeAccounts.map(acc => {
|
|
52
|
+
// Use what API returns: accountName for ProjectX, rithmicAccountId for Rithmic
|
|
53
|
+
const name = acc.accountName || acc.rithmicAccountId || acc.accountId;
|
|
54
|
+
const balance = acc.balance !== null && acc.balance !== undefined
|
|
55
|
+
? ` - $${acc.balance.toLocaleString()}`
|
|
56
|
+
: '';
|
|
57
|
+
return {
|
|
58
|
+
label: `${name} (${acc.propfirm || acc.platform || 'Unknown'})${balance}`,
|
|
59
|
+
value: acc
|
|
60
|
+
};
|
|
61
|
+
});
|
|
55
62
|
options.push({ label: '< Back', value: 'back' });
|
|
56
63
|
|
|
57
64
|
const selectedAccount = await prompts.selectOption('Select Account:', options);
|
|
@@ -72,7 +79,7 @@ const oneAccountMenu = async (service) => {
|
|
|
72
79
|
};
|
|
73
80
|
|
|
74
81
|
/**
|
|
75
|
-
* Symbol selection -
|
|
82
|
+
* Symbol selection - RAW API data only
|
|
76
83
|
*/
|
|
77
84
|
const selectSymbol = async (service, account) => {
|
|
78
85
|
const spinner = ora({ text: 'Loading symbols...', color: 'yellow' }).start();
|
|
@@ -83,34 +90,15 @@ const selectSymbol = async (service, account) => {
|
|
|
83
90
|
return null;
|
|
84
91
|
}
|
|
85
92
|
|
|
86
|
-
// Contracts are already sorted by category from getContracts()
|
|
87
93
|
const contracts = contractsResult.contracts;
|
|
88
|
-
|
|
89
94
|
spinner.succeed(`Found ${contracts.length} contracts`);
|
|
90
95
|
|
|
91
|
-
//
|
|
92
|
-
const options =
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// Category header from API field contractGroup
|
|
97
|
-
if (c.contractGroup !== currentGroup) {
|
|
98
|
-
currentGroup = c.contractGroup;
|
|
99
|
-
if (currentGroup) {
|
|
100
|
-
options.push({
|
|
101
|
-
label: chalk.cyan.bold(`── ${currentGroup} ──`),
|
|
102
|
-
value: null,
|
|
103
|
-
disabled: true
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Display using RAW API fields only
|
|
109
|
-
const label = ` ${c.name} - ${c.description} (${c.exchange})`;
|
|
110
|
-
options.push({ label, value: c });
|
|
111
|
-
}
|
|
96
|
+
// Display EXACTLY what API returns - no modifications
|
|
97
|
+
const options = contracts.map(c => ({
|
|
98
|
+
label: `${c.name} - ${c.description}`,
|
|
99
|
+
value: c
|
|
100
|
+
}));
|
|
112
101
|
|
|
113
|
-
options.push({ label: '', value: null, disabled: true }); // Spacer
|
|
114
102
|
options.push({ label: chalk.gray('< Back'), value: 'back' });
|
|
115
103
|
|
|
116
104
|
const contract = await prompts.selectOption(chalk.yellow('Select Symbol:'), options);
|
package/src/pages/orders.js
CHANGED
|
@@ -68,7 +68,7 @@ const showOrders = async (service) => {
|
|
|
68
68
|
let allOrders = [];
|
|
69
69
|
|
|
70
70
|
for (const account of allAccounts) {
|
|
71
|
-
const accName = String(account.
|
|
71
|
+
const accName = String(account.accountName || account.rithmicAccountId || account.accountId || 'Unknown').substring(0, 20);
|
|
72
72
|
spinner = ora({ text: `Fetching orders for ${accName}...`, color: 'yellow' }).start();
|
|
73
73
|
|
|
74
74
|
try {
|
|
@@ -77,7 +77,7 @@ const showOrders = async (service) => {
|
|
|
77
77
|
result.orders.forEach(order => {
|
|
78
78
|
allOrders.push({
|
|
79
79
|
...order,
|
|
80
|
-
accountName: account.accountId,
|
|
80
|
+
accountName: account.accountName || account.rithmicAccountId || account.accountId,
|
|
81
81
|
propfirm: account.propfirm
|
|
82
82
|
});
|
|
83
83
|
});
|
package/src/pages/positions.js
CHANGED
|
@@ -68,7 +68,7 @@ const showPositions = async (service) => {
|
|
|
68
68
|
let allPositions = [];
|
|
69
69
|
|
|
70
70
|
for (const account of allAccounts) {
|
|
71
|
-
const accName = String(account.
|
|
71
|
+
const accName = String(account.accountName || account.rithmicAccountId || account.accountId || 'Unknown').substring(0, 20);
|
|
72
72
|
spinner = ora({ text: `Fetching positions for ${accName}...`, color: 'yellow' }).start();
|
|
73
73
|
|
|
74
74
|
try {
|
|
@@ -77,7 +77,7 @@ const showPositions = async (service) => {
|
|
|
77
77
|
result.positions.forEach(pos => {
|
|
78
78
|
allPositions.push({
|
|
79
79
|
...pos,
|
|
80
|
-
accountName: account.accountId,
|
|
80
|
+
accountName: account.accountName || account.rithmicAccountId || account.accountId,
|
|
81
81
|
propfirm: account.propfirm
|
|
82
82
|
});
|
|
83
83
|
});
|