@riocrypto/common-server 1.0.2729 → 1.0.2730

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.
@@ -33,7 +33,7 @@ declare class ClusterClient {
33
33
  isBinanceRFQ?: boolean;
34
34
  }): Promise<Quote>;
35
35
  getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
36
- createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }: {
36
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, binanceRFQOrderId, }: {
37
37
  quoteId: string;
38
38
  userAddressId?: string;
39
39
  payoutBankAccountId?: string;
@@ -45,6 +45,7 @@ declare class ClusterClient {
45
45
  bulkCryptoPayoutId?: string;
46
46
  bulkBankPayoutId?: string;
47
47
  TWAPSessionId?: string;
48
+ binanceRFQOrderId?: string;
48
49
  }): Promise<Order>;
49
50
  takeAxe({ axeId, userId, amount, crypto, userAddressId, payoutBankAccountId, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, }: {
50
51
  axeId: string;
@@ -114,7 +114,7 @@ class ClusterClient {
114
114
  return response.data;
115
115
  });
116
116
  }
117
- createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }) {
117
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, binanceRFQOrderId, }) {
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
119
  const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
120
120
  quoteId,
@@ -132,6 +132,7 @@ class ClusterClient {
132
132
  : undefined,
133
133
  bulkBankPaymentId: bulkBankPaymentId ? bulkBankPaymentId : undefined,
134
134
  TWAPSessionId: TWAPSessionId ? TWAPSessionId : undefined,
135
+ binanceRFQOrderId: binanceRFQOrderId ? binanceRFQOrderId : undefined,
135
136
  }, {
136
137
  headers: {
137
138
  "x-cluster-api-key": this.clusterApiKey,
@@ -21,6 +21,7 @@ const sanitizeOrderDoc = (doc) => {
21
21
  delete obj.assetPriceInUSD;
22
22
  delete obj.actualAssetPriceInUSD;
23
23
  delete obj.previousActiveStatus;
24
+ delete obj.binanceRFQOrderId;
24
25
  if (((_a = obj.paymentsReceived) === null || _a === void 0 ? void 0 : _a.length) > 0) {
25
26
  obj.paymentsReceived = obj.paymentsReceived.map((payment) => {
26
27
  if (payment.fireblocksTransferId) {
@@ -4,6 +4,7 @@ interface BinanceRFQQuoteAttrs {
4
4
  rfqId: string;
5
5
  quoteId: string;
6
6
  clientQuoteId: string;
7
+ binanceRFQOrderId: string;
7
8
  baseAsset: string;
8
9
  quoteAsset: string;
9
10
  side: BinanceRFQSide;
@@ -16,6 +17,7 @@ interface BinanceRFQQuoteDoc extends Document {
16
17
  rfqId: string;
17
18
  quoteId: string;
18
19
  clientQuoteId: string;
20
+ binanceRFQOrderId: string;
19
21
  baseAsset: string;
20
22
  quoteAsset: string;
21
23
  side: BinanceRFQSide;
@@ -19,6 +19,9 @@ const buildBinanceRFQQuote = (mongoose) => {
19
19
  type: String,
20
20
  required: true,
21
21
  },
22
+ binanceRFQOrderId: {
23
+ type: String,
24
+ },
22
25
  baseAsset: {
23
26
  type: String,
24
27
  required: true,
@@ -4,6 +4,7 @@ interface BinanceRFQTradeAttrs {
4
4
  rfqId: string;
5
5
  quoteId: string;
6
6
  tradeId: string;
7
+ binanceRFQOrderId: string;
7
8
  executedPrice: number;
8
9
  executedQty: number;
9
10
  tradeStatus: BinanceRFQTradeStatus;
@@ -14,6 +15,7 @@ interface BinanceRFQTradeDoc extends Document {
14
15
  rfqId: string;
15
16
  quoteId: string;
16
17
  tradeId: string;
18
+ binanceRFQOrderId: string;
17
19
  executedPrice: number;
18
20
  executedQty: number;
19
21
  tradeStatus: BinanceRFQTradeStatus;
@@ -15,6 +15,9 @@ const buildBinanceRFQTrade = (mongoose) => {
15
15
  type: String,
16
16
  required: true,
17
17
  },
18
+ binanceRFQOrderId: {
19
+ type: String,
20
+ },
18
21
  tradeId: {
19
22
  type: String,
20
23
  required: true,
@@ -141,6 +141,7 @@ interface OrderAttrs {
141
141
  sessionId: string;
142
142
  settlementId: string;
143
143
  };
144
+ binanceRFQOrderId?: string;
144
145
  }
145
146
  interface OrderDoc extends Document {
146
147
  quoteId: string;
@@ -282,6 +283,7 @@ interface OrderDoc extends Document {
282
283
  sessionId: string;
283
284
  settlementId: string;
284
285
  };
286
+ binanceRFQOrderId?: string;
285
287
  }
286
288
  interface OrderModel extends Model<OrderDoc> {
287
289
  build(attrs: OrderAttrs): OrderDoc;
@@ -357,6 +357,9 @@ const buildOrder = (mongoose) => {
357
357
  TWAP: {
358
358
  type: Object,
359
359
  },
360
+ binanceRFQOrderId: {
361
+ type: String,
362
+ },
360
363
  }, {
361
364
  toJSON: {
362
365
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2729",
3
+ "version": "1.0.2730",
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.2524",
31
+ "@riocrypto/common": "^1.0.2526",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",