@riocrypto/common-server 1.0.521 → 1.0.523
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.
|
@@ -97,11 +97,10 @@ class CCXTClient {
|
|
|
97
97
|
let ticker = yield exchange.fetchTicker(`${crypto}/${fiat}`);
|
|
98
98
|
if (!ticker.vwap)
|
|
99
99
|
throw new Error("Unable to get ticker vwap");
|
|
100
|
-
const exchangeFee =
|
|
101
|
-
console.log("exchangeFee", exchangeFee);
|
|
100
|
+
const exchangeFee = exchange.id === "bitstamp" ? 0.002 : 0.002;
|
|
102
101
|
return {
|
|
103
|
-
price: ticker.vwap,
|
|
104
|
-
amountCrypto: amount / ticker.vwap,
|
|
102
|
+
price: ticker.vwap * (1 + exchangeFee),
|
|
103
|
+
amountCrypto: amount / (ticker.vwap * (1 + exchangeFee)),
|
|
105
104
|
amountFiat: amount,
|
|
106
105
|
crypto,
|
|
107
106
|
fiat,
|
|
@@ -165,10 +164,11 @@ class CCXTClient {
|
|
|
165
164
|
let ticker = yield exchange.fetchTicker(`${crypto}/${fiat}`);
|
|
166
165
|
if (!ticker.vwap)
|
|
167
166
|
throw new Error("Unable to get ticker vwap");
|
|
167
|
+
const exchangeFee = exchange.id === "bitstamp" ? 0.002 : 0.002;
|
|
168
168
|
return {
|
|
169
|
-
price: ticker.vwap,
|
|
169
|
+
price: ticker.vwap * (1 - exchangeFee),
|
|
170
170
|
amountCrypto: amount,
|
|
171
|
-
amountFiat: amount * ticker.vwap,
|
|
171
|
+
amountFiat: amount * (ticker.vwap * (1 - exchangeFee)),
|
|
172
172
|
crypto,
|
|
173
173
|
fiat,
|
|
174
174
|
};
|
|
@@ -21,6 +21,7 @@ interface BusinessUserAttrs {
|
|
|
21
21
|
attributes?: UserAttribute[];
|
|
22
22
|
brokerId?: string;
|
|
23
23
|
platformFeeRanges?: PlatformFeeRange[];
|
|
24
|
+
partnerId?: string;
|
|
24
25
|
}
|
|
25
26
|
interface BusinessUserModel extends Model<BusinessUserDoc> {
|
|
26
27
|
build(attrs: BusinessUserAttrs): BusinessUserDoc;
|
|
@@ -46,6 +47,7 @@ interface BusinessUserDoc extends Document {
|
|
|
46
47
|
attributes?: UserAttribute[];
|
|
47
48
|
brokerId?: string;
|
|
48
49
|
platformFeeRanges?: PlatformFeeRange[];
|
|
50
|
+
partnerId?: string;
|
|
49
51
|
}
|
|
50
52
|
declare const buildBusinessUser: (mongoose: Mongoose) => BusinessUserModel;
|
|
51
53
|
export { buildBusinessUser, BusinessUserDoc };
|
package/build/models/order.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ interface OrderAttrs {
|
|
|
22
22
|
depositAddress?: string;
|
|
23
23
|
depositTxId?: string;
|
|
24
24
|
withdrawalTxId?: string;
|
|
25
|
-
addressVerified?: boolean;
|
|
26
25
|
brokerCustomerId?: string;
|
|
27
26
|
}
|
|
28
27
|
interface OrderDoc extends Document {
|
|
@@ -47,7 +46,6 @@ interface OrderDoc extends Document {
|
|
|
47
46
|
depositAddress?: string;
|
|
48
47
|
depositTxId?: string;
|
|
49
48
|
withdrawalTxId?: string;
|
|
50
|
-
addressVerified?: boolean;
|
|
51
49
|
brokerCustomerId?: string;
|
|
52
50
|
}
|
|
53
51
|
interface OrderModel extends Model<OrderDoc> {
|
package/build/models/order.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.523",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
|
-
"@riocrypto/common": "^1.0.
|
|
25
|
+
"@riocrypto/common": "^1.0.528",
|
|
26
26
|
"@types/express": "^4.17.13",
|
|
27
27
|
"axios": "^0.27.2",
|
|
28
28
|
"ccxt": "^3.0.30",
|