@binance/crypto-loan 1.0.0
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/LICENCE +21 -0
- package/README.md +200 -0
- package/dist/index.d.mts +4092 -0
- package/dist/index.d.ts +4092 -0
- package/dist/index.js +2278 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2263 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +55 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2263 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name2 in all)
|
|
4
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/crypto-loan.ts
|
|
8
|
+
import { platform, arch } from "os";
|
|
9
|
+
import { ConfigurationRestAPI as ConfigurationRestAPI4, CRYPTO_LOAN_REST_API_PROD_URL } from "@binance/common";
|
|
10
|
+
|
|
11
|
+
// package.json
|
|
12
|
+
var name = "@binance/crypto-loan";
|
|
13
|
+
var version = "1.0.0";
|
|
14
|
+
|
|
15
|
+
// src/rest-api/index.ts
|
|
16
|
+
var rest_api_exports = {};
|
|
17
|
+
__export(rest_api_exports, {
|
|
18
|
+
FlexibleRateApi: () => FlexibleRateApi,
|
|
19
|
+
RestAPI: () => RestAPI,
|
|
20
|
+
StableRateApi: () => StableRateApi
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// src/rest-api/modules/flexible-rate-api.ts
|
|
24
|
+
import {
|
|
25
|
+
assertParamExists,
|
|
26
|
+
sendRequest
|
|
27
|
+
} from "@binance/common";
|
|
28
|
+
var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
29
|
+
return {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* Weight: 6000
|
|
33
|
+
*
|
|
34
|
+
* @summary Check Collateral Repay Rate (USER_DATA)
|
|
35
|
+
* @param {string} loanCoin
|
|
36
|
+
* @param {string} collateralCoin
|
|
37
|
+
* @param {number} [recvWindow]
|
|
38
|
+
*
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
checkCollateralRepayRate: async (loanCoin, collateralCoin, recvWindow) => {
|
|
42
|
+
assertParamExists("checkCollateralRepayRate", "loanCoin", loanCoin);
|
|
43
|
+
assertParamExists("checkCollateralRepayRate", "collateralCoin", collateralCoin);
|
|
44
|
+
const localVarQueryParameter = {};
|
|
45
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
46
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
47
|
+
}
|
|
48
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
49
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
50
|
+
}
|
|
51
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
52
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
53
|
+
}
|
|
54
|
+
let _timeUnit;
|
|
55
|
+
if ("timeUnit" in configuration)
|
|
56
|
+
_timeUnit = configuration.timeUnit;
|
|
57
|
+
return {
|
|
58
|
+
endpoint: "/sapi/v2/loan/flexible/repay/rate",
|
|
59
|
+
method: "GET",
|
|
60
|
+
params: localVarQueryParameter,
|
|
61
|
+
timeUnit: _timeUnit
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Flexible Loan Adjust LTV
|
|
66
|
+
*
|
|
67
|
+
* API Key needs Spot & Margin Trading permission for this endpoint
|
|
68
|
+
*
|
|
69
|
+
* Weight: 6000
|
|
70
|
+
*
|
|
71
|
+
* @summary Flexible Loan Adjust LTV(TRADE)
|
|
72
|
+
* @param {string} loanCoin
|
|
73
|
+
* @param {string} collateralCoin
|
|
74
|
+
* @param {number} adjustmentAmount
|
|
75
|
+
* @param {string} direction "ADDITIONAL", "REDUCED"
|
|
76
|
+
* @param {number} [recvWindow]
|
|
77
|
+
*
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
*/
|
|
80
|
+
flexibleLoanAdjustLtv: async (loanCoin, collateralCoin, adjustmentAmount, direction, recvWindow) => {
|
|
81
|
+
assertParamExists("flexibleLoanAdjustLtv", "loanCoin", loanCoin);
|
|
82
|
+
assertParamExists("flexibleLoanAdjustLtv", "collateralCoin", collateralCoin);
|
|
83
|
+
assertParamExists("flexibleLoanAdjustLtv", "adjustmentAmount", adjustmentAmount);
|
|
84
|
+
assertParamExists("flexibleLoanAdjustLtv", "direction", direction);
|
|
85
|
+
const localVarQueryParameter = {};
|
|
86
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
87
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
88
|
+
}
|
|
89
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
90
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
91
|
+
}
|
|
92
|
+
if (adjustmentAmount !== void 0 && adjustmentAmount !== null) {
|
|
93
|
+
localVarQueryParameter["adjustmentAmount"] = adjustmentAmount;
|
|
94
|
+
}
|
|
95
|
+
if (direction !== void 0 && direction !== null) {
|
|
96
|
+
localVarQueryParameter["direction"] = direction;
|
|
97
|
+
}
|
|
98
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
99
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
100
|
+
}
|
|
101
|
+
let _timeUnit;
|
|
102
|
+
if ("timeUnit" in configuration)
|
|
103
|
+
_timeUnit = configuration.timeUnit;
|
|
104
|
+
return {
|
|
105
|
+
endpoint: "/sapi/v2/loan/flexible/adjust/ltv",
|
|
106
|
+
method: "POST",
|
|
107
|
+
params: localVarQueryParameter,
|
|
108
|
+
timeUnit: _timeUnit
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* Borrow Flexible Loan
|
|
113
|
+
*
|
|
114
|
+
*
|
|
115
|
+
* Only available for master account
|
|
116
|
+
* You can customize LTV by entering loanAmount and collateralAmount.
|
|
117
|
+
*
|
|
118
|
+
* Weight: 6000
|
|
119
|
+
*
|
|
120
|
+
* @summary Flexible Loan Borrow(TRADE)
|
|
121
|
+
* @param {string} loanCoin
|
|
122
|
+
* @param {string} collateralCoin
|
|
123
|
+
* @param {number} [recvWindow]
|
|
124
|
+
*
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
flexibleLoanBorrow: async (loanCoin, collateralCoin, recvWindow) => {
|
|
128
|
+
assertParamExists("flexibleLoanBorrow", "loanCoin", loanCoin);
|
|
129
|
+
assertParamExists("flexibleLoanBorrow", "collateralCoin", collateralCoin);
|
|
130
|
+
const localVarQueryParameter = {};
|
|
131
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
132
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
133
|
+
}
|
|
134
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
135
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
136
|
+
}
|
|
137
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
138
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
139
|
+
}
|
|
140
|
+
let _timeUnit;
|
|
141
|
+
if ("timeUnit" in configuration)
|
|
142
|
+
_timeUnit = configuration.timeUnit;
|
|
143
|
+
return {
|
|
144
|
+
endpoint: "/sapi/v2/loan/flexible/borrow",
|
|
145
|
+
method: "POST",
|
|
146
|
+
params: localVarQueryParameter,
|
|
147
|
+
timeUnit: _timeUnit
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* Weight: 6000
|
|
153
|
+
*
|
|
154
|
+
* @summary Flexible Loan Collateral Repayment (TRADE)
|
|
155
|
+
* @param {string} loanCoin
|
|
156
|
+
* @param {string} collateralCoin
|
|
157
|
+
* @param {number} repayAmount repay amount of loanCoin
|
|
158
|
+
* @param {boolean} [fullRepayment] Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount
|
|
159
|
+
* @param {number} [recvWindow]
|
|
160
|
+
*
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
*/
|
|
163
|
+
flexibleLoanCollateralRepayment: async (loanCoin, collateralCoin, repayAmount, fullRepayment, recvWindow) => {
|
|
164
|
+
assertParamExists("flexibleLoanCollateralRepayment", "loanCoin", loanCoin);
|
|
165
|
+
assertParamExists("flexibleLoanCollateralRepayment", "collateralCoin", collateralCoin);
|
|
166
|
+
assertParamExists("flexibleLoanCollateralRepayment", "repayAmount", repayAmount);
|
|
167
|
+
const localVarQueryParameter = {};
|
|
168
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
169
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
170
|
+
}
|
|
171
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
172
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
173
|
+
}
|
|
174
|
+
if (repayAmount !== void 0 && repayAmount !== null) {
|
|
175
|
+
localVarQueryParameter["repayAmount"] = repayAmount;
|
|
176
|
+
}
|
|
177
|
+
if (fullRepayment !== void 0 && fullRepayment !== null) {
|
|
178
|
+
localVarQueryParameter["fullRepayment"] = fullRepayment;
|
|
179
|
+
}
|
|
180
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
181
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
182
|
+
}
|
|
183
|
+
let _timeUnit;
|
|
184
|
+
if ("timeUnit" in configuration)
|
|
185
|
+
_timeUnit = configuration.timeUnit;
|
|
186
|
+
return {
|
|
187
|
+
endpoint: "/sapi/v2/loan/flexible/repay/collateral",
|
|
188
|
+
method: "POST",
|
|
189
|
+
params: localVarQueryParameter,
|
|
190
|
+
timeUnit: _timeUnit
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* Flexible Loan Repay
|
|
195
|
+
*
|
|
196
|
+
*
|
|
197
|
+
* repayAmount is mandatory even fullRepayment = FALSE
|
|
198
|
+
*
|
|
199
|
+
* Weight: 6000
|
|
200
|
+
*
|
|
201
|
+
* @summary Flexible Loan Repay(TRADE)
|
|
202
|
+
* @param {string} loanCoin
|
|
203
|
+
* @param {string} collateralCoin
|
|
204
|
+
* @param {number} repayAmount repay amount of loanCoin
|
|
205
|
+
* @param {boolean} [collateralReturn] Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order, and lower LTV.
|
|
206
|
+
* @param {boolean} [fullRepayment] Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount
|
|
207
|
+
* @param {number} [recvWindow]
|
|
208
|
+
*
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
*/
|
|
211
|
+
flexibleLoanRepay: async (loanCoin, collateralCoin, repayAmount, collateralReturn, fullRepayment, recvWindow) => {
|
|
212
|
+
assertParamExists("flexibleLoanRepay", "loanCoin", loanCoin);
|
|
213
|
+
assertParamExists("flexibleLoanRepay", "collateralCoin", collateralCoin);
|
|
214
|
+
assertParamExists("flexibleLoanRepay", "repayAmount", repayAmount);
|
|
215
|
+
const localVarQueryParameter = {};
|
|
216
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
217
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
218
|
+
}
|
|
219
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
220
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
221
|
+
}
|
|
222
|
+
if (repayAmount !== void 0 && repayAmount !== null) {
|
|
223
|
+
localVarQueryParameter["repayAmount"] = repayAmount;
|
|
224
|
+
}
|
|
225
|
+
if (collateralReturn !== void 0 && collateralReturn !== null) {
|
|
226
|
+
localVarQueryParameter["collateralReturn"] = collateralReturn;
|
|
227
|
+
}
|
|
228
|
+
if (fullRepayment !== void 0 && fullRepayment !== null) {
|
|
229
|
+
localVarQueryParameter["fullRepayment"] = fullRepayment;
|
|
230
|
+
}
|
|
231
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
232
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
233
|
+
}
|
|
234
|
+
let _timeUnit;
|
|
235
|
+
if ("timeUnit" in configuration)
|
|
236
|
+
_timeUnit = configuration.timeUnit;
|
|
237
|
+
return {
|
|
238
|
+
endpoint: "/sapi/v2/loan/flexible/repay",
|
|
239
|
+
method: "POST",
|
|
240
|
+
params: localVarQueryParameter,
|
|
241
|
+
timeUnit: _timeUnit
|
|
242
|
+
};
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
* Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
|
|
246
|
+
*
|
|
247
|
+
* Weight: 400
|
|
248
|
+
*
|
|
249
|
+
* @summary Get Flexible Loan Assets Data(USER_DATA)
|
|
250
|
+
* @param {string} [loanCoin]
|
|
251
|
+
* @param {number} [recvWindow]
|
|
252
|
+
*
|
|
253
|
+
* @throws {RequiredError}
|
|
254
|
+
*/
|
|
255
|
+
getFlexibleLoanAssetsData: async (loanCoin, recvWindow) => {
|
|
256
|
+
const localVarQueryParameter = {};
|
|
257
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
258
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
259
|
+
}
|
|
260
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
261
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
262
|
+
}
|
|
263
|
+
let _timeUnit;
|
|
264
|
+
if ("timeUnit" in configuration)
|
|
265
|
+
_timeUnit = configuration.timeUnit;
|
|
266
|
+
return {
|
|
267
|
+
endpoint: "/sapi/v2/loan/flexible/loanable/data",
|
|
268
|
+
method: "GET",
|
|
269
|
+
params: localVarQueryParameter,
|
|
270
|
+
timeUnit: _timeUnit
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
* Get Flexible Loan Borrow History
|
|
275
|
+
*
|
|
276
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
277
|
+
* The max interval between startTime and endTime is 180 days.
|
|
278
|
+
*
|
|
279
|
+
* Weight: 400
|
|
280
|
+
*
|
|
281
|
+
* @summary Get Flexible Loan Borrow History(USER_DATA)
|
|
282
|
+
* @param {string} [loanCoin]
|
|
283
|
+
* @param {string} [collateralCoin]
|
|
284
|
+
* @param {number} [startTime]
|
|
285
|
+
* @param {number} [endTime]
|
|
286
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
287
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
288
|
+
* @param {number} [recvWindow]
|
|
289
|
+
*
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
*/
|
|
292
|
+
getFlexibleLoanBorrowHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
293
|
+
const localVarQueryParameter = {};
|
|
294
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
295
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
296
|
+
}
|
|
297
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
298
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
299
|
+
}
|
|
300
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
301
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
302
|
+
}
|
|
303
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
304
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
305
|
+
}
|
|
306
|
+
if (current !== void 0 && current !== null) {
|
|
307
|
+
localVarQueryParameter["current"] = current;
|
|
308
|
+
}
|
|
309
|
+
if (limit !== void 0 && limit !== null) {
|
|
310
|
+
localVarQueryParameter["limit"] = limit;
|
|
311
|
+
}
|
|
312
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
313
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
314
|
+
}
|
|
315
|
+
let _timeUnit;
|
|
316
|
+
if ("timeUnit" in configuration)
|
|
317
|
+
_timeUnit = configuration.timeUnit;
|
|
318
|
+
return {
|
|
319
|
+
endpoint: "/sapi/v2/loan/flexible/borrow/history",
|
|
320
|
+
method: "GET",
|
|
321
|
+
params: localVarQueryParameter,
|
|
322
|
+
timeUnit: _timeUnit
|
|
323
|
+
};
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
|
|
327
|
+
*
|
|
328
|
+
* Weight: 400
|
|
329
|
+
*
|
|
330
|
+
* @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
|
|
331
|
+
* @param {string} [collateralCoin]
|
|
332
|
+
* @param {number} [recvWindow]
|
|
333
|
+
*
|
|
334
|
+
* @throws {RequiredError}
|
|
335
|
+
*/
|
|
336
|
+
getFlexibleLoanCollateralAssetsData: async (collateralCoin, recvWindow) => {
|
|
337
|
+
const localVarQueryParameter = {};
|
|
338
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
339
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
340
|
+
}
|
|
341
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
342
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
343
|
+
}
|
|
344
|
+
let _timeUnit;
|
|
345
|
+
if ("timeUnit" in configuration)
|
|
346
|
+
_timeUnit = configuration.timeUnit;
|
|
347
|
+
return {
|
|
348
|
+
endpoint: "/sapi/v2/loan/flexible/collateral/data",
|
|
349
|
+
method: "GET",
|
|
350
|
+
params: localVarQueryParameter,
|
|
351
|
+
timeUnit: _timeUnit
|
|
352
|
+
};
|
|
353
|
+
},
|
|
354
|
+
/**
|
|
355
|
+
*
|
|
356
|
+
* Weight: 400
|
|
357
|
+
*
|
|
358
|
+
* @summary Get Flexible Loan Liquidation History (USER_DATA)
|
|
359
|
+
* @param {string} [loanCoin]
|
|
360
|
+
* @param {string} [collateralCoin]
|
|
361
|
+
* @param {number} [startTime]
|
|
362
|
+
* @param {number} [endTime]
|
|
363
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
364
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
365
|
+
* @param {number} [recvWindow]
|
|
366
|
+
*
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
getFlexibleLoanLiquidationHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
370
|
+
const localVarQueryParameter = {};
|
|
371
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
372
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
373
|
+
}
|
|
374
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
375
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
376
|
+
}
|
|
377
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
378
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
379
|
+
}
|
|
380
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
381
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
382
|
+
}
|
|
383
|
+
if (current !== void 0 && current !== null) {
|
|
384
|
+
localVarQueryParameter["current"] = current;
|
|
385
|
+
}
|
|
386
|
+
if (limit !== void 0 && limit !== null) {
|
|
387
|
+
localVarQueryParameter["limit"] = limit;
|
|
388
|
+
}
|
|
389
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
390
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
391
|
+
}
|
|
392
|
+
let _timeUnit;
|
|
393
|
+
if ("timeUnit" in configuration)
|
|
394
|
+
_timeUnit = configuration.timeUnit;
|
|
395
|
+
return {
|
|
396
|
+
endpoint: "/sapi/v2/loan/flexible/liquidation/history",
|
|
397
|
+
method: "GET",
|
|
398
|
+
params: localVarQueryParameter,
|
|
399
|
+
timeUnit: _timeUnit
|
|
400
|
+
};
|
|
401
|
+
},
|
|
402
|
+
/**
|
|
403
|
+
* Get Flexible Loan LTV Adjustment History
|
|
404
|
+
*
|
|
405
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
406
|
+
* The max interval between startTime and endTime is 180 days.
|
|
407
|
+
*
|
|
408
|
+
* Weight: 400
|
|
409
|
+
*
|
|
410
|
+
* @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
|
|
411
|
+
* @param {string} [loanCoin]
|
|
412
|
+
* @param {string} [collateralCoin]
|
|
413
|
+
* @param {number} [startTime]
|
|
414
|
+
* @param {number} [endTime]
|
|
415
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
416
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
417
|
+
* @param {number} [recvWindow]
|
|
418
|
+
*
|
|
419
|
+
* @throws {RequiredError}
|
|
420
|
+
*/
|
|
421
|
+
getFlexibleLoanLtvAdjustmentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
422
|
+
const localVarQueryParameter = {};
|
|
423
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
424
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
425
|
+
}
|
|
426
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
427
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
428
|
+
}
|
|
429
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
430
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
431
|
+
}
|
|
432
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
433
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
434
|
+
}
|
|
435
|
+
if (current !== void 0 && current !== null) {
|
|
436
|
+
localVarQueryParameter["current"] = current;
|
|
437
|
+
}
|
|
438
|
+
if (limit !== void 0 && limit !== null) {
|
|
439
|
+
localVarQueryParameter["limit"] = limit;
|
|
440
|
+
}
|
|
441
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
442
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
443
|
+
}
|
|
444
|
+
let _timeUnit;
|
|
445
|
+
if ("timeUnit" in configuration)
|
|
446
|
+
_timeUnit = configuration.timeUnit;
|
|
447
|
+
return {
|
|
448
|
+
endpoint: "/sapi/v2/loan/flexible/ltv/adjustment/history",
|
|
449
|
+
method: "GET",
|
|
450
|
+
params: localVarQueryParameter,
|
|
451
|
+
timeUnit: _timeUnit
|
|
452
|
+
};
|
|
453
|
+
},
|
|
454
|
+
/**
|
|
455
|
+
* Get Flexible Loan Ongoing Orders
|
|
456
|
+
*
|
|
457
|
+
* Weight: 300
|
|
458
|
+
*
|
|
459
|
+
* @summary Get Flexible Loan Ongoing Orders(USER_DATA)
|
|
460
|
+
* @param {string} [loanCoin]
|
|
461
|
+
* @param {string} [collateralCoin]
|
|
462
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
463
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
464
|
+
* @param {number} [recvWindow]
|
|
465
|
+
*
|
|
466
|
+
* @throws {RequiredError}
|
|
467
|
+
*/
|
|
468
|
+
getFlexibleLoanOngoingOrders: async (loanCoin, collateralCoin, current, limit, recvWindow) => {
|
|
469
|
+
const localVarQueryParameter = {};
|
|
470
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
471
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
472
|
+
}
|
|
473
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
474
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
475
|
+
}
|
|
476
|
+
if (current !== void 0 && current !== null) {
|
|
477
|
+
localVarQueryParameter["current"] = current;
|
|
478
|
+
}
|
|
479
|
+
if (limit !== void 0 && limit !== null) {
|
|
480
|
+
localVarQueryParameter["limit"] = limit;
|
|
481
|
+
}
|
|
482
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
483
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
484
|
+
}
|
|
485
|
+
let _timeUnit;
|
|
486
|
+
if ("timeUnit" in configuration)
|
|
487
|
+
_timeUnit = configuration.timeUnit;
|
|
488
|
+
return {
|
|
489
|
+
endpoint: "/sapi/v2/loan/flexible/ongoing/orders",
|
|
490
|
+
method: "GET",
|
|
491
|
+
params: localVarQueryParameter,
|
|
492
|
+
timeUnit: _timeUnit
|
|
493
|
+
};
|
|
494
|
+
},
|
|
495
|
+
/**
|
|
496
|
+
* Get Flexible Loan Repayment History
|
|
497
|
+
*
|
|
498
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
499
|
+
* The max interval between startTime and endTime is 180 days.
|
|
500
|
+
*
|
|
501
|
+
* Weight: 400
|
|
502
|
+
*
|
|
503
|
+
* @summary Get Flexible Loan Repayment History(USER_DATA)
|
|
504
|
+
* @param {string} [loanCoin]
|
|
505
|
+
* @param {string} [collateralCoin]
|
|
506
|
+
* @param {number} [startTime]
|
|
507
|
+
* @param {number} [endTime]
|
|
508
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
509
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
510
|
+
* @param {number} [recvWindow]
|
|
511
|
+
*
|
|
512
|
+
* @throws {RequiredError}
|
|
513
|
+
*/
|
|
514
|
+
getFlexibleLoanRepaymentHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
515
|
+
const localVarQueryParameter = {};
|
|
516
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
517
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
518
|
+
}
|
|
519
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
520
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
521
|
+
}
|
|
522
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
523
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
524
|
+
}
|
|
525
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
526
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
527
|
+
}
|
|
528
|
+
if (current !== void 0 && current !== null) {
|
|
529
|
+
localVarQueryParameter["current"] = current;
|
|
530
|
+
}
|
|
531
|
+
if (limit !== void 0 && limit !== null) {
|
|
532
|
+
localVarQueryParameter["limit"] = limit;
|
|
533
|
+
}
|
|
534
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
535
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
536
|
+
}
|
|
537
|
+
let _timeUnit;
|
|
538
|
+
if ("timeUnit" in configuration)
|
|
539
|
+
_timeUnit = configuration.timeUnit;
|
|
540
|
+
return {
|
|
541
|
+
endpoint: "/sapi/v2/loan/flexible/repay/history",
|
|
542
|
+
method: "GET",
|
|
543
|
+
params: localVarQueryParameter,
|
|
544
|
+
timeUnit: _timeUnit
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
var FlexibleRateApi = class {
|
|
550
|
+
constructor(configuration) {
|
|
551
|
+
this.configuration = configuration;
|
|
552
|
+
this.localVarAxiosParamCreator = FlexibleRateApiAxiosParamCreator(configuration);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
*
|
|
556
|
+
* Weight: 6000
|
|
557
|
+
*
|
|
558
|
+
* @summary Check Collateral Repay Rate (USER_DATA)
|
|
559
|
+
* @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
|
|
560
|
+
* @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
|
|
561
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
562
|
+
* @memberof FlexibleRateApi
|
|
563
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
|
|
564
|
+
*/
|
|
565
|
+
async checkCollateralRepayRate(requestParameters) {
|
|
566
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRate(
|
|
567
|
+
requestParameters?.loanCoin,
|
|
568
|
+
requestParameters?.collateralCoin,
|
|
569
|
+
requestParameters?.recvWindow
|
|
570
|
+
);
|
|
571
|
+
return sendRequest(
|
|
572
|
+
this.configuration,
|
|
573
|
+
localVarAxiosArgs.endpoint,
|
|
574
|
+
localVarAxiosArgs.method,
|
|
575
|
+
localVarAxiosArgs.params,
|
|
576
|
+
localVarAxiosArgs?.timeUnit,
|
|
577
|
+
{ isSigned: true }
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Flexible Loan Adjust LTV
|
|
582
|
+
*
|
|
583
|
+
* API Key needs Spot & Margin Trading permission for this endpoint
|
|
584
|
+
*
|
|
585
|
+
* Weight: 6000
|
|
586
|
+
*
|
|
587
|
+
* @summary Flexible Loan Adjust LTV(TRADE)
|
|
588
|
+
* @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
|
|
589
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
|
|
590
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
591
|
+
* @memberof FlexibleRateApi
|
|
592
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
|
|
593
|
+
*/
|
|
594
|
+
async flexibleLoanAdjustLtv(requestParameters) {
|
|
595
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanAdjustLtv(
|
|
596
|
+
requestParameters?.loanCoin,
|
|
597
|
+
requestParameters?.collateralCoin,
|
|
598
|
+
requestParameters?.adjustmentAmount,
|
|
599
|
+
requestParameters?.direction,
|
|
600
|
+
requestParameters?.recvWindow
|
|
601
|
+
);
|
|
602
|
+
return sendRequest(
|
|
603
|
+
this.configuration,
|
|
604
|
+
localVarAxiosArgs.endpoint,
|
|
605
|
+
localVarAxiosArgs.method,
|
|
606
|
+
localVarAxiosArgs.params,
|
|
607
|
+
localVarAxiosArgs?.timeUnit,
|
|
608
|
+
{ isSigned: true }
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Borrow Flexible Loan
|
|
613
|
+
*
|
|
614
|
+
*
|
|
615
|
+
* Only available for master account
|
|
616
|
+
* You can customize LTV by entering loanAmount and collateralAmount.
|
|
617
|
+
*
|
|
618
|
+
* Weight: 6000
|
|
619
|
+
*
|
|
620
|
+
* @summary Flexible Loan Borrow(TRADE)
|
|
621
|
+
* @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
|
|
622
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
|
|
623
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
624
|
+
* @memberof FlexibleRateApi
|
|
625
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
|
|
626
|
+
*/
|
|
627
|
+
async flexibleLoanBorrow(requestParameters) {
|
|
628
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanBorrow(
|
|
629
|
+
requestParameters?.loanCoin,
|
|
630
|
+
requestParameters?.collateralCoin,
|
|
631
|
+
requestParameters?.recvWindow
|
|
632
|
+
);
|
|
633
|
+
return sendRequest(
|
|
634
|
+
this.configuration,
|
|
635
|
+
localVarAxiosArgs.endpoint,
|
|
636
|
+
localVarAxiosArgs.method,
|
|
637
|
+
localVarAxiosArgs.params,
|
|
638
|
+
localVarAxiosArgs?.timeUnit,
|
|
639
|
+
{ isSigned: true }
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
*
|
|
644
|
+
* Weight: 6000
|
|
645
|
+
*
|
|
646
|
+
* @summary Flexible Loan Collateral Repayment (TRADE)
|
|
647
|
+
* @param {FlexibleLoanCollateralRepaymentRequest} requestParameters Request parameters.
|
|
648
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanCollateralRepaymentResponse>>}
|
|
649
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
650
|
+
* @memberof FlexibleRateApi
|
|
651
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Collateral-Repay Binance API Documentation}
|
|
652
|
+
*/
|
|
653
|
+
async flexibleLoanCollateralRepayment(requestParameters) {
|
|
654
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanCollateralRepayment(
|
|
655
|
+
requestParameters?.loanCoin,
|
|
656
|
+
requestParameters?.collateralCoin,
|
|
657
|
+
requestParameters?.repayAmount,
|
|
658
|
+
requestParameters?.fullRepayment,
|
|
659
|
+
requestParameters?.recvWindow
|
|
660
|
+
);
|
|
661
|
+
return sendRequest(
|
|
662
|
+
this.configuration,
|
|
663
|
+
localVarAxiosArgs.endpoint,
|
|
664
|
+
localVarAxiosArgs.method,
|
|
665
|
+
localVarAxiosArgs.params,
|
|
666
|
+
localVarAxiosArgs?.timeUnit,
|
|
667
|
+
{ isSigned: true }
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Flexible Loan Repay
|
|
672
|
+
*
|
|
673
|
+
*
|
|
674
|
+
* repayAmount is mandatory even fullRepayment = FALSE
|
|
675
|
+
*
|
|
676
|
+
* Weight: 6000
|
|
677
|
+
*
|
|
678
|
+
* @summary Flexible Loan Repay(TRADE)
|
|
679
|
+
* @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
|
|
680
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
|
|
681
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
682
|
+
* @memberof FlexibleRateApi
|
|
683
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
|
|
684
|
+
*/
|
|
685
|
+
async flexibleLoanRepay(requestParameters) {
|
|
686
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanRepay(
|
|
687
|
+
requestParameters?.loanCoin,
|
|
688
|
+
requestParameters?.collateralCoin,
|
|
689
|
+
requestParameters?.repayAmount,
|
|
690
|
+
requestParameters?.collateralReturn,
|
|
691
|
+
requestParameters?.fullRepayment,
|
|
692
|
+
requestParameters?.recvWindow
|
|
693
|
+
);
|
|
694
|
+
return sendRequest(
|
|
695
|
+
this.configuration,
|
|
696
|
+
localVarAxiosArgs.endpoint,
|
|
697
|
+
localVarAxiosArgs.method,
|
|
698
|
+
localVarAxiosArgs.params,
|
|
699
|
+
localVarAxiosArgs?.timeUnit,
|
|
700
|
+
{ isSigned: true }
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
|
|
705
|
+
*
|
|
706
|
+
* Weight: 400
|
|
707
|
+
*
|
|
708
|
+
* @summary Get Flexible Loan Assets Data(USER_DATA)
|
|
709
|
+
* @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
|
|
710
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
|
|
711
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
712
|
+
* @memberof FlexibleRateApi
|
|
713
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
|
|
714
|
+
*/
|
|
715
|
+
async getFlexibleLoanAssetsData(requestParameters = {}) {
|
|
716
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanAssetsData(
|
|
717
|
+
requestParameters?.loanCoin,
|
|
718
|
+
requestParameters?.recvWindow
|
|
719
|
+
);
|
|
720
|
+
return sendRequest(
|
|
721
|
+
this.configuration,
|
|
722
|
+
localVarAxiosArgs.endpoint,
|
|
723
|
+
localVarAxiosArgs.method,
|
|
724
|
+
localVarAxiosArgs.params,
|
|
725
|
+
localVarAxiosArgs?.timeUnit,
|
|
726
|
+
{ isSigned: true }
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Get Flexible Loan Borrow History
|
|
731
|
+
*
|
|
732
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
733
|
+
* The max interval between startTime and endTime is 180 days.
|
|
734
|
+
*
|
|
735
|
+
* Weight: 400
|
|
736
|
+
*
|
|
737
|
+
* @summary Get Flexible Loan Borrow History(USER_DATA)
|
|
738
|
+
* @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
|
|
739
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
|
|
740
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
741
|
+
* @memberof FlexibleRateApi
|
|
742
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
|
|
743
|
+
*/
|
|
744
|
+
async getFlexibleLoanBorrowHistory(requestParameters = {}) {
|
|
745
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanBorrowHistory(
|
|
746
|
+
requestParameters?.loanCoin,
|
|
747
|
+
requestParameters?.collateralCoin,
|
|
748
|
+
requestParameters?.startTime,
|
|
749
|
+
requestParameters?.endTime,
|
|
750
|
+
requestParameters?.current,
|
|
751
|
+
requestParameters?.limit,
|
|
752
|
+
requestParameters?.recvWindow
|
|
753
|
+
);
|
|
754
|
+
return sendRequest(
|
|
755
|
+
this.configuration,
|
|
756
|
+
localVarAxiosArgs.endpoint,
|
|
757
|
+
localVarAxiosArgs.method,
|
|
758
|
+
localVarAxiosArgs.params,
|
|
759
|
+
localVarAxiosArgs?.timeUnit,
|
|
760
|
+
{ isSigned: true }
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
|
|
765
|
+
*
|
|
766
|
+
* Weight: 400
|
|
767
|
+
*
|
|
768
|
+
* @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
|
|
769
|
+
* @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
|
|
770
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
|
|
771
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
772
|
+
* @memberof FlexibleRateApi
|
|
773
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
|
|
774
|
+
*/
|
|
775
|
+
async getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
|
|
776
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanCollateralAssetsData(
|
|
777
|
+
requestParameters?.collateralCoin,
|
|
778
|
+
requestParameters?.recvWindow
|
|
779
|
+
);
|
|
780
|
+
return sendRequest(
|
|
781
|
+
this.configuration,
|
|
782
|
+
localVarAxiosArgs.endpoint,
|
|
783
|
+
localVarAxiosArgs.method,
|
|
784
|
+
localVarAxiosArgs.params,
|
|
785
|
+
localVarAxiosArgs?.timeUnit,
|
|
786
|
+
{ isSigned: true }
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
*
|
|
791
|
+
* Weight: 400
|
|
792
|
+
*
|
|
793
|
+
* @summary Get Flexible Loan Liquidation History (USER_DATA)
|
|
794
|
+
* @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
|
|
795
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
|
|
796
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
797
|
+
* @memberof FlexibleRateApi
|
|
798
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
|
|
799
|
+
*/
|
|
800
|
+
async getFlexibleLoanLiquidationHistory(requestParameters = {}) {
|
|
801
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLiquidationHistory(
|
|
802
|
+
requestParameters?.loanCoin,
|
|
803
|
+
requestParameters?.collateralCoin,
|
|
804
|
+
requestParameters?.startTime,
|
|
805
|
+
requestParameters?.endTime,
|
|
806
|
+
requestParameters?.current,
|
|
807
|
+
requestParameters?.limit,
|
|
808
|
+
requestParameters?.recvWindow
|
|
809
|
+
);
|
|
810
|
+
return sendRequest(
|
|
811
|
+
this.configuration,
|
|
812
|
+
localVarAxiosArgs.endpoint,
|
|
813
|
+
localVarAxiosArgs.method,
|
|
814
|
+
localVarAxiosArgs.params,
|
|
815
|
+
localVarAxiosArgs?.timeUnit,
|
|
816
|
+
{ isSigned: true }
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Get Flexible Loan LTV Adjustment History
|
|
821
|
+
*
|
|
822
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
823
|
+
* The max interval between startTime and endTime is 180 days.
|
|
824
|
+
*
|
|
825
|
+
* Weight: 400
|
|
826
|
+
*
|
|
827
|
+
* @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
|
|
828
|
+
* @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
|
|
829
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
|
|
830
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
831
|
+
* @memberof FlexibleRateApi
|
|
832
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
|
|
833
|
+
*/
|
|
834
|
+
async getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
|
|
835
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanLtvAdjustmentHistory(
|
|
836
|
+
requestParameters?.loanCoin,
|
|
837
|
+
requestParameters?.collateralCoin,
|
|
838
|
+
requestParameters?.startTime,
|
|
839
|
+
requestParameters?.endTime,
|
|
840
|
+
requestParameters?.current,
|
|
841
|
+
requestParameters?.limit,
|
|
842
|
+
requestParameters?.recvWindow
|
|
843
|
+
);
|
|
844
|
+
return sendRequest(
|
|
845
|
+
this.configuration,
|
|
846
|
+
localVarAxiosArgs.endpoint,
|
|
847
|
+
localVarAxiosArgs.method,
|
|
848
|
+
localVarAxiosArgs.params,
|
|
849
|
+
localVarAxiosArgs?.timeUnit,
|
|
850
|
+
{ isSigned: true }
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Get Flexible Loan Ongoing Orders
|
|
855
|
+
*
|
|
856
|
+
* Weight: 300
|
|
857
|
+
*
|
|
858
|
+
* @summary Get Flexible Loan Ongoing Orders(USER_DATA)
|
|
859
|
+
* @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
|
|
860
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
|
|
861
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
862
|
+
* @memberof FlexibleRateApi
|
|
863
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
|
|
864
|
+
*/
|
|
865
|
+
async getFlexibleLoanOngoingOrders(requestParameters = {}) {
|
|
866
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanOngoingOrders(
|
|
867
|
+
requestParameters?.loanCoin,
|
|
868
|
+
requestParameters?.collateralCoin,
|
|
869
|
+
requestParameters?.current,
|
|
870
|
+
requestParameters?.limit,
|
|
871
|
+
requestParameters?.recvWindow
|
|
872
|
+
);
|
|
873
|
+
return sendRequest(
|
|
874
|
+
this.configuration,
|
|
875
|
+
localVarAxiosArgs.endpoint,
|
|
876
|
+
localVarAxiosArgs.method,
|
|
877
|
+
localVarAxiosArgs.params,
|
|
878
|
+
localVarAxiosArgs?.timeUnit,
|
|
879
|
+
{ isSigned: true }
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Get Flexible Loan Repayment History
|
|
884
|
+
*
|
|
885
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
886
|
+
* The max interval between startTime and endTime is 180 days.
|
|
887
|
+
*
|
|
888
|
+
* Weight: 400
|
|
889
|
+
*
|
|
890
|
+
* @summary Get Flexible Loan Repayment History(USER_DATA)
|
|
891
|
+
* @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
|
|
892
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
|
|
893
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
894
|
+
* @memberof FlexibleRateApi
|
|
895
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
|
|
896
|
+
*/
|
|
897
|
+
async getFlexibleLoanRepaymentHistory(requestParameters = {}) {
|
|
898
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanRepaymentHistory(
|
|
899
|
+
requestParameters?.loanCoin,
|
|
900
|
+
requestParameters?.collateralCoin,
|
|
901
|
+
requestParameters?.startTime,
|
|
902
|
+
requestParameters?.endTime,
|
|
903
|
+
requestParameters?.current,
|
|
904
|
+
requestParameters?.limit,
|
|
905
|
+
requestParameters?.recvWindow
|
|
906
|
+
);
|
|
907
|
+
return sendRequest(
|
|
908
|
+
this.configuration,
|
|
909
|
+
localVarAxiosArgs.endpoint,
|
|
910
|
+
localVarAxiosArgs.method,
|
|
911
|
+
localVarAxiosArgs.params,
|
|
912
|
+
localVarAxiosArgs?.timeUnit,
|
|
913
|
+
{ isSigned: true }
|
|
914
|
+
);
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
// src/rest-api/modules/stable-rate-api.ts
|
|
919
|
+
import {
|
|
920
|
+
assertParamExists as assertParamExists2,
|
|
921
|
+
sendRequest as sendRequest2
|
|
922
|
+
} from "@binance/common";
|
|
923
|
+
var StableRateApiAxiosParamCreator = function(configuration) {
|
|
924
|
+
return {
|
|
925
|
+
/**
|
|
926
|
+
* Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
|
|
927
|
+
*
|
|
928
|
+
* Weight: 6000
|
|
929
|
+
*
|
|
930
|
+
* @summary Check Collateral Repay Rate(USER_DATA)
|
|
931
|
+
* @param {string} loanCoin
|
|
932
|
+
* @param {string} collateralCoin
|
|
933
|
+
* @param {number} repayAmount repay amount of loanCoin
|
|
934
|
+
* @param {number} [recvWindow]
|
|
935
|
+
*
|
|
936
|
+
* @throws {RequiredError}
|
|
937
|
+
*/
|
|
938
|
+
checkCollateralRepayRateStableRate: async (loanCoin, collateralCoin, repayAmount, recvWindow) => {
|
|
939
|
+
assertParamExists2("checkCollateralRepayRateStableRate", "loanCoin", loanCoin);
|
|
940
|
+
assertParamExists2(
|
|
941
|
+
"checkCollateralRepayRateStableRate",
|
|
942
|
+
"collateralCoin",
|
|
943
|
+
collateralCoin
|
|
944
|
+
);
|
|
945
|
+
assertParamExists2("checkCollateralRepayRateStableRate", "repayAmount", repayAmount);
|
|
946
|
+
const localVarQueryParameter = {};
|
|
947
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
948
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
949
|
+
}
|
|
950
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
951
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
952
|
+
}
|
|
953
|
+
if (repayAmount !== void 0 && repayAmount !== null) {
|
|
954
|
+
localVarQueryParameter["repayAmount"] = repayAmount;
|
|
955
|
+
}
|
|
956
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
957
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
958
|
+
}
|
|
959
|
+
let _timeUnit;
|
|
960
|
+
if ("timeUnit" in configuration)
|
|
961
|
+
_timeUnit = configuration.timeUnit;
|
|
962
|
+
return {
|
|
963
|
+
endpoint: "/sapi/v1/loan/repay/collateral/rate",
|
|
964
|
+
method: "GET",
|
|
965
|
+
params: localVarQueryParameter,
|
|
966
|
+
timeUnit: _timeUnit
|
|
967
|
+
};
|
|
968
|
+
},
|
|
969
|
+
/**
|
|
970
|
+
* Crypto Loan Adjust LTV
|
|
971
|
+
*
|
|
972
|
+
* Weight: 6000
|
|
973
|
+
*
|
|
974
|
+
* @summary Crypto Loan Adjust LTV(TRADE)
|
|
975
|
+
* @param {number} orderId
|
|
976
|
+
* @param {number} amount
|
|
977
|
+
* @param {string} direction "ADDITIONAL", "REDUCED"
|
|
978
|
+
* @param {number} [recvWindow]
|
|
979
|
+
*
|
|
980
|
+
* @throws {RequiredError}
|
|
981
|
+
*/
|
|
982
|
+
cryptoLoanAdjustLtv: async (orderId, amount, direction, recvWindow) => {
|
|
983
|
+
assertParamExists2("cryptoLoanAdjustLtv", "orderId", orderId);
|
|
984
|
+
assertParamExists2("cryptoLoanAdjustLtv", "amount", amount);
|
|
985
|
+
assertParamExists2("cryptoLoanAdjustLtv", "direction", direction);
|
|
986
|
+
const localVarQueryParameter = {};
|
|
987
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
988
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
989
|
+
}
|
|
990
|
+
if (amount !== void 0 && amount !== null) {
|
|
991
|
+
localVarQueryParameter["amount"] = amount;
|
|
992
|
+
}
|
|
993
|
+
if (direction !== void 0 && direction !== null) {
|
|
994
|
+
localVarQueryParameter["direction"] = direction;
|
|
995
|
+
}
|
|
996
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
997
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
998
|
+
}
|
|
999
|
+
let _timeUnit;
|
|
1000
|
+
if ("timeUnit" in configuration)
|
|
1001
|
+
_timeUnit = configuration.timeUnit;
|
|
1002
|
+
return {
|
|
1003
|
+
endpoint: "/sapi/v1/loan/adjust/ltv",
|
|
1004
|
+
method: "POST",
|
|
1005
|
+
params: localVarQueryParameter,
|
|
1006
|
+
timeUnit: _timeUnit
|
|
1007
|
+
};
|
|
1008
|
+
},
|
|
1009
|
+
/**
|
|
1010
|
+
* Crypto Loan Borrow
|
|
1011
|
+
*
|
|
1012
|
+
* Weight: 6000
|
|
1013
|
+
*
|
|
1014
|
+
* @summary Crypto Loan Borrow(TRADE)
|
|
1015
|
+
* @param {string} loanCoin
|
|
1016
|
+
* @param {string} collateralCoin
|
|
1017
|
+
* @param {number} loanTerm 7/30 days
|
|
1018
|
+
* @param {number} [recvWindow]
|
|
1019
|
+
*
|
|
1020
|
+
* @throws {RequiredError}
|
|
1021
|
+
*/
|
|
1022
|
+
cryptoLoanBorrow: async (loanCoin, collateralCoin, loanTerm, recvWindow) => {
|
|
1023
|
+
assertParamExists2("cryptoLoanBorrow", "loanCoin", loanCoin);
|
|
1024
|
+
assertParamExists2("cryptoLoanBorrow", "collateralCoin", collateralCoin);
|
|
1025
|
+
assertParamExists2("cryptoLoanBorrow", "loanTerm", loanTerm);
|
|
1026
|
+
const localVarQueryParameter = {};
|
|
1027
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1028
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1029
|
+
}
|
|
1030
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1031
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1032
|
+
}
|
|
1033
|
+
if (loanTerm !== void 0 && loanTerm !== null) {
|
|
1034
|
+
localVarQueryParameter["loanTerm"] = loanTerm;
|
|
1035
|
+
}
|
|
1036
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1037
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1038
|
+
}
|
|
1039
|
+
let _timeUnit;
|
|
1040
|
+
if ("timeUnit" in configuration)
|
|
1041
|
+
_timeUnit = configuration.timeUnit;
|
|
1042
|
+
return {
|
|
1043
|
+
endpoint: "/sapi/v1/loan/borrow",
|
|
1044
|
+
method: "POST",
|
|
1045
|
+
params: localVarQueryParameter,
|
|
1046
|
+
timeUnit: _timeUnit
|
|
1047
|
+
};
|
|
1048
|
+
},
|
|
1049
|
+
/**
|
|
1050
|
+
* Customize Margin Call
|
|
1051
|
+
*
|
|
1052
|
+
* Weight: 6000
|
|
1053
|
+
*
|
|
1054
|
+
* @summary Crypto Loan Customize Margin Call(TRADE)
|
|
1055
|
+
* @param {number} marginCall
|
|
1056
|
+
* @param {number} [recvWindow]
|
|
1057
|
+
*
|
|
1058
|
+
* @throws {RequiredError}
|
|
1059
|
+
*/
|
|
1060
|
+
cryptoLoanCustomizeMarginCall: async (marginCall, recvWindow) => {
|
|
1061
|
+
assertParamExists2("cryptoLoanCustomizeMarginCall", "marginCall", marginCall);
|
|
1062
|
+
const localVarQueryParameter = {};
|
|
1063
|
+
if (marginCall !== void 0 && marginCall !== null) {
|
|
1064
|
+
localVarQueryParameter["marginCall"] = marginCall;
|
|
1065
|
+
}
|
|
1066
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1067
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1068
|
+
}
|
|
1069
|
+
let _timeUnit;
|
|
1070
|
+
if ("timeUnit" in configuration)
|
|
1071
|
+
_timeUnit = configuration.timeUnit;
|
|
1072
|
+
return {
|
|
1073
|
+
endpoint: "/sapi/v1/loan/customize/margin_call",
|
|
1074
|
+
method: "POST",
|
|
1075
|
+
params: localVarQueryParameter,
|
|
1076
|
+
timeUnit: _timeUnit
|
|
1077
|
+
};
|
|
1078
|
+
},
|
|
1079
|
+
/**
|
|
1080
|
+
* Crypto Loan Repay
|
|
1081
|
+
*
|
|
1082
|
+
* Weight: 6000
|
|
1083
|
+
*
|
|
1084
|
+
* @summary Crypto Loan Repay(TRADE)
|
|
1085
|
+
* @param {number} orderId
|
|
1086
|
+
* @param {number} amount
|
|
1087
|
+
* @param {number} [type] Default: 1. 1 for "repay with borrowed coin"; 2 for "repay with collateral".
|
|
1088
|
+
* @param {boolean} [collateralReturn] Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order, and lower LTV.
|
|
1089
|
+
* @param {number} [recvWindow]
|
|
1090
|
+
*
|
|
1091
|
+
* @throws {RequiredError}
|
|
1092
|
+
*/
|
|
1093
|
+
cryptoLoanRepay: async (orderId, amount, type, collateralReturn, recvWindow) => {
|
|
1094
|
+
assertParamExists2("cryptoLoanRepay", "orderId", orderId);
|
|
1095
|
+
assertParamExists2("cryptoLoanRepay", "amount", amount);
|
|
1096
|
+
const localVarQueryParameter = {};
|
|
1097
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
1098
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
1099
|
+
}
|
|
1100
|
+
if (amount !== void 0 && amount !== null) {
|
|
1101
|
+
localVarQueryParameter["amount"] = amount;
|
|
1102
|
+
}
|
|
1103
|
+
if (type !== void 0 && type !== null) {
|
|
1104
|
+
localVarQueryParameter["type"] = type;
|
|
1105
|
+
}
|
|
1106
|
+
if (collateralReturn !== void 0 && collateralReturn !== null) {
|
|
1107
|
+
localVarQueryParameter["collateralReturn"] = collateralReturn;
|
|
1108
|
+
}
|
|
1109
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1110
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1111
|
+
}
|
|
1112
|
+
let _timeUnit;
|
|
1113
|
+
if ("timeUnit" in configuration)
|
|
1114
|
+
_timeUnit = configuration.timeUnit;
|
|
1115
|
+
return {
|
|
1116
|
+
endpoint: "/sapi/v1/loan/repay",
|
|
1117
|
+
method: "POST",
|
|
1118
|
+
params: localVarQueryParameter,
|
|
1119
|
+
timeUnit: _timeUnit
|
|
1120
|
+
};
|
|
1121
|
+
},
|
|
1122
|
+
/**
|
|
1123
|
+
* Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
|
|
1124
|
+
*
|
|
1125
|
+
* Weight: 400
|
|
1126
|
+
*
|
|
1127
|
+
* @summary Get Collateral Assets Data(USER_DATA)
|
|
1128
|
+
* @param {string} [collateralCoin]
|
|
1129
|
+
* @param {number} [vipLevel] Default: user's vip level. Send "-1" to check specified configuration
|
|
1130
|
+
* @param {number} [recvWindow]
|
|
1131
|
+
*
|
|
1132
|
+
* @throws {RequiredError}
|
|
1133
|
+
*/
|
|
1134
|
+
getCollateralAssetsData: async (collateralCoin, vipLevel, recvWindow) => {
|
|
1135
|
+
const localVarQueryParameter = {};
|
|
1136
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1137
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1138
|
+
}
|
|
1139
|
+
if (vipLevel !== void 0 && vipLevel !== null) {
|
|
1140
|
+
localVarQueryParameter["vipLevel"] = vipLevel;
|
|
1141
|
+
}
|
|
1142
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1143
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1144
|
+
}
|
|
1145
|
+
let _timeUnit;
|
|
1146
|
+
if ("timeUnit" in configuration)
|
|
1147
|
+
_timeUnit = configuration.timeUnit;
|
|
1148
|
+
return {
|
|
1149
|
+
endpoint: "/sapi/v1/loan/collateral/data",
|
|
1150
|
+
method: "GET",
|
|
1151
|
+
params: localVarQueryParameter,
|
|
1152
|
+
timeUnit: _timeUnit
|
|
1153
|
+
};
|
|
1154
|
+
},
|
|
1155
|
+
/**
|
|
1156
|
+
* Get Crypto Loans Income History
|
|
1157
|
+
*
|
|
1158
|
+
* If startTime and endTime are not sent, the recent 7-day data will be returned.
|
|
1159
|
+
* The max interval between startTime and endTime is 30 days.
|
|
1160
|
+
*
|
|
1161
|
+
* Weight: 6000
|
|
1162
|
+
*
|
|
1163
|
+
* @summary Get Crypto Loans Income History(USER_DATA)
|
|
1164
|
+
* @param {string} [asset]
|
|
1165
|
+
* @param {string} [type] All types will be returned by default. Enum:`borrowIn` ,`collateralSpent`, `repayAmount`, `collateralReturn`(Collateral return after repayment), `addCollateral`, `removeCollateral`, `collateralReturnAfterLiquidation`
|
|
1166
|
+
* @param {number} [startTime]
|
|
1167
|
+
* @param {number} [endTime]
|
|
1168
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
1169
|
+
* @param {number} [recvWindow]
|
|
1170
|
+
*
|
|
1171
|
+
* @throws {RequiredError}
|
|
1172
|
+
*/
|
|
1173
|
+
getCryptoLoansIncomeHistory: async (asset, type, startTime, endTime, limit, recvWindow) => {
|
|
1174
|
+
const localVarQueryParameter = {};
|
|
1175
|
+
if (asset !== void 0 && asset !== null) {
|
|
1176
|
+
localVarQueryParameter["asset"] = asset;
|
|
1177
|
+
}
|
|
1178
|
+
if (type !== void 0 && type !== null) {
|
|
1179
|
+
localVarQueryParameter["type"] = type;
|
|
1180
|
+
}
|
|
1181
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
1182
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
1183
|
+
}
|
|
1184
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
1185
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
1186
|
+
}
|
|
1187
|
+
if (limit !== void 0 && limit !== null) {
|
|
1188
|
+
localVarQueryParameter["limit"] = limit;
|
|
1189
|
+
}
|
|
1190
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1191
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1192
|
+
}
|
|
1193
|
+
let _timeUnit;
|
|
1194
|
+
if ("timeUnit" in configuration)
|
|
1195
|
+
_timeUnit = configuration.timeUnit;
|
|
1196
|
+
return {
|
|
1197
|
+
endpoint: "/sapi/v1/loan/income",
|
|
1198
|
+
method: "GET",
|
|
1199
|
+
params: localVarQueryParameter,
|
|
1200
|
+
timeUnit: _timeUnit
|
|
1201
|
+
};
|
|
1202
|
+
},
|
|
1203
|
+
/**
|
|
1204
|
+
* Get Loan Borrow History
|
|
1205
|
+
*
|
|
1206
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1207
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1208
|
+
*
|
|
1209
|
+
* Weight: 400
|
|
1210
|
+
*
|
|
1211
|
+
* @summary Get Loan Borrow History(USER_DATA)
|
|
1212
|
+
* @param {number} [orderId]
|
|
1213
|
+
* @param {string} [loanCoin]
|
|
1214
|
+
* @param {string} [collateralCoin]
|
|
1215
|
+
* @param {number} [startTime]
|
|
1216
|
+
* @param {number} [endTime]
|
|
1217
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
1218
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
1219
|
+
* @param {number} [recvWindow]
|
|
1220
|
+
*
|
|
1221
|
+
* @throws {RequiredError}
|
|
1222
|
+
*/
|
|
1223
|
+
getLoanBorrowHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
1224
|
+
const localVarQueryParameter = {};
|
|
1225
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
1226
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
1227
|
+
}
|
|
1228
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1229
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1230
|
+
}
|
|
1231
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1232
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1233
|
+
}
|
|
1234
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
1235
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
1236
|
+
}
|
|
1237
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
1238
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
1239
|
+
}
|
|
1240
|
+
if (current !== void 0 && current !== null) {
|
|
1241
|
+
localVarQueryParameter["current"] = current;
|
|
1242
|
+
}
|
|
1243
|
+
if (limit !== void 0 && limit !== null) {
|
|
1244
|
+
localVarQueryParameter["limit"] = limit;
|
|
1245
|
+
}
|
|
1246
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1247
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1248
|
+
}
|
|
1249
|
+
let _timeUnit;
|
|
1250
|
+
if ("timeUnit" in configuration)
|
|
1251
|
+
_timeUnit = configuration.timeUnit;
|
|
1252
|
+
return {
|
|
1253
|
+
endpoint: "/sapi/v1/loan/borrow/history",
|
|
1254
|
+
method: "GET",
|
|
1255
|
+
params: localVarQueryParameter,
|
|
1256
|
+
timeUnit: _timeUnit
|
|
1257
|
+
};
|
|
1258
|
+
},
|
|
1259
|
+
/**
|
|
1260
|
+
* Get Loan LTV Adjustment History
|
|
1261
|
+
*
|
|
1262
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1263
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1264
|
+
*
|
|
1265
|
+
* Weight: 400
|
|
1266
|
+
*
|
|
1267
|
+
* @summary Get Loan LTV Adjustment History(USER_DATA)
|
|
1268
|
+
* @param {number} [orderId]
|
|
1269
|
+
* @param {string} [loanCoin]
|
|
1270
|
+
* @param {string} [collateralCoin]
|
|
1271
|
+
* @param {number} [startTime]
|
|
1272
|
+
* @param {number} [endTime]
|
|
1273
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
1274
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
1275
|
+
* @param {number} [recvWindow]
|
|
1276
|
+
*
|
|
1277
|
+
* @throws {RequiredError}
|
|
1278
|
+
*/
|
|
1279
|
+
getLoanLtvAdjustmentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
1280
|
+
const localVarQueryParameter = {};
|
|
1281
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
1282
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
1283
|
+
}
|
|
1284
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1285
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1286
|
+
}
|
|
1287
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1288
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1289
|
+
}
|
|
1290
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
1291
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
1292
|
+
}
|
|
1293
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
1294
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
1295
|
+
}
|
|
1296
|
+
if (current !== void 0 && current !== null) {
|
|
1297
|
+
localVarQueryParameter["current"] = current;
|
|
1298
|
+
}
|
|
1299
|
+
if (limit !== void 0 && limit !== null) {
|
|
1300
|
+
localVarQueryParameter["limit"] = limit;
|
|
1301
|
+
}
|
|
1302
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1303
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1304
|
+
}
|
|
1305
|
+
let _timeUnit;
|
|
1306
|
+
if ("timeUnit" in configuration)
|
|
1307
|
+
_timeUnit = configuration.timeUnit;
|
|
1308
|
+
return {
|
|
1309
|
+
endpoint: "/sapi/v1/loan/ltv/adjustment/history",
|
|
1310
|
+
method: "GET",
|
|
1311
|
+
params: localVarQueryParameter,
|
|
1312
|
+
timeUnit: _timeUnit
|
|
1313
|
+
};
|
|
1314
|
+
},
|
|
1315
|
+
/**
|
|
1316
|
+
* Get Loan Ongoing Orders
|
|
1317
|
+
*
|
|
1318
|
+
* Weight: 300
|
|
1319
|
+
*
|
|
1320
|
+
* @summary Get Loan Ongoing Orders(USER_DATA)
|
|
1321
|
+
* @param {number} [orderId]
|
|
1322
|
+
* @param {string} [loanCoin]
|
|
1323
|
+
* @param {string} [collateralCoin]
|
|
1324
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
1325
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
1326
|
+
* @param {number} [recvWindow]
|
|
1327
|
+
*
|
|
1328
|
+
* @throws {RequiredError}
|
|
1329
|
+
*/
|
|
1330
|
+
getLoanOngoingOrders: async (orderId, loanCoin, collateralCoin, current, limit, recvWindow) => {
|
|
1331
|
+
const localVarQueryParameter = {};
|
|
1332
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
1333
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
1334
|
+
}
|
|
1335
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1336
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1337
|
+
}
|
|
1338
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1339
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1340
|
+
}
|
|
1341
|
+
if (current !== void 0 && current !== null) {
|
|
1342
|
+
localVarQueryParameter["current"] = current;
|
|
1343
|
+
}
|
|
1344
|
+
if (limit !== void 0 && limit !== null) {
|
|
1345
|
+
localVarQueryParameter["limit"] = limit;
|
|
1346
|
+
}
|
|
1347
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1348
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1349
|
+
}
|
|
1350
|
+
let _timeUnit;
|
|
1351
|
+
if ("timeUnit" in configuration)
|
|
1352
|
+
_timeUnit = configuration.timeUnit;
|
|
1353
|
+
return {
|
|
1354
|
+
endpoint: "/sapi/v1/loan/ongoing/orders",
|
|
1355
|
+
method: "GET",
|
|
1356
|
+
params: localVarQueryParameter,
|
|
1357
|
+
timeUnit: _timeUnit
|
|
1358
|
+
};
|
|
1359
|
+
},
|
|
1360
|
+
/**
|
|
1361
|
+
* Get Loan Repayment History
|
|
1362
|
+
*
|
|
1363
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1364
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1365
|
+
*
|
|
1366
|
+
* Weight: 400
|
|
1367
|
+
*
|
|
1368
|
+
* @summary Get Loan Repayment History(USER_DATA)
|
|
1369
|
+
* @param {number} [orderId]
|
|
1370
|
+
* @param {string} [loanCoin]
|
|
1371
|
+
* @param {string} [collateralCoin]
|
|
1372
|
+
* @param {number} [startTime]
|
|
1373
|
+
* @param {number} [endTime]
|
|
1374
|
+
* @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
|
|
1375
|
+
* @param {number} [limit] Default: 10; max: 100
|
|
1376
|
+
* @param {number} [recvWindow]
|
|
1377
|
+
*
|
|
1378
|
+
* @throws {RequiredError}
|
|
1379
|
+
*/
|
|
1380
|
+
getLoanRepaymentHistory: async (orderId, loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
1381
|
+
const localVarQueryParameter = {};
|
|
1382
|
+
if (orderId !== void 0 && orderId !== null) {
|
|
1383
|
+
localVarQueryParameter["orderId"] = orderId;
|
|
1384
|
+
}
|
|
1385
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1386
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1387
|
+
}
|
|
1388
|
+
if (collateralCoin !== void 0 && collateralCoin !== null) {
|
|
1389
|
+
localVarQueryParameter["collateralCoin"] = collateralCoin;
|
|
1390
|
+
}
|
|
1391
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
1392
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
1393
|
+
}
|
|
1394
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
1395
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
1396
|
+
}
|
|
1397
|
+
if (current !== void 0 && current !== null) {
|
|
1398
|
+
localVarQueryParameter["current"] = current;
|
|
1399
|
+
}
|
|
1400
|
+
if (limit !== void 0 && limit !== null) {
|
|
1401
|
+
localVarQueryParameter["limit"] = limit;
|
|
1402
|
+
}
|
|
1403
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1404
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1405
|
+
}
|
|
1406
|
+
let _timeUnit;
|
|
1407
|
+
if ("timeUnit" in configuration)
|
|
1408
|
+
_timeUnit = configuration.timeUnit;
|
|
1409
|
+
return {
|
|
1410
|
+
endpoint: "/sapi/v1/loan/repay/history",
|
|
1411
|
+
method: "GET",
|
|
1412
|
+
params: localVarQueryParameter,
|
|
1413
|
+
timeUnit: _timeUnit
|
|
1414
|
+
};
|
|
1415
|
+
},
|
|
1416
|
+
/**
|
|
1417
|
+
* Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
|
|
1418
|
+
*
|
|
1419
|
+
* Weight: 400
|
|
1420
|
+
*
|
|
1421
|
+
* @summary Get Loanable Assets Data(USER_DATA)
|
|
1422
|
+
* @param {string} [loanCoin]
|
|
1423
|
+
* @param {number} [vipLevel] Default: user's vip level. Send "-1" to check specified configuration
|
|
1424
|
+
* @param {number} [recvWindow]
|
|
1425
|
+
*
|
|
1426
|
+
* @throws {RequiredError}
|
|
1427
|
+
*/
|
|
1428
|
+
getLoanableAssetsData: async (loanCoin, vipLevel, recvWindow) => {
|
|
1429
|
+
const localVarQueryParameter = {};
|
|
1430
|
+
if (loanCoin !== void 0 && loanCoin !== null) {
|
|
1431
|
+
localVarQueryParameter["loanCoin"] = loanCoin;
|
|
1432
|
+
}
|
|
1433
|
+
if (vipLevel !== void 0 && vipLevel !== null) {
|
|
1434
|
+
localVarQueryParameter["vipLevel"] = vipLevel;
|
|
1435
|
+
}
|
|
1436
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
1437
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1438
|
+
}
|
|
1439
|
+
let _timeUnit;
|
|
1440
|
+
if ("timeUnit" in configuration)
|
|
1441
|
+
_timeUnit = configuration.timeUnit;
|
|
1442
|
+
return {
|
|
1443
|
+
endpoint: "/sapi/v1/loan/loanable/data",
|
|
1444
|
+
method: "GET",
|
|
1445
|
+
params: localVarQueryParameter,
|
|
1446
|
+
timeUnit: _timeUnit
|
|
1447
|
+
};
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
var StableRateApi = class {
|
|
1452
|
+
constructor(configuration) {
|
|
1453
|
+
this.configuration = configuration;
|
|
1454
|
+
this.localVarAxiosParamCreator = StableRateApiAxiosParamCreator(configuration);
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
|
|
1458
|
+
*
|
|
1459
|
+
* Weight: 6000
|
|
1460
|
+
*
|
|
1461
|
+
* @summary Check Collateral Repay Rate(USER_DATA)
|
|
1462
|
+
* @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
|
|
1463
|
+
* @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
|
|
1464
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1465
|
+
* @memberof StableRateApi
|
|
1466
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
|
|
1467
|
+
*/
|
|
1468
|
+
async checkCollateralRepayRateStableRate(requestParameters) {
|
|
1469
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkCollateralRepayRateStableRate(
|
|
1470
|
+
requestParameters?.loanCoin,
|
|
1471
|
+
requestParameters?.collateralCoin,
|
|
1472
|
+
requestParameters?.repayAmount,
|
|
1473
|
+
requestParameters?.recvWindow
|
|
1474
|
+
);
|
|
1475
|
+
return sendRequest2(
|
|
1476
|
+
this.configuration,
|
|
1477
|
+
localVarAxiosArgs.endpoint,
|
|
1478
|
+
localVarAxiosArgs.method,
|
|
1479
|
+
localVarAxiosArgs.params,
|
|
1480
|
+
localVarAxiosArgs?.timeUnit,
|
|
1481
|
+
{ isSigned: true }
|
|
1482
|
+
);
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Crypto Loan Adjust LTV
|
|
1486
|
+
*
|
|
1487
|
+
* Weight: 6000
|
|
1488
|
+
*
|
|
1489
|
+
* @summary Crypto Loan Adjust LTV(TRADE)
|
|
1490
|
+
* @param {CryptoLoanAdjustLtvRequest} requestParameters Request parameters.
|
|
1491
|
+
* @returns {Promise<RestApiResponse<CryptoLoanAdjustLtvResponse>>}
|
|
1492
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1493
|
+
* @memberof StableRateApi
|
|
1494
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Adjust-LTV Binance API Documentation}
|
|
1495
|
+
*/
|
|
1496
|
+
async cryptoLoanAdjustLtv(requestParameters) {
|
|
1497
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanAdjustLtv(
|
|
1498
|
+
requestParameters?.orderId,
|
|
1499
|
+
requestParameters?.amount,
|
|
1500
|
+
requestParameters?.direction,
|
|
1501
|
+
requestParameters?.recvWindow
|
|
1502
|
+
);
|
|
1503
|
+
return sendRequest2(
|
|
1504
|
+
this.configuration,
|
|
1505
|
+
localVarAxiosArgs.endpoint,
|
|
1506
|
+
localVarAxiosArgs.method,
|
|
1507
|
+
localVarAxiosArgs.params,
|
|
1508
|
+
localVarAxiosArgs?.timeUnit,
|
|
1509
|
+
{ isSigned: true }
|
|
1510
|
+
);
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Crypto Loan Borrow
|
|
1514
|
+
*
|
|
1515
|
+
* Weight: 6000
|
|
1516
|
+
*
|
|
1517
|
+
* @summary Crypto Loan Borrow(TRADE)
|
|
1518
|
+
* @param {CryptoLoanBorrowRequest} requestParameters Request parameters.
|
|
1519
|
+
* @returns {Promise<RestApiResponse<CryptoLoanBorrowResponse>>}
|
|
1520
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1521
|
+
* @memberof StableRateApi
|
|
1522
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Borrow Binance API Documentation}
|
|
1523
|
+
*/
|
|
1524
|
+
async cryptoLoanBorrow(requestParameters) {
|
|
1525
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanBorrow(
|
|
1526
|
+
requestParameters?.loanCoin,
|
|
1527
|
+
requestParameters?.collateralCoin,
|
|
1528
|
+
requestParameters?.loanTerm,
|
|
1529
|
+
requestParameters?.recvWindow
|
|
1530
|
+
);
|
|
1531
|
+
return sendRequest2(
|
|
1532
|
+
this.configuration,
|
|
1533
|
+
localVarAxiosArgs.endpoint,
|
|
1534
|
+
localVarAxiosArgs.method,
|
|
1535
|
+
localVarAxiosArgs.params,
|
|
1536
|
+
localVarAxiosArgs?.timeUnit,
|
|
1537
|
+
{ isSigned: true }
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Customize Margin Call
|
|
1542
|
+
*
|
|
1543
|
+
* Weight: 6000
|
|
1544
|
+
*
|
|
1545
|
+
* @summary Crypto Loan Customize Margin Call(TRADE)
|
|
1546
|
+
* @param {CryptoLoanCustomizeMarginCallRequest} requestParameters Request parameters.
|
|
1547
|
+
* @returns {Promise<RestApiResponse<CryptoLoanCustomizeMarginCallResponse>>}
|
|
1548
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1549
|
+
* @memberof StableRateApi
|
|
1550
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Customize-Margin-Call Binance API Documentation}
|
|
1551
|
+
*/
|
|
1552
|
+
async cryptoLoanCustomizeMarginCall(requestParameters) {
|
|
1553
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanCustomizeMarginCall(
|
|
1554
|
+
requestParameters?.marginCall,
|
|
1555
|
+
requestParameters?.recvWindow
|
|
1556
|
+
);
|
|
1557
|
+
return sendRequest2(
|
|
1558
|
+
this.configuration,
|
|
1559
|
+
localVarAxiosArgs.endpoint,
|
|
1560
|
+
localVarAxiosArgs.method,
|
|
1561
|
+
localVarAxiosArgs.params,
|
|
1562
|
+
localVarAxiosArgs?.timeUnit,
|
|
1563
|
+
{ isSigned: true }
|
|
1564
|
+
);
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Crypto Loan Repay
|
|
1568
|
+
*
|
|
1569
|
+
* Weight: 6000
|
|
1570
|
+
*
|
|
1571
|
+
* @summary Crypto Loan Repay(TRADE)
|
|
1572
|
+
* @param {CryptoLoanRepayRequest} requestParameters Request parameters.
|
|
1573
|
+
* @returns {Promise<RestApiResponse<CryptoLoanRepayResponse>>}
|
|
1574
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1575
|
+
* @memberof StableRateApi
|
|
1576
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Repay Binance API Documentation}
|
|
1577
|
+
*/
|
|
1578
|
+
async cryptoLoanRepay(requestParameters) {
|
|
1579
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanRepay(
|
|
1580
|
+
requestParameters?.orderId,
|
|
1581
|
+
requestParameters?.amount,
|
|
1582
|
+
requestParameters?.type,
|
|
1583
|
+
requestParameters?.collateralReturn,
|
|
1584
|
+
requestParameters?.recvWindow
|
|
1585
|
+
);
|
|
1586
|
+
return sendRequest2(
|
|
1587
|
+
this.configuration,
|
|
1588
|
+
localVarAxiosArgs.endpoint,
|
|
1589
|
+
localVarAxiosArgs.method,
|
|
1590
|
+
localVarAxiosArgs.params,
|
|
1591
|
+
localVarAxiosArgs?.timeUnit,
|
|
1592
|
+
{ isSigned: true }
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
|
|
1597
|
+
*
|
|
1598
|
+
* Weight: 400
|
|
1599
|
+
*
|
|
1600
|
+
* @summary Get Collateral Assets Data(USER_DATA)
|
|
1601
|
+
* @param {GetCollateralAssetsDataRequest} requestParameters Request parameters.
|
|
1602
|
+
* @returns {Promise<RestApiResponse<GetCollateralAssetsDataResponse>>}
|
|
1603
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1604
|
+
* @memberof StableRateApi
|
|
1605
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Collateral-Assets-Data Binance API Documentation}
|
|
1606
|
+
*/
|
|
1607
|
+
async getCollateralAssetsData(requestParameters = {}) {
|
|
1608
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCollateralAssetsData(
|
|
1609
|
+
requestParameters?.collateralCoin,
|
|
1610
|
+
requestParameters?.vipLevel,
|
|
1611
|
+
requestParameters?.recvWindow
|
|
1612
|
+
);
|
|
1613
|
+
return sendRequest2(
|
|
1614
|
+
this.configuration,
|
|
1615
|
+
localVarAxiosArgs.endpoint,
|
|
1616
|
+
localVarAxiosArgs.method,
|
|
1617
|
+
localVarAxiosArgs.params,
|
|
1618
|
+
localVarAxiosArgs?.timeUnit,
|
|
1619
|
+
{ isSigned: true }
|
|
1620
|
+
);
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Get Crypto Loans Income History
|
|
1624
|
+
*
|
|
1625
|
+
* If startTime and endTime are not sent, the recent 7-day data will be returned.
|
|
1626
|
+
* The max interval between startTime and endTime is 30 days.
|
|
1627
|
+
*
|
|
1628
|
+
* Weight: 6000
|
|
1629
|
+
*
|
|
1630
|
+
* @summary Get Crypto Loans Income History(USER_DATA)
|
|
1631
|
+
* @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
|
|
1632
|
+
* @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
|
|
1633
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1634
|
+
* @memberof StableRateApi
|
|
1635
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
|
|
1636
|
+
*/
|
|
1637
|
+
async getCryptoLoansIncomeHistory(requestParameters = {}) {
|
|
1638
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCryptoLoansIncomeHistory(
|
|
1639
|
+
requestParameters?.asset,
|
|
1640
|
+
requestParameters?.type,
|
|
1641
|
+
requestParameters?.startTime,
|
|
1642
|
+
requestParameters?.endTime,
|
|
1643
|
+
requestParameters?.limit,
|
|
1644
|
+
requestParameters?.recvWindow
|
|
1645
|
+
);
|
|
1646
|
+
return sendRequest2(
|
|
1647
|
+
this.configuration,
|
|
1648
|
+
localVarAxiosArgs.endpoint,
|
|
1649
|
+
localVarAxiosArgs.method,
|
|
1650
|
+
localVarAxiosArgs.params,
|
|
1651
|
+
localVarAxiosArgs?.timeUnit,
|
|
1652
|
+
{ isSigned: true }
|
|
1653
|
+
);
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Get Loan Borrow History
|
|
1657
|
+
*
|
|
1658
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1659
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1660
|
+
*
|
|
1661
|
+
* Weight: 400
|
|
1662
|
+
*
|
|
1663
|
+
* @summary Get Loan Borrow History(USER_DATA)
|
|
1664
|
+
* @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
|
|
1665
|
+
* @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
|
|
1666
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1667
|
+
* @memberof StableRateApi
|
|
1668
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
|
|
1669
|
+
*/
|
|
1670
|
+
async getLoanBorrowHistory(requestParameters = {}) {
|
|
1671
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanBorrowHistory(
|
|
1672
|
+
requestParameters?.orderId,
|
|
1673
|
+
requestParameters?.loanCoin,
|
|
1674
|
+
requestParameters?.collateralCoin,
|
|
1675
|
+
requestParameters?.startTime,
|
|
1676
|
+
requestParameters?.endTime,
|
|
1677
|
+
requestParameters?.current,
|
|
1678
|
+
requestParameters?.limit,
|
|
1679
|
+
requestParameters?.recvWindow
|
|
1680
|
+
);
|
|
1681
|
+
return sendRequest2(
|
|
1682
|
+
this.configuration,
|
|
1683
|
+
localVarAxiosArgs.endpoint,
|
|
1684
|
+
localVarAxiosArgs.method,
|
|
1685
|
+
localVarAxiosArgs.params,
|
|
1686
|
+
localVarAxiosArgs?.timeUnit,
|
|
1687
|
+
{ isSigned: true }
|
|
1688
|
+
);
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Get Loan LTV Adjustment History
|
|
1692
|
+
*
|
|
1693
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1694
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1695
|
+
*
|
|
1696
|
+
* Weight: 400
|
|
1697
|
+
*
|
|
1698
|
+
* @summary Get Loan LTV Adjustment History(USER_DATA)
|
|
1699
|
+
* @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
|
|
1700
|
+
* @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
|
|
1701
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1702
|
+
* @memberof StableRateApi
|
|
1703
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
|
|
1704
|
+
*/
|
|
1705
|
+
async getLoanLtvAdjustmentHistory(requestParameters = {}) {
|
|
1706
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanLtvAdjustmentHistory(
|
|
1707
|
+
requestParameters?.orderId,
|
|
1708
|
+
requestParameters?.loanCoin,
|
|
1709
|
+
requestParameters?.collateralCoin,
|
|
1710
|
+
requestParameters?.startTime,
|
|
1711
|
+
requestParameters?.endTime,
|
|
1712
|
+
requestParameters?.current,
|
|
1713
|
+
requestParameters?.limit,
|
|
1714
|
+
requestParameters?.recvWindow
|
|
1715
|
+
);
|
|
1716
|
+
return sendRequest2(
|
|
1717
|
+
this.configuration,
|
|
1718
|
+
localVarAxiosArgs.endpoint,
|
|
1719
|
+
localVarAxiosArgs.method,
|
|
1720
|
+
localVarAxiosArgs.params,
|
|
1721
|
+
localVarAxiosArgs?.timeUnit,
|
|
1722
|
+
{ isSigned: true }
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Get Loan Ongoing Orders
|
|
1727
|
+
*
|
|
1728
|
+
* Weight: 300
|
|
1729
|
+
*
|
|
1730
|
+
* @summary Get Loan Ongoing Orders(USER_DATA)
|
|
1731
|
+
* @param {GetLoanOngoingOrdersRequest} requestParameters Request parameters.
|
|
1732
|
+
* @returns {Promise<RestApiResponse<GetLoanOngoingOrdersResponse>>}
|
|
1733
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1734
|
+
* @memberof StableRateApi
|
|
1735
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Ongoing-Orders Binance API Documentation}
|
|
1736
|
+
*/
|
|
1737
|
+
async getLoanOngoingOrders(requestParameters = {}) {
|
|
1738
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanOngoingOrders(
|
|
1739
|
+
requestParameters?.orderId,
|
|
1740
|
+
requestParameters?.loanCoin,
|
|
1741
|
+
requestParameters?.collateralCoin,
|
|
1742
|
+
requestParameters?.current,
|
|
1743
|
+
requestParameters?.limit,
|
|
1744
|
+
requestParameters?.recvWindow
|
|
1745
|
+
);
|
|
1746
|
+
return sendRequest2(
|
|
1747
|
+
this.configuration,
|
|
1748
|
+
localVarAxiosArgs.endpoint,
|
|
1749
|
+
localVarAxiosArgs.method,
|
|
1750
|
+
localVarAxiosArgs.params,
|
|
1751
|
+
localVarAxiosArgs?.timeUnit,
|
|
1752
|
+
{ isSigned: true }
|
|
1753
|
+
);
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Get Loan Repayment History
|
|
1757
|
+
*
|
|
1758
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1759
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1760
|
+
*
|
|
1761
|
+
* Weight: 400
|
|
1762
|
+
*
|
|
1763
|
+
* @summary Get Loan Repayment History(USER_DATA)
|
|
1764
|
+
* @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
|
|
1765
|
+
* @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
|
|
1766
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1767
|
+
* @memberof StableRateApi
|
|
1768
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
|
|
1769
|
+
*/
|
|
1770
|
+
async getLoanRepaymentHistory(requestParameters = {}) {
|
|
1771
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanRepaymentHistory(
|
|
1772
|
+
requestParameters?.orderId,
|
|
1773
|
+
requestParameters?.loanCoin,
|
|
1774
|
+
requestParameters?.collateralCoin,
|
|
1775
|
+
requestParameters?.startTime,
|
|
1776
|
+
requestParameters?.endTime,
|
|
1777
|
+
requestParameters?.current,
|
|
1778
|
+
requestParameters?.limit,
|
|
1779
|
+
requestParameters?.recvWindow
|
|
1780
|
+
);
|
|
1781
|
+
return sendRequest2(
|
|
1782
|
+
this.configuration,
|
|
1783
|
+
localVarAxiosArgs.endpoint,
|
|
1784
|
+
localVarAxiosArgs.method,
|
|
1785
|
+
localVarAxiosArgs.params,
|
|
1786
|
+
localVarAxiosArgs?.timeUnit,
|
|
1787
|
+
{ isSigned: true }
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
|
|
1792
|
+
*
|
|
1793
|
+
* Weight: 400
|
|
1794
|
+
*
|
|
1795
|
+
* @summary Get Loanable Assets Data(USER_DATA)
|
|
1796
|
+
* @param {GetLoanableAssetsDataRequest} requestParameters Request parameters.
|
|
1797
|
+
* @returns {Promise<RestApiResponse<GetLoanableAssetsDataResponse>>}
|
|
1798
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1799
|
+
* @memberof StableRateApi
|
|
1800
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Loanable-Assets-Data Binance API Documentation}
|
|
1801
|
+
*/
|
|
1802
|
+
async getLoanableAssetsData(requestParameters = {}) {
|
|
1803
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanableAssetsData(
|
|
1804
|
+
requestParameters?.loanCoin,
|
|
1805
|
+
requestParameters?.vipLevel,
|
|
1806
|
+
requestParameters?.recvWindow
|
|
1807
|
+
);
|
|
1808
|
+
return sendRequest2(
|
|
1809
|
+
this.configuration,
|
|
1810
|
+
localVarAxiosArgs.endpoint,
|
|
1811
|
+
localVarAxiosArgs.method,
|
|
1812
|
+
localVarAxiosArgs.params,
|
|
1813
|
+
localVarAxiosArgs?.timeUnit,
|
|
1814
|
+
{ isSigned: true }
|
|
1815
|
+
);
|
|
1816
|
+
}
|
|
1817
|
+
};
|
|
1818
|
+
|
|
1819
|
+
// src/rest-api/rest-api.ts
|
|
1820
|
+
import { sendRequest as sendRequest3 } from "@binance/common";
|
|
1821
|
+
var RestAPI = class {
|
|
1822
|
+
constructor(configuration) {
|
|
1823
|
+
this.configuration = configuration;
|
|
1824
|
+
this.flexibleRateApi = new FlexibleRateApi(configuration);
|
|
1825
|
+
this.stableRateApi = new StableRateApi(configuration);
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Generic function to send a request.
|
|
1829
|
+
* @param endpoint - The API endpoint to call.
|
|
1830
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1831
|
+
* @param params - Query parameters for the request.
|
|
1832
|
+
*
|
|
1833
|
+
* @returns A promise resolving to the response data object.
|
|
1834
|
+
*/
|
|
1835
|
+
sendRequest(endpoint, method, params = {}) {
|
|
1836
|
+
return sendRequest3(this.configuration, endpoint, method, params, void 0);
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Generic function to send a signed request.
|
|
1840
|
+
* @param endpoint - The API endpoint to call.
|
|
1841
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1842
|
+
* @param params - Query parameters for the request.
|
|
1843
|
+
*
|
|
1844
|
+
* @returns A promise resolving to the response data object.
|
|
1845
|
+
*/
|
|
1846
|
+
sendSignedRequest(endpoint, method, params = {}) {
|
|
1847
|
+
return sendRequest3(this.configuration, endpoint, method, params, void 0, {
|
|
1848
|
+
isSigned: true
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
*
|
|
1853
|
+
* Weight: 6000
|
|
1854
|
+
*
|
|
1855
|
+
* @summary Check Collateral Repay Rate (USER_DATA)
|
|
1856
|
+
* @param {CheckCollateralRepayRateRequest} requestParameters Request parameters.
|
|
1857
|
+
* @returns {Promise<RestApiResponse<CheckCollateralRepayRateResponse>>}
|
|
1858
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1859
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Check-Collateral-Repay-Rate Binance API Documentation}
|
|
1860
|
+
*/
|
|
1861
|
+
checkCollateralRepayRate(requestParameters) {
|
|
1862
|
+
return this.flexibleRateApi.checkCollateralRepayRate(requestParameters);
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Flexible Loan Adjust LTV
|
|
1866
|
+
*
|
|
1867
|
+
* API Key needs Spot & Margin Trading permission for this endpoint
|
|
1868
|
+
*
|
|
1869
|
+
* Weight: 6000
|
|
1870
|
+
*
|
|
1871
|
+
* @summary Flexible Loan Adjust LTV(TRADE)
|
|
1872
|
+
* @param {FlexibleLoanAdjustLtvRequest} requestParameters Request parameters.
|
|
1873
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanAdjustLtvResponse>>}
|
|
1874
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1875
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Adjust-LTV Binance API Documentation}
|
|
1876
|
+
*/
|
|
1877
|
+
flexibleLoanAdjustLtv(requestParameters) {
|
|
1878
|
+
return this.flexibleRateApi.flexibleLoanAdjustLtv(requestParameters);
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Borrow Flexible Loan
|
|
1882
|
+
*
|
|
1883
|
+
*
|
|
1884
|
+
* Only available for master account
|
|
1885
|
+
* You can customize LTV by entering loanAmount and collateralAmount.
|
|
1886
|
+
*
|
|
1887
|
+
* Weight: 6000
|
|
1888
|
+
*
|
|
1889
|
+
* @summary Flexible Loan Borrow(TRADE)
|
|
1890
|
+
* @param {FlexibleLoanBorrowRequest} requestParameters Request parameters.
|
|
1891
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanBorrowResponse>>}
|
|
1892
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1893
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Borrow Binance API Documentation}
|
|
1894
|
+
*/
|
|
1895
|
+
flexibleLoanBorrow(requestParameters) {
|
|
1896
|
+
return this.flexibleRateApi.flexibleLoanBorrow(requestParameters);
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
*
|
|
1900
|
+
* Weight: 6000
|
|
1901
|
+
*
|
|
1902
|
+
* @summary Flexible Loan Collateral Repayment (TRADE)
|
|
1903
|
+
* @param {FlexibleLoanCollateralRepaymentRequest} requestParameters Request parameters.
|
|
1904
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanCollateralRepaymentResponse>>}
|
|
1905
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1906
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Collateral-Repay Binance API Documentation}
|
|
1907
|
+
*/
|
|
1908
|
+
flexibleLoanCollateralRepayment(requestParameters) {
|
|
1909
|
+
return this.flexibleRateApi.flexibleLoanCollateralRepayment(requestParameters);
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Flexible Loan Repay
|
|
1913
|
+
*
|
|
1914
|
+
*
|
|
1915
|
+
* repayAmount is mandatory even fullRepayment = FALSE
|
|
1916
|
+
*
|
|
1917
|
+
* Weight: 6000
|
|
1918
|
+
*
|
|
1919
|
+
* @summary Flexible Loan Repay(TRADE)
|
|
1920
|
+
* @param {FlexibleLoanRepayRequest} requestParameters Request parameters.
|
|
1921
|
+
* @returns {Promise<RestApiResponse<FlexibleLoanRepayResponse>>}
|
|
1922
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1923
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Repay Binance API Documentation}
|
|
1924
|
+
*/
|
|
1925
|
+
flexibleLoanRepay(requestParameters) {
|
|
1926
|
+
return this.flexibleRateApi.flexibleLoanRepay(requestParameters);
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value.
|
|
1930
|
+
*
|
|
1931
|
+
* Weight: 400
|
|
1932
|
+
*
|
|
1933
|
+
* @summary Get Flexible Loan Assets Data(USER_DATA)
|
|
1934
|
+
* @param {GetFlexibleLoanAssetsDataRequest} requestParameters Request parameters.
|
|
1935
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanAssetsDataResponse>>}
|
|
1936
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1937
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Assets-Data Binance API Documentation}
|
|
1938
|
+
*/
|
|
1939
|
+
getFlexibleLoanAssetsData(requestParameters = {}) {
|
|
1940
|
+
return this.flexibleRateApi.getFlexibleLoanAssetsData(requestParameters);
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Get Flexible Loan Borrow History
|
|
1944
|
+
*
|
|
1945
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1946
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1947
|
+
*
|
|
1948
|
+
* Weight: 400
|
|
1949
|
+
*
|
|
1950
|
+
* @summary Get Flexible Loan Borrow History(USER_DATA)
|
|
1951
|
+
* @param {GetFlexibleLoanBorrowHistoryRequest} requestParameters Request parameters.
|
|
1952
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanBorrowHistoryResponse>>}
|
|
1953
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1954
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Borrow-History Binance API Documentation}
|
|
1955
|
+
*/
|
|
1956
|
+
getFlexibleLoanBorrowHistory(requestParameters = {}) {
|
|
1957
|
+
return this.flexibleRateApi.getFlexibleLoanBorrowHistory(requestParameters);
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value.
|
|
1961
|
+
*
|
|
1962
|
+
* Weight: 400
|
|
1963
|
+
*
|
|
1964
|
+
* @summary Get Flexible Loan Collateral Assets Data(USER_DATA)
|
|
1965
|
+
* @param {GetFlexibleLoanCollateralAssetsDataRequest} requestParameters Request parameters.
|
|
1966
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanCollateralAssetsDataResponse>>}
|
|
1967
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1968
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Collateral-Assets-Data Binance API Documentation}
|
|
1969
|
+
*/
|
|
1970
|
+
getFlexibleLoanCollateralAssetsData(requestParameters = {}) {
|
|
1971
|
+
return this.flexibleRateApi.getFlexibleLoanCollateralAssetsData(requestParameters);
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
*
|
|
1975
|
+
* Weight: 400
|
|
1976
|
+
*
|
|
1977
|
+
* @summary Get Flexible Loan Liquidation History (USER_DATA)
|
|
1978
|
+
* @param {GetFlexibleLoanLiquidationHistoryRequest} requestParameters Request parameters.
|
|
1979
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanLiquidationHistoryResponse>>}
|
|
1980
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1981
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Liquidation-History Binance API Documentation}
|
|
1982
|
+
*/
|
|
1983
|
+
getFlexibleLoanLiquidationHistory(requestParameters = {}) {
|
|
1984
|
+
return this.flexibleRateApi.getFlexibleLoanLiquidationHistory(requestParameters);
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Get Flexible Loan LTV Adjustment History
|
|
1988
|
+
*
|
|
1989
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
1990
|
+
* The max interval between startTime and endTime is 180 days.
|
|
1991
|
+
*
|
|
1992
|
+
* Weight: 400
|
|
1993
|
+
*
|
|
1994
|
+
* @summary Get Flexible Loan LTV Adjustment History(USER_DATA)
|
|
1995
|
+
* @param {GetFlexibleLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
|
|
1996
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanLtvAdjustmentHistoryResponse>>}
|
|
1997
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1998
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-LTV-Adjustment-History Binance API Documentation}
|
|
1999
|
+
*/
|
|
2000
|
+
getFlexibleLoanLtvAdjustmentHistory(requestParameters = {}) {
|
|
2001
|
+
return this.flexibleRateApi.getFlexibleLoanLtvAdjustmentHistory(requestParameters);
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* Get Flexible Loan Ongoing Orders
|
|
2005
|
+
*
|
|
2006
|
+
* Weight: 300
|
|
2007
|
+
*
|
|
2008
|
+
* @summary Get Flexible Loan Ongoing Orders(USER_DATA)
|
|
2009
|
+
* @param {GetFlexibleLoanOngoingOrdersRequest} requestParameters Request parameters.
|
|
2010
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanOngoingOrdersResponse>>}
|
|
2011
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2012
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Ongoing-Orders Binance API Documentation}
|
|
2013
|
+
*/
|
|
2014
|
+
getFlexibleLoanOngoingOrders(requestParameters = {}) {
|
|
2015
|
+
return this.flexibleRateApi.getFlexibleLoanOngoingOrders(requestParameters);
|
|
2016
|
+
}
|
|
2017
|
+
/**
|
|
2018
|
+
* Get Flexible Loan Repayment History
|
|
2019
|
+
*
|
|
2020
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
2021
|
+
* The max interval between startTime and endTime is 180 days.
|
|
2022
|
+
*
|
|
2023
|
+
* Weight: 400
|
|
2024
|
+
*
|
|
2025
|
+
* @summary Get Flexible Loan Repayment History(USER_DATA)
|
|
2026
|
+
* @param {GetFlexibleLoanRepaymentHistoryRequest} requestParameters Request parameters.
|
|
2027
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanRepaymentHistoryResponse>>}
|
|
2028
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2029
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/user-information/Get-Flexible-Loan-Repayment-History Binance API Documentation}
|
|
2030
|
+
*/
|
|
2031
|
+
getFlexibleLoanRepaymentHistory(requestParameters = {}) {
|
|
2032
|
+
return this.flexibleRateApi.getFlexibleLoanRepaymentHistory(requestParameters);
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.
|
|
2036
|
+
*
|
|
2037
|
+
* Weight: 6000
|
|
2038
|
+
*
|
|
2039
|
+
* @summary Check Collateral Repay Rate(USER_DATA)
|
|
2040
|
+
* @param {CheckCollateralRepayRateStableRateRequest} requestParameters Request parameters.
|
|
2041
|
+
* @returns {Promise<RestApiResponse<CheckCollateralRepayRateStableRateResponse>>}
|
|
2042
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2043
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Check-Collateral-Repay-Rate Binance API Documentation}
|
|
2044
|
+
*/
|
|
2045
|
+
checkCollateralRepayRateStableRate(requestParameters) {
|
|
2046
|
+
return this.stableRateApi.checkCollateralRepayRateStableRate(requestParameters);
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Crypto Loan Adjust LTV
|
|
2050
|
+
*
|
|
2051
|
+
* Weight: 6000
|
|
2052
|
+
*
|
|
2053
|
+
* @summary Crypto Loan Adjust LTV(TRADE)
|
|
2054
|
+
* @param {CryptoLoanAdjustLtvRequest} requestParameters Request parameters.
|
|
2055
|
+
* @returns {Promise<RestApiResponse<CryptoLoanAdjustLtvResponse>>}
|
|
2056
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2057
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Adjust-LTV Binance API Documentation}
|
|
2058
|
+
*/
|
|
2059
|
+
cryptoLoanAdjustLtv(requestParameters) {
|
|
2060
|
+
return this.stableRateApi.cryptoLoanAdjustLtv(requestParameters);
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Crypto Loan Borrow
|
|
2064
|
+
*
|
|
2065
|
+
* Weight: 6000
|
|
2066
|
+
*
|
|
2067
|
+
* @summary Crypto Loan Borrow(TRADE)
|
|
2068
|
+
* @param {CryptoLoanBorrowRequest} requestParameters Request parameters.
|
|
2069
|
+
* @returns {Promise<RestApiResponse<CryptoLoanBorrowResponse>>}
|
|
2070
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2071
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Borrow Binance API Documentation}
|
|
2072
|
+
*/
|
|
2073
|
+
cryptoLoanBorrow(requestParameters) {
|
|
2074
|
+
return this.stableRateApi.cryptoLoanBorrow(requestParameters);
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Customize Margin Call
|
|
2078
|
+
*
|
|
2079
|
+
* Weight: 6000
|
|
2080
|
+
*
|
|
2081
|
+
* @summary Crypto Loan Customize Margin Call(TRADE)
|
|
2082
|
+
* @param {CryptoLoanCustomizeMarginCallRequest} requestParameters Request parameters.
|
|
2083
|
+
* @returns {Promise<RestApiResponse<CryptoLoanCustomizeMarginCallResponse>>}
|
|
2084
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2085
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Customize-Margin-Call Binance API Documentation}
|
|
2086
|
+
*/
|
|
2087
|
+
cryptoLoanCustomizeMarginCall(requestParameters) {
|
|
2088
|
+
return this.stableRateApi.cryptoLoanCustomizeMarginCall(requestParameters);
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Crypto Loan Repay
|
|
2092
|
+
*
|
|
2093
|
+
* Weight: 6000
|
|
2094
|
+
*
|
|
2095
|
+
* @summary Crypto Loan Repay(TRADE)
|
|
2096
|
+
* @param {CryptoLoanRepayRequest} requestParameters Request parameters.
|
|
2097
|
+
* @returns {Promise<RestApiResponse<CryptoLoanRepayResponse>>}
|
|
2098
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2099
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Repay Binance API Documentation}
|
|
2100
|
+
*/
|
|
2101
|
+
cryptoLoanRepay(requestParameters) {
|
|
2102
|
+
return this.stableRateApi.cryptoLoanRepay(requestParameters);
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
|
|
2106
|
+
*
|
|
2107
|
+
* Weight: 400
|
|
2108
|
+
*
|
|
2109
|
+
* @summary Get Collateral Assets Data(USER_DATA)
|
|
2110
|
+
* @param {GetCollateralAssetsDataRequest} requestParameters Request parameters.
|
|
2111
|
+
* @returns {Promise<RestApiResponse<GetCollateralAssetsDataResponse>>}
|
|
2112
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2113
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Collateral-Assets-Data Binance API Documentation}
|
|
2114
|
+
*/
|
|
2115
|
+
getCollateralAssetsData(requestParameters = {}) {
|
|
2116
|
+
return this.stableRateApi.getCollateralAssetsData(requestParameters);
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* Get Crypto Loans Income History
|
|
2120
|
+
*
|
|
2121
|
+
* If startTime and endTime are not sent, the recent 7-day data will be returned.
|
|
2122
|
+
* The max interval between startTime and endTime is 30 days.
|
|
2123
|
+
*
|
|
2124
|
+
* Weight: 6000
|
|
2125
|
+
*
|
|
2126
|
+
* @summary Get Crypto Loans Income History(USER_DATA)
|
|
2127
|
+
* @param {GetCryptoLoansIncomeHistoryRequest} requestParameters Request parameters.
|
|
2128
|
+
* @returns {Promise<RestApiResponse<GetCryptoLoansIncomeHistoryResponse>>}
|
|
2129
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2130
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History Binance API Documentation}
|
|
2131
|
+
*/
|
|
2132
|
+
getCryptoLoansIncomeHistory(requestParameters = {}) {
|
|
2133
|
+
return this.stableRateApi.getCryptoLoansIncomeHistory(requestParameters);
|
|
2134
|
+
}
|
|
2135
|
+
/**
|
|
2136
|
+
* Get Loan Borrow History
|
|
2137
|
+
*
|
|
2138
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
2139
|
+
* The max interval between startTime and endTime is 180 days.
|
|
2140
|
+
*
|
|
2141
|
+
* Weight: 400
|
|
2142
|
+
*
|
|
2143
|
+
* @summary Get Loan Borrow History(USER_DATA)
|
|
2144
|
+
* @param {GetLoanBorrowHistoryRequest} requestParameters Request parameters.
|
|
2145
|
+
* @returns {Promise<RestApiResponse<GetLoanBorrowHistoryResponse>>}
|
|
2146
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2147
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Borrow-History Binance API Documentation}
|
|
2148
|
+
*/
|
|
2149
|
+
getLoanBorrowHistory(requestParameters = {}) {
|
|
2150
|
+
return this.stableRateApi.getLoanBorrowHistory(requestParameters);
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Get Loan LTV Adjustment History
|
|
2154
|
+
*
|
|
2155
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
2156
|
+
* The max interval between startTime and endTime is 180 days.
|
|
2157
|
+
*
|
|
2158
|
+
* Weight: 400
|
|
2159
|
+
*
|
|
2160
|
+
* @summary Get Loan LTV Adjustment History(USER_DATA)
|
|
2161
|
+
* @param {GetLoanLtvAdjustmentHistoryRequest} requestParameters Request parameters.
|
|
2162
|
+
* @returns {Promise<RestApiResponse<GetLoanLtvAdjustmentHistoryResponse>>}
|
|
2163
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2164
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-LTV-Adjustment-History Binance API Documentation}
|
|
2165
|
+
*/
|
|
2166
|
+
getLoanLtvAdjustmentHistory(requestParameters = {}) {
|
|
2167
|
+
return this.stableRateApi.getLoanLtvAdjustmentHistory(requestParameters);
|
|
2168
|
+
}
|
|
2169
|
+
/**
|
|
2170
|
+
* Get Loan Ongoing Orders
|
|
2171
|
+
*
|
|
2172
|
+
* Weight: 300
|
|
2173
|
+
*
|
|
2174
|
+
* @summary Get Loan Ongoing Orders(USER_DATA)
|
|
2175
|
+
* @param {GetLoanOngoingOrdersRequest} requestParameters Request parameters.
|
|
2176
|
+
* @returns {Promise<RestApiResponse<GetLoanOngoingOrdersResponse>>}
|
|
2177
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2178
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Ongoing-Orders Binance API Documentation}
|
|
2179
|
+
*/
|
|
2180
|
+
getLoanOngoingOrders(requestParameters = {}) {
|
|
2181
|
+
return this.stableRateApi.getLoanOngoingOrders(requestParameters);
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Get Loan Repayment History
|
|
2185
|
+
*
|
|
2186
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned.
|
|
2187
|
+
* The max interval between startTime and endTime is 180 days.
|
|
2188
|
+
*
|
|
2189
|
+
* Weight: 400
|
|
2190
|
+
*
|
|
2191
|
+
* @summary Get Loan Repayment History(USER_DATA)
|
|
2192
|
+
* @param {GetLoanRepaymentHistoryRequest} requestParameters Request parameters.
|
|
2193
|
+
* @returns {Promise<RestApiResponse<GetLoanRepaymentHistoryResponse>>}
|
|
2194
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2195
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Repayment-History Binance API Documentation}
|
|
2196
|
+
*/
|
|
2197
|
+
getLoanRepaymentHistory(requestParameters = {}) {
|
|
2198
|
+
return this.stableRateApi.getLoanRepaymentHistory(requestParameters);
|
|
2199
|
+
}
|
|
2200
|
+
/**
|
|
2201
|
+
* Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
|
|
2202
|
+
*
|
|
2203
|
+
* Weight: 400
|
|
2204
|
+
*
|
|
2205
|
+
* @summary Get Loanable Assets Data(USER_DATA)
|
|
2206
|
+
* @param {GetLoanableAssetsDataRequest} requestParameters Request parameters.
|
|
2207
|
+
* @returns {Promise<RestApiResponse<GetLoanableAssetsDataResponse>>}
|
|
2208
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2209
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Loanable-Assets-Data Binance API Documentation}
|
|
2210
|
+
*/
|
|
2211
|
+
getLoanableAssetsData(requestParameters = {}) {
|
|
2212
|
+
return this.stableRateApi.getLoanableAssetsData(requestParameters);
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
// src/crypto-loan.ts
|
|
2217
|
+
var CryptoLoan = class {
|
|
2218
|
+
constructor(config) {
|
|
2219
|
+
if (config?.configurationRestAPI) {
|
|
2220
|
+
const configRestAPI = new ConfigurationRestAPI4(config.configurationRestAPI);
|
|
2221
|
+
configRestAPI.basePath = configRestAPI.basePath || CRYPTO_LOAN_REST_API_PROD_URL;
|
|
2222
|
+
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
2223
|
+
configRestAPI.baseOptions.headers = {
|
|
2224
|
+
...configRestAPI.baseOptions.headers || {},
|
|
2225
|
+
"User-Agent": `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`
|
|
2226
|
+
};
|
|
2227
|
+
this.restAPI = new RestAPI(configRestAPI);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
// src/index.ts
|
|
2233
|
+
import {
|
|
2234
|
+
CRYPTO_LOAN_REST_API_PROD_URL as CRYPTO_LOAN_REST_API_PROD_URL2,
|
|
2235
|
+
CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
2236
|
+
ConnectorClientError,
|
|
2237
|
+
RequiredError,
|
|
2238
|
+
UnauthorizedError,
|
|
2239
|
+
ForbiddenError,
|
|
2240
|
+
TooManyRequestsError,
|
|
2241
|
+
RateLimitBanError,
|
|
2242
|
+
ServerError,
|
|
2243
|
+
NetworkError,
|
|
2244
|
+
NotFoundError,
|
|
2245
|
+
BadRequestError
|
|
2246
|
+
} from "@binance/common";
|
|
2247
|
+
export {
|
|
2248
|
+
BadRequestError,
|
|
2249
|
+
CRYPTO_LOAN_REST_API_PROD_URL2 as CRYPTO_LOAN_REST_API_PROD_URL,
|
|
2250
|
+
CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
2251
|
+
ConnectorClientError,
|
|
2252
|
+
CryptoLoan,
|
|
2253
|
+
rest_api_exports as CryptoLoanRestAPI,
|
|
2254
|
+
ForbiddenError,
|
|
2255
|
+
NetworkError,
|
|
2256
|
+
NotFoundError,
|
|
2257
|
+
RateLimitBanError,
|
|
2258
|
+
RequiredError,
|
|
2259
|
+
ServerError,
|
|
2260
|
+
TooManyRequestsError,
|
|
2261
|
+
UnauthorizedError
|
|
2262
|
+
};
|
|
2263
|
+
//# sourceMappingURL=index.mjs.map
|