hedgequantx 2.9.148 → 2.9.149
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
|
@@ -326,14 +326,11 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
326
326
|
marketFeed.on('disconnected', () => { stats.connected = false; ui.addLog('error', 'Market disconnected'); });
|
|
327
327
|
|
|
328
328
|
try {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
if (service.disconnectTicker) {
|
|
335
|
-
await service.disconnectTicker();
|
|
336
|
-
}
|
|
329
|
+
// Try sync (RithmicService) then async (BrokerClient)
|
|
330
|
+
let rithmicCredentials = service.getRithmicCredentials?.();
|
|
331
|
+
if (!rithmicCredentials && service.getRithmicCredentialsAsync) rithmicCredentials = await service.getRithmicCredentialsAsync();
|
|
332
|
+
if (!rithmicCredentials) throw new Error('Rithmic credentials not available - try "hqx login"');
|
|
333
|
+
if (service.disconnectTicker) await service.disconnectTicker(); // Avoid TICKER conflict
|
|
337
334
|
await marketFeed.connect(rithmicCredentials);
|
|
338
335
|
await marketFeed.subscribe(symbolCode, contract.exchange || 'CME');
|
|
339
336
|
|
|
@@ -188,9 +188,13 @@ const launchCopyTrading = async (config) => {
|
|
|
188
188
|
|
|
189
189
|
// Connect to market data (Rithmic TICKER_PLANT)
|
|
190
190
|
try {
|
|
191
|
-
|
|
191
|
+
// Try sync first (RithmicService), then async (RithmicBrokerClient)
|
|
192
|
+
let rithmicCredentials = leadService.getRithmicCredentials?.();
|
|
193
|
+
if (!rithmicCredentials && leadService.getRithmicCredentialsAsync) {
|
|
194
|
+
rithmicCredentials = await leadService.getRithmicCredentialsAsync();
|
|
195
|
+
}
|
|
192
196
|
if (!rithmicCredentials) {
|
|
193
|
-
throw new Error('Rithmic credentials not available');
|
|
197
|
+
throw new Error('Rithmic credentials not available - try "hqx login"');
|
|
194
198
|
}
|
|
195
199
|
await marketFeed.connect(rithmicCredentials);
|
|
196
200
|
await marketFeed.subscribe(symbolName, contract.exchange || 'CME');
|
|
@@ -267,8 +267,12 @@ const executeMultiSymbol = async ({ service, account, contracts, config, strateg
|
|
|
267
267
|
|
|
268
268
|
// Connect and subscribe to all symbols
|
|
269
269
|
try {
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
// Try sync first (RithmicService), then async (RithmicBrokerClient)
|
|
271
|
+
let rithmicCredentials = service.getRithmicCredentials?.();
|
|
272
|
+
if (!rithmicCredentials && service.getRithmicCredentialsAsync) {
|
|
273
|
+
rithmicCredentials = await service.getRithmicCredentialsAsync();
|
|
274
|
+
}
|
|
275
|
+
if (!rithmicCredentials) throw new Error('Rithmic credentials not available - try "hqx login"');
|
|
272
276
|
|
|
273
277
|
if (service.disconnectTicker) await service.disconnectTicker();
|
|
274
278
|
await marketFeed.connect(rithmicCredentials);
|