hedgequantx 2.3.13 → 2.3.14
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/algo/one-account.js +25 -3
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
|
@@ -78,7 +78,7 @@ const oneAccountMenu = async (service) => {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Symbol selection -
|
|
81
|
+
* Symbol selection - sorted with popular indices first
|
|
82
82
|
*/
|
|
83
83
|
const selectSymbol = async (service, account) => {
|
|
84
84
|
const spinner = ora({ text: 'Loading symbols...', color: 'yellow' }).start();
|
|
@@ -89,10 +89,32 @@ const selectSymbol = async (service, account) => {
|
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
let contracts = contractsResult.contracts;
|
|
93
|
+
|
|
94
|
+
// Sort: Popular indices first (ES, NQ, MES, MNQ, RTY, YM, etc.)
|
|
95
|
+
const popularPrefixes = ['ES', 'NQ', 'MES', 'MNQ', 'M2K', 'RTY', 'YM', 'MYM', 'NKD', 'GC', 'SI', 'CL'];
|
|
96
|
+
|
|
97
|
+
contracts.sort((a, b) => {
|
|
98
|
+
const nameA = a.name || '';
|
|
99
|
+
const nameB = b.name || '';
|
|
100
|
+
|
|
101
|
+
// Check if names start with popular prefixes
|
|
102
|
+
const idxA = popularPrefixes.findIndex(p => nameA.startsWith(p));
|
|
103
|
+
const idxB = popularPrefixes.findIndex(p => nameB.startsWith(p));
|
|
104
|
+
|
|
105
|
+
// Both are popular - sort by popularity order
|
|
106
|
+
if (idxA !== -1 && idxB !== -1) return idxA - idxB;
|
|
107
|
+
// Only A is popular - A first
|
|
108
|
+
if (idxA !== -1) return -1;
|
|
109
|
+
// Only B is popular - B first
|
|
110
|
+
if (idxB !== -1) return 1;
|
|
111
|
+
// Neither - alphabetical
|
|
112
|
+
return nameA.localeCompare(nameB);
|
|
113
|
+
});
|
|
114
|
+
|
|
93
115
|
spinner.succeed(`Found ${contracts.length} contracts`);
|
|
94
116
|
|
|
95
|
-
// Display
|
|
117
|
+
// Display sorted contracts from API
|
|
96
118
|
const options = contracts.map(c => ({
|
|
97
119
|
label: `${c.name} - ${c.description}`,
|
|
98
120
|
value: c
|