@riocrypto/common-server 1.0.2158 → 1.0.2159

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, ExternalTrade, ExternalTradeType, ExternalTradingProvider } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -69,7 +69,15 @@ 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>;
72
+ startExternalTradingAlgorithm({ type, provider, originCurrency, destinationCurrency, maxOriginAmount, maxDestinationAmount, limitPrice, }: {
73
+ type: ExternalTradingAlgorithmType;
74
+ provider: ExternalTradingProvider;
75
+ originCurrency: Crypto | Fiat;
76
+ destinationCurrency: Crypto | Fiat;
77
+ maxOriginAmount?: number;
78
+ maxDestinationAmount?: number;
79
+ limitPrice?: number;
80
+ }): Promise<ExternalTradingAlgorithm>;
73
81
  stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
74
82
  getExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
75
83
  getExternalTrade(id: string): Promise<ExternalTrade>;
@@ -430,9 +430,17 @@ class ClusterClient {
430
430
  });
431
431
  });
432
432
  }
433
- startExternalTradingAlgorithm(id) {
433
+ startExternalTradingAlgorithm({ type, provider, originCurrency, destinationCurrency, maxOriginAmount, maxDestinationAmount, limitPrice, }) {
434
434
  return __awaiter(this, void 0, void 0, function* () {
435
- const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/algorithms/${id}/start`, {}, {
435
+ const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/algorithms/start`, {
436
+ type,
437
+ provider,
438
+ originCurrency,
439
+ destinationCurrency,
440
+ maxOriginAmount,
441
+ maxDestinationAmount,
442
+ limitPrice,
443
+ }, {
436
444
  headers: {
437
445
  "x-cluster-api-key": this.clusterApiKey,
438
446
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2158",
3
+ "version": "1.0.2159",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",