@riocrypto/common-server 1.0.2154 → 1.0.2156
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -69,6 +69,9 @@ declare class ClusterClient {
|
|
|
69
69
|
}): Promise<EmarketsFXTrade>;
|
|
70
70
|
getEmarketsTrade(id: string): Promise<EmarketsFXTrade>;
|
|
71
71
|
updateExternalTradingAlgorithmLimitPrice(id: string, limitPrice: number): Promise<void>;
|
|
72
|
+
startExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
73
|
+
stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
74
|
+
getExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
72
75
|
}
|
|
73
76
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
74
77
|
export {};
|
|
@@ -430,6 +430,36 @@ class ClusterClient {
|
|
|
430
430
|
});
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
+
startExternalTradingAlgorithm(id) {
|
|
434
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
435
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/algorithms/${id}/start`, {}, {
|
|
436
|
+
headers: {
|
|
437
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
438
|
+
},
|
|
439
|
+
});
|
|
440
|
+
return response.data;
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
stopExternalTradingAlgorithm(id) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/algorithms/${id}/stop`, {}, {
|
|
446
|
+
headers: {
|
|
447
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
448
|
+
},
|
|
449
|
+
});
|
|
450
|
+
return response.data;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
getExternalTradingAlgorithm(id) {
|
|
454
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
455
|
+
const response = yield this.axios.get(`${this.baseUrl}/api/trading/external/algorithms/${id}`, {
|
|
456
|
+
headers: {
|
|
457
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
458
|
+
},
|
|
459
|
+
});
|
|
460
|
+
return response.data;
|
|
461
|
+
});
|
|
462
|
+
}
|
|
433
463
|
}
|
|
434
464
|
const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
435
465
|
// Retrieve secrets asynchronously
|