@riocrypto/common-server 1.0.2153 → 1.0.2155

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;
@@ -68,6 +68,9 @@ declare class ClusterClient {
68
68
  side: Side;
69
69
  }): Promise<EmarketsFXTrade>;
70
70
  getEmarketsTrade(id: string): Promise<EmarketsFXTrade>;
71
+ updateExternalTradingAlgorithmLimitPrice(id: string, limitPrice: number): Promise<void>;
72
+ startExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
73
+ stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
71
74
  }
72
75
  export declare const buildClusterClient: () => Promise<ClusterClient>;
73
76
  export {};
@@ -421,6 +421,35 @@ class ClusterClient {
421
421
  return response.data;
422
422
  });
423
423
  }
424
+ updateExternalTradingAlgorithmLimitPrice(id, limitPrice) {
425
+ return __awaiter(this, void 0, void 0, function* () {
426
+ yield this.axios.patch(`${this.baseUrl}/api/trading/external/algorithms/${id}`, { limitPrice }, {
427
+ headers: {
428
+ "x-cluster-api-key": this.clusterApiKey,
429
+ },
430
+ });
431
+ });
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
+ }
424
453
  }
425
454
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
426
455
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2153",
3
+ "version": "1.0.2155",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",