@binance/crypto-loan 8.0.0 → 8.0.2

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.js CHANGED
@@ -1,1652 +1,1066 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name2 in all)
8
- __defProp(target, name2, { get: all[name2], enumerable: true });
3
+ var __export = (all) => {
4
+ let target = {};
5
+ for (var name$1 in all) __defProp(target, name$1, {
6
+ get: all[name$1],
7
+ enumerable: true
8
+ });
9
+ return target;
9
10
  };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- BadRequestError: () => import_common5.BadRequestError,
24
- CRYPTO_LOAN_REST_API_PROD_URL: () => import_common5.CRYPTO_LOAN_REST_API_PROD_URL,
25
- ConnectorClientError: () => import_common5.ConnectorClientError,
26
- CryptoLoan: () => CryptoLoan,
27
- CryptoLoanRestAPI: () => rest_api_exports,
28
- ForbiddenError: () => import_common5.ForbiddenError,
29
- NetworkError: () => import_common5.NetworkError,
30
- NotFoundError: () => import_common5.NotFoundError,
31
- RateLimitBanError: () => import_common5.RateLimitBanError,
32
- RequiredError: () => import_common5.RequiredError,
33
- ServerError: () => import_common5.ServerError,
34
- TooManyRequestsError: () => import_common5.TooManyRequestsError,
35
- UnauthorizedError: () => import_common5.UnauthorizedError
36
- });
37
- module.exports = __toCommonJS(index_exports);
38
11
 
39
- // src/crypto-loan.ts
40
- var import_common4 = require("@binance/common");
12
+ //#endregion
13
+ let __binance_common = require("@binance/common");
41
14
 
42
- // package.json
15
+ //#region package.json
43
16
  var name = "@binance/crypto-loan";
44
- var version = "8.0.0";
17
+ var version = "8.0.2";
45
18
 
