@binance/crypto-loan 1.0.0 → 2.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/README.md +0 -19
- package/dist/index.d.mts +93 -198
- package/dist/index.d.ts +93 -198
- package/dist/index.js +28 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -3
package/dist/index.js
CHANGED
|
@@ -18,11 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
BadRequestError: () => import_common5.BadRequestError,
|
|
24
24
|
CRYPTO_LOAN_REST_API_PROD_URL: () => import_common5.CRYPTO_LOAN_REST_API_PROD_URL,
|
|
25
|
-
CRYPTO_LOAN_REST_API_TESTNET_URL: () => import_common5.CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
26
25
|
ConnectorClientError: () => import_common5.ConnectorClientError,
|
|
27
26
|
CryptoLoan: () => CryptoLoan,
|
|
28
27
|
CryptoLoanRestAPI: () => rest_api_exports,
|
|
@@ -35,7 +34,7 @@ __export(src_exports, {
|
|
|
35
34
|
TooManyRequestsError: () => import_common5.TooManyRequestsError,
|
|
36
35
|
UnauthorizedError: () => import_common5.UnauthorizedError
|
|
37
36
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
38
|
|
|
40
39
|
// src/crypto-loan.ts
|
|
41
40
|
var import_os = require("os");
|
|
@@ -43,7 +42,7 @@ var import_common4 = require("@binance/common");
|
|
|
43
42
|
|
|
44
43
|
// package.json
|
|
45
44
|
var name = "@binance/crypto-loan";
|
|
46
|
-
var version = "
|
|
45
|
+
var version = "2.0.0";
|
|
47
46
|
|
|
48
47
|
// src/rest-api/index.ts
|
|
49
48
|
var rest_api_exports = {};
|
|
@@ -82,8 +81,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
82
81
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
83
82
|
}
|
|
84
83
|
let _timeUnit;
|
|
85
|
-
if ("timeUnit" in configuration)
|
|
86
|
-
_timeUnit = configuration.timeUnit;
|
|
84
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
87
85
|
return {
|
|
88
86
|
endpoint: "/sapi/v2/loan/flexible/repay/rate",
|
|
89
87
|
method: "GET",
|
|
@@ -129,8 +127,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
129
127
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
130
128
|
}
|
|
131
129
|
let _timeUnit;
|
|
132
|
-
if ("timeUnit" in configuration)
|
|
133
|
-
_timeUnit = configuration.timeUnit;
|
|
130
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
134
131
|
return {
|
|
135
132
|
endpoint: "/sapi/v2/loan/flexible/adjust/ltv",
|
|
136
133
|
method: "POST",
|
|
@@ -168,8 +165,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
168
165
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
169
166
|
}
|
|
170
167
|
let _timeUnit;
|
|
171
|
-
if ("timeUnit" in configuration)
|
|
172
|
-
_timeUnit = configuration.timeUnit;
|
|
168
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
173
169
|
return {
|
|
174
170
|
endpoint: "/sapi/v2/loan/flexible/borrow",
|
|
175
171
|
method: "POST",
|
|
@@ -211,8 +207,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
211
207
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
212
208
|
}
|
|
213
209
|
let _timeUnit;
|
|
214
|
-
if ("timeUnit" in configuration)
|
|
215
|
-
_timeUnit = configuration.timeUnit;
|
|
210
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
216
211
|
return {
|
|
217
212
|
endpoint: "/sapi/v2/loan/flexible/repay/collateral",
|
|
218
213
|
method: "POST",
|
|
@@ -262,8 +257,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
262
257
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
263
258
|
}
|
|
264
259
|
let _timeUnit;
|
|
265
|
-
if ("timeUnit" in configuration)
|
|
266
|
-
_timeUnit = configuration.timeUnit;
|
|
260
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
267
261
|
return {
|
|
268
262
|
endpoint: "/sapi/v2/loan/flexible/repay",
|
|
269
263
|
method: "POST",
|
|
@@ -291,8 +285,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
291
285
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
292
286
|
}
|
|
293
287
|
let _timeUnit;
|
|
294
|
-
if ("timeUnit" in configuration)
|
|
295
|
-
_timeUnit = configuration.timeUnit;
|
|
288
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
296
289
|
return {
|
|
297
290
|
endpoint: "/sapi/v2/loan/flexible/loanable/data",
|
|
298
291
|
method: "GET",
|
|
@@ -343,8 +336,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
343
336
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
344
337
|
}
|
|
345
338
|
let _timeUnit;
|
|
346
|
-
if ("timeUnit" in configuration)
|
|
347
|
-
_timeUnit = configuration.timeUnit;
|
|
339
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
348
340
|
return {
|
|
349
341
|
endpoint: "/sapi/v2/loan/flexible/borrow/history",
|
|
350
342
|
method: "GET",
|
|
@@ -372,8 +364,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
372
364
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
373
365
|
}
|
|
374
366
|
let _timeUnit;
|
|
375
|
-
if ("timeUnit" in configuration)
|
|
376
|
-
_timeUnit = configuration.timeUnit;
|
|
367
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
377
368
|
return {
|
|
378
369
|
endpoint: "/sapi/v2/loan/flexible/collateral/data",
|
|
379
370
|
method: "GET",
|
|
@@ -420,8 +411,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
420
411
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
421
412
|
}
|
|
422
413
|
let _timeUnit;
|
|
423
|
-
if ("timeUnit" in configuration)
|
|
424
|
-
_timeUnit = configuration.timeUnit;
|
|
414
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
425
415
|
return {
|
|
426
416
|
endpoint: "/sapi/v2/loan/flexible/liquidation/history",
|
|
427
417
|
method: "GET",
|
|
@@ -472,8 +462,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
472
462
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
473
463
|
}
|
|
474
464
|
let _timeUnit;
|
|
475
|
-
if ("timeUnit" in configuration)
|
|
476
|
-
_timeUnit = configuration.timeUnit;
|
|
465
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
477
466
|
return {
|
|
478
467
|
endpoint: "/sapi/v2/loan/flexible/ltv/adjustment/history",
|
|
479
468
|
method: "GET",
|
|
@@ -513,8 +502,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
513
502
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
514
503
|
}
|
|
515
504
|
let _timeUnit;
|
|
516
|
-
if ("timeUnit" in configuration)
|
|
517
|
-
_timeUnit = configuration.timeUnit;
|
|
505
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
518
506
|
return {
|
|
519
507
|
endpoint: "/sapi/v2/loan/flexible/ongoing/orders",
|
|
520
508
|
method: "GET",
|
|
@@ -565,8 +553,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
565
553
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
566
554
|
}
|
|
567
555
|
let _timeUnit;
|
|
568
|
-
if ("timeUnit" in configuration)
|
|
569
|
-
_timeUnit = configuration.timeUnit;
|
|
556
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
570
557
|
return {
|
|
571
558
|
endpoint: "/sapi/v2/loan/flexible/repay/history",
|
|
572
559
|
method: "GET",
|
|
@@ -984,8 +971,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
984
971
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
985
972
|
}
|
|
986
973
|
let _timeUnit;
|
|
987
|
-
if ("timeUnit" in configuration)
|
|
988
|
-
_timeUnit = configuration.timeUnit;
|
|
974
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
989
975
|
return {
|
|
990
976
|
endpoint: "/sapi/v1/loan/repay/collateral/rate",
|
|
991
977
|
method: "GET",
|
|
@@ -1024,8 +1010,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1024
1010
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1025
1011
|
}
|
|
1026
1012
|
let _timeUnit;
|
|
1027
|
-
if ("timeUnit" in configuration)
|
|
1028
|
-
_timeUnit = configuration.timeUnit;
|
|
1013
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1029
1014
|
return {
|
|
1030
1015
|
endpoint: "/sapi/v1/loan/adjust/ltv",
|
|
1031
1016
|
method: "POST",
|
|
@@ -1064,8 +1049,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1064
1049
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1065
1050
|
}
|
|
1066
1051
|
let _timeUnit;
|
|
1067
|
-
if ("timeUnit" in configuration)
|
|
1068
|
-
_timeUnit = configuration.timeUnit;
|
|
1052
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1069
1053
|
return {
|
|
1070
1054
|
endpoint: "/sapi/v1/loan/borrow",
|
|
1071
1055
|
method: "POST",
|
|
@@ -1094,8 +1078,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1094
1078
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1095
1079
|
}
|
|
1096
1080
|
let _timeUnit;
|
|
1097
|
-
if ("timeUnit" in configuration)
|
|
1098
|
-
_timeUnit = configuration.timeUnit;
|
|
1081
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1099
1082
|
return {
|
|
1100
1083
|
endpoint: "/sapi/v1/loan/customize/margin_call",
|
|
1101
1084
|
method: "POST",
|
|
@@ -1137,8 +1120,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1137
1120
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1138
1121
|
}
|
|
1139
1122
|
let _timeUnit;
|
|
1140
|
-
if ("timeUnit" in configuration)
|
|
1141
|
-
_timeUnit = configuration.timeUnit;
|
|
1123
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1142
1124
|
return {
|
|
1143
1125
|
endpoint: "/sapi/v1/loan/repay",
|
|
1144
1126
|
method: "POST",
|
|
@@ -1170,8 +1152,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1170
1152
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1171
1153
|
}
|
|
1172
1154
|
let _timeUnit;
|
|
1173
|
-
if ("timeUnit" in configuration)
|
|
1174
|
-
_timeUnit = configuration.timeUnit;
|
|
1155
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1175
1156
|
return {
|
|
1176
1157
|
endpoint: "/sapi/v1/loan/collateral/data",
|
|
1177
1158
|
method: "GET",
|
|
@@ -1218,8 +1199,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1218
1199
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1219
1200
|
}
|
|
1220
1201
|
let _timeUnit;
|
|
1221
|
-
if ("timeUnit" in configuration)
|
|
1222
|
-
_timeUnit = configuration.timeUnit;
|
|
1202
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1223
1203
|
return {
|
|
1224
1204
|
endpoint: "/sapi/v1/loan/income",
|
|
1225
1205
|
method: "GET",
|
|
@@ -1274,8 +1254,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1274
1254
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1275
1255
|
}
|
|
1276
1256
|
let _timeUnit;
|
|
1277
|
-
if ("timeUnit" in configuration)
|
|
1278
|
-
_timeUnit = configuration.timeUnit;
|
|
1257
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1279
1258
|
return {
|
|
1280
1259
|
endpoint: "/sapi/v1/loan/borrow/history",
|
|
1281
1260
|
method: "GET",
|
|
@@ -1330,8 +1309,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1330
1309
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1331
1310
|
}
|
|
1332
1311
|
let _timeUnit;
|
|
1333
|
-
if ("timeUnit" in configuration)
|
|
1334
|
-
_timeUnit = configuration.timeUnit;
|
|
1312
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1335
1313
|
return {
|
|
1336
1314
|
endpoint: "/sapi/v1/loan/ltv/adjustment/history",
|
|
1337
1315
|
method: "GET",
|
|
@@ -1375,8 +1353,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1375
1353
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1376
1354
|
}
|
|
1377
1355
|
let _timeUnit;
|
|
1378
|
-
if ("timeUnit" in configuration)
|
|
1379
|
-
_timeUnit = configuration.timeUnit;
|
|
1356
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1380
1357
|
return {
|
|
1381
1358
|
endpoint: "/sapi/v1/loan/ongoing/orders",
|
|
1382
1359
|
method: "GET",
|
|
@@ -1431,8 +1408,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1431
1408
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1432
1409
|
}
|
|
1433
1410
|
let _timeUnit;
|
|
1434
|
-
if ("timeUnit" in configuration)
|
|
1435
|
-
_timeUnit = configuration.timeUnit;
|
|
1411
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1436
1412
|
return {
|
|
1437
1413
|
endpoint: "/sapi/v1/loan/repay/history",
|
|
1438
1414
|
method: "GET",
|
|
@@ -1464,8 +1440,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1464
1440
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1465
1441
|
}
|
|
1466
1442
|
let _timeUnit;
|
|
1467
|
-
if ("timeUnit" in configuration)
|
|
1468
|
-
_timeUnit = configuration.timeUnit;
|
|
1443
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1469
1444
|
return {
|
|
1470
1445
|
endpoint: "/sapi/v1/loan/loanable/data",
|
|
1471
1446
|
method: "GET",
|
|
@@ -2262,7 +2237,6 @@ var import_common5 = require("@binance/common");
|
|
|
2262
2237
|
0 && (module.exports = {
|
|
2263
2238
|
BadRequestError,
|
|
2264
2239
|
CRYPTO_LOAN_REST_API_PROD_URL,
|
|
2265
|
-
CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
2266
2240
|
ConnectorClientError,
|
|
2267
2241
|
CryptoLoan,
|
|
2268
2242
|
CryptoLoanRestAPI,
|