@riocrypto/common-server 1.0.2683 → 1.0.2685
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.
|
@@ -48,6 +48,9 @@ class CoincoverClient {
|
|
|
48
48
|
[common_1.Crypto.USDCBase]: "usd-coin",
|
|
49
49
|
[common_1.Crypto.USDCSolana]: "usd-coin",
|
|
50
50
|
[common_1.Crypto.USDCPolygonBridged]: "usd-coin",
|
|
51
|
+
[common_1.Crypto.EURCEthereum]: "euro-coin",
|
|
52
|
+
[common_1.Crypto.EURCSolana]: "euro-coin",
|
|
53
|
+
[common_1.Crypto.EURCBase]: "euro-coin",
|
|
51
54
|
[common_1.Crypto.TRON]: "tron",
|
|
52
55
|
[common_1.Crypto.SOL]: "solana",
|
|
53
56
|
[common_1.Crypto.XLM]: "stellar",
|
|
@@ -7,7 +7,7 @@ const getNetworkFees = (crypto, conversionRateToUSD) => {
|
|
|
7
7
|
if (crypto === common_1.Crypto.USDTTron) {
|
|
8
8
|
withdrawFeeInUSD = 3;
|
|
9
9
|
}
|
|
10
|
-
else if (crypto === common_1.Crypto.USDCSolana) {
|
|
10
|
+
else if (crypto === common_1.Crypto.USDCSolana || crypto === common_1.Crypto.EURCSolana) {
|
|
11
11
|
withdrawFeeInUSD = 0.01;
|
|
12
12
|
}
|
|
13
13
|
else if (crypto === common_1.Crypto.USDCPolygon) {
|
|
@@ -16,10 +16,10 @@ const getNetworkFees = (crypto, conversionRateToUSD) => {
|
|
|
16
16
|
else if (crypto === common_1.Crypto.USDCStellar) {
|
|
17
17
|
withdrawFeeInUSD = 0.01;
|
|
18
18
|
}
|
|
19
|
-
else if (crypto === common_1.Crypto.USDCBase) {
|
|
19
|
+
else if (crypto === common_1.Crypto.USDCBase || crypto === common_1.Crypto.EURCBase) {
|
|
20
20
|
withdrawFeeInUSD = 0.01;
|
|
21
21
|
}
|
|
22
|
-
else if (crypto === common_1.Crypto.USDC || crypto === common_1.Crypto.USDTEthereum) {
|
|
22
|
+
else if (crypto === common_1.Crypto.USDC || crypto === common_1.Crypto.USDTEthereum || crypto === common_1.Crypto.EURCEthereum) {
|
|
23
23
|
withdrawFeeInUSD = 5;
|
|
24
24
|
}
|
|
25
25
|
else {
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2685",
|
|
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.2488",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|