@riocrypto/common-server 1.0.2863 → 1.0.2865
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.
- package/build/clients/cluster-client.d.ts +20 -0
- package/build/clients/cluster-client.js +27 -0
- package/build/helpers/find-user-tier-forward-curve-rate.js +7 -2
- package/build/helpers/get-resolved-forward-curve-tiers.js +14 -5
- package/build/helpers/sanitize-order-doc.js +2 -0
- package/build/models/order.d.ts +4 -0
- package/build/models/order.js +11 -0
- package/build/models/user.d.ts +11 -71
- package/build/models/user.js +59 -232
- package/package.json +2 -2
|
@@ -108,6 +108,26 @@ declare class ClusterClient {
|
|
|
108
108
|
cancelFXTrade(fxTradeId: string): Promise<void>;
|
|
109
109
|
resetOrderFXData(orderId: string): Promise<void>;
|
|
110
110
|
resetOrderStatus(orderId: string, status: OrderStatus): Promise<void>;
|
|
111
|
+
confirmBankPayouts({ orderId, payouts, }: {
|
|
112
|
+
orderId: string;
|
|
113
|
+
payouts: {
|
|
114
|
+
amount: number;
|
|
115
|
+
SPEITrackingNumber?: string;
|
|
116
|
+
SPIDTrackingNumber?: string;
|
|
117
|
+
CEPLink?: string;
|
|
118
|
+
reference?: string;
|
|
119
|
+
sentAt: Date;
|
|
120
|
+
}[];
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
confirmCryptoPayouts({ orderId, payouts, }: {
|
|
123
|
+
orderId: string;
|
|
124
|
+
payouts: {
|
|
125
|
+
amount: number;
|
|
126
|
+
blockchainTxId?: string;
|
|
127
|
+
sentAt: Date;
|
|
128
|
+
}[];
|
|
129
|
+
}): Promise<void>;
|
|
130
|
+
confirmOrderLiquidity(orderId: string): Promise<void>;
|
|
111
131
|
deleteInvoice(id: string): Promise<void>;
|
|
112
132
|
deleteRecord(id: string): Promise<void>;
|
|
113
133
|
createRecord(orderId: string, force: boolean): Promise<void>;
|
|
@@ -411,6 +411,33 @@ class ClusterClient {
|
|
|
411
411
|
});
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
+
confirmBankPayouts({ orderId, payouts, }) {
|
|
415
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
416
|
+
yield this.axios.post(`${this.baseUrl}/api/payouts/bank/confirm`, { orderId, payouts }, {
|
|
417
|
+
headers: {
|
|
418
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
419
|
+
},
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
confirmCryptoPayouts({ orderId, payouts, }) {
|
|
424
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
425
|
+
yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/confirm`, { orderId, payouts }, {
|
|
426
|
+
headers: {
|
|
427
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
confirmOrderLiquidity(orderId) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
yield this.axios.post(`${this.baseUrl}/api/liquidity/confirm`, { orderId }, {
|
|
435
|
+
headers: {
|
|
436
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
437
|
+
},
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
}
|
|
414
441
|
deleteInvoice(id) {
|
|
415
442
|
return __awaiter(this, void 0, void 0, function* () {
|
|
416
443
|
yield this.axios.delete(`${this.baseUrl}/api/invoices/${id}`, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findUserTierForwardCurveRate = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
4
5
|
const interpolate_forward_curve_rate_1 = require("./interpolate-forward-curve-rate");
|
|
5
6
|
const getRangeCurve = (range, kind) => kind === "twap"
|
|
6
7
|
? range.TWAPTwoWaySettlementDateOffsetFee
|
|
@@ -19,8 +20,12 @@ const getRangeCurve = (range, kind) => kind === "twap"
|
|
|
19
20
|
* (`TWAPTwoWaySettlementDateOffsetFee`).
|
|
20
21
|
*/
|
|
21
22
|
const findUserTierForwardCurveRate = ({ user, country, side, amount, day, kind = "regular", }) => {
|
|
22
|
-
var _a
|
|
23
|
-
const ranges = (
|
|
23
|
+
var _a;
|
|
24
|
+
const ranges = (0, common_1.getActivePlatformFeeRanges)({
|
|
25
|
+
platformFees: (_a = user === null || user === void 0 ? void 0 : user.platformFeeRanges) === null || _a === void 0 ? void 0 : _a[country],
|
|
26
|
+
country,
|
|
27
|
+
side,
|
|
28
|
+
});
|
|
24
29
|
if (!ranges || ranges.length === 0)
|
|
25
30
|
return undefined;
|
|
26
31
|
const sorted = [...ranges].sort((a, b) => a.min - b.min);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getResolvedForwardCurveTiers = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
4
5
|
const resolve_forward_curve_rate_1 = require("./resolve-forward-curve-rate");
|
|
5
6
|
/**
|
|
6
7
|
* Builds per-tier resolved forward curves suitable for charting.
|
|
@@ -13,12 +14,20 @@ const resolve_forward_curve_rate_1 = require("./resolve-forward-curve-rate");
|
|
|
13
14
|
* continuous line.
|
|
14
15
|
*/
|
|
15
16
|
const getResolvedForwardCurveTiers = ({ user, broker, country, side, rioSettings, kind = "regular", }) => {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f
|
|
17
|
-
const userRanges = (
|
|
18
|
-
|
|
17
|
+
var _a, _b, _c, _d, _e, _f;
|
|
18
|
+
const userRanges = (0, common_1.getActivePlatformFeeRanges)({
|
|
19
|
+
platformFees: (_a = user.platformFeeRanges) === null || _a === void 0 ? void 0 : _a[country],
|
|
20
|
+
country,
|
|
21
|
+
side,
|
|
22
|
+
});
|
|
23
|
+
const brokerRanges = (0, common_1.getActivePlatformFeeRanges)({
|
|
24
|
+
platformFees: (_b = broker === null || broker === void 0 ? void 0 : broker.platformFeeRanges) === null || _b === void 0 ? void 0 : _b[country],
|
|
25
|
+
country,
|
|
26
|
+
side,
|
|
27
|
+
});
|
|
19
28
|
const platformCurve = kind === "twap"
|
|
20
|
-
? (
|
|
21
|
-
: (
|
|
29
|
+
? (_d = (_c = rioSettings.defaultTWAPTwoWaySettlementDateOffsetFee) === null || _c === void 0 ? void 0 : _c[country]) === null || _d === void 0 ? void 0 : _d[side]
|
|
30
|
+
: (_f = (_e = rioSettings.defaultTwoWaySettlementDateOffsetFee) === null || _e === void 0 ? void 0 : _e[country]) === null || _f === void 0 ? void 0 : _f[side];
|
|
22
31
|
let tiers = [];
|
|
23
32
|
if (userRanges && userRanges.length > 0) {
|
|
24
33
|
tiers = [...userRanges]
|
|
@@ -23,6 +23,8 @@ const sanitizeOrderDoc = (doc) => {
|
|
|
23
23
|
delete obj.actualAssetPriceInUSD;
|
|
24
24
|
delete obj.previousActiveStatus;
|
|
25
25
|
delete obj.binanceRFQOrderId;
|
|
26
|
+
delete obj.payoutAutoRetryAt;
|
|
27
|
+
delete obj.payoutAutoRetryCount;
|
|
26
28
|
if (((_a = obj.paymentsReceived) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
27
29
|
obj.paymentsReceived = obj.paymentsReceived.map((payment) => {
|
|
28
30
|
if (payment.fireblocksTransferId) {
|
package/build/models/order.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ interface OrderAttrs {
|
|
|
81
81
|
};
|
|
82
82
|
payoutTransferLimit?: number;
|
|
83
83
|
paymentReceivedAt?: Date;
|
|
84
|
+
payoutAutoRetryAt?: Date;
|
|
85
|
+
payoutAutoRetryCount?: number;
|
|
84
86
|
version: number;
|
|
85
87
|
invoice?: {
|
|
86
88
|
PDFLink?: string;
|
|
@@ -278,6 +280,8 @@ interface OrderDoc extends Document {
|
|
|
278
280
|
}[];
|
|
279
281
|
payoutTransferLimit?: number;
|
|
280
282
|
paymentReceivedAt?: Date;
|
|
283
|
+
payoutAutoRetryAt?: Date;
|
|
284
|
+
payoutAutoRetryCount?: number;
|
|
281
285
|
version: number;
|
|
282
286
|
informationalFees?: {
|
|
283
287
|
serviceFeeFiat?: number;
|
package/build/models/order.js
CHANGED
|
@@ -360,6 +360,14 @@ const buildOrder = (mongoose) => {
|
|
|
360
360
|
previousActiveStatus: {
|
|
361
361
|
type: String,
|
|
362
362
|
},
|
|
363
|
+
// Set when a failed payout is scheduled for an automated retry; unset
|
|
364
|
+
// once the retry has been claimed for processing.
|
|
365
|
+
payoutAutoRetryAt: {
|
|
366
|
+
type: mongoose.Schema.Types.Date,
|
|
367
|
+
},
|
|
368
|
+
payoutAutoRetryCount: {
|
|
369
|
+
type: Number,
|
|
370
|
+
},
|
|
363
371
|
TWAP: {
|
|
364
372
|
type: Object,
|
|
365
373
|
},
|
|
@@ -382,6 +390,9 @@ const buildOrder = (mongoose) => {
|
|
|
382
390
|
orderSchema.index({ brokerId: 1, createdAt: 1, side: 1, status: 1 });
|
|
383
391
|
orderSchema.index({ brokerId: 1, createdAt: 1, country: 1 });
|
|
384
392
|
orderSchema.index({ "TWAP.sessionId": 1 }, { sparse: true });
|
|
393
|
+
// Sparse: only orders with a pending automated payout retry carry this field,
|
|
394
|
+
// so the retry cron's due query never scans the full collection.
|
|
395
|
+
orderSchema.index({ payoutAutoRetryAt: 1 }, { sparse: true });
|
|
385
396
|
orderSchema.index({ userId: 1, "TWAP.sessionId": 1, createdAt: 1 });
|
|
386
397
|
orderSchema.index({ brokerId: 1, "TWAP.sessionId": 1, createdAt: 1 });
|
|
387
398
|
orderSchema.index({ clientReferenceId: 1 }, { sparse: true });
|
package/build/models/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnboardingStatus,
|
|
1
|
+
import { OnboardingStatus, PlatformFeesForCountry, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, MexicoInvoicingMethod, ColombiaInvoicingMethod } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document, HydratedDocument } from "mongoose";
|
|
3
3
|
interface UserAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -23,26 +23,11 @@ interface UserAttrs {
|
|
|
23
23
|
attributes?: UserAttribute[];
|
|
24
24
|
brokerId?: string;
|
|
25
25
|
platformFeeRanges?: {
|
|
26
|
-
MX?:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
buy?: PlatformFeeRange[];
|
|
32
|
-
sell?: PlatformFeeRange[];
|
|
33
|
-
};
|
|
34
|
-
CO?: {
|
|
35
|
-
buy?: PlatformFeeRange[];
|
|
36
|
-
sell?: PlatformFeeRange[];
|
|
37
|
-
};
|
|
38
|
-
BR?: {
|
|
39
|
-
buy?: PlatformFeeRange[];
|
|
40
|
-
sell?: PlatformFeeRange[];
|
|
41
|
-
};
|
|
42
|
-
US?: {
|
|
43
|
-
buy?: PlatformFeeRange[];
|
|
44
|
-
sell?: PlatformFeeRange[];
|
|
45
|
-
};
|
|
26
|
+
MX?: PlatformFeesForCountry;
|
|
27
|
+
PE?: PlatformFeesForCountry;
|
|
28
|
+
CO?: PlatformFeesForCountry;
|
|
29
|
+
BR?: PlatformFeesForCountry;
|
|
30
|
+
US?: PlatformFeesForCountry;
|
|
46
31
|
};
|
|
47
32
|
accumulatedVolumeInUSD?: {
|
|
48
33
|
MX?: {
|
|
@@ -170,56 +155,11 @@ interface UserDoc extends Document {
|
|
|
170
155
|
attributes?: UserAttribute[];
|
|
171
156
|
brokerId?: string;
|
|
172
157
|
platformFeeRanges?: {
|
|
173
|
-
MX?:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
};
|
|
179
|
-
twoWaySettlementDateOffsetFee?: {
|
|
180
|
-
[key: number]: number;
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
PE?: {
|
|
184
|
-
buy?: PlatformFeeRange[];
|
|
185
|
-
sell?: PlatformFeeRange[];
|
|
186
|
-
deferredPaymentFee?: {
|
|
187
|
-
[deferredPaymentType in DeferredPaymentType]: number;
|
|
188
|
-
};
|
|
189
|
-
twoWaySettlementDateOffsetFee?: {
|
|
190
|
-
[key: number]: number;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
CO?: {
|
|
194
|
-
buy?: PlatformFeeRange[];
|
|
195
|
-
sell?: PlatformFeeRange[];
|
|
196
|
-
deferredPaymentFee?: {
|
|
197
|
-
[deferredPaymentType in DeferredPaymentType]: number;
|
|
198
|
-
};
|
|
199
|
-
twoWaySettlementDateOffsetFee?: {
|
|
200
|
-
[key: number]: number;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
BR?: {
|
|
204
|
-
buy?: PlatformFeeRange[];
|
|
205
|
-
sell?: PlatformFeeRange[];
|
|
206
|
-
deferredPaymentFee?: {
|
|
207
|
-
[deferredPaymentType in DeferredPaymentType]: number;
|
|
208
|
-
};
|
|
209
|
-
twoWaySettlementDateOffsetFee?: {
|
|
210
|
-
[key: number]: number;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
US?: {
|
|
214
|
-
buy?: PlatformFeeRange[];
|
|
215
|
-
sell?: PlatformFeeRange[];
|
|
216
|
-
deferredPaymentFee?: {
|
|
217
|
-
[deferredPaymentType in DeferredPaymentType]: number;
|
|
218
|
-
};
|
|
219
|
-
twoWaySettlementDateOffsetFee?: {
|
|
220
|
-
[key: number]: number;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
158
|
+
MX?: PlatformFeesForCountry;
|
|
159
|
+
PE?: PlatformFeesForCountry;
|
|
160
|
+
CO?: PlatformFeesForCountry;
|
|
161
|
+
BR?: PlatformFeesForCountry;
|
|
162
|
+
US?: PlatformFeesForCountry;
|
|
223
163
|
};
|
|
224
164
|
accumulatedVolumeInUSD?: {
|
|
225
165
|
MX?: {
|
package/build/models/user.js
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildUser = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
5
|
+
const mongoose_1 = require("mongoose");
|
|
6
|
+
// Defined as a sub-schema (rather than a nested plain object) so that
|
|
7
|
+
// ranges without a schedule keep the path undefined instead of
|
|
8
|
+
// materializing an empty `{ daysOfWeek: [] }` object on every range.
|
|
9
|
+
const platformFeeScheduleSchema = new mongoose_1.Schema({
|
|
10
|
+
daysOfWeek: [
|
|
11
|
+
{
|
|
12
|
+
type: String,
|
|
13
|
+
enum: Object.values(common_1.DayOfWeek),
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
startMinute: {
|
|
17
|
+
type: Number,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
endMinute: {
|
|
21
|
+
type: Number,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
}, { _id: false });
|
|
25
|
+
const platformFeeRangeSchemaDefinition = {
|
|
26
|
+
min: {
|
|
27
|
+
type: Number,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
max: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
fee: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
schedule: {
|
|
39
|
+
type: platformFeeScheduleSchema,
|
|
40
|
+
},
|
|
41
|
+
deferredPaymentFee: {
|
|
42
|
+
type: Object,
|
|
43
|
+
},
|
|
44
|
+
twoWaySettlementDateOffsetFee: {
|
|
45
|
+
type: Object,
|
|
46
|
+
},
|
|
47
|
+
TWAPFee: {
|
|
48
|
+
type: Number,
|
|
49
|
+
},
|
|
50
|
+
TWAPTwoWaySettlementDateOffsetFee: {
|
|
51
|
+
type: Object,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const platformFeesForCountrySchemaDefinition = {
|
|
55
|
+
buy: [platformFeeRangeSchemaDefinition],
|
|
56
|
+
sell: [platformFeeRangeSchemaDefinition],
|
|
57
|
+
};
|
|
4
58
|
const buildUser = (mongoose) => {
|
|
5
59
|
// if model is already defined, return it
|
|
6
60
|
if (mongoose.models.User) {
|
|
@@ -62,238 +116,11 @@ const buildUser = (mongoose) => {
|
|
|
62
116
|
type: Number,
|
|
63
117
|
},
|
|
64
118
|
platformFeeRanges: {
|
|
65
|
-
MX:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
required: true,
|
|
71
|
-
},
|
|
72
|
-
max: {
|
|
73
|
-
type: Number,
|
|
74
|
-
required: true,
|
|
75
|
-
},
|
|
76
|
-
fee: {
|
|
77
|
-
type: Number,
|
|
78
|
-
required: true,
|
|
79
|
-
},
|
|
80
|
-
deferredPaymentFee: {
|
|
81
|
-
type: Object,
|
|
82
|
-
},
|
|
83
|
-
twoWaySettlementDateOffsetFee: {
|
|
84
|
-
type: Object,
|
|
85
|
-
},
|
|
86
|
-
TWAPFee: {
|
|
87
|
-
type: Number,
|
|
88
|
-
},
|
|
89
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
90
|
-
type: Object,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
sell: [
|
|
95
|
-
{
|
|
96
|
-
min: {
|
|
97
|
-
type: Number,
|
|
98
|
-
required: true,
|
|
99
|
-
},
|
|
100
|
-
max: {
|
|
101
|
-
type: Number,
|
|
102
|
-
required: true,
|
|
103
|
-
},
|
|
104
|
-
fee: {
|
|
105
|
-
type: Number,
|
|
106
|
-
required: true,
|
|
107
|
-
},
|
|
108
|
-
deferredPaymentFee: {
|
|
109
|
-
type: Object,
|
|
110
|
-
},
|
|
111
|
-
twoWaySettlementDateOffsetFee: {
|
|
112
|
-
type: Object,
|
|
113
|
-
},
|
|
114
|
-
TWAPFee: {
|
|
115
|
-
type: Number,
|
|
116
|
-
},
|
|
117
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
118
|
-
type: Object,
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
],
|
|
122
|
-
},
|
|
123
|
-
US: {
|
|
124
|
-
buy: [
|
|
125
|
-
{
|
|
126
|
-
min: {
|
|
127
|
-
type: Number,
|
|
128
|
-
required: true,
|
|
129
|
-
},
|
|
130
|
-
max: {
|
|
131
|
-
type: Number,
|
|
132
|
-
required: true,
|
|
133
|
-
},
|
|
134
|
-
fee: {
|
|
135
|
-
type: Number,
|
|
136
|
-
required: true,
|
|
137
|
-
},
|
|
138
|
-
deferredPaymentFee: {
|
|
139
|
-
type: Object,
|
|
140
|
-
},
|
|
141
|
-
twoWaySettlementDateOffsetFee: {
|
|
142
|
-
type: Object,
|
|
143
|
-
},
|
|
144
|
-
TWAPFee: {
|
|
145
|
-
type: Number,
|
|
146
|
-
},
|
|
147
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
148
|
-
type: Object,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
sell: [
|
|
153
|
-
{
|
|
154
|
-
min: {
|
|
155
|
-
type: Number,
|
|
156
|
-
required: true,
|
|
157
|
-
},
|
|
158
|
-
max: {
|
|
159
|
-
type: Number,
|
|
160
|
-
required: true,
|
|
161
|
-
},
|
|
162
|
-
fee: {
|
|
163
|
-
type: Number,
|
|
164
|
-
required: true,
|
|
165
|
-
},
|
|
166
|
-
deferredPaymentFee: {
|
|
167
|
-
type: Object,
|
|
168
|
-
},
|
|
169
|
-
twoWaySettlementDateOffsetFee: {
|
|
170
|
-
type: Object,
|
|
171
|
-
},
|
|
172
|
-
TWAPFee: {
|
|
173
|
-
type: Number,
|
|
174
|
-
},
|
|
175
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
176
|
-
type: Object,
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
},
|
|
181
|
-
PE: {
|
|
182
|
-
buy: [
|
|
183
|
-
{
|
|
184
|
-
min: {
|
|
185
|
-
type: Number,
|
|
186
|
-
required: true,
|
|
187
|
-
},
|
|
188
|
-
max: {
|
|
189
|
-
type: Number,
|
|
190
|
-
required: true,
|
|
191
|
-
},
|
|
192
|
-
fee: {
|
|
193
|
-
type: Number,
|
|
194
|
-
required: true,
|
|
195
|
-
},
|
|
196
|
-
deferredPaymentFee: {
|
|
197
|
-
type: Object,
|
|
198
|
-
},
|
|
199
|
-
twoWaySettlementDateOffsetFee: {
|
|
200
|
-
type: Object,
|
|
201
|
-
},
|
|
202
|
-
TWAPFee: {
|
|
203
|
-
type: Number,
|
|
204
|
-
},
|
|
205
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
206
|
-
type: Object,
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
sell: [
|
|
211
|
-
{
|
|
212
|
-
min: {
|
|
213
|
-
type: Number,
|
|
214
|
-
required: true,
|
|
215
|
-
},
|
|
216
|
-
max: {
|
|
217
|
-
type: Number,
|
|
218
|
-
required: true,
|
|
219
|
-
},
|
|
220
|
-
fee: {
|
|
221
|
-
type: Number,
|
|
222
|
-
required: true,
|
|
223
|
-
},
|
|
224
|
-
deferredPaymentFee: {
|
|
225
|
-
type: Object,
|
|
226
|
-
},
|
|
227
|
-
twoWaySettlementDateOffsetFee: {
|
|
228
|
-
type: Object,
|
|
229
|
-
},
|
|
230
|
-
TWAPFee: {
|
|
231
|
-
type: Number,
|
|
232
|
-
},
|
|
233
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
234
|
-
type: Object,
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
},
|
|
239
|
-
CO: {
|
|
240
|
-
buy: [
|
|
241
|
-
{
|
|
242
|
-
min: {
|
|
243
|
-
type: Number,
|
|
244
|
-
required: true,
|
|
245
|
-
},
|
|
246
|
-
max: {
|
|
247
|
-
type: Number,
|
|
248
|
-
required: true,
|
|
249
|
-
},
|
|
250
|
-
fee: {
|
|
251
|
-
type: Number,
|
|
252
|
-
required: true,
|
|
253
|
-
},
|
|
254
|
-
deferredPaymentFee: {
|
|
255
|
-
type: Object,
|
|
256
|
-
},
|
|
257
|
-
twoWaySettlementDateOffsetFee: {
|
|
258
|
-
type: Object,
|
|
259
|
-
},
|
|
260
|
-
TWAPFee: {
|
|
261
|
-
type: Number,
|
|
262
|
-
},
|
|
263
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
264
|
-
type: Object,
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
sell: [
|
|
269
|
-
{
|
|
270
|
-
min: {
|
|
271
|
-
type: Number,
|
|
272
|
-
required: true,
|
|
273
|
-
},
|
|
274
|
-
max: {
|
|
275
|
-
type: Number,
|
|
276
|
-
required: true,
|
|
277
|
-
},
|
|
278
|
-
fee: {
|
|
279
|
-
type: Number,
|
|
280
|
-
required: true,
|
|
281
|
-
},
|
|
282
|
-
deferredPaymentFee: {
|
|
283
|
-
type: Object,
|
|
284
|
-
},
|
|
285
|
-
twoWaySettlementDateOffsetFee: {
|
|
286
|
-
type: Object,
|
|
287
|
-
},
|
|
288
|
-
TWAPFee: {
|
|
289
|
-
type: Number,
|
|
290
|
-
},
|
|
291
|
-
TWAPTwoWaySettlementDateOffsetFee: {
|
|
292
|
-
type: Object,
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
],
|
|
296
|
-
},
|
|
119
|
+
MX: platformFeesForCountrySchemaDefinition,
|
|
120
|
+
US: platformFeesForCountrySchemaDefinition,
|
|
121
|
+
PE: platformFeesForCountrySchemaDefinition,
|
|
122
|
+
CO: platformFeesForCountrySchemaDefinition,
|
|
123
|
+
BR: platformFeesForCountrySchemaDefinition,
|
|
297
124
|
},
|
|
298
125
|
rioBankAccount: {
|
|
299
126
|
MX: Object,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2865",
|
|
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.6.0",
|
|
29
29
|
"@google-cloud/storage": "^7.19.0",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.10.3",
|
|
31
|
-
"@riocrypto/common": "1.0.
|
|
31
|
+
"@riocrypto/common": "1.0.2676",
|
|
32
32
|
"@slack/web-api": "^7.15.0",
|
|
33
33
|
"@types/express": "^4.17.25",
|
|
34
34
|
"axios": "1.16.0",
|