@riocrypto/common-server 1.0.2266 → 1.0.2267
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.
|
@@ -87,6 +87,17 @@ declare class ClusterClient {
|
|
|
87
87
|
}): Promise<EmarketsFXTrade>;
|
|
88
88
|
retryEmarketsTrade(id: string): Promise<void>;
|
|
89
89
|
retryExternalTrade(id: string): Promise<void>;
|
|
90
|
+
importExternalTrade(data: {
|
|
91
|
+
provider: ExternalTradingProvider;
|
|
92
|
+
originCurrency: Crypto | Fiat;
|
|
93
|
+
destinationCurrency: Crypto | Fiat;
|
|
94
|
+
originAmount: number;
|
|
95
|
+
destinationAmount: number;
|
|
96
|
+
type: ExternalTradeType;
|
|
97
|
+
emarketsOrderType?: "TOD" | "TOM" | "SPT";
|
|
98
|
+
arbitrageSessionId?: string;
|
|
99
|
+
}): Promise<ExternalTrade>;
|
|
100
|
+
deleteExternalTrade(id: string): Promise<void>;
|
|
90
101
|
getEmarketsTrade(id: string): Promise<EmarketsFXTrade>;
|
|
91
102
|
updateExternalTradingAlgorithmLimitPrice(id: string, limitPrice: number): Promise<void>;
|
|
92
103
|
startExternalTradingAlgorithm({ type, provider, originCurrency, destinationCurrency, maxOriginAmount, maxDestinationAmount, limitPrice, replaceOrderDifferenceThreshold, isPostOnly, spread, clipSize, }: {
|
|
@@ -452,6 +452,21 @@ class ClusterClient {
|
|
|
452
452
|
yield this.axios.post(`${this.baseUrl}/api/trading/external/trades/${id}/retry`, {}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
+
importExternalTrade(data) {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
457
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/trades/import`, Object.assign({}, data), {
|
|
458
|
+
headers: {
|
|
459
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
460
|
+
},
|
|
461
|
+
});
|
|
462
|
+
return response.data;
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
deleteExternalTrade(id) {
|
|
466
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
467
|
+
yield this.axios.delete(`${this.baseUrl}/api/trading/external/trades/${id}`, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
468
|
+
});
|
|
469
|
+
}
|
|
455
470
|
getEmarketsTrade(id) {
|
|
456
471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
457
472
|
const response = yield this.axios.get(`${this.baseUrl}/api/emarkets/bot/trades/${id}`, {
|