46
- // src/rest-api/index.ts
47
- var rest_api_exports = {};
48
- __export(rest_api_exports, {
49
- FlexibleRateApi: () => FlexibleRateApi,
50
- RestAPI: () => RestAPI,
51
- StableRateApi: () => StableRateApi
52
- });
53
-
54
- // src/rest-api/modules/flexible-rate-api.ts
55
- var import_common = require("@binance/common");
56
- var FlexibleRateApiAxiosParamCreator = function(configuration) {
57
- return {
58
- /**
59
- *
60
- * Weight: 6000
61
- *
62
- * @summary Check Collateral Repay Rate (USER_DATA)
63
- * @param {string} loanCoin
64
- * @param {string} collateralCoin
65
- * @param {number} [recvWindow]
66
- *
67
- * @throws {RequiredError}
68
- */
69
- checkCollateralRepayRate: async (loanCoin, collateralCoin, recvWindow) => {
70
- (0, import_common.assertParamExists)("checkCollateralRepayRate", "loanCoin", loanCoin);
71
- (0, import_common.assertParamExists)("checkCollateralRepayRate", "collateralCoin", collateralCoin);
72
- const localVarQueryParameter = {};
73
- if (loanCoin !== void 0 && loanCoin !== null) {
74
- localVarQueryParameter["loanCoin"] = loanCoin;
75
- }
76
- if (collateralCoin !== void 0 && collateralCoin !== null) {
77
- localVarQueryParameter["collateralCoin"] = collateralCoin;
78
- }
79
- if (recvWindow !== void 0 && recvWindow !== null) {
80
- localVarQueryParameter["recvWindow"] = recvWindow;
81
- }
82
- let _timeUnit;
83
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
84
- return {
85
- endpoint: "/sapi/v2/loan/flexible/repay/rate",
86
- method: "GET",
87
- params: localVarQueryParameter,
88
- timeUnit: _timeUnit
89
- };
90
- },
91
- /**
92
- * Flexible Loan Adjust LTV
93
- *
94
- * API Key needs Spot & Margin Trading permission for this endpoint
95
- *
96
- * Weight: 6000
97
- *
98
- * @summary Flexible Loan Adjust LTV(TRADE)
99
- * @param {string} loanCoin
100
- * @param {string} collateralCoin
101
- * @param {number} adjustmentAmount
102
- * @param {string} direction "ADDITIONAL", "REDUCED"
103
- * @param {number} [recvWindow]
104
- *
105
- * @throws {RequiredError}
106
- */
107
- flexibleLoanAdjustLtv: async (loanCoin, collateralCoin, adjustmentAmount, direction, recvWindow) => {
108
- (0, import_common.assertParamExists)("flexibleLoanAdjustLtv", "loanCoin", loanCoin);
109
- (0, import_common.assertParamExists)("flexibleLoanAdjustLtv", "collateralCoin", collateralCoin);
110
- (0, import_common.assertParamExists)("flexibleLoanAdjustLtv", "adjustmentAmount", adjustmentAmount);
111
- (0, import_common.assertParamExists)("flexibleLoanAdjustLtv", "direction", direction);
112
- const localVarQueryParameter = {};
113
- if (loanCoin !== void 0 && loanCoin !== null) {
114
- localVarQueryParameter["loanCoin"] = loanCoin;
115
- }
116
- if (collateralCoin !== void 0 && collateralCoin !== null) {
117
- localVarQueryParameter["collateralCoin"] = collateralCoin;
118
- }
119
- if (adjustmentAmount !== void 0 && adjustmentAmount !== null) {
120
- localVarQueryParameter["adjustmentAmount"] = adjustmentAmount;
121
- }
122
- if (direction !== void 0 && direction !== null) {
123
- localVarQueryParameter["direction"] = direction;
124
- }
125
- if (recvWindow !== void 0 && recvWindow !== null) {
126
- localVarQueryParameter["recvWindow"] = recvWindow;
127
- }
128
- let _timeUnit;
129
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
130
- return {
131
- endpoint: "/sapi/v2/loan/flexible/adjust/ltv",
132
- method: "POST",
133
- params: localVarQueryParameter,
134
- timeUnit: _timeUnit
135
- };
136
- },
137
- /**
138
- * Borrow Flexible Loan
139
- *
140
- *
141
- * Only available for master account
142
- * You can customize LTV by entering loanAmount and collateralAmount.
143
- *
144
- * Weight: 6000
145
- *
146
- * @summary Flexible Loan Borrow(TRADE)
147
- * @param {string} loanCoin
148
- * @param {string} collateralCoin
149
- * @param {number} [loanAmount] Mandatory when collateralAmount is empty
150
- * @param {number} [collateralAmount] Mandatory when loanAmount is empty
151
- * @param {number} [recvWindow]
152
- *
153
- * @throws {RequiredError}
154
- */
155
- flexibleLoanBorrow: async (loanCoin, collateralCoin, loanAmount, collateralAmount, recvWindow) => {
156
- (0, import_common.assertParamExists)("flexibleLoanBorrow", "loanCoin", loanCoin);
157
- (0, import_common.assertParamExists)("flexibleLoanBorrow", "collateralCoin", collateralCoin);
158
- const localVarQueryParameter = {};
159
- if (loanCoin !== void 0 && loanCoin !== null) {
160
- localVarQueryParameter["loanCoin"] = loanCoin;
161
- }
162
- if (loanAmount !== void 0 && loanAmount !== null) {
163
- localVarQueryParameter["loanAmount"] = loanAmount;
164
- }
165
- if (collateralCoin !== void 0 && collateralCoin !== null) {
166
- localVarQueryParameter["collateralCoin"] = collateralCoin;
167
- }
168
- if (collateralAmount !== void 0 && collateralAmount !== null) {
169
- localVarQueryParameter["collateralAmount"] = collateralAmount;
170
- }
171
- if (recvWindow !== void 0 && recvWindow !== null) {
172
- localVarQueryParameter["recvWindow"] = recvWindow;
173
- }
174
- let _timeUnit;
175
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
176
- return {
177
- endpoint: "/sapi/v2/loan/flexible/borrow",
178
- method: "POST",
179
- params: localVarQueryParameter,
180
- timeUnit: _timeUnit
181
- };
182
- },
183
- /**
184
- * Flexible Loan Repay
185
- *
186
- *
187
- * repayAmount is mandatory even fullRepayment = FALSE
188
- *
189
- * Weight: 6000
190
- *
191
- * @summary Flexible Loan Repay(TRADE)
192
- * @param {string} loanCoin
193
- * @param {string} collateralCoin
194
- * @param {number} repayAmount repay amount of loanCoin
195
- * @param {boolean} [collateralReturn] Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order, and lower LTV.
196
- * @param {boolean} [fullRepayment] Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount
197
- * @param {number} [repaymentType] Default: 1. 1: Repayment with loan asset; 2: Repayment with collateral
198
- * @param {number} [recvWindow]
199
- *
200
- * @throws {RequiredError}
201
- */
202
- flexibleLoanRepay: async (loanCoin, collateralCoin, repayAmount, collateralReturn, fullRepayment, repaymentType, recvWindow) => {
203
- (0, import_common.assertParamExists)("flexibleLoanRepay", "loanCoin", loanCoin);
204
- (0, import_common.assertParamExists)("flexibleLoanRepay", "collateralCoin", collateralCoin);
205
- (0, import_common.assertParamExists)("flexibleLoanRepay", "repayAmount", repayAmount);
206
- const localVarQueryParameter = {};
207
- if (loanCoin !== void 0 && loanCoin !== null) {
208
- localVarQueryParameter["loanCoin"] = loanCoin;
209
- }
210
- if (collateralCoin !== void 0 && collateralCoin !== null) {
211
- localVarQueryParameter["collateralCoin"] = collateralCoin;
212
- }
213
- if (repayAmount !== void 0 && repayAmount !== null) {
214
- localVarQueryParameter["repayAmount"] = repayAmount;
215
- }
216
- if (collateralReturn !== void 0 && collateralReturn !== null) {
217
- localVarQueryParameter["collateralReturn"] = collateralReturn;
218
- }
219
- if (fullRepayment !== void 0 && fullRepayment !== null) {
220
- localVarQueryParameter["fullRepayment"] = fullRepayment;
221
- }
222
- if (repaymentType !== void 0 && repaymentType !== null) {
223
- localVarQueryParameter["repaymentType"] = repaymentType;
224
- }
225
- if (recvWindow !== void 0 && recvWindow !== null) {
226
- localVarQueryParameter["recvWindow"] = recvWindow;
227
- }
228
- let _timeUnit;
229
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
230
- return {
231
- endpoint: "/sapi/v2/loan/flexible/repay",
232
- method: "POST",
233
- params: localVarQueryParameter,
234
- timeUnit: _timeUnit
235
- };
236
- },
237
- /**
238
- * Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
239
- *
240
- * Weight: 400
241
- *
242
- * @summary Get Flexible Loan Assets Data(USER_DATA)
243
- * @param {string} [loanCoin]
244
- * @param {number} [recvWindow]
245
- *
246
- * @throws {RequiredError}
247
- */
248
- getFlexibleLoanAssetsData: async (loanCoin, recvWindow) => {
249
- const localVarQueryParameter = {};
250
- if (loanCoin !== void 0 && loanCoin !== null) {
251
- localVarQueryParameter["loanCoin"] = loanCoin;
252
- }
253
- if (recvWindow !== void 0 && recvWindow !== null) {
254
- localVarQueryParameter["recvWindow"] = recvWindow;
255
- }
256
- let _timeUnit;
257
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
258
- return {
259
- endpoint: "/sapi/v2/loan/flexible/loanable/data",
260
- method: "GET",
261
- params: localVarQueryParameter,
262
- timeUnit: _timeUnit
263
- };
264
- },
265
- /**
266
- * Get Flexible Loan Borrow History
267
- *
268
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
269
- * The max interval between startTime and endTime is 180 days.
270
- *
271
- * Weight: 400
272
- *
273
- * @summary Get Flexible Loan Borrow History(USER_DATA)
274
- * @param {string} [loanCoin]
275
- * @param {string} [collateralCoin]
276
- * @param {number} [startTime]
277
- * @param {number} [endTime]
278
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
279
- * @param {number} [limit] Default: 10; max: 100
280
- * @param {number} [recvWindow]
281
- *
282
- * @throws {RequiredError}
283
- */
284
- getFlexibleLoanBorrowHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
285
- const localVarQueryParameter = {};
286
- if (loanCoin !== void 0 && loanCoin !== null) {
287
- localVarQueryParameter["loanCoin"] = loanCoin;
288
- }
289
- if (collateralCoin !== void 0 && collateralCoin !== null) {
290
- localVarQueryParameter["collateralCoin"] = collateralCoin;
291
- }
292
- if (startTime !== void 0 && startTime !== null) {
293
- localVarQueryParameter["startTime"] = startTime;
294
- }
295
- if (endTime !== void 0 && endTime !== null) {
296
- localVarQueryParameter["endTime"] = endTime;
297
- }
298
- if (current !== void 0 && current !== null) {
299
- localVarQueryParameter["current"] = current;
300
- }
301
- if (limit !== void 0 && limit !== null) {
302
- localVarQueryParameter["limit"] = limit;
303
- }
304
- if (recvWindow !== void 0 && recvWindow !== null) {
305
- localVarQueryParameter["recvWindow"] = recvWindow;
306
- }
307
- let _timeUnit;
308
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
309
- return {
310
- endpoint: "/sapi/v2/loan/flexible/borrow/history",
311
- method: "GET",
312
- params: localVarQueryParameter,
313
- timeUnit: _timeUnit
314
- };
315
- },
316
- /**
317
- * Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
318
- *
319
- * Weight: 400
320
- *
321
- * @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
322
- * @param {string} [collateralCoin]
323
- * @param {number} [recvWindow]
324
- *
325
- * @throws {RequiredError}
326
- */
327
- getFlexibleLoanCollateralAssetsData: async (collateralCoin, recvWindow) => {
328
- const localVarQueryParameter = {};
329
- if (collateralCoin !== void 0 && collateralCoin !== null) {
330
- localVarQueryParameter["collateralCoin"] = collateralCoin;
331
- }
332
- if (recvWindow !== void 0 && recvWindow !== null) {
333
- localVarQueryParameter["recvWindow"] = recvWindow;
334
- }
335
- let _timeUnit;
336
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
337
- return {
338
- endpoint: "/sapi/v2/loan/flexible/collateral/data",
339
- method: "GET",
340
- params: localVarQueryParameter,
341
- timeUnit: _timeUnit
342
- };
343
- },
344
- /**
345
- *
346
- * Weight: 400
347
- *
348
- * @summary Get Flexible Loan Liquidation History (USER_DATA)
349
- * @param {string} [loanCoin]
350
- * @param {string} [collateralCoin]
351
- * @param {number} [startTime]
352
- * @param {number} [endTime]
353
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
354
- * @param {number} [limit] Default: 10; max: 100
355
- * @param {number} [recvWindow]
356
- *
357
- * @throws {RequiredError}
358
- */
359
- getFlexibleLoanLiquidationHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
360
- const localVarQueryParameter = {};
361
- if (loanCoin !== void 0 && loanCoin !== null) {
362
- localVarQueryParameter["loanCoin"] = loanCoin;
363
- }
364
- if (collateralCoin !== void 0 && collateralCoin !== null) {
365
- localVarQueryParameter["collateralCoin"] = collateralCoin;
366
- }
367
- if (startTime !== void 0 && startTime !== null) {
368
- localVarQueryParameter["startTime"] = startTime;
369
- }
370
- if (endTime !== void 0 && endTime !== null) {
371
- localVarQueryParameter["endTime"] = endTime;
372
- }
373
- if (current !== void 0 && current !== null) {
374
- localVarQueryParameter["current"] = current;
375
- }
376
- if (limit !== void 0 && limit !== null) {
377
- localVarQueryParameter["limit"] = limit;
378
- }
379
- if (recvWindow !== void 0 && recvWindow !== null) {
380
- localVarQueryParameter["recvWindow"] = recvWindow;
381
- }
382
- let _timeUnit;
383
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
384
- return {
385
- endpoint: "/sapi/v2/loan/flexible/liquidation/history",
386
- method: "GET",
387
- params: localVarQueryParameter,
388
- timeUnit: _timeUnit
389
- };
390
- },
391
- /**
392
- * Get Flexible Loan LTV Adjustment History
393
- *
394
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
395
- * The max interval between startTime and endTime is 180 days.
396
- *
397
- * Weight: 400
398
- *
399
- * @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
400
- * @param {string} [loanCoin]
401
- * @param {string} [collateralCoin]
402
- * @param {number} [startTime]
403
- * @param {number} [endTime]
404
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
405
- * @param {number} [limit] Default: 10; max: 100
406
- * @param {number} [recvWindow]
407
- *
408
- * @throws {RequiredError}
409
- */
410
- getFlexibleLoanLtvAdjustmentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
411
- const localVarQueryParameter = {};
412
- if (loanCoin !== void 0 && loanCoin !== null) {
413
- localVarQueryParameter["loanCoin"] = loanCoin;
414
- }
415
- if (collateralCoin !== void 0 && collateralCoin !== null) {
416
- localVarQueryParameter["collateralCoin"] = collateralCoin;
417
- }
418
- if (startTime !== void 0 && startTime !== null) {
419
- localVarQueryParameter["startTime"] = startTime;
420
- }
421
- if (endTime !== void 0 && endTime !== null) {
422
- localVarQueryParameter["endTime"] = endTime;
423
- }
424
- if (current !== void 0 && current !== null) {
425
- localVarQueryParameter["current"] = current;
426
- }
427
- if (limit !== void 0 && limit !== null) {
428
- localVarQueryParameter["limit"] = limit;
429
- }
430
- if (recvWindow !== void 0 && recvWindow !== null) {
431
- localVarQueryParameter["recvWindow"] = recvWindow;
432
- }
433
- let _timeUnit;
434
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
435
- return {
436
- endpoint: "/sapi/v2/loan/flexible/ltv/adjustment/history",
437
- method: "GET",
438
- params: localVarQueryParameter,
439
- timeUnit: _timeUnit
440
- };
441
- },
442
- /**
443
- * Get Flexible Loan Ongoing Orders
444
- *
445
- * Weight: 300
446
- *
447
- * @summary Get Flexible Loan Ongoing Orders(USER_DATA)
448
- * @param {string} [loanCoin]
449
- * @param {string} [collateralCoin]
450
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
451
- * @param {number} [limit] Default: 10; max: 100
452
- * @param {number} [recvWindow]
453
- *
454
- * @throws {RequiredError}
455
- */
456
- getFlexibleLoanOngoingOrders: async (loanCoin, collateralCoin, current, limit, recvWindow) => {
457
- const localVarQueryParameter = {};
458
- if (loanCoin !== void 0 && loanCoin !== null) {
459
- localVarQueryParameter["loanCoin"] = loanCoin;
460
- }
461
- if (collateralCoin !== void 0 && collateralCoin !== null) {
462
- localVarQueryParameter["collateralCoin"] = collateralCoin;
463
- }
464
- if (current !== void 0 && current !== null) {
465
- localVarQueryParameter["current"] = current;
466
- }
467
- if (limit !== void 0 && limit !== null) {
468
- localVarQueryParameter["limit"] = limit;
469
- }
470
- if (recvWindow !== void 0 && recvWindow !== null) {
471
- localVarQueryParameter["recvWindow"] = recvWindow;
472
- }
473
- let _timeUnit;
474
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
475
- return {
476
- endpoint: "/sapi/v2/loan/flexible/ongoing/orders",
477
- method: "GET",
478
- params: localVarQueryParameter,
479
- timeUnit: _timeUnit
480
- };
481
- },
482
- /**
483
- * Get Flexible Loan Repayment History
484
- *
485
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
486
- * The max interval between startTime and endTime is 180 days.
487
- *
488
- * Weight: 400
489
- *
490
- * @summary Get Flexible Loan Repayment History(USER_DATA)
491
- * @param {string} [loanCoin]
492
- * @param {string} [collateralCoin]
493
- * @param {number} [startTime]
494
- * @param {number} [endTime]
495
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
496
- * @param {number} [limit] Default: 10; max: 100
497
- * @param {number} [recvWindow]
498
- *
499
- * @throws {RequiredError}
500
- */
501
- getFlexibleLoanRepaymentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
502
- const localVarQueryParameter = {};
503
- if (loanCoin !== void 0 && loanCoin !== null) {
504
- localVarQueryParameter["loanCoin"] = loanCoin;
505
- }
506
- if (collateralCoin !== void 0 && collateralCoin !== null) {
507
- localVarQueryParameter["collateralCoin"] = collateralCoin;
508
- }
509
- if (startTime !== void 0 && startTime !== null) {
510
- localVarQueryParameter["startTime"] = startTime;
511
- }
512
- if (endTime !== void 0 && endTime !== null) {
513
- localVarQueryParameter["endTime"] = endTime;
514
- }
515
- if (current !== void 0 && current !== null) {
516
- localVarQueryParameter["current"] = current;
517
- }
518
- if (limit !== void 0 && limit !== null) {
519
- localVarQueryParameter["limit"] = limit;
520
- }
521
- if (recvWindow !== void 0 && recvWindow !== null) {
522
- localVarQueryParameter["recvWindow"] = recvWindow;
523
- }
524
- let _timeUnit;
525
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
526
- return {
527
- endpoint: "/sapi/v2/loan/flexible/repay/history",
528
- method: "GET",
529
- params: localVarQueryParameter,
530
- timeUnit: _timeUnit
531
- };
532
- }
533
- };
19
+ //#endregion
20
+ //#region src/rest-api/modules/flexible-rate-api.ts
21
+ /**
22
+ * Binance Crypto Loan REST API
23
+ *
24
+ * OpenAPI Specification for the Binance Crypto Loan REST API
25
+ *
26
+ * The version of the OpenAPI document: 1.0.0
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ */
33
+ /**
34
+ * FlexibleRateApi - axios parameter creator
35
+ */
36
+ const FlexibleRateApiAxiosParamCreator = function(configuration) {
37
+ return {
38
+ checkCollateralRepayRate: async (loanCoin, collateralCoin, recvWindow) => {
39
+ (0, __binance_common.assertParamExists)("checkCollateralRepayRate", "loanCoin", loanCoin);
40
+ (0, __binance_common.assertParamExists)("checkCollateralRepayRate", "collateralCoin", collateralCoin);
41
+ const localVarQueryParameter = {};
42
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
43
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
44
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
45
+ let _timeUnit;
46
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
47
+ return {
48
+ endpoint: "/sapi/v2/loan/flexible/repay/rate",
49
+ method: "GET",
50
+ params: localVarQueryParameter,
51
+ timeUnit: _timeUnit
52
+ };
53
+ },
54
+ flexibleLoanAdjustLtv: async (loanCoin, collateralCoin, adjustmentAmount, direction, recvWindow) => {
55
+ (0, __binance_common.assertParamExists)("flexibleLoanAdjustLtv", "loanCoin", loanCoin);
56
+ (0, __binance_common.assertParamExists)("flexibleLoanAdjustLtv", "collateralCoin", collateralCoin);
57
+ (0, __binance_common.assertParamExists)("flexibleLoanAdjustLtv", "adjustmentAmount", adjustmentAmount);
58
+ (0, __binance_common.assertParamExists)("flexibleLoanAdjustLtv", "direction", direction);
59
+ const localVarQueryParameter = {};
60
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
61
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
62
+ if (adjustmentAmount !== void 0 && adjustmentAmount !== null) localVarQueryParameter["adjustmentAmount"] = adjustmentAmount;
63
+ if (direction !== void 0 && direction !== null) localVarQueryParameter["direction"] = direction;
64
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
65
+ let _timeUnit;
66
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
67
+ return {
68
+ endpoint: "/sapi/v2/loan/flexible/adjust/ltv",
69
+ method: "POST",
70
+ params: localVarQueryParameter,
71
+ timeUnit: _timeUnit
72
+ };
73
+ },
74
+ flexibleLoanBorrow: async (loanCoin, collateralCoin, loanAmount, collateralAmount, recvWindow) => {
75
+ (0, __binance_common.assertParamExists)("flexibleLoanBorrow", "loanCoin", loanCoin);
76
+ (0, __binance_common.assertParamExists)("flexibleLoanBorrow", "collateralCoin", collateralCoin);
77
+ const localVarQueryParameter = {};
78
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
79
+ if (loanAmount !== void 0 && loanAmount !== null) localVarQueryParameter["loanAmount"] = loanAmount;
80
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
81
+ if (collateralAmount !== void 0 && collateralAmount !== null) localVarQueryParameter["collateralAmount"] = collateralAmount;
82
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
83
+ let _timeUnit;
84
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
85
+ return {
86
+ endpoint: "/sapi/v2/loan/flexible/borrow",
87
+ method: "POST",
88
+ params: localVarQueryParameter,
89
+ timeUnit: _timeUnit
90
+ };
91
+ },
92
+ flexibleLoanRepay: async (loanCoin, collateralCoin, repayAmount, collateralReturn, fullRepayment, repaymentType, recvWindow) => {
93
+ (0, __binance_common.assertParamExists)("flexibleLoanRepay", "loanCoin", loanCoin);
94
+ (0, __binance_common.assertParamExists)("flexibleLoanRepay", "collateralCoin", collateralCoin);
95
+ (0, __binance_common.assertParamExists)("flexibleLoanRepay", "repayAmount", repayAmount);
96
+ const localVarQueryParameter = {};
97
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
98
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
99
+ if (repayAmount !== void 0 && repayAmount !== null) localVarQueryParameter["repayAmount"] = repayAmount;
100
+ if (collateralReturn !== void 0 && collateralReturn !== null) localVarQueryParameter["collateralReturn"] = collateralReturn;
101
+ if (fullRepayment !== void 0 && fullRepayment !== null) localVarQueryParameter["fullRepayment"] = fullRepayment;
102
+ if (repaymentType !== void 0 && repaymentType !== null) localVarQueryParameter["repaymentType"] = repaymentType;
103
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
104
+ let _timeUnit;
105
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
106
+ return {
107
+ endpoint: "/sapi/v2/loan/flexible/repay",
108
+ method: "POST",
109
+ params: localVarQueryParameter,
110
+ timeUnit: _timeUnit
111
+ };
112
+ },
113
+ getFlexibleLoanAssetsData: async (loanCoin, recvWindow) => {
114
+ const localVarQueryParameter = {};
115
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
116
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
117
+ let _timeUnit;
118
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
119
+ return {
120
+ endpoint: "/sapi/v2/loan/flexible/loanable/data",
121
+ method: "GET",
122
+ params: localVarQueryParameter,
123
+ timeUnit: _timeUnit
124
+ };
125
+ },
126
+ getFlexibleLoanBorrowHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
127
+ const localVarQueryParameter = {};
128
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
129
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
130
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
131
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
132
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
133
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
134
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
135
+ let _timeUnit;
136
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
137
+ return {
138
+ endpoint: "/sapi/v2/loan/flexible/borrow/history",
139
+ method: "GET",
140
+ params: localVarQueryParameter,
141
+ timeUnit: _timeUnit
142
+ };
143
+ },
144
+ getFlexibleLoanCollateralAssetsData: async (collateralCoin, recvWindow) => {
145
+ const localVarQueryParameter = {};
146
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
147
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
148
+ let _timeUnit;
149
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
150
+ return {
151
+ endpoint: "/sapi/v2/loan/flexible/collateral/data",
152
+ method: "GET",
153
+ params: localVarQueryParameter,
154
+ timeUnit: _timeUnit
155
+ };
156
+ },
157
+ getFlexibleLoanLiquidationHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
158
+ const localVarQueryParameter = {};
159
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
160
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
161
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
162
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
163
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
164
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
165
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
166
+ let _timeUnit;
167
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
168
+ return {
169
+ endpoint: "/sapi/v2/loan/flexible/liquidation/history",
170
+ method: "GET",
171
+ params: localVarQueryParameter,
172
+ timeUnit: _timeUnit
173
+ };
174
+ },
175
+ getFlexibleLoanLtvAdjustmentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
176
+ const localVarQueryParameter = {};
177
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
178
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
179
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
180
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
181
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
182
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
183
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
184
+ let _timeUnit;
185
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
186
+ return {
187
+ endpoint: "/sapi/v2/loan/flexible/ltv/adjustment/history",
188
+ method: "GET",
189
+ params: localVarQueryParameter,
190
+ timeUnit: _timeUnit
191
+ };
192
+ },
193
+ getFlexibleLoanOngoingOrders: async (loanCoin, collateralCoin, current, limit, recvWindow) => {
194
+ const localVarQueryParameter = {};
195
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
196
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
197
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
198
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
199
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
200
+ let _timeUnit;
201
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
202
+ return {
203
+ endpoint: "/sapi/v2/loan/flexible/ongoing/orders",
204
+ method: "GET",
205
+ params: localVarQueryParameter,
206
+ timeUnit: _timeUnit
207
+ };
208
+ },
209
+ getFlexibleLoanRepaymentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
210
+ const localVarQueryParameter = {};
211
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
212
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
213
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
214
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
215
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
216
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
217
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
218
+ let _timeUnit;
219
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
220
+ return {
221
+ endpoint: "/sapi/v2/loan/flexible/repay/history",
222
+ method: "GET",
223
+ params: localVarQueryParameter,
224
+ timeUnit: _timeUnit
225
+ };
226
+ }
227
+ };
534
228
  };
