@riocrypto/common-server 1.0.2155 → 1.0.2157
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, ExternalTradingAlgorithm } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -71,6 +71,8 @@ declare class ClusterClient {
|
|
|
71
71
|
updateExternalTradingAlgorithmLimitPrice(id: string, limitPrice: number): Promise<void>;
|
|
72
72
|
startExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
73
73
|
stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
74
|
+
getExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
75
|
+
getExternalTrade(id: string): Promise<ExternalTrade>;
|
|
74
76
|
}
|
|
75
77
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
76
78
|
export {};
|
|
@@ -450,6 +450,26 @@ class ClusterClient {
|
|
|
450
450
|
return response.data;
|
|
451
451
|
});
|
|
452
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
|
+
}
|
|
463
|
+
getExternalTrade(id) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
const response = yield this.axios.get(`${this.baseUrl}/api/trading/external/trades/${id}`, {
|
|
466
|
+
headers: {
|
|
467
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
return response.data;
|
|
471
|
+
});
|
|
472
|
+
}
|
|
453
473
|
}
|
|
454
474
|
const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
455
475
|
// Retrieve secrets asynchronously
|