@riocrypto/common-server 1.0.2163 → 1.0.2164

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.
@@ -6,12 +6,13 @@ interface ExternalTradeAttrs {
6
6
  type: ExternalTradeType;
7
7
  side: Side;
8
8
  provider: ExternalTradingProvider;
9
- amountType: ExternalTradeAmountType;
10
9
  originCurrency: Fiat | Crypto;
11
10
  originAmount: number;
12
11
  destinationCurrency: Fiat | Crypto;
13
12
  destinationAmount: number;
14
- amountFilled: number;
13
+ requestedOriginAmount?: number;
14
+ requestedDestinationAmount?: number;
15
+ requestedAmountType: ExternalTradeAmountType;
15
16
  limitPrice?: number;
16
17
  actualPrice?: number;
17
18
  status: ExternalTradeStatus;
@@ -34,6 +35,9 @@ interface ExternalTradeDoc extends Document {
34
35
  originAmount: number;
35
36
  destinationCurrency: Fiat | Crypto;
36
37
  destinationAmount: number;
38
+ requestedOriginAmount?: number;
39
+ requestedDestinationAmount?: number;
40
+ requestedAmountType: ExternalTradeAmountType;
37
41
  amountFilled: number;
38
42
  limitPrice?: number;
39
43
  actualPrice?: number;
@@ -14,7 +14,7 @@ const buildExternalTrade = (mongoose) => {
14
14
  providerOrderId: {
15
15
  type: String,
16
16
  },
17
- amountType: {
17
+ requestedAmountType: {
18
18
  type: String,
19
19
  required: true,
20
20
  },
@@ -38,6 +38,9 @@ const buildExternalTrade = (mongoose) => {
38
38
  type: Number,
39
39
  required: true,
40
40
  },
41
+ requestedOriginAmount: {
42
+ type: Number,
43
+ },
41
44
  destinationCurrency: {
42
45
  type: String,
43
46
  required: true,
@@ -46,6 +49,9 @@ const buildExternalTrade = (mongoose) => {
46
49
  type: Number,
47
50
  required: true,
48
51
  },
52
+ requestedDestinationAmount: {
53
+ type: Number,
54
+ },
49
55
  amountFilled: {
50
56
  type: Number,
51
57
  required: true,
@@ -1,4 +1,4 @@
1
- import { Fiat, Side, Crypto, ExternalTradingAlgorithmType, ExternalTradingProvider, ExternalTradingAlgorithmStatus } from "@riocrypto/common";
1
+ import { Fiat, Side, Crypto, ExternalTradingAlgorithmType, ExternalTradingProvider, ExternalTradingAlgorithmStatus, ExternalTradeAmountType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface ExternalTradingAlgorithmAttrs {
4
4
  createdAt: Date;
@@ -12,6 +12,7 @@ interface ExternalTradingAlgorithmAttrs {
12
12
  destinationCurrency: Fiat | Crypto;
13
13
  maxOriginAmount?: number;
14
14
  maxDestinationAmount?: number;
15
+ maxAmountType?: ExternalTradeAmountType;
15
16
  isExecuting: boolean;
16
17
  actualPrice?: number;
17
18
  algoOptions: {
@@ -36,6 +37,7 @@ interface ExternalTradingAlgorithmDoc extends Document {
36
37
  destinationCurrency: Fiat | Crypto;
37
38
  maxOriginAmount?: number;
38
39
  maxDestinationAmount?: number;
40
+ maxAmountType?: ExternalTradeAmountType;
39
41
  isExecuting: boolean;
40
42
  actualPrice?: number;
41
43
  algoOptions: {
@@ -43,6 +43,9 @@ const buildExternalTradingAlgorithm = (mongoose) => {
43
43
  type: String,
44
44
  required: true,
45
45
  },
46
+ maxAmountType: {
47
+ type: String,
48
+ },
46
49
  maxOriginAmount: {
47
50
  type: Number,
48
51
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2163",
3
+ "version": "1.0.2164",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",