@riocrypto/common-server 1.0.1202 → 1.0.1204

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,14 @@ declare class BitsoClient {
54
54
  side: string;
55
55
  maker_side: string;
56
56
  }[]>;
57
+ getOrderBookTrades(crypto: Crypto): Promise<{
58
+ book: string;
59
+ created_at: string;
60
+ amount: string;
61
+ maker_side: string;
62
+ price: string;
63
+ tid: number;
64
+ }[]>;
57
65
  cancelOrder(oid: string): Promise<void>;
58
66
  getOrderBook(crypto: Crypto): Promise<{
59
67
  asks: {
@@ -64,7 +64,7 @@ class BitsoClient {
64
64
  details: {
65
65
  beneficiary: bankAccount.accountHolderName,
66
66
  institution_code: bitsoBankAccountCode,
67
- clabe: bankAccount.accountNumber,
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1202",
3
+ "version": "1.0.1204",
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.1086",
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",