229
+ /**
230
+ * FlexibleRateApi - object-oriented interface
231
+ * @class FlexibleRateApi
232
+ */
535
233
  var FlexibleRateApi = class {
536
- constructor(configuration) {
537
- this.configuration = configuration;
538
- this.localVarAxiosParamCreator = FlexibleRateApiAxiosParamCreator(configuration);
539
- }
540
- /**
541
- *
542
- * Weight: 6000
543
- *
544
- * @summary Check Collateral Repay Rate (USER_DATA)
545
- * @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
546
- * @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
547
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
548
- * @memberof FlexibleRateApi
549
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
550
- */
551
- async checkCollateralRepayRate(requestParameters) {
552
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRate(
553
- requestParameters?.loanCoin,
554
- requestParameters?.collateralCoin,
555
- requestParameters?.recvWindow
556
- );
557
- return (0, import_common.sendRequest)(
558
- this.configuration,
559
- localVarAxiosArgs.endpoint,
560
- localVarAxiosArgs.method,
561
- localVarAxiosArgs.params,
562
- localVarAxiosArgs?.timeUnit,
563
- { isSigned: true }
564
- );
565
- }
566
- /**
567
- * Flexible Loan Adjust LTV
568
- *
569
- * API Key needs Spot & Margin Trading permission for this endpoint
570
- *
571
- * Weight: 6000
572
- *
573
- * @summary Flexible Loan Adjust LTV(TRADE)
574
- * @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
575
- * @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
576
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
577
- * @memberof FlexibleRateApi
578
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
579
- */
580
- async flexibleLoanAdjustLtv(requestParameters) {
581
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanAdjustLtv(
582
- requestParameters?.loanCoin,
583
- requestParameters?.collateralCoin,
584
- requestParameters?.adjustmentAmount,
585
- requestParameters?.direction,
586
- requestParameters?.recvWindow
587
- );
588
- return (0, import_common.sendRequest)(
589
- this.configuration,
590
- localVarAxiosArgs.endpoint,
591
- localVarAxiosArgs.method,
592
- localVarAxiosArgs.params,
593
- localVarAxiosArgs?.timeUnit,
594
- { isSigned: true }
595
- );
596
- }
597
- /**
598
- * Borrow Flexible Loan
599
- *
600
- *
601
- * Only available for master account
602
- * You can customize LTV by entering loanAmount and collateralAmount.
603
- *
604
- * Weight: 6000
605
- *
606
- * @summary Flexible Loan Borrow(TRADE)
607
- * @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
608
- * @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
609
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
610
- * @memberof FlexibleRateApi
611
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
612
- */
613
- async flexibleLoanBorrow(requestParameters) {
614
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanBorrow(
615
- requestParameters?.loanCoin,
616
- requestParameters?.collateralCoin,
617
- requestParameters?.loanAmount,
618
- requestParameters?.collateralAmount,
619
- requestParameters?.recvWindow
620
- );
621
- return (0, import_common.sendRequest)(
622
- this.configuration,
623
- localVarAxiosArgs.endpoint,
624
- localVarAxiosArgs.method,
625
- localVarAxiosArgs.params,
626
- localVarAxiosArgs?.timeUnit,
627
- { isSigned: true }
628
- );
629
- }
630
- /**
631
- * Flexible Loan Repay
632
- *
633
- *
634
- * repayAmount is mandatory even fullRepayment = FALSE
635
- *
636
- * Weight: 6000
637
- *
638
- * @summary Flexible Loan Repay(TRADE)
639
- * @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
640
- * @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
641
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
642
- * @memberof FlexibleRateApi
643
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
644
- */
645
- async flexibleLoanRepay(requestParameters) {
646
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanRepay(
647
- requestParameters?.loanCoin,
648
- requestParameters?.collateralCoin,
649
- requestParameters?.repayAmount,
650
- requestParameters?.collateralReturn,
651
- requestParameters?.fullRepayment,
652
- requestParameters?.repaymentType,
653
- requestParameters?.recvWindow
654
- );
655
- return (0, import_common.sendRequest)(
656
- this.configuration,
657
- localVarAxiosArgs.endpoint,
658
- localVarAxiosArgs.method,
659
- localVarAxiosArgs.params,
660
- localVarAxiosArgs?.timeUnit,
661
- { isSigned: true }
662
- );
663
- }
664
- /**
665
- * Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
666
- *
667
- * Weight: 400
668
- *
669
- * @summary Get Flexible Loan Assets Data(USER_DATA)
670
- * @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
671
- * @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
672
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
673
- * @memberof FlexibleRateApi
674
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
675
- */
676
- async getFlexibleLoanAssetsData(requestParameters = {}) {
677
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanAssetsData(
678
- requestParameters?.loanCoin,
679
- requestParameters?.recvWindow
680
- );
681
- return (0, import_common.sendRequest)(
682
- this.configuration,
683
- localVarAxiosArgs.endpoint,
684
- localVarAxiosArgs.method,
685
- localVarAxiosArgs.params,
686
- localVarAxiosArgs?.timeUnit,
687
- { isSigned: true }
688
- );
689
- }
690
- /**
691
- * Get Flexible Loan Borrow History
692
- *
693
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
694
- * The max interval between startTime and endTime is 180 days.
695
- *
696
- * Weight: 400
697
- *
698
- * @summary Get Flexible Loan Borrow History(USER_DATA)
699
- * @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
700
- * @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
701
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
702
- * @memberof FlexibleRateApi
703
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
704
- */
705
- async getFlexibleLoanBorrowHistory(requestParameters = {}) {
706
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanBorrowHistory(
707
- requestParameters?.loanCoin,
708
- requestParameters?.collateralCoin,
709
- requestParameters?.startTime,
710
- requestParameters?.endTime,
711
- requestParameters?.current,
712
- requestParameters?.limit,
713
- requestParameters?.recvWindow
714
- );
715
- return (0, import_common.sendRequest)(
716
- this.configuration,
717
- localVarAxiosArgs.endpoint,
718
- localVarAxiosArgs.method,
719
- localVarAxiosArgs.params,
720
- localVarAxiosArgs?.timeUnit,
721
- { isSigned: true }
722
- );
723
- }
724
- /**
725
- * Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
726
- *
727
- * Weight: 400
728
- *
729
- * @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
730
- * @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
731
- * @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
732
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
733
- * @memberof FlexibleRateApi
734
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
735
- */
736
- async getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
737
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanCollateralAssetsData(
738
- requestParameters?.collateralCoin,
739
- requestParameters?.recvWindow
740
- );
741
- return (0, import_common.sendRequest)(
742
- this.configuration,
743
- localVarAxiosArgs.endpoint,
744
- localVarAxiosArgs.method,
745
- localVarAxiosArgs.params,
746
- localVarAxiosArgs?.timeUnit,
747
- { isSigned: true }
748
- );
749
- }
750
- /**
751
- *
752
- * Weight: 400
753
- *
754
- * @summary Get Flexible Loan Liquidation History (USER_DATA)
755
- * @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
756
- * @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
757
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
758
- * @memberof FlexibleRateApi
759
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
760
- */
761
- async getFlexibleLoanLiquidationHistory(requestParameters = {}) {
762
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLiquidationHistory(
763
- requestParameters?.loanCoin,
764
- requestParameters?.collateralCoin,
765
- requestParameters?.startTime,
766
- requestParameters?.endTime,
767
- requestParameters?.current,
768
- requestParameters?.limit,
769
- requestParameters?.recvWindow
770
- );
771
- return (0, import_common.sendRequest)(
772
- this.configuration,
773
- localVarAxiosArgs.endpoint,
774
- localVarAxiosArgs.method,
775
- localVarAxiosArgs.params,
776
- localVarAxiosArgs?.timeUnit,
777
- { isSigned: true }
778
- );
779
- }
780
- /**
781
- * Get Flexible Loan LTV Adjustment History
782
- *
783
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
784
- * The max interval between startTime and endTime is 180 days.
785
- *
786
- * Weight: 400
787
- *
788
- * @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
789
- * @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
790
- * @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
791
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
792
- * @memberof FlexibleRateApi
793
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
794
- */
795
- async getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
796
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLtvAdjustmentHistory(
797
- requestParameters?.loanCoin,
798
- requestParameters?.collateralCoin,
799
- requestParameters?.startTime,
800
- requestParameters?.endTime,
801
- requestParameters?.current,
802
- requestParameters?.limit,
803
- requestParameters?.recvWindow
804
- );
805
- return (0, import_common.sendRequest)(
806
- this.configuration,
807
- localVarAxiosArgs.endpoint,
808
- localVarAxiosArgs.method,
809
- localVarAxiosArgs.params,
810
- localVarAxiosArgs?.timeUnit,
811
- { isSigned: true }
812
- );
813
- }
814
- /**
815
- * Get Flexible Loan Ongoing Orders
816
- *
817
- * Weight: 300
818
- *
819
- * @summary Get Flexible Loan Ongoing Orders(USER_DATA)
820
- * @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
821
- * @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
822
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
823
- * @memberof FlexibleRateApi
824
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
825
- */
826
- async getFlexibleLoanOngoingOrders(requestParameters = {}) {
827
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanOngoingOrders(
828
- requestParameters?.loanCoin,
829
- requestParameters?.collateralCoin,
830
- requestParameters?.current,
831
- requestParameters?.limit,
832
- requestParameters?.recvWindow
833
- );
834
- return (0, import_common.sendRequest)(
835
- this.configuration,
836
- localVarAxiosArgs.endpoint,
837
- localVarAxiosArgs.method,
838
- localVarAxiosArgs.params,
839
- localVarAxiosArgs?.timeUnit,
840
- { isSigned: true }
841
- );
842
- }
843
- /**
844
- * Get Flexible Loan Repayment History
845
- *
846
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
847
- * The max interval between startTime and endTime is 180 days.
848
- *
849
- * Weight: 400
850
- *
851
- * @summary Get Flexible Loan Repayment History(USER_DATA)
852
- * @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
853
- * @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
854
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
855
- * @memberof FlexibleRateApi
856
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
857
- */
858
- async getFlexibleLoanRepaymentHistory(requestParameters = {}) {
859
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanRepaymentHistory(
860
- requestParameters?.loanCoin,
861
- requestParameters?.collateralCoin,
862
- requestParameters?.startTime,
863
- requestParameters?.endTime,
864
- requestParameters?.current,
865
- requestParameters?.limit,
866
- requestParameters?.recvWindow
867
- );
868
- return (0, import_common.sendRequest)(
869
- this.configuration,
870
- localVarAxiosArgs.endpoint,
871
- localVarAxiosArgs.method,
872
- localVarAxiosArgs.params,
873
- localVarAxiosArgs?.timeUnit,
874
- { isSigned: true }
875
- );
876
- }
234
+ constructor(configuration) {
235
+ this.configuration = configuration;
236
+ this.localVarAxiosParamCreator = FlexibleRateApiAxiosParamCreator(configuration);
237
+ }
238
+ /**
239
+ *
240
+ * Weight: 6000
241
+ *
242
+ * @summary Check Collateral Repay Rate (USER_DATA)
243
+ * @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
244
+ * @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
245
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
246
+ * @memberof FlexibleRateApi
247
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
248
+ */
249
+ async checkCollateralRepayRate(requestParameters) {
250
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRate(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.recvWindow);
251
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
252
+ }
253
+ /**
254
+ * Flexible Loan Adjust LTV
255
+ *
256
+ * API Key needs Spot & Margin Trading permission for this endpoint
257
+ *
258
+ * Weight: 6000
259
+ *
260
+ * @summary Flexible Loan Adjust LTV(TRADE)
261
+ * @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
262
+ * @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
263
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
264
+ * @memberof FlexibleRateApi
265
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
266
+ */
267
+ async flexibleLoanAdjustLtv(requestParameters) {
268
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanAdjustLtv(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.adjustmentAmount, requestParameters?.direction, requestParameters?.recvWindow);
269
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
270
+ }
271
+ /**
272
+ * Borrow Flexible Loan
273
+ *
274
+ *
275
+ * Only available for master account
276
+ * You can customize LTV by entering loanAmount and collateralAmount.
277
+ *
278
+ * Weight: 6000
279
+ *
280
+ * @summary Flexible Loan Borrow(TRADE)
281
+ * @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
282
+ * @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
283
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
284
+ * @memberof FlexibleRateApi
285
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
286
+ */
287
+ async flexibleLoanBorrow(requestParameters) {
288
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanBorrow(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.loanAmount, requestParameters?.collateralAmount, requestParameters?.recvWindow);
289
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
290
+ }
291
+ /**
292
+ * Flexible Loan Repay
293
+ *
294
+ *
295
+ * repayAmount is mandatory even fullRepayment = FALSE
296
+ *
297
+ * Weight: 6000
298
+ *
299
+ * @summary Flexible Loan Repay(TRADE)
300
+ * @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
301
+ * @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
302
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
303
+ * @memberof FlexibleRateApi
304
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
305
+ */
306
+ async flexibleLoanRepay(requestParameters) {
307
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanRepay(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.repayAmount, requestParameters?.collateralReturn, requestParameters?.fullRepayment, requestParameters?.repaymentType, requestParameters?.recvWindow);
308
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
309
+ }
310
+ /**
311
+ * Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
312
+ *
313
+ * Weight: 400
314
+ *
315
+ * @summary Get Flexible Loan Assets Data(USER_DATA)
316
+ * @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
317
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
318
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
319
+ * @memberof FlexibleRateApi
320
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
321
+ */
322
+ async getFlexibleLoanAssetsData(requestParameters = {}) {
323
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanAssetsData(requestParameters?.loanCoin, requestParameters?.recvWindow);
324
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
325
+ }
326
+ /**
327
+ * Get Flexible Loan Borrow History
328
+ *
329
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
330
+ * The max interval between startTime and endTime is 180 days.
331
+ *
332
+ * Weight: 400
333
+ *
334
+ * @summary Get Flexible Loan Borrow History(USER_DATA)
335
+ * @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
336
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
337
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
338
+ * @memberof FlexibleRateApi
339
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
340
+ */
341
+ async getFlexibleLoanBorrowHistory(requestParameters = {}) {
342
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanBorrowHistory(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
343
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
344
+ }
345
+ /**
346
+ * Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
347
+ *
348
+ * Weight: 400
349
+ *
350
+ * @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
351
+ * @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
352
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
353
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
354
+ * @memberof FlexibleRateApi
355
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
356
+ */
357
+ async getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
358
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanCollateralAssetsData(requestParameters?.collateralCoin, requestParameters?.recvWindow);
359
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
360
+ }
361
+ /**
362
+ *
363
+ * Weight: 400
364
+ *
365
+ * @summary Get Flexible Loan Liquidation History (USER_DATA)
366
+ * @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
367
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
368
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
369
+ * @memberof FlexibleRateApi
370
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
371
+ */
372
+ async getFlexibleLoanLiquidationHistory(requestParameters = {}) {
373
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLiquidationHistory(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
374
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
375
+ }
376
+ /**
377
+ * Get Flexible Loan LTV Adjustment History
378
+ *
379
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
380
+ * The max interval between startTime and endTime is 180 days.
381
+ *
382
+ * Weight: 400
383
+ *
384
+ * @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
385
+ * @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
386
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
387
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
388
+ * @memberof FlexibleRateApi
389
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
390
+ */
391
+ async getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
392
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLtvAdjustmentHistory(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
393
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
394
+ }
395
+ /**
396
+ * Get Flexible Loan Ongoing Orders
397
+ *
398
+ * Weight: 300
399
+ *
400
+ * @summary Get Flexible Loan Ongoing Orders(USER_DATA)
401
+ * @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
402
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
403
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
404
+ * @memberof FlexibleRateApi
405
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
406
+ */
407
+ async getFlexibleLoanOngoingOrders(requestParameters = {}) {
408
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanOngoingOrders(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
409
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
410
+ }
411
+ /**
412
+ * Get Flexible Loan Repayment History
413
+ *
414
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
415
+ * The max interval between startTime and endTime is 180 days.
416
+ *
417
+ * Weight: 400
418
+ *
419
+ * @summary Get Flexible Loan Repayment History(USER_DATA)
420
+ * @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
421
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
422
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
423
+ * @memberof FlexibleRateApi
424
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
425
+ */
426
+ async getFlexibleLoanRepaymentHistory(requestParameters = {}) {
427
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanRepaymentHistory(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
428
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
429
+ }
877
430
  };
878
431
 
879
- // src/rest-api/modules/stable-rate-api.ts
880
- var import_common2 = require("@binance/common");
881
- var StableRateApiAxiosParamCreator = function(configuration) {
882
- return {
883
- /**
884
- * Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
885
- *
886
- * Weight: 6000
887
- *
888
- * @summary Check Collateral Repay Rate(USER_DATA)
889
- * @param {string} loanCoin
890
- * @param {string} collateralCoin
891
- * @param {number} repayAmount repay amount of loanCoin
892
- * @param {number} [recvWindow]
893
- *
894
- * @throws {RequiredError}
895
- */
896
- checkCollateralRepayRateStableRate: async (loanCoin, collateralCoin, repayAmount, recvWindow) => {
897
- (0, import_common2.assertParamExists)("checkCollateralRepayRateStableRate", "loanCoin", loanCoin);
898
- (0, import_common2.assertParamExists)(
899
- "checkCollateralRepayRateStableRate",
900
- "collateralCoin",
901
- collateralCoin
902
- );
903
- (0, import_common2.assertParamExists)("checkCollateralRepayRateStableRate", "repayAmount", repayAmount);
904
- const localVarQueryParameter = {};
905
- if (loanCoin !== void 0 && loanCoin !== null) {
906
- localVarQueryParameter["loanCoin"] = loanCoin;
907
- }
908
- if (collateralCoin !== void 0 && collateralCoin !== null) {
909
- localVarQueryParameter["collateralCoin"] = collateralCoin;
910
- }
911
- if (repayAmount !== void 0 && repayAmount !== null) {
912
- localVarQueryParameter["repayAmount"] = repayAmount;
913
- }
914
- if (recvWindow !== void 0 && recvWindow !== null) {
915
- localVarQueryParameter["recvWindow"] = recvWindow;
916
- }
917
- let _timeUnit;
918
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
919
- return {
920
- endpoint: "/sapi/v1/loan/repay/collateral/rate",
921
- method: "GET",
922
- params: localVarQueryParameter,
923
- timeUnit: _timeUnit
924
- };
925
- },
926
- /**
927
- * Get Crypto Loans Income History
928
- *
929
- * If startTime and endTime are not sent, the recent 7-day data will be returned.
930
- * The max interval between startTime and endTime is 30 days.
931
- *
932
- * Weight: 6000
933
- *
934
- * @summary Get Crypto Loans Income History(USER_DATA)
935
- * @param {string} [asset]
936
- * @param {string} [type] All types will be returned by default. Enum:`borrowIn` ,`collateralSpent`, `repayAmount`, `collateralReturn`(Collateral return after repayment), `addCollateral`, `removeCollateral`, `collateralReturnAfterLiquidation`
937
- * @param {number} [startTime]
938
- * @param {number} [endTime]
939
- * @param {number} [limit] Default: 10; max: 100
940
- * @param {number} [recvWindow]
941
- *
942
- * @throws {RequiredError}
943
- */
944
- getCryptoLoansIncomeHistory: async (asset, type, startTime, endTime, limit, recvWindow) => {
945
- const localVarQueryParameter = {};
946
- if (asset !== void 0 && asset !== null) {
947
- localVarQueryParameter["asset"] = asset;
948
- }
949
- if (type !== void 0 && type !== null) {
950
- localVarQueryParameter["type"] = type;
951
- }
952
- if (startTime !== void 0 && startTime !== null) {
953
- localVarQueryParameter["startTime"] = startTime;
954
- }
955
- if (endTime !== void 0 && endTime !== null) {
956
- localVarQueryParameter["endTime"] = endTime;
957
- }
958
- if (limit !== void 0 && limit !== null) {
959
- localVarQueryParameter["limit"] = limit;
960
- }
961
- if (recvWindow !== void 0 && recvWindow !== null) {
962
- localVarQueryParameter["recvWindow"] = recvWindow;
963
- }
964
- let _timeUnit;
965
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
966
- return {
967
- endpoint: "/sapi/v1/loan/income",
968
- method: "GET",
969
- params: localVarQueryParameter,
970
- timeUnit: _timeUnit
971
- };
972
- },
973
- /**
974
- * Get Loan Borrow History
975
- *
976
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
977
- * The max interval between startTime and endTime is 180 days.
978
- *
979
- * Weight: 400
980
- *
981
- * @summary Get Loan Borrow History(USER_DATA)
982
- * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
983
- * @param {string} [loanCoin]
984
- * @param {string} [collateralCoin]
985
- * @param {number} [startTime]
986
- * @param {number} [endTime]
987
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
988
- * @param {number} [limit] Default: 10; max: 100
989
- * @param {number} [recvWindow]
990
- *
991
- * @throws {RequiredError}
992
- */
993
- getLoanBorrowHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
994
- const localVarQueryParameter = {};
995
- if (orderId !== void 0 && orderId !== null) {
996
- localVarQueryParameter["orderId"] = orderId;
997
- }
998
- if (loanCoin !== void 0 && loanCoin !== null) {
999
- localVarQueryParameter["loanCoin"] = loanCoin;
1000
- }
1001
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1002
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1003
- }
1004
- if (startTime !== void 0 && startTime !== null) {
1005
- localVarQueryParameter["startTime"] = startTime;
1006
- }
1007
- if (endTime !== void 0 && endTime !== null) {
1008
- localVarQueryParameter["endTime"] = endTime;
1009
- }
1010
- if (current !== void 0 && current !== null) {
1011
- localVarQueryParameter["current"] = current;
1012
- }
1013
- if (limit !== void 0 && limit !== null) {
1014
- localVarQueryParameter["limit"] = limit;
1015
- }
1016
- if (recvWindow !== void 0 && recvWindow !== null) {
1017
- localVarQueryParameter["recvWindow"] = recvWindow;
1018
- }
1019
- let _timeUnit;
1020
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1021
- return {
1022
- endpoint: "/sapi/v1/loan/borrow/history",
1023
- method: "GET",
1024
- params: localVarQueryParameter,
1025
- timeUnit: _timeUnit
1026
- };
1027
- },
1028
- /**
1029
- * Get Loan LTV Adjustment History
1030
- *
1031
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1032
- * The max interval between startTime and endTime is 180 days.
1033
- *
1034
- * Weight: 400
1035
- *
1036
- * @summary Get Loan LTV Adjustment History(USER_DATA)
1037
- * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
1038
- * @param {string} [loanCoin]
1039
- * @param {string} [collateralCoin]
1040
- * @param {number} [startTime]
1041
- * @param {number} [endTime]
1042
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
1043
- * @param {number} [limit] Default: 10; max: 100
1044
- * @param {number} [recvWindow]
1045
- *
1046
- * @throws {RequiredError}
1047
- */
1048
- getLoanLtvAdjustmentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
1049
- const localVarQueryParameter = {};
1050
- if (orderId !== void 0 && orderId !== null) {
1051
- localVarQueryParameter["orderId"] = orderId;
1052
- }
1053
- if (loanCoin !== void 0 && loanCoin !== null) {
1054
- localVarQueryParameter["loanCoin"] = loanCoin;
1055
- }
1056
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1057
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1058
- }
1059
- if (startTime !== void 0 && startTime !== null) {
1060
- localVarQueryParameter["startTime"] = startTime;
1061
- }
1062
- if (endTime !== void 0 && endTime !== null) {
1063
- localVarQueryParameter["endTime"] = endTime;
1064
- }
1065
- if (current !== void 0 && current !== null) {
1066
- localVarQueryParameter["current"] = current;
1067
- }
1068
- if (limit !== void 0 && limit !== null) {
1069
- localVarQueryParameter["limit"] = limit;
1070
- }
1071
- if (recvWindow !== void 0 && recvWindow !== null) {
1072
- localVarQueryParameter["recvWindow"] = recvWindow;
1073
- }
1074
- let _timeUnit;
1075
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1076
- return {
1077
- endpoint: "/sapi/v1/loan/ltv/adjustment/history",
1078
- method: "GET",
1079
- params: localVarQueryParameter,
1080
- timeUnit: _timeUnit
1081
- };
1082
- },
1083
- /**
1084
- * Get Loan Repayment History
1085
- *
1086
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1087
- * The max interval between startTime and endTime is 180 days.
1088
- *
1089
- * Weight: 400
1090
- *
1091
- * @summary Get Loan Repayment History(USER_DATA)
1092
- * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
1093
- * @param {string} [loanCoin]
1094
- * @param {string} [collateralCoin]
1095
- * @param {number} [startTime]
1096
- * @param {number} [endTime]
1097
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
1098
- * @param {number} [limit] Default: 10; max: 100
1099
- * @param {number} [recvWindow]
1100
- *
1101
- * @throws {RequiredError}
1102
- */
1103
- getLoanRepaymentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
1104
- const localVarQueryParameter = {};
1105
- if (orderId !== void 0 && orderId !== null) {
1106
- localVarQueryParameter["orderId"] = orderId;
1107
- }
1108
- if (loanCoin !== void 0 && loanCoin !== null) {
1109
- localVarQueryParameter["loanCoin"] = loanCoin;
1110
- }
1111
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1112
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1113
- }
1114
- if (startTime !== void 0 && startTime !== null) {
1115
- localVarQueryParameter["startTime"] = startTime;
1116
- }
1117
- if (endTime !== void 0 && endTime !== null) {
1118
- localVarQueryParameter["endTime"] = endTime;
1119
- }
1120
- if (current !== void 0 && current !== null) {
1121
- localVarQueryParameter["current"] = current;
1122
- }
1123
- if (limit !== void 0 && limit !== null) {
1124
- localVarQueryParameter["limit"] = limit;
1125
- }
1126
- if (recvWindow !== void 0 && recvWindow !== null) {
1127
- localVarQueryParameter["recvWindow"] = recvWindow;
1128
- }
1129
- let _timeUnit;
1130
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1131
- return {
1132
- endpoint: "/sapi/v1/loan/repay/history",
1133
- method: "GET",
1134
- params: localVarQueryParameter,
1135
- timeUnit: _timeUnit
1136
- };
1137
- }
1138
- };
432
+ //#endregion
433
+ //#region src/rest-api/modules/stable-rate-api.ts
434
+ /**
435
+ * Binance Crypto Loan REST API
436
+ *
437
+ * OpenAPI Specification for the Binance Crypto Loan REST API
438
+ *
439
+ * The version of the OpenAPI document: 1.0.0
440
+ *
441
+ *
442
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
443
+ * https://openapi-generator.tech
444
+ * Do not edit the class manually.
445
+ */
446
+ /**
447
+ * StableRateApi - axios parameter creator
448
+ */
449
+ const StableRateApiAxiosParamCreator = function(configuration) {
450
+ return {
451
+ checkCollateralRepayRateStableRate: async (loanCoin, collateralCoin, repayAmount, recvWindow) => {
452
+ (0, __binance_common.assertParamExists)("checkCollateralRepayRateStableRate", "loanCoin", loanCoin);
453
+ (0, __binance_common.assertParamExists)("checkCollateralRepayRateStableRate", "collateralCoin", collateralCoin);
454
+ (0, __binance_common.assertParamExists)("checkCollateralRepayRateStableRate", "repayAmount", repayAmount);
455
+ const localVarQueryParameter = {};
456
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
457
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
458
+ if (repayAmount !== void 0 && repayAmount !== null) localVarQueryParameter["repayAmount"] = repayAmount;
459
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
460
+ let _timeUnit;
461
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
462
+ return {
463
+ endpoint: "/sapi/v1/loan/repay/collateral/rate",
464
+ method: "GET",
465
+ params: localVarQueryParameter,
466
+ timeUnit: _timeUnit
467
+ };
468
+ },
469
+ getCryptoLoansIncomeHistory: async (asset, type, startTime, endTime, limit, recvWindow) => {
470
+ const localVarQueryParameter = {};
471
+ if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
472
+ if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
473
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
474
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
475
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
476
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
477
+ let _timeUnit;
478
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
479
+ return {
480
+ endpoint: "/sapi/v1/loan/income",
481
+ method: "GET",
482
+ params: localVarQueryParameter,
483
+ timeUnit: _timeUnit
484
+ };
485
+ },
486
+ getLoanBorrowHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
487
+ const localVarQueryParameter = {};
488
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
489
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
490
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
491
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
492
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
493
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
494
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
495
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
496
+ let _timeUnit;
497
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
498
+ return {
499
+ endpoint: "/sapi/v1/loan/borrow/history",
500
+ method: "GET",
501
+ params: localVarQueryParameter,
502
+ timeUnit: _timeUnit
503
+ };
504
+ },
505
+ getLoanLtvAdjustmentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
506
+ const localVarQueryParameter = {};
507
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
508
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
509
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
510
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
511
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
512
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
513
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
514
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
515
+ let _timeUnit;
516
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
517
+ return {
518
+ endpoint: "/sapi/v1/loan/ltv/adjustment/history",
519
+ method: "GET",
520
+ params: localVarQueryParameter,
521
+ timeUnit: _timeUnit
522
+ };
523
+ },
524
+ getLoanRepaymentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
525
+ const localVarQueryParameter = {};
526
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
527
+ if (loanCoin !== void 0 && loanCoin !== null) localVarQueryParameter["loanCoin"] = loanCoin;
528
+ if (collateralCoin !== void 0 && collateralCoin !== null) localVarQueryParameter["collateralCoin"] = collateralCoin;
529
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
530
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
531
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
532
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
533
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
534
+ let _timeUnit;
535
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
536
+ return {
537
+ endpoint: "/sapi/v1/loan/repay/history",
538
+ method: "GET",
539
+ params: localVarQueryParameter,
540
+ timeUnit: _timeUnit
541
+ };
542
+ }
543
+ };
1139
544
  };
