@riocrypto/common-server 1.0.2429 → 1.0.2431

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.
@@ -10,7 +10,7 @@ declare class ClusterClient {
10
10
  newAmountCrypto?: number;
11
11
  useSamePrice?: boolean;
12
12
  }): Promise<Quote>;
13
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, priceType, limitNetPrice, }: {
13
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, priceType, limitNetPrice, cancelAt, }: {
14
14
  userId: string;
15
15
  side: Side;
16
16
  country: Country;
@@ -27,6 +27,7 @@ declare class ClusterClient {
27
27
  ignoreLiquidityError?: boolean;
28
28
  priceType?: PriceType;
29
29
  limitNetPrice?: number;
30
+ cancelAt?: Date;
30
31
  }): Promise<Quote>;
31
32
  getNewChainedQuote(chainedOrderId: string, chainedQuote: ChainedQuote, newOriginAmount?: number): Promise<ChainedQuote>;
32
33
  getBidQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number, USBankTransferMethod?: "ach_push" | "wire", netPrice?: string): Promise<Quote>;
@@ -74,7 +74,7 @@ class ClusterClient {
74
74
  return response.data.quote;
75
75
  });
76
76
  }
77
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, priceType, limitNetPrice, }) {
77
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, priceType, limitNetPrice, cancelAt, }) {
78
78
  return __awaiter(this, void 0, void 0, function* () {
79
79
  const response = yield this.axios.post(`${this.baseUrl}/api/quotes`, {
80
80
  userId,
@@ -93,6 +93,7 @@ class ClusterClient {
93
93
  ignoreLiquidityError,
94
94
  priceType,
95
95
  limitNetPrice,
96
+ cancelAt,
96
97
  }, {
97
98
  headers: {
98
99
  "x-cluster-api-key": this.clusterApiKey,
@@ -25,12 +25,14 @@ interface OrderAttrs {
25
25
  wireMessage?: string;
26
26
  parentOrderId?: string;
27
27
  marketPrice: number;
28
+ price?: number;
28
29
  depositAddress?: string;
29
30
  depositTxId?: string;
30
31
  withdrawalTxId?: string;
31
32
  withdrawalTxIds?: string[];
32
33
  brokerId?: string;
33
34
  limitNetPrice?: number;
35
+ cancelAt?: Date;
34
36
  conversionRateUSD: number;
35
37
  conversionRateUSDWithMarkups: number;
36
38
  actualConversionRateUSD?: number;
@@ -143,6 +145,7 @@ interface OrderDoc extends Document {
143
145
  twoWaySettlementDate: Date;
144
146
  country: Country;
145
147
  limitNetPrice?: number;
148
+ cancelAt?: Date;
146
149
  cryptoAddress?: string;
147
150
  amountFiat: number;
148
151
  amountCrypto: number;
@@ -153,6 +156,7 @@ interface OrderDoc extends Document {
153
156
  fees: Fees;
154
157
  actualFees?: Fees;
155
158
  marketPrice: number;
159
+ price?: number;
156
160
  depositAddress?: string;
157
161
  depositTxId?: string;
158
162
  withdrawalTxId?: string;
@@ -38,6 +38,9 @@ const buildOrder = (mongoose) => {
38
38
  bulkBankPaymentId: {
39
39
  type: String,
40
40
  },
41
+ cancelAt: {
42
+ type: mongoose.Schema.Types.Date,
43
+ },
41
44
  crypto: {
42
45
  type: String,
43
46
  required: true,
@@ -156,7 +159,9 @@ const buildOrder = (mongoose) => {
156
159
  },
157
160
  marketPrice: {
158
161
  type: Number,
159
- required: true,
162
+ },
163
+ price: {
164
+ type: Number,
160
165
  },
161
166
  brokerId: {
162
167
  type: String,
@@ -17,8 +17,10 @@ interface QuoteAttrs {
17
17
  processor: Processor;
18
18
  fees: Fees;
19
19
  assetPriceInUSD: number;
20
+ price?: number;
20
21
  marketPrice: number;
21
22
  createdAt: Date;
23
+ cancelAt?: Date;
22
24
  noMarkups: boolean;
23
25
  quoteInCrypto: boolean;
24
26
  reissueAfterExpiration: boolean;
@@ -56,7 +58,9 @@ interface QuoteDoc extends Document {
56
58
  liquidityProvider: LiquidityProvider;
57
59
  processor: Processor;
58
60
  createdAt: Date;
61
+ cancelAt?: Date;
59
62
  fees: Fees;
63
+ price?: number;
60
64
  marketPrice: number;
61
65
  assetPriceInUSD: number;
62
66
  quoteInCrypto: boolean;
@@ -91,6 +91,9 @@ const buildQuote = (mongoose) => {
91
91
  noMarkups: {
92
92
  type: Boolean,
93
93
  },
94
+ price: {
95
+ type: Number,
96
+ },
94
97
  marketPrice: {
95
98
  type: Number,
96
99
  },
@@ -104,6 +107,9 @@ const buildQuote = (mongoose) => {
104
107
  type: mongoose.Schema.Types.Date,
105
108
  required: true,
106
109
  },
110
+ cancelAt: {
111
+ type: mongoose.Schema.Types.Date,
112
+ },
107
113
  conversionRateUSD: {
108
114
  type: Number,
109
115
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2429",
3
+ "version": "1.0.2431",
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.2187",
31
+ "@riocrypto/common": "^1.0.2189",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",