@riocrypto/common-server 1.0.2442 → 1.0.2444
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType,
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -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,
|
|
13
|
+
createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, orderType, limitNetPrice, timeInForceStartsAt, timeInForceEndsAt, }: {
|
|
14
14
|
userId: string;
|
|
15
15
|
side: Side;
|
|
16
16
|
country: Country;
|
|
@@ -25,7 +25,7 @@ declare class ClusterClient {
|
|
|
25
25
|
netPrice?: number;
|
|
26
26
|
marketPrice?: number;
|
|
27
27
|
ignoreLiquidityError?: boolean;
|
|
28
|
-
|
|
28
|
+
orderType?: OrderType;
|
|
29
29
|
limitNetPrice?: number;
|
|
30
30
|
timeInForceStartsAt?: Date;
|
|
31
31
|
timeInForceEndsAt?: Date;
|
|
@@ -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,
|
|
77
|
+
createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, netPrice, marketPrice, ignoreLiquidityError, orderType, 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,
|
|
@@ -91,7 +91,7 @@ class ClusterClient {
|
|
|
91
91
|
netPrice,
|
|
92
92
|
marketPrice,
|
|
93
93
|
ignoreLiquidityError,
|
|
94
|
-
|
|
94
|
+
orderType,
|
|
95
95
|
limitNetPrice,
|
|
96
96
|
timeInForceStartsAt,
|
|
97
97
|
timeInForceEndsAt,
|
package/build/models/order.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, TwoWaySettlementType,
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, TwoWaySettlementType, OrderType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface OrderAttrs {
|
|
4
4
|
quoteId: string;
|
|
5
|
-
|
|
5
|
+
type: OrderType;
|
|
6
6
|
userId: string;
|
|
7
7
|
crypto: Crypto;
|
|
8
8
|
side: Side;
|
|
@@ -134,7 +134,7 @@ interface OrderAttrs {
|
|
|
134
134
|
}
|
|
135
135
|
interface OrderDoc extends Document {
|
|
136
136
|
quoteId: string;
|
|
137
|
-
|
|
137
|
+
type: OrderType;
|
|
138
138
|
userId: string;
|
|
139
139
|
status: OrderStatus;
|
|
140
140
|
crypto: Crypto;
|
package/build/models/order.js
CHANGED
package/build/models/quote.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, Crypto, DeferredPaymentType, TwoWaySettlementType,
|
|
1
|
+
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, Crypto, DeferredPaymentType, TwoWaySettlementType, OrderType } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface QuoteAttrs {
|
|
4
4
|
userId: string;
|
|
5
|
-
|
|
5
|
+
orderType: OrderType;
|
|
6
6
|
crypto: Crypto;
|
|
7
7
|
side: Side;
|
|
8
8
|
fiat: Fiat;
|
|
@@ -45,7 +45,7 @@ interface QuoteAttrs {
|
|
|
45
45
|
}
|
|
46
46
|
interface QuoteDoc extends Document {
|
|
47
47
|
userId: string;
|
|
48
|
-
|
|
48
|
+
orderType: OrderType;
|
|
49
49
|
crypto: Crypto;
|
|
50
50
|
side: Side;
|
|
51
51
|
fiat: Fiat;
|
package/build/models/quote.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2444",
|
|
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.2206",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|