545
+ /**
546
+ * StableRateApi - object-oriented interface
547
+ * @class StableRateApi
548
+ */
1140
549
  var StableRateApi = class {
1141
- constructor(configuration) {
1142
- this.configuration = configuration;
1143
- this.localVarAxiosParamCreator = StableRateApiAxiosParamCreator(configuration);
1144
- }
1145
- /**
1146
- * Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
1147
- *
1148
- * Weight: 6000
1149
- *
1150
- * @summary Check Collateral Repay Rate(USER_DATA)
1151
- * @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
1152
- * @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
1153
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1154
- * @memberof StableRateApi
1155
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
1156
- */
1157
- async checkCollateralRepayRateStableRate(requestParameters) {
1158
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRateStableRate(
1159
- requestParameters?.loanCoin,
1160
- requestParameters?.collateralCoin,
1161
- requestParameters?.repayAmount,
1162
- requestParameters?.recvWindow
1163
- );
1164
- return (0, import_common2.sendRequest)(
1165
- this.configuration,
1166
- localVarAxiosArgs.endpoint,
1167
- localVarAxiosArgs.method,
1168
- localVarAxiosArgs.params,
1169
- localVarAxiosArgs?.timeUnit,
1170
- { isSigned: true }
1171
- );
1172
- }
1173
- /**
1174
- * Get Crypto Loans Income History
1175
- *
1176
- * If startTime and endTime are not sent, the recent 7-day data will be returned.
1177
- * The max interval between startTime and endTime is 30 days.
1178
- *
1179
- * Weight: 6000
1180
- *
1181
- * @summary Get Crypto Loans Income History(USER_DATA)
1182
- * @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
1183
- * @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
1184
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1185
- * @memberof StableRateApi
1186
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
1187
- */
1188
- async getCryptoLoansIncomeHistory(requestParameters = {}) {
1189
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCryptoLoansIncomeHistory(
1190
- requestParameters?.asset,
1191
- requestParameters?.type,
1192
- requestParameters?.startTime,
1193
- requestParameters?.endTime,
1194
- requestParameters?.limit,
1195
- requestParameters?.recvWindow
1196
- );
1197
- return (0, import_common2.sendRequest)(
1198
- this.configuration,
1199
- localVarAxiosArgs.endpoint,
1200
- localVarAxiosArgs.method,
1201
- localVarAxiosArgs.params,
1202
- localVarAxiosArgs?.timeUnit,
1203
- { isSigned: true }
1204
- );
1205
- }
1206
- /**
1207
- * Get Loan Borrow History
1208
- *
1209
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1210
- * The max interval between startTime and endTime is 180 days.
1211
- *
1212
- * Weight: 400
1213
- *
1214
- * @summary Get Loan Borrow History(USER_DATA)
1215
- * @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
1216
- * @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
1217
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1218
- * @memberof StableRateApi
1219
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
1220
- */
1221
- async getLoanBorrowHistory(requestParameters = {}) {
1222
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanBorrowHistory(
1223
- requestParameters?.orderId,
1224
- requestParameters?.loanCoin,
1225
- requestParameters?.collateralCoin,
1226
- requestParameters?.startTime,
1227
- requestParameters?.endTime,
1228
- requestParameters?.current,
1229
- requestParameters?.limit,
1230
- requestParameters?.recvWindow
1231
- );
1232
- return (0, import_common2.sendRequest)(
1233
- this.configuration,
1234
- localVarAxiosArgs.endpoint,
1235
- localVarAxiosArgs.method,
1236
- localVarAxiosArgs.params,
1237
- localVarAxiosArgs?.timeUnit,
1238
- { isSigned: true }
1239
- );
1240
- }
1241
- /**
1242
- * Get Loan LTV Adjustment History
1243
- *
1244
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1245
- * The max interval between startTime and endTime is 180 days.
1246
- *
1247
- * Weight: 400
1248
- *
1249
- * @summary Get Loan LTV Adjustment History(USER_DATA)
1250
- * @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
1251
- * @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
1252
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1253
- * @memberof StableRateApi
1254
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
1255
- */
1256
- async getLoanLtvAdjustmentHistory(requestParameters = {}) {
1257
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanLtvAdjustmentHistory(
1258
- requestParameters?.orderId,
1259
- requestParameters?.loanCoin,
1260
- requestParameters?.collateralCoin,
1261
- requestParameters?.startTime,
1262
- requestParameters?.endTime,
1263
- requestParameters?.current,
1264
- requestParameters?.limit,
1265
- requestParameters?.recvWindow
1266
- );
1267
- return (0, import_common2.sendRequest)(
1268
- this.configuration,
1269
- localVarAxiosArgs.endpoint,
1270
- localVarAxiosArgs.method,
1271
- localVarAxiosArgs.params,
1272
- localVarAxiosArgs?.timeUnit,
1273
- { isSigned: true }
1274
- );
1275
- }
1276
- /**
1277
- * Get Loan Repayment History
1278
- *
1279
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1280
- * The max interval between startTime and endTime is 180 days.
1281
- *
1282
- * Weight: 400
1283
- *
1284
- * @summary Get Loan Repayment History(USER_DATA)
1285
- * @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
1286
- * @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
1287
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1288
- * @memberof StableRateApi
1289
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
1290
- */
1291
- async getLoanRepaymentHistory(requestParameters = {}) {
1292
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanRepaymentHistory(
1293
- requestParameters?.orderId,
1294
- requestParameters?.loanCoin,
1295
- requestParameters?.collateralCoin,
1296
- requestParameters?.startTime,
1297
- requestParameters?.endTime,
1298
- requestParameters?.current,
1299
- requestParameters?.limit,
1300
- requestParameters?.recvWindow
1301
- );
1302
- return (0, import_common2.sendRequest)(
1303
- this.configuration,
1304
- localVarAxiosArgs.endpoint,
1305
- localVarAxiosArgs.method,
1306
- localVarAxiosArgs.params,
1307
- localVarAxiosArgs?.timeUnit,
1308
- { isSigned: true }
1309
- );
1310
- }
550
+ constructor(configuration) {
551
+ this.configuration = configuration;
552
+ this.localVarAxiosParamCreator = StableRateApiAxiosParamCreator(configuration);
553
+ }
554
+ /**
555
+ * Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
556
+ *
557
+ * Weight: 6000
558
+ *
559
+ * @summary Check Collateral Repay Rate(USER_DATA)
560
+ * @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
561
+ * @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
562
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
563
+ * @memberof StableRateApi
564
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
565
+ */
566
+ async checkCollateralRepayRateStableRate(requestParameters) {
567
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRateStableRate(requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.repayAmount, requestParameters?.recvWindow);
568
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
569
+ }
570
+ /**
571
+ * Get Crypto Loans Income History
572
+ *
573
+ * If startTime and endTime are not sent, the recent 7-day data will be returned.
574
+ * The max interval between startTime and endTime is 30 days.
575
+ *
576
+ * Weight: 6000
577
+ *
578
+ * @summary Get Crypto Loans Income History(USER_DATA)
579
+ * @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
580
+ * @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
581
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
582
+ * @memberof StableRateApi
583
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
584
+ */
585
+ async getCryptoLoansIncomeHistory(requestParameters = {}) {
586
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCryptoLoansIncomeHistory(requestParameters?.asset, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
587
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
588
+ }
589
+ /**
590
+ * Get Loan Borrow History
591
+ *
592
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
593
+ * The max interval between startTime and endTime is 180 days.
594
+ *
595
+ * Weight: 400
596
+ *
597
+ * @summary Get Loan Borrow History(USER_DATA)
598
+ * @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
599
+ * @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
600
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
601
+ * @memberof StableRateApi
602
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
603
+ */
604
+ async getLoanBorrowHistory(requestParameters = {}) {
605
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanBorrowHistory(requestParameters?.orderId, requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
606
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
607
+ }
608
+ /**
609
+ * Get Loan LTV Adjustment History
610
+ *
611
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
612
+ * The max interval between startTime and endTime is 180 days.
613
+ *
614
+ * Weight: 400
615
+ *
616
+ * @summary Get Loan LTV Adjustment History(USER_DATA)
617
+ * @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
618
+ * @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
619
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
620
+ * @memberof StableRateApi
621
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
622
+ */
623
+ async getLoanLtvAdjustmentHistory(requestParameters = {}) {
624
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanLtvAdjustmentHistory(requestParameters?.orderId, requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
625
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
626
+ }
627
+ /**
628
+ * Get Loan Repayment History
629
+ *
630
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
631
+ * The max interval between startTime and endTime is 180 days.
632
+ *
633
+ * Weight: 400
634
+ *
635
+ * @summary Get Loan Repayment History(USER_DATA)
636
+ * @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
637
+ * @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
638
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
639
+ * @memberof StableRateApi
640
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
641
+ */
642
+ async getLoanRepaymentHistory(requestParameters = {}) {
643
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanRepaymentHistory(requestParameters?.orderId, requestParameters?.loanCoin, requestParameters?.collateralCoin, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit, requestParameters?.recvWindow);
644
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
645
+ }
1311
646
  };
1312
647
 
1313
- // src/rest-api/rest-api.ts
1314
- var import_common3 = require("@binance/common");
648
+ //#endregion
649
+ //#region src/rest-api/rest-api.ts
650
+ /**
651
+ * Binance Crypto Loan REST API
652
+ *
653
+ * OpenAPI Specification for the Binance Crypto Loan REST API
654
+ *
655
+ * The version of the OpenAPI document: 1.0.0
656
+ *
657
+ *
658
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
659
+ * https://openapi-generator.tech
660
+ * Do not edit the class manually.
661
+ */
1315
662
  var RestAPI = class {
1316
- constructor(configuration) {
1317
- this.configuration = configuration;
1318
- this.flexibleRateApi = new FlexibleRateApi(configuration);
1319
- this.stableRateApi = new StableRateApi(configuration);
1320
- }
1321
- /**
1322
- * Generic function to send a request.
1323
- * @param endpoint - The API endpoint to call.
1324
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
1325
- * @param params - Query parameters for the request.
1326
- *
1327
- * @returns A promise resolving to the response data object.
1328
- */
1329
- sendRequest(endpoint, method, params = {}) {
1330
- return (0, import_common3.sendRequest)(this.configuration, endpoint, method, params, void 0);
1331
- }
1332
- /**
1333
- * Generic function to send a signed request.
1334
- * @param endpoint - The API endpoint to call.
1335
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
1336
- * @param params - Query parameters for the request.
1337
- *
1338
- * @returns A promise resolving to the response data object.
1339
- */
1340
- sendSignedRequest(endpoint, method, params = {}) {
1341
- return (0, import_common3.sendRequest)(this.configuration, endpoint, method, params, void 0, {
1342
- isSigned: true
1343
- });
1344
- }
1345
- /**
1346
- *
1347
- * Weight: 6000
1348
- *
1349
- * @summary Check Collateral Repay Rate (USER_DATA)
1350
- * @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
1351
- *
1352
- * @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
1353
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1354
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
1355
- */
1356
- checkCollateralRepayRate(requestParameters) {
1357
- return this.flexibleRateApi.checkCollateralRepayRate(requestParameters);
1358
- }
1359
- /**
1360
- * Flexible Loan Adjust LTV
1361
- *
1362
- * API Key needs Spot & Margin Trading permission for this endpoint
1363
- *
1364
- * Weight: 6000
1365
- *
1366
- * @summary Flexible Loan Adjust LTV(TRADE)
1367
- * @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
1368
- *
1369
- * @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
1370
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1371
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
1372
- */
1373
- flexibleLoanAdjustLtv(requestParameters) {
1374
- return this.flexibleRateApi.flexibleLoanAdjustLtv(requestParameters);
1375
- }
1376
- /**
1377
- * Borrow Flexible Loan
1378
- *
1379
- *
1380
- * Only available for master account
1381
- * You can customize LTV by entering loanAmount and collateralAmount.
1382
- *
1383
- * Weight: 6000
1384
- *
1385
- * @summary Flexible Loan Borrow(TRADE)
1386
- * @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
1387
- *
1388
- * @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
1389
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1390
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
1391
- */
1392
- flexibleLoanBorrow(requestParameters) {
1393
- return this.flexibleRateApi.flexibleLoanBorrow(requestParameters);
1394
- }
1395
- /**
1396
- * Flexible Loan Repay
1397
- *
1398
- *
1399
- * repayAmount is mandatory even fullRepayment = FALSE
1400
- *
1401
- * Weight: 6000
1402
- *
1403
- * @summary Flexible Loan Repay(TRADE)
1404
- * @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
1405
- *
1406
- * @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
1407
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1408
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
1409
- */
1410
- flexibleLoanRepay(requestParameters) {
1411
- return this.flexibleRateApi.flexibleLoanRepay(requestParameters);
1412
- }
1413
- /**
1414
- * Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
1415
- *
1416
- * Weight: 400
1417
- *
1418
- * @summary Get Flexible Loan Assets Data(USER_DATA)
1419
- * @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
1420
- *
1421
- * @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
1422
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1423
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
1424
- */
1425
- getFlexibleLoanAssetsData(requestParameters = {}) {
1426
- return this.flexibleRateApi.getFlexibleLoanAssetsData(requestParameters);
663
+ constructor(configuration) {
664
+ this.configuration = configuration;
665
+ this.flexibleRateApi = new FlexibleRateApi(configuration);
666
+ this.stableRateApi = new StableRateApi(configuration);
667
+ }
668
+ /**
669
+ * Generic function to send a request.
670
+ * @param endpoint - The API endpoint to call.
671
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
672
+ * @param params - Query parameters for the request.
673
+ *
674
+ * @returns A promise resolving to the response data object.
675
+ */
676
+ sendRequest(endpoint, method, params = {}) {
677
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
678
+ }
679
+ /**
680
+ * Generic function to send a signed request.
681
+ * @param endpoint - The API endpoint to call.
682
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
683
+ * @param params - Query parameters for the request.
684
+ *
685
+ * @returns A promise resolving to the response data object.
686
+ */
687
+ sendSignedRequest(endpoint, method, params = {}) {
688
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
689
+ }
690
+ /**
691
+ *
692
+ * Weight: 6000
693
+ *
694
+ * @summary Check Collateral Repay Rate (USER_DATA)
695
+ * @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
696
+ *
697
+ * @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
698
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
699
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
700
+ */
701
+ checkCollateralRepayRate(requestParameters) {
702
+ return this.flexibleRateApi.checkCollateralRepayRate(requestParameters);
703
+ }
704
+ /**
705
+ * Flexible Loan Adjust LTV
706
+ *
707
+ * API Key needs Spot & Margin Trading permission for this endpoint
708
+ *
709
+ * Weight: 6000
710
+ *
711
+ * @summary Flexible Loan Adjust LTV(TRADE)
712
+ * @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
713
+ *
714
+ * @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
715
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
716
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
717
+ */
718
+ flexibleLoanAdjustLtv(requestParameters) {
719
+ return this.flexibleRateApi.flexibleLoanAdjustLtv(requestParameters);
720
+ }
721
+ /**
722
+ * Borrow Flexible Loan
723
+ *
724
+ *
725
+ * Only available for master account
726
+ * You can customize LTV by entering loanAmount and collateralAmount.
727
+ *
728
+ * Weight: 6000
729
+ *
730
+ * @summary Flexible Loan Borrow(TRADE)
731
+ * @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
732
+ *
733
+ * @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
734
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
735
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
736
+ */
737
+ flexibleLoanBorrow(requestParameters) {
738
+ return this.flexibleRateApi.flexibleLoanBorrow(requestParameters);
739
+ }
740
+ /**
741
+ * Flexible Loan Repay
742
+ *
743
+ *
744
+ * repayAmount is mandatory even fullRepayment = FALSE
745
+ *
746
+ * Weight: 6000
747
+ *
748
+ * @summary Flexible Loan Repay(TRADE)
749
+ * @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
750
+ *
751
+ * @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
752
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
753
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
754
+ */
755
+ flexibleLoanRepay(requestParameters) {
756
+ return this.flexibleRateApi.flexibleLoanRepay(requestParameters);
757
+ }
758
+ /**
759
+ * Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
760
+ *
761
+ * Weight: 400
762
+ *
763
+ * @summary Get Flexible Loan Assets Data(USER_DATA)
764
+ * @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
765
+ *
766
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
767
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
768
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
769
+ */
770
+ getFlexibleLoanAssetsData(requestParameters = {}) {
771
+ return this.flexibleRateApi.getFlexibleLoanAssetsData(requestParameters);
772
+ }
773
+ /**
774
+ * Get Flexible Loan Borrow History
775
+ *
776
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
777
+ * The max interval between startTime and endTime is 180 days.
778
+ *
779
+ * Weight: 400
780
+ *
781
+ * @summary Get Flexible Loan Borrow History(USER_DATA)
782
+ * @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
783
+ *
784
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
785
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
786
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
787
+ */
788
+ getFlexibleLoanBorrowHistory(requestParameters = {}) {
789
+ return this.flexibleRateApi.getFlexibleLoanBorrowHistory(requestParameters);
790
+ }
791
+ /**
792
+ * Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
793
+ *
794
+ * Weight: 400
795
+ *
796
+ * @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
797
+ * @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
798
+ *
799
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
800
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
801
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
802
+ */
803
+ getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
804
+ return this.flexibleRateApi.getFlexibleLoanCollateralAssetsData(requestParameters);
805
+ }
806
+ /**
807
+ *
808
+ * Weight: 400
809
+ *
810
+ * @summary Get Flexible Loan Liquidation History (USER_DATA)
811
+ * @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
812
+ *
813
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
814
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
815
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
816
+ */
817
+ getFlexibleLoanLiquidationHistory(requestParameters = {}) {
818
+ return this.flexibleRateApi.getFlexibleLoanLiquidationHistory(requestParameters);
819
+ }
820
+ /**
821
+ * Get Flexible Loan LTV Adjustment History
822
+ *
823
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
824
+ * The max interval between startTime and endTime is 180 days.
825
+ *
826
+ * Weight: 400
827
+ *
828
+ * @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
829
+ * @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
830
+ *
831
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
832
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
833
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
834
+ */
835
+ getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
836
+ return this.flexibleRateApi.getFlexibleLoanLtvAdjustmentHistory(requestParameters);
837
+ }
838
+ /**
839
+ * Get Flexible Loan Ongoing Orders
840
+ *
841
+ * Weight: 300
842
+ *
843
+ * @summary Get Flexible Loan Ongoing Orders(USER_DATA)
844
+ * @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
845
+ *
846
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
847
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
848
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
849
+ */
850
+ getFlexibleLoanOngoingOrders(requestParameters = {}) {
851
+ return this.flexibleRateApi.getFlexibleLoanOngoingOrders(requestParameters);
852
+ }
853
+ /**
854
+ * Get Flexible Loan Repayment History
855
+ *
856
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
857
+ * The max interval between startTime and endTime is 180 days.
858
+ *
859
+ * Weight: 400
860
+ *
861
+ * @summary Get Flexible Loan Repayment History(USER_DATA)
862
+ * @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
863
+ *
864
+ * @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
865
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
866
+ * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
867
+ */
868
+ getFlexibleLoanRepaymentHistory(requestParameters = {}) {
869
+ return this.flexibleRateApi.getFlexibleLoanRepaymentHistory(requestParameters);
870
+ }
871
+ /**
872
+ * Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
873
+ *
874
+ * Weight: 6000
875
+ *
876
+ * @summary Check Collateral Repay Rate(USER_DATA)
877
+ * @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
878
+ *
879
+ * @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
880
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
881
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
882
+ */
883
+ checkCollateralRepayRateStableRate(requestParameters) {
884
+ return this.stableRateApi.checkCollateralRepayRateStableRate(requestParameters);
885
+ }
886
+ /**
887
+ * Get Crypto Loans Income History
888
+ *
889
+ * If startTime and endTime are not sent, the recent 7-day data will be returned.
890
+ * The max interval between startTime and endTime is 30 days.
891
+ *
892
+ * Weight: 6000
893
+ *
894
+ * @summary Get Crypto Loans Income History(USER_DATA)
895
+ * @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
896
+ *
897
+ * @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
898
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
899
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
900
+ */
901
+ getCryptoLoansIncomeHistory(requestParameters = {}) {
902
+ return this.stableRateApi.getCryptoLoansIncomeHistory(requestParameters);
903
+ }
904
+ /**
905
+ * Get Loan Borrow History
906
+ *
907
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
908
+ * The max interval between startTime and endTime is 180 days.
909
+ *
910
+ * Weight: 400
911
+ *
912
+ * @summary Get Loan Borrow History(USER_DATA)
913
+ * @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
914
+ *
915
+ * @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
916
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
917
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
918
+ */
919
+ getLoanBorrowHistory(requestParameters = {}) {
920
+ return this.stableRateApi.getLoanBorrowHistory(requestParameters);
921
+ }
922
+ /**
923
+ * Get Loan LTV Adjustment History
924
+ *
925
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
926
+ * The max interval between startTime and endTime is 180 days.
927
+ *
928
+ * Weight: 400
929
+ *
930
+ * @summary Get Loan LTV Adjustment History(USER_DATA)
931
+ * @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
932
+ *
933
+ * @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
934
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
935
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
936
+ */
937
+ getLoanLtvAdjustmentHistory(requestParameters = {}) {
938
+ return this.stableRateApi.getLoanLtvAdjustmentHistory(requestParameters);
939
+ }
940
+ /**
941
+ * Get Loan Repayment History
942
+ *
943
+ * If startTime and endTime are not sent, the recent 90-day data will be returned.
944
+ * The max interval between startTime and endTime is 180 days.
945
+ *
946
+ * Weight: 400
947
+ *
948
+ * @summary Get Loan Repayment History(USER_DATA)
949
+ * @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
950
+ *
951
+ * @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
952
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
953
+ * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
954
+ */
955
+ getLoanRepaymentHistory(requestParameters = {}) {
956
+ return this.stableRateApi.getLoanRepaymentHistory(requestParameters);
957
+ }
958
+ };
959
+
960
+ //#endregion
961
+ //#region src/rest-api/index.ts
962
+ var rest_api_exports = /* @__PURE__ */ __export({
963
+ FlexibleRateApi: () => FlexibleRateApi,
964
+ RestAPI: () => RestAPI,
965
+ StableRateApi: () => StableRateApi
966
+ });
967
+
968
+ //#endregion
969
+ //#region src/crypto-loan.ts
970
+ var CryptoLoan = class {
971
+ constructor(config) {
972
+ const userAgent = (0, __binance_common.buildUserAgent)(name, version);
973
+ if (config?.configurationRestAPI) {
974
+ const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
975
+ configRestAPI.basePath = configRestAPI.basePath || __binance_common.CRYPTO_LOAN_REST_API_PROD_URL;
976
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
977
+ configRestAPI.baseOptions.headers = {
978
+ ...configRestAPI.baseOptions.headers || {},
979
+ "User-Agent": userAgent
980
+ };
981
+ this.restAPI = new RestAPI(configRestAPI);
982
+ }
983
+ }
984
+ };
985
+
986
+ //#endregion
987
+ Object.defineProperty(exports, 'BadRequestError', {
988
+ enumerable: true,
989
+ get: function () {
990
+ return __binance_common.BadRequestError;
1427
991
  }
1428
- /**
1429
- * Get Flexible Loan Borrow History
1430
- *
1431
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1432
- * The max interval between startTime and endTime is 180 days.
1433
- *
1434
- * Weight: 400
1435
- *
1436
- * @summary Get Flexible Loan Borrow History(USER_DATA)
1437
- * @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
1438
- *
1439
- * @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
1440
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1441
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
1442
- */
1443
- getFlexibleLoanBorrowHistory(requestParameters = {}) {
1444
- return this.flexibleRateApi.getFlexibleLoanBorrowHistory(requestParameters);
992
+ });
993
+ Object.defineProperty(exports, 'CRYPTO_LOAN_REST_API_PROD_URL', {
994
+ enumerable: true,
995
+ get: function () {
996
+ return __binance_common.CRYPTO_LOAN_REST_API_PROD_URL;
1445
997
  }
1446
- /**
1447
- * Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
1448
- *
1449
- * Weight: 400
1450
- *
1451
- * @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
1452
- * @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
1453
- *
1454
- * @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
1455
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1456
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
1457
- */
1458
- getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
1459
- return this.flexibleRateApi.getFlexibleLoanCollateralAssetsData(requestParameters);
998
+ });
999
+ Object.defineProperty(exports, 'ConfigurationCryptoLoan', {
1000
+ enumerable: true,
1001
+ get: function () {
1002
+ return ConfigurationCryptoLoan;
1460
1003
  }
1461
- /**
1462
- *
1463
- * Weight: 400
1464
- *
1465
- * @summary Get Flexible Loan Liquidation History (USER_DATA)
1466
- * @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
1467
- *
1468
- * @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
1469
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1470
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
1471
- */
1472
- getFlexibleLoanLiquidationHistory(requestParameters = {}) {
1473
- return this.flexibleRateApi.getFlexibleLoanLiquidationHistory(requestParameters);
1004
+ });
1005
+ Object.defineProperty(exports, 'ConnectorClientError', {
1006
+ enumerable: true,
1007
+ get: function () {
1008
+ return __binance_common.ConnectorClientError;
1474
1009
  }
1475
- /**
1476
- * Get Flexible Loan LTV Adjustment History
1477
- *
1478
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1479
- * The max interval between startTime and endTime is 180 days.
1480
- *
1481
- * Weight: 400
1482
- *
1483
- * @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
1484
- * @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
1485
- *
1486
- * @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
1487
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1488
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
1489
- */
1490
- getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
1491
- return this.flexibleRateApi.getFlexibleLoanLtvAdjustmentHistory(requestParameters);
1010
+ });
1011
+ exports.CryptoLoan = CryptoLoan;
1012
+ Object.defineProperty(exports, 'CryptoLoanRestAPI', {
1013
+ enumerable: true,
1014
+ get: function () {
1015
+ return rest_api_exports;
1492
1016
  }
1493
- /**
1494
- * Get Flexible Loan Ongoing Orders
1495
- *
1496
- * Weight: 300
1497
- *
1498
- * @summary Get Flexible Loan Ongoing Orders(USER_DATA)
1499
- * @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
1500
- *
1501
- * @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
1502
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1503
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
1504
- */
1505
- getFlexibleLoanOngoingOrders(requestParameters = {}) {
1506
- return this.flexibleRateApi.getFlexibleLoanOngoingOrders(requestParameters);
1017
+ });
1018
+ Object.defineProperty(exports, 'ForbiddenError', {
1019
+ enumerable: true,
1020
+ get: function () {
1021
+ return __binance_common.ForbiddenError;
1507
1022
  }
1508
- /**
1509
- * Get Flexible Loan Repayment History
1510
- *
1511
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1512
- * The max interval between startTime and endTime is 180 days.
1513
- *
1514
- * Weight: 400
1515
- *
1516
- * @summary Get Flexible Loan Repayment History(USER_DATA)
1517
- * @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
1518
- *
1519
- * @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
1520
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1521
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
1522
- */
1523
- getFlexibleLoanRepaymentHistory(requestParameters = {}) {
1524
- return this.flexibleRateApi.getFlexibleLoanRepaymentHistory(requestParameters);
1023
+ });
1024
+ Object.defineProperty(exports, 'NetworkError', {
1025
+ enumerable: true,
1026
+ get: function () {
1027
+ return __binance_common.NetworkError;
1525
1028
  }
1526
- /**
1527
- * Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
1528
- *
1529
- * Weight: 6000
1530
- *
1531
- * @summary Check Collateral Repay Rate(USER_DATA)
1532
- * @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
1533
- *
1534
- * @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
1535
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1536
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
1537
- */
1538
- checkCollateralRepayRateStableRate(requestParameters) {
1539
- return this.stableRateApi.checkCollateralRepayRateStableRate(requestParameters);
1029
+ });
1030
+ Object.defineProperty(exports, 'NotFoundError', {
1031
+ enumerable: true,
1032
+ get: function () {
1033
+ return __binance_common.NotFoundError;
1540
1034
  }
1541
- /**
1542
- * Get Crypto Loans Income History
1543
- *
1544
- * If startTime and endTime are not sent, the recent 7-day data will be returned.
1545
- * The max interval between startTime and endTime is 30 days.
1546
- *
1547
- * Weight: 6000
1548
- *
1549
- * @summary Get Crypto Loans Income History(USER_DATA)
1550
- * @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
1551
- *
1552
- * @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
1553
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1554
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
1555
- */
1556
- getCryptoLoansIncomeHistory(requestParameters = {}) {
1557
- return this.stableRateApi.getCryptoLoansIncomeHistory(requestParameters);
1035
+ });
1036
+ Object.defineProperty(exports, 'RateLimitBanError', {
1037
+ enumerable: true,
1038
+ get: function () {
1039
+ return __binance_common.RateLimitBanError;
1558
1040
  }
1559
- /**
1560
- * Get Loan Borrow History
1561
- *
1562
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1563
- * The max interval between startTime and endTime is 180 days.
1564
- *
1565
- * Weight: 400
1566
- *
1567
- * @summary Get Loan Borrow History(USER_DATA)
1568
- * @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
1569
- *
1570
- * @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
1571
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1572
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
1573
- */
1574
- getLoanBorrowHistory(requestParameters = {}) {
1575
- return this.stableRateApi.getLoanBorrowHistory(requestParameters);
1041
+ });
1042
+ Object.defineProperty(exports, 'RequiredError', {
1043
+ enumerable: true,
1044
+ get: function () {
1045
+ return __binance_common.RequiredError;
1576
1046
  }
1577
- /**
1578
- * Get Loan LTV Adjustment History
1579
- *
1580
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1581
- * The max interval between startTime and endTime is 180 days.
1582
- *
1583
- * Weight: 400
1584
- *
1585
- * @summary Get Loan LTV Adjustment History(USER_DATA)
1586
- * @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
1587
- *
1588
- * @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
1589
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1590
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
1591
- */
1592
- getLoanLtvAdjustmentHistory(requestParameters = {}) {
1593
- return this.stableRateApi.getLoanLtvAdjustmentHistory(requestParameters);
1047
+ });
1048
+ Object.defineProperty(exports, 'ServerError', {
1049
+ enumerable: true,
1050
+ get: function () {
1051
+ return __binance_common.ServerError;
1594
1052
  }
1595
- /**
1596
- * Get Loan Repayment History
1597
- *
1598
- * If startTime and endTime are not sent, the recent 90-day data will be returned.
1599
- * The max interval between startTime and endTime is 180 days.
1600
- *
1601
- * Weight: 400
1602
- *
1603
- * @summary Get Loan Repayment History(USER_DATA)
1604
- * @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
1605
- *
1606
- * @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
1607
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1608
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
1609
- */
1610
- getLoanRepaymentHistory(requestParameters = {}) {
1611
- return this.stableRateApi.getLoanRepaymentHistory(requestParameters);
1053
+ });
1054
+ Object.defineProperty(exports, 'TooManyRequestsError', {
1055
+ enumerable: true,
1056
+ get: function () {
1057
+ return __binance_common.TooManyRequestsError;
1612
1058
  }
1613
- };
1614
-
1615
- // src/crypto-loan.ts
1616
- var CryptoLoan = class {
1617
- constructor(config) {
1618
- const userAgent = (0, import_common4.buildUserAgent)(name, version);
1619
- if (config?.configurationRestAPI) {
1620
- const configRestAPI = new import_common4.ConfigurationRestAPI(
1621
- config.configurationRestAPI
1622
- );
1623
- configRestAPI.basePath = configRestAPI.basePath || import_common4.CRYPTO_LOAN_REST_API_PROD_URL;
1624
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
1625
- configRestAPI.baseOptions.headers = {
1626
- ...configRestAPI.baseOptions.headers || {},
1627
- "User-Agent": userAgent
1628
- };
1629
- this.restAPI = new RestAPI(configRestAPI);
1630
- }
1059
+ });
1060
+ Object.defineProperty(exports, 'UnauthorizedError', {
1061
+ enumerable: true,
1062
+ get: function () {
1063
+ return __binance_common.UnauthorizedError;
1631
1064
  }
1632
- };
1633
-
1634
- // src/index.ts
1635
- var import_common5 = require("@binance/common");
1636
- // Annotate the CommonJS export names for ESM import in node:
1637
- 0 && (module.exports = {
1638
- BadRequestError,
1639
- CRYPTO_LOAN_REST_API_PROD_URL,
1640
- ConnectorClientError,
1641
- CryptoLoan,
1642
- CryptoLoanRestAPI,
1643
- ForbiddenError,
1644
- NetworkError,
1645
- NotFoundError,
1646
- RateLimitBanError,
1647
- RequiredError,
1648
- ServerError,
1649
- TooManyRequestsError,
1650
- UnauthorizedError
1651
1065
  });
1652
1066
  //# sourceMappingURL=index.js.map