hedgequantx 2.6.9 → 2.6.11
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 +1 -1
- package/src/app.js +9 -10
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -256,28 +256,27 @@ const run = async () => {
|
|
|
256
256
|
log.info('Starting HQX CLI');
|
|
257
257
|
await bannerClosed();
|
|
258
258
|
|
|
259
|
-
//
|
|
260
|
-
|
|
259
|
+
// Single loading spinner
|
|
260
|
+
const spinner = ora({ text: 'LOADING DASHBOARD...', color: 'yellow' }).start();
|
|
261
|
+
|
|
262
|
+
// PRE-LOAD: Initialize Rithmic protobuf definitions at startup (silent)
|
|
261
263
|
const { proto } = require('./services/rithmic/protobuf');
|
|
262
|
-
const protoSpinner = ora({ text: 'INITIALIZING TRADING ENGINE...', color: 'cyan' }).start();
|
|
263
264
|
try {
|
|
264
265
|
await proto.load();
|
|
265
|
-
protoSpinner.succeed('TRADING ENGINE READY');
|
|
266
266
|
} catch (e) {
|
|
267
|
-
|
|
267
|
+
// Silent fail
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
// Restore session
|
|
271
|
-
const spinner = ora({ text: 'RESTORING SESSION...', color: 'yellow' }).start();
|
|
272
271
|
const restored = await connections.restoreFromStorage();
|
|
273
272
|
|
|
274
273
|
if (restored) {
|
|
275
|
-
spinner.succeed('SESSION RESTORED');
|
|
276
274
|
currentService = connections.getAll()[0].service;
|
|
277
275
|
await refreshStats();
|
|
278
|
-
} else {
|
|
279
|
-
spinner.info('NO ACTIVE SESSION');
|
|
280
276
|
}
|
|
277
|
+
|
|
278
|
+
spinner.stop();
|
|
279
|
+
console.clear();
|
|
281
280
|
|
|
282
281
|
// Main loop
|
|
283
282
|
while (true) {
|
|
@@ -286,7 +285,7 @@ const run = async () => {
|
|
|
286
285
|
|
|
287
286
|
if (!connections.isConnected()) {
|
|
288
287
|
console.clear();
|
|
289
|
-
await
|
|
288
|
+
await bannerOpen();
|
|
290
289
|
const choice = await mainMenu();
|
|
291
290
|
|
|
292
291
|
if (choice === 'exit') {
|