@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/chunk.mjs +13 -0
- package/dist/index.d.mts +2046 -2262
- package/dist/index.d.ts +2048 -2262
- package/dist/index.js +1036 -1622
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +959 -1623
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,1652 +1,1066 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
40
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
let __binance_common = require("@binance/common");
|
|
41
14
|
|
|
42
|
-
|
|
15
|
+
//#region package.json
|
|
43
16
|
var name = "@binance/crypto-loan";
|
|
44
|
-
var version = "8.0.
|
|
17
|
+
var version = "8.0.2";
|
|
45
18
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
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
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
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
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
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
|
-
|
|
1314
|
-
|
|
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
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
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
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
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
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
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
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
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
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
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
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
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
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
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
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
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
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
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
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
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
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
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
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
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
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
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
|