@riocrypto/common-server 1.0.2682 → 1.0.2684
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.
|
@@ -143,7 +143,7 @@ declare class ClusterClient {
|
|
|
143
143
|
originAmount: number;
|
|
144
144
|
destinationAmount: number;
|
|
145
145
|
type: ExternalTradeType;
|
|
146
|
-
|
|
146
|
+
settlementType?: EmarketsSettlementType | TransnetworkSettlementType;
|
|
147
147
|
arbitrageSessionId?: string;
|
|
148
148
|
externalTradingAlgorithmId?: string;
|
|
149
149
|
}): Promise<ExternalTrade>;
|
|
@@ -167,7 +167,7 @@ declare class ClusterClient {
|
|
|
167
167
|
stopExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
168
168
|
getExternalTradingAlgorithm(id: string): Promise<ExternalTradingAlgorithm>;
|
|
169
169
|
getExternalTrade(id: string): Promise<ExternalTrade>;
|
|
170
|
-
placeExternalTrade({ provider, type, originCurrency, destinationCurrency, requestedOriginAmount, requestedDestinationAmount, limitPrice,
|
|
170
|
+
placeExternalTrade({ provider, type, originCurrency, destinationCurrency, requestedOriginAmount, requestedDestinationAmount, limitPrice, settlementType, arbitrageSessionId, }: {
|
|
171
171
|
provider: ExternalTradingProvider;
|
|
172
172
|
type: ExternalTradeType;
|
|
173
173
|
originCurrency: Crypto | Fiat;
|
|
@@ -175,7 +175,7 @@ declare class ClusterClient {
|
|
|
175
175
|
requestedOriginAmount?: number;
|
|
176
176
|
requestedDestinationAmount?: number;
|
|
177
177
|
limitPrice: number;
|
|
178
|
-
|
|
178
|
+
settlementType?: EmarketsSettlementType | TransnetworkSettlementType;
|
|
179
179
|
arbitrageSessionId?: string;
|
|
180
180
|
}): Promise<ExternalTrade>;
|
|
181
181
|
generateSTPDepositCLABE(userId: string): Promise<{
|
|
@@ -594,7 +594,7 @@ class ClusterClient {
|
|
|
594
594
|
return response.data;
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
-
placeExternalTrade({ provider, type, originCurrency, destinationCurrency, requestedOriginAmount, requestedDestinationAmount, limitPrice,
|
|
597
|
+
placeExternalTrade({ provider, type, originCurrency, destinationCurrency, requestedOriginAmount, requestedDestinationAmount, limitPrice, settlementType, arbitrageSessionId, }) {
|
|
598
598
|
return __awaiter(this, void 0, void 0, function* () {
|
|
599
599
|
const response = yield this.axios.post(`${this.baseUrl}/api/trading/external/trades`, {
|
|
600
600
|
provider,
|
|
@@ -604,7 +604,7 @@ class ClusterClient {
|
|
|
604
604
|
requestedOriginAmount,
|
|
605
605
|
requestedDestinationAmount,
|
|
606
606
|
limitPrice,
|
|
607
|
-
|
|
607
|
+
settlementType,
|
|
608
608
|
arbitrageSessionId,
|
|
609
609
|
}, {
|
|
610
610
|
headers: {
|
package/build/models/fill.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ interface FillAttrs {
|
|
|
5
5
|
effectiveDate: Date;
|
|
6
6
|
orderId: string;
|
|
7
7
|
symbol: string;
|
|
8
|
-
status: string;
|
|
9
8
|
side: Side;
|
|
10
9
|
price: number;
|
|
11
10
|
qty: number;
|
|
@@ -15,13 +14,13 @@ interface FillAttrs {
|
|
|
15
14
|
note?: string;
|
|
16
15
|
referenceRate?: number;
|
|
17
16
|
valueDate?: Date;
|
|
17
|
+
externalTradeId?: string;
|
|
18
18
|
}
|
|
19
19
|
interface FillDoc extends Document {
|
|
20
20
|
createdAt: Date;
|
|
21
21
|
effectiveDate: Date;
|
|
22
22
|
orderId: string;
|
|
23
23
|
symbol: string;
|
|
24
|
-
status: string;
|
|
25
24
|
side: Side;
|
|
26
25
|
price: number;
|
|
27
26
|
qty: number;
|
|
@@ -31,6 +30,7 @@ interface FillDoc extends Document {
|
|
|
31
30
|
note?: string;
|
|
32
31
|
referenceRate?: number;
|
|
33
32
|
valueDate?: Date;
|
|
33
|
+
externalTradeId?: string;
|
|
34
34
|
}
|
|
35
35
|
interface FillModel extends Model<FillDoc> {
|
|
36
36
|
build(attrs: FillAttrs): FillDoc;
|
package/build/models/fill.js
CHANGED
|
@@ -10,7 +10,6 @@ const buildFill = (mongoose) => {
|
|
|
10
10
|
effectiveDate: { type: Date, required: true },
|
|
11
11
|
orderId: { type: String, required: true },
|
|
12
12
|
symbol: { type: String, required: true },
|
|
13
|
-
status: { type: String, required: true },
|
|
14
13
|
side: { type: String, required: true },
|
|
15
14
|
price: { type: Number, required: true },
|
|
16
15
|
qty: { type: Number, required: true },
|
|
@@ -19,11 +18,13 @@ const buildFill = (mongoose) => {
|
|
|
19
18
|
isDeleted: { type: Boolean, required: true, default: false },
|
|
20
19
|
note: { type: String, required: false },
|
|
21
20
|
referenceRate: { type: Number, required: false },
|
|
22
|
-
valueDate: { type: Date, required: false }
|
|
21
|
+
valueDate: { type: Date, required: false },
|
|
22
|
+
externalTradeId: { type: String, required: false }
|
|
23
23
|
});
|
|
24
24
|
FillSchema.index({ createdAt: -1 });
|
|
25
25
|
FillSchema.index({ orderId: -1 });
|
|
26
26
|
FillSchema.index({ source: 1, createdAt: -1 });
|
|
27
|
+
FillSchema.index({ externalTradeId: 1 });
|
|
27
28
|
FillSchema.statics.build = (attrs) => {
|
|
28
29
|
return new Fill(attrs);
|
|
29
30
|
};
|