@riocrypto/common-server 1.0.2164 → 1.0.2166

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.
@@ -81,13 +81,15 @@ declare class ClusterClient {
81
81
  stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
82
82
  getExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
83
83
  getExternalTrade(id: string): Promise<ExternalTrade>;
84
- placeExternalTrade({ provider, type, originCurrency, destinationCurrency, originAmount, destinationAmount, limitPrice, emarketsOrderType, arbitrageSessionId, }: {
84
+ placeExternalTrade({ provider, type, originCurrency, destinationCurrency, originAmount, destinationAmount, requestedOriginAmount, requestedDestinationAmount, limitPrice, emarketsOrderType, arbitrageSessionId, }: {
85
85
  provider: ExternalTradingProvider;
86
86
  type: ExternalTradeType;
87
87
  originCurrency: Crypto | Fiat;
88
88
  destinationCurrency: Crypto | Fiat;
89
89
  originAmount: number;
90
90
  destinationAmount: number;
91
+ requestedOriginAmount?: number;
92
+ requestedDestinationAmount?: number;
91
93
  limitPrice: number;
92
94
  emarketsOrderType: "TOD" | "TOM" | "SPT";
93
95
  arbitrageSessionId?: string;
@@ -478,7 +478,7 @@ class ClusterClient {
478
478
  return response.data;
479
479
  });
480
480
  }
481
- placeExternalTrade({ provider, type, originCurrency, destinationCurrency, originAmount, destinationAmount, limitPrice, emarketsOrderType, arbitrageSessionId, }) {
481
+ placeExternalTrade({ provider, type, originCurrency, destinationCurrency, originAmount, destinationAmount, requestedOriginAmount, requestedDestinationAmount, limitPrice, emarketsOrderType, arbitrageSessionId, }) {
482
482
  return __awaiter(this, void 0, void 0, function* () {
483
483
  const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/trades`, {
484
484
  provider,
@@ -487,6 +487,8 @@ class ClusterClient {
487
487
  destinationCurrency,
488
488
  originAmount,
489
489
  destinationAmount,
490
+ requestedOriginAmount,
491
+ requestedDestinationAmount,
490
492
  limitPrice,
491
493
  emarketsOrderType,
492
494
  arbitrageSessionId,
@@ -38,7 +38,6 @@ interface ExternalTradeDoc extends Document {
38
38
  requestedOriginAmount?: number;
39
39
  requestedDestinationAmount?: number;
40
40
  requestedAmountType: ExternalTradeAmountType;
41
- amountFilled: number;
42
41
  limitPrice?: number;
43
42
  actualPrice?: number;
44
43
  status: ExternalTradeStatus;
@@ -52,10 +52,6 @@ const buildExternalTrade = (mongoose) => {
52
52
  requestedDestinationAmount: {
53
53
  type: Number,
54
54
  },
55
- amountFilled: {
56
- type: Number,
57
- required: true,
58
- },
59
55
  limitPrice: {
60
56
  type: Number,
61
57
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2164",
3
+ "version": "1.0.2166",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.1913",
31
+ "@riocrypto/common": "^1.0.1914",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",