@binance/convert 4.0.3 → 4.1.1
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/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +45 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -25
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1117,20 +1117,22 @@ declare class RestAPI {
|
|
|
1117
1117
|
* Generic function to send a request.
|
|
1118
1118
|
* @param endpoint - The API endpoint to call.
|
|
1119
1119
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1120
|
-
* @param
|
|
1120
|
+
* @param queryParams - Query parameters for the request.
|
|
1121
|
+
* @param bodyParams - Body parameters for the request.
|
|
1121
1122
|
*
|
|
1122
1123
|
* @returns A promise resolving to the response data object.
|
|
1123
1124
|
*/
|
|
1124
|
-
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
1125
|
+
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
1125
1126
|
/**
|
|
1126
1127
|
* Generic function to send a signed request.
|
|
1127
1128
|
* @param endpoint - The API endpoint to call.
|
|
1128
1129
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1129
|
-
* @param
|
|
1130
|
+
* @param queryParams - Query parameters for the request.
|
|
1131
|
+
* @param bodyParams - Body parameters for the request.
|
|
1130
1132
|
*
|
|
1131
1133
|
* @returns A promise resolving to the response data object.
|
|
1132
1134
|
*/
|
|
1133
|
-
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
1135
|
+
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
1134
1136
|
/**
|
|
1135
1137
|
* Query for all convertible token pairs and the tokens’ respective upper/lower limits
|
|
1136
1138
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1119,20 +1119,22 @@ declare class RestAPI {
|
|
|
1119
1119
|
* Generic function to send a request.
|
|
1120
1120
|
* @param endpoint - The API endpoint to call.
|
|
1121
1121
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1122
|
-
* @param
|
|
1122
|
+
* @param queryParams - Query parameters for the request.
|
|
1123
|
+
* @param bodyParams - Body parameters for the request.
|
|
1123
1124
|
*
|
|
1124
1125
|
* @returns A promise resolving to the response data object.
|
|
1125
1126
|
*/
|
|
1126
|
-
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
1127
|
+
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
1127
1128
|
/**
|
|
1128
1129
|
* Generic function to send a signed request.
|
|
1129
1130
|
* @param endpoint - The API endpoint to call.
|
|
1130
1131
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1131
|
-
* @param
|
|
1132
|
+
* @param queryParams - Query parameters for the request.
|
|
1133
|
+
* @param bodyParams - Body parameters for the request.
|
|
1132
1134
|
*
|
|
1133
1135
|
* @returns A promise resolving to the response data object.
|
|
1134
1136
|
*/
|
|
1135
|
-
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
1137
|
+
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
1136
1138
|
/**
|
|
1137
1139
|
* Query for all convertible token pairs and the tokens’ respective upper/lower limits
|
|
1138
1140
|
*
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/convert";
|
|
17
|
-
var version = "4.
|
|
17
|
+
var version = "4.1.1";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/market-data-api.ts
|
|
@@ -37,6 +37,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
37
37
|
return {
|
|
38
38
|
listAllConvertPairs: async (fromAsset, toAsset) => {
|
|
39
39
|
const localVarQueryParameter = {};
|
|
40
|
+
const localVarBodyParameter = {};
|
|
40
41
|
if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
|
|
41
42
|
if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
|
|
42
43
|
let _timeUnit;
|
|
@@ -44,19 +45,22 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
|
|
|
44
45
|
return {
|
|
45
46
|
endpoint: "/sapi/v1/convert/exchangeInfo",
|
|
46
47
|
method: "GET",
|
|
47
|
-
|
|
48
|
+
queryParams: localVarQueryParameter,
|
|
49
|
+
bodyParams: localVarBodyParameter,
|
|
48
50
|
timeUnit: _timeUnit
|
|
49
51
|
};
|
|
50
52
|
},
|
|
51
53
|
queryOrderQuantityPrecisionPerAsset: async (recvWindow) => {
|
|
52
54
|
const localVarQueryParameter = {};
|
|
55
|
+
const localVarBodyParameter = {};
|
|
53
56
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
54
57
|
let _timeUnit;
|
|
55
58
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
56
59
|
return {
|
|
57
60
|
endpoint: "/sapi/v1/convert/assetInfo",
|
|
58
61
|
method: "GET",
|
|
59
|
-
|
|
62
|
+
queryParams: localVarQueryParameter,
|
|
63
|
+
bodyParams: localVarBodyParameter,
|
|
60
64
|
timeUnit: _timeUnit
|
|
61
65
|
};
|
|
62
66
|
}
|
|
@@ -88,7 +92,7 @@ var MarketDataApi = class {
|
|
|
88
92
|
*/
|
|
89
93
|
async listAllConvertPairs(requestParameters = {}) {
|
|
90
94
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(requestParameters?.fromAsset, requestParameters?.toAsset);
|
|
91
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
95
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
92
96
|
}
|
|
93
97
|
/**
|
|
94
98
|
* Query for supported asset’s precision information
|
|
@@ -104,7 +108,7 @@ var MarketDataApi = class {
|
|
|
104
108
|
*/
|
|
105
109
|
async queryOrderQuantityPrecisionPerAsset(requestParameters = {}) {
|
|
106
110
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(requestParameters?.recvWindow);
|
|
107
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
111
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
108
112
|
}
|
|
109
113
|
};
|
|
110
114
|
|
|
@@ -130,6 +134,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
130
134
|
acceptQuote: async (quoteId, recvWindow) => {
|
|
131
135
|
(0, __binance_common.assertParamExists)("acceptQuote", "quoteId", quoteId);
|
|
132
136
|
const localVarQueryParameter = {};
|
|
137
|
+
const localVarBodyParameter = {};
|
|
133
138
|
if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
|
|
134
139
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
135
140
|
let _timeUnit;
|
|
@@ -137,13 +142,15 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
137
142
|
return {
|
|
138
143
|
endpoint: "/sapi/v1/convert/acceptQuote",
|
|
139
144
|
method: "POST",
|
|
140
|
-
|
|
145
|
+
queryParams: localVarQueryParameter,
|
|
146
|
+
bodyParams: localVarBodyParameter,
|
|
141
147
|
timeUnit: _timeUnit
|
|
142
148
|
};
|
|
143
149
|
},
|
|
144
150
|
cancelLimitOrder: async (orderId, recvWindow) => {
|
|
145
151
|
(0, __binance_common.assertParamExists)("cancelLimitOrder", "orderId", orderId);
|
|
146
152
|
const localVarQueryParameter = {};
|
|
153
|
+
const localVarBodyParameter = {};
|
|
147
154
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
148
155
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
149
156
|
let _timeUnit;
|
|
@@ -151,7 +158,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
151
158
|
return {
|
|
152
159
|
endpoint: "/sapi/v1/convert/limit/cancelOrder",
|
|
153
160
|
method: "POST",
|
|
154
|
-
|
|
161
|
+
queryParams: localVarQueryParameter,
|
|
162
|
+
bodyParams: localVarBodyParameter,
|
|
155
163
|
timeUnit: _timeUnit
|
|
156
164
|
};
|
|
157
165
|
},
|
|
@@ -159,6 +167,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
159
167
|
(0, __binance_common.assertParamExists)("getConvertTradeHistory", "startTime", startTime);
|
|
160
168
|
(0, __binance_common.assertParamExists)("getConvertTradeHistory", "endTime", endTime);
|
|
161
169
|
const localVarQueryParameter = {};
|
|
170
|
+
const localVarBodyParameter = {};
|
|
162
171
|
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
163
172
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
164
173
|
if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
|
|
@@ -168,12 +177,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
168
177
|
return {
|
|
169
178
|
endpoint: "/sapi/v1/convert/tradeFlow",
|
|
170
179
|
method: "GET",
|
|
171
|
-
|
|
180
|
+
queryParams: localVarQueryParameter,
|
|
181
|
+
bodyParams: localVarBodyParameter,
|
|
172
182
|
timeUnit: _timeUnit
|
|
173
183
|
};
|
|
174
184
|
},
|
|
175
185
|
orderStatus: async (orderId, quoteId) => {
|
|
176
186
|
const localVarQueryParameter = {};
|
|
187
|
+
const localVarBodyParameter = {};
|
|
177
188
|
if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
|
|
178
189
|
if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
|
|
179
190
|
let _timeUnit;
|
|
@@ -181,7 +192,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
181
192
|
return {
|
|
182
193
|
endpoint: "/sapi/v1/convert/orderStatus",
|
|
183
194
|
method: "GET",
|
|
184
|
-
|
|
195
|
+
queryParams: localVarQueryParameter,
|
|
196
|
+
bodyParams: localVarBodyParameter,
|
|
185
197
|
timeUnit: _timeUnit
|
|
186
198
|
};
|
|
187
199
|
},
|
|
@@ -192,6 +204,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
192
204
|
(0, __binance_common.assertParamExists)("placeLimitOrder", "side", side);
|
|
193
205
|
(0, __binance_common.assertParamExists)("placeLimitOrder", "expiredType", expiredType);
|
|
194
206
|
const localVarQueryParameter = {};
|
|
207
|
+
const localVarBodyParameter = {};
|
|
195
208
|
if (baseAsset !== void 0 && baseAsset !== null) localVarQueryParameter["baseAsset"] = baseAsset;
|
|
196
209
|
if (quoteAsset !== void 0 && quoteAsset !== null) localVarQueryParameter["quoteAsset"] = quoteAsset;
|
|
197
210
|
if (limitPrice !== void 0 && limitPrice !== null) localVarQueryParameter["limitPrice"] = limitPrice;
|
|
@@ -206,19 +219,22 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
206
219
|
return {
|
|
207
220
|
endpoint: "/sapi/v1/convert/limit/placeOrder",
|
|
208
221
|
method: "POST",
|
|
209
|
-
|
|
222
|
+
queryParams: localVarQueryParameter,
|
|
223
|
+
bodyParams: localVarBodyParameter,
|
|
210
224
|
timeUnit: _timeUnit
|
|
211
225
|
};
|
|
212
226
|
},
|
|
213
227
|
queryLimitOpenOrders: async (recvWindow) => {
|
|
214
228
|
const localVarQueryParameter = {};
|
|
229
|
+
const localVarBodyParameter = {};
|
|
215
230
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
216
231
|
let _timeUnit;
|
|
217
232
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
218
233
|
return {
|
|
219
234
|
endpoint: "/sapi/v1/convert/limit/queryOpenOrders",
|
|
220
235
|
method: "GET",
|
|
221
|
-
|
|
236
|
+
queryParams: localVarQueryParameter,
|
|
237
|
+
bodyParams: localVarBodyParameter,
|
|
222
238
|
timeUnit: _timeUnit
|
|
223
239
|
};
|
|
224
240
|
},
|
|
@@ -226,6 +242,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
226
242
|
(0, __binance_common.assertParamExists)("sendQuoteRequest", "fromAsset", fromAsset);
|
|
227
243
|
(0, __binance_common.assertParamExists)("sendQuoteRequest", "toAsset", toAsset);
|
|
228
244
|
const localVarQueryParameter = {};
|
|
245
|
+
const localVarBodyParameter = {};
|
|
229
246
|
if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
|
|
230
247
|
if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
|
|
231
248
|
if (fromAmount !== void 0 && fromAmount !== null) localVarQueryParameter["fromAmount"] = fromAmount;
|
|
@@ -238,7 +255,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
238
255
|
return {
|
|
239
256
|
endpoint: "/sapi/v1/convert/getQuote",
|
|
240
257
|
method: "POST",
|
|
241
|
-
|
|
258
|
+
queryParams: localVarQueryParameter,
|
|
259
|
+
bodyParams: localVarBodyParameter,
|
|
242
260
|
timeUnit: _timeUnit
|
|
243
261
|
};
|
|
244
262
|
}
|
|
@@ -267,7 +285,7 @@ var TradeApi = class {
|
|
|
267
285
|
*/
|
|
268
286
|
async acceptQuote(requestParameters) {
|
|
269
287
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(requestParameters?.quoteId, requestParameters?.recvWindow);
|
|
270
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
288
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
271
289
|
}
|
|
272
290
|
/**
|
|
273
291
|
* Enable users to cancel a limit order
|
|
@@ -283,7 +301,7 @@ var TradeApi = class {
|
|
|
283
301
|
*/
|
|
284
302
|
async cancelLimitOrder(requestParameters) {
|
|
285
303
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(requestParameters?.orderId, requestParameters?.recvWindow);
|
|
286
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
304
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
287
305
|
}
|
|
288
306
|
/**
|
|
289
307
|
* Get Convert Trade History
|
|
@@ -301,7 +319,7 @@ var TradeApi = class {
|
|
|
301
319
|
*/
|
|
302
320
|
async getConvertTradeHistory(requestParameters) {
|
|
303
321
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
304
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
322
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
305
323
|
}
|
|
306
324
|
/**
|
|
307
325
|
* Query order status by order ID.
|
|
@@ -317,7 +335,7 @@ var TradeApi = class {
|
|
|
317
335
|
*/
|
|
318
336
|
async orderStatus(requestParameters = {}) {
|
|
319
337
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(requestParameters?.orderId, requestParameters?.quoteId);
|
|
320
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
338
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
321
339
|
}
|
|
322
340
|
/**
|
|
323
341
|
* Enable users to place a limit order
|
|
@@ -337,7 +355,7 @@ var TradeApi = class {
|
|
|
337
355
|
*/
|
|
338
356
|
async placeLimitOrder(requestParameters) {
|
|
339
357
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(requestParameters?.baseAsset, requestParameters?.quoteAsset, requestParameters?.limitPrice, requestParameters?.side, requestParameters?.expiredType, requestParameters?.baseAmount, requestParameters?.quoteAmount, requestParameters?.walletType, requestParameters?.recvWindow);
|
|
340
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
358
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
341
359
|
}
|
|
342
360
|
/**
|
|
343
361
|
* Request a quote for the requested token pairs
|
|
@@ -353,7 +371,7 @@ var TradeApi = class {
|
|
|
353
371
|
*/
|
|
354
372
|
async queryLimitOpenOrders(requestParameters = {}) {
|
|
355
373
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(requestParameters?.recvWindow);
|
|
356
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
374
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
357
375
|
}
|
|
358
376
|
/**
|
|
359
377
|
* Request a quote for the requested token pairs
|
|
@@ -372,7 +390,7 @@ var TradeApi = class {
|
|
|
372
390
|
*/
|
|
373
391
|
async sendQuoteRequest(requestParameters) {
|
|
374
392
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(requestParameters?.fromAsset, requestParameters?.toAsset, requestParameters?.fromAmount, requestParameters?.toAmount, requestParameters?.walletType, requestParameters?.validTime, requestParameters?.recvWindow);
|
|
375
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
393
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
376
394
|
}
|
|
377
395
|
};
|
|
378
396
|
|
|
@@ -400,23 +418,25 @@ var RestAPI = class {
|
|
|
400
418
|
* Generic function to send a request.
|
|
401
419
|
* @param endpoint - The API endpoint to call.
|
|
402
420
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
403
|
-
* @param
|
|
421
|
+
* @param queryParams - Query parameters for the request.
|
|
422
|
+
* @param bodyParams - Body parameters for the request.
|
|
404
423
|
*
|
|
405
424
|
* @returns A promise resolving to the response data object.
|
|
406
425
|
*/
|
|
407
|
-
sendRequest(endpoint, method,
|
|
408
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
426
|
+
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
427
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
409
428
|
}
|
|
410
429
|
/**
|
|
411
430
|
* Generic function to send a signed request.
|
|
412
431
|
* @param endpoint - The API endpoint to call.
|
|
413
432
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
414
|
-
* @param
|
|
433
|
+
* @param queryParams - Query parameters for the request.
|
|
434
|
+
* @param bodyParams - Body parameters for the request.
|
|
415
435
|
*
|
|
416
436
|
* @returns A promise resolving to the response data object.
|
|
417
437
|
*/
|
|
418
|
-
sendSignedRequest(endpoint, method,
|
|
419
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
438
|
+
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
439
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
420
440
|
}
|
|
421
441
|
/**
|
|
422
442
|
* Query for all convertible token pairs and the tokens’ respective upper/lower limits
|