@riocrypto/common-server 1.0.2432 → 1.0.2435
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, timeInForceStartsAt, timeInForceEndsAt, }: {
|
|
14
14
|
userId: string;
|
|
15
15
|
side: Side;
|
|
16
16
|
country: Country;
|
|
@@ -27,8 +27,8 @@ declare class ClusterClient {
|
|
|
27
27
|
ignoreLiquidityError?: boolean;
|
|
28
28
|
priceType?: PriceType;
|
|
29
29
|
limitNetPrice?: number;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
timeInForceStartsAt?: Date;
|
|
31
|
+
timeInForceEndsAt?: Date;
|
|
32
32
|
}): Promise<Quote>;
|
|
33
33
|
getNewChainedQuote(chainedOrderId: string, chainedQuote: ChainedQuote, newOriginAmount?: number): Promise<ChainedQuote>;
|
|
34
34
|
getBidQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number, USBankTransferMethod?: "ach_push" | "wire", netPrice?: string): Promise<Quote>;
|
|
@@ -106,6 +106,7 @@ declare class ClusterClient {
|
|
|
106
106
|
isExternalTrade: boolean;
|
|
107
107
|
}): Promise<EmarketsFXTrade>;
|
|
108
108
|
retryEmarketsTrade(id: string): Promise<void>;
|
|
109
|
+
cancelEmarketsTrade(id: string): Promise<void>;
|
|
109
110
|
retryExternalTrade(id: string): Promise<void>;
|
|
110
111
|
importExternalTrade(data: {
|
|
111
112
|
provider: ExternalTradingProvider;
|
|
@@ -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, timeInForceStartsAt, timeInForceEndsAt, }) {
|
|
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,8 +93,8 @@ class ClusterClient {
|
|
|
93
93
|
ignoreLiquidityError,
|
|
94
94
|
priceType,
|
|
95
95
|
limitNetPrice,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
timeInForceStartsAt,
|
|
97
|
+
timeInForceEndsAt,
|
|
98
98
|
}, {
|
|
99
99
|
headers: {
|
|
100
100
|
"x-cluster-api-key": this.clusterApiKey,
|
|
@@ -460,6 +460,15 @@ class ClusterClient {
|
|
|
460
460
|
});
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
+
cancelEmarketsTrade(id) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
yield this.axios.post(`${this.baseUrl}/api/emarkets/bot/trades/${id}/cancel`, {}, {
|
|
466
|
+
headers: {
|
|
467
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
}
|
|
463
472
|
retryExternalTrade(id) {
|
|
464
473
|
return __awaiter(this, void 0, void 0, function* () {
|
|
465
474
|
yield this.axios.post(`${this.baseUrl}/api/trading/external/trades/${id}/retry`, {}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
package/build/models/order.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ interface OrderAttrs {
|
|
|
32
32
|
withdrawalTxIds?: string[];
|
|
33
33
|
brokerId?: string;
|
|
34
34
|
limitNetPrice?: number;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
timeInForceStartsAt?: Date;
|
|
36
|
+
timeInForceEndsAt?: Date;
|
|
37
37
|
conversionRateUSD: number;
|
|
38
38
|
conversionRateUSDWithMarkups: number;
|
|
39
39
|
actualConversionRateUSD?: number;
|
|
@@ -146,8 +146,8 @@ interface OrderDoc extends Document {
|
|
|
146
146
|
twoWaySettlementDate: Date;
|
|
147
147
|
country: Country;
|
|
148
148
|
limitNetPrice?: number;
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
timeInForceStartsAt?: Date;
|
|
150
|
+
timeInForceEndsAt?: Date;
|
|
151
151
|
cryptoAddress?: string;
|
|
152
152
|
amountFiat: number;
|
|
153
153
|
amountCrypto: number;
|
package/build/models/order.js
CHANGED
|
@@ -38,10 +38,10 @@ const buildOrder = (mongoose) => {
|
|
|
38
38
|
bulkBankPaymentId: {
|
|
39
39
|
type: String,
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
timeInForceStartsAt: {
|
|
42
42
|
type: mongoose.Schema.Types.Date,
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
timeInForceEndsAt: {
|
|
45
45
|
type: mongoose.Schema.Types.Date,
|
|
46
46
|
},
|
|
47
47
|
crypto: {
|
package/build/models/quote.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ interface QuoteAttrs {
|
|
|
20
20
|
price?: number;
|
|
21
21
|
marketPrice: number;
|
|
22
22
|
createdAt: Date;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
timeInForceStartsAt?: Date;
|
|
24
|
+
timeInForceEndsAt?: Date;
|
|
25
25
|
noMarkups: boolean;
|
|
26
26
|
quoteInCrypto: boolean;
|
|
27
27
|
reissueAfterExpiration: boolean;
|
|
@@ -59,8 +59,8 @@ interface QuoteDoc extends Document {
|
|
|
59
59
|
liquidityProvider: LiquidityProvider;
|
|
60
60
|
processor: Processor;
|
|
61
61
|
createdAt: Date;
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
timeInForceStartsAt?: Date;
|
|
63
|
+
timeInForceEndsAt?: Date;
|
|
64
64
|
fees: Fees;
|
|
65
65
|
price?: number;
|
|
66
66
|
marketPrice: number;
|
package/build/models/quote.js
CHANGED
|
@@ -107,10 +107,10 @@ const buildQuote = (mongoose) => {
|
|
|
107
107
|
type: mongoose.Schema.Types.Date,
|
|
108
108
|
required: true,
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
timeInForceStartsAt: {
|
|
111
111
|
type: mongoose.Schema.Types.Date,
|
|
112
112
|
},
|
|
113
|
-
|
|
113
|
+
timeInForceEndsAt: {
|
|
114
114
|
type: mongoose.Schema.Types.Date,
|
|
115
115
|
},
|
|
116
116
|
conversionRateUSD: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2435",
|
|
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.
|
|
31
|
+
"@riocrypto/common": "^1.0.2193",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|