@riocrypto/common-server 1.0.1201 → 1.0.1203
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.
|
@@ -54,6 +54,22 @@ declare class BitsoClient {
|
|
|
54
54
|
side: string;
|
|
55
55
|
maker_side: string;
|
|
56
56
|
}[]>;
|
|
57
|
+
getOrderBookTrades(crypto: Crypto): Promise<{
|
|
58
|
+
book: string;
|
|
59
|
+
major: string;
|
|
60
|
+
major_currency: string;
|
|
61
|
+
created_at: string;
|
|
62
|
+
minor: string;
|
|
63
|
+
minor_currency: string;
|
|
64
|
+
fees_amount: string;
|
|
65
|
+
fees_currency: string;
|
|
66
|
+
price: string;
|
|
67
|
+
tid: string;
|
|
68
|
+
oid: string;
|
|
69
|
+
origin_id: string;
|
|
70
|
+
side: string;
|
|
71
|
+
maker_side: string;
|
|
72
|
+
}[]>;
|
|
57
73
|
cancelOrder(oid: string): Promise<void>;
|
|
58
74
|
getOrderBook(crypto: Crypto): Promise<{
|
|
59
75
|
asks: {
|
|
@@ -64,7 +64,7 @@ class BitsoClient {
|
|
|
64
64
|
details: {
|
|
65
65
|
beneficiary: bankAccount.accountHolderName,
|
|
66
66
|
institution_code: bitsoBankAccountCode,
|
|
67
|
-
clabe: bankAccount.
|
|
67
|
+
clabe: bankAccount.CLABE,
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
};
|
|
@@ -179,6 +179,23 @@ class BitsoClient {
|
|
|
179
179
|
return data.payload || [];
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
getOrderBookTrades(crypto) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
const requestConfig = {
|
|
185
|
+
method: "GET",
|
|
186
|
+
url: `${this.baseUrl}/api/v3/trades?book=${crypto.toLocaleLowerCase()}_mxn`,
|
|
187
|
+
headers: {
|
|
188
|
+
"Content-Type": "application/json",
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
const signedRequestConfig = this.signRequest(requestConfig);
|
|
192
|
+
const { data } = yield (0, axios_1.default)(signedRequestConfig);
|
|
193
|
+
if (!data.success) {
|
|
194
|
+
throw new Error("Error getting Bitso order book trades");
|
|
195
|
+
}
|
|
196
|
+
return data.payload || [];
|
|
197
|
+
});
|
|
198
|
+
}
|
|
182
199
|
cancelOrder(oid) {
|
|
183
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
201
|
const requestConfig = {
|
|
@@ -7,7 +7,7 @@ interface BankAccountAttrs {
|
|
|
7
7
|
accountHolderName: string;
|
|
8
8
|
country: Country;
|
|
9
9
|
fiat: Fiat;
|
|
10
|
-
accountNumber
|
|
10
|
+
accountNumber?: string;
|
|
11
11
|
approved: boolean;
|
|
12
12
|
swiftCode?: string;
|
|
13
13
|
CCI?: string;
|
|
@@ -21,7 +21,7 @@ interface BankAccountDoc extends Document {
|
|
|
21
21
|
accountHolderName: string;
|
|
22
22
|
country: Country;
|
|
23
23
|
fiat: Fiat;
|
|
24
|
-
accountNumber
|
|
24
|
+
accountNumber?: string;
|
|
25
25
|
approved: boolean;
|
|
26
26
|
swiftCode?: string;
|
|
27
27
|
CCI?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1203",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1087",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|