@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.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { ConfigurationRestAPI as ConfigurationRestAPI4, CRYPTO_LOAN_REST_API_PRO
|
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
12
|
var name = "@binance/crypto-loan";
|
|
13
|
-
var version = "
|
|
13
|
+
var version = "2.0.0";
|
|
14
14
|
|
|
15
15
|
// src/rest-api/index.ts
|
|
16
16
|
var rest_api_exports = {};
|
|
@@ -52,8 +52,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
52
52
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
53
53
|
}
|
|
54
54
|
let _timeUnit;
|
|
55
|
-
if ("timeUnit" in configuration)
|
|
56
|
-
_timeUnit = configuration.timeUnit;
|
|
55
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
57
56
|
return {
|
|
58
57
|
endpoint: "/sapi/v2/loan/flexible/repay/rate",
|
|
59
58
|
method: "GET",
|
|
@@ -99,8 +98,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
99
98
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
100
99
|
}
|
|
101
100
|
let _timeUnit;
|
|
102
|
-
if ("timeUnit" in configuration)
|
|
103
|
-
_timeUnit = configuration.timeUnit;
|
|
101
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
104
102
|
return {
|
|
105
103
|
endpoint: "/sapi/v2/loan/flexible/adjust/ltv",
|
|
106
104
|
method: "POST",
|
|
@@ -138,8 +136,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
138
136
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
139
137
|
}
|
|
140
138
|
let _timeUnit;
|
|
141
|
-
if ("timeUnit" in configuration)
|
|
142
|
-
_timeUnit = configuration.timeUnit;
|
|
139
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
143
140
|
return {
|
|
144
141
|
endpoint: "/sapi/v2/loan/flexible/borrow",
|
|
145
142
|
method: "POST",
|
|
@@ -181,8 +178,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
181
178
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
182
179
|
}
|
|
183
180
|
let _timeUnit;
|
|
184
|
-
if ("timeUnit" in configuration)
|
|
185
|
-
_timeUnit = configuration.timeUnit;
|
|
181
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
186
182
|
return {
|
|
187
183
|
endpoint: "/sapi/v2/loan/flexible/repay/collateral",
|
|
188
184
|
method: "POST",
|
|
@@ -232,8 +228,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
232
228
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
233
229
|
}
|
|
234
230
|
let _timeUnit;
|
|
235
|
-
if ("timeUnit" in configuration)
|
|
236
|
-
_timeUnit = configuration.timeUnit;
|
|
231
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
237
232
|
return {
|
|
238
233
|
endpoint: "/sapi/v2/loan/flexible/repay",
|
|
239
234
|
method: "POST",
|
|
@@ -261,8 +256,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
261
256
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
262
257
|
}
|
|
263
258
|
let _timeUnit;
|
|
264
|
-
if ("timeUnit" in configuration)
|
|
265
|
-
_timeUnit = configuration.timeUnit;
|
|
259
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
266
260
|
return {
|
|
267
261
|
endpoint: "/sapi/v2/loan/flexible/loanable/data",
|
|
268
262
|
method: "GET",
|
|
@@ -313,8 +307,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
313
307
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
314
308
|
}
|
|
315
309
|
let _timeUnit;
|
|
316
|
-
if ("timeUnit" in configuration)
|
|
317
|
-
_timeUnit = configuration.timeUnit;
|
|
310
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
318
311
|
return {
|
|
319
312
|
endpoint: "/sapi/v2/loan/flexible/borrow/history",
|
|
320
313
|
method: "GET",
|
|
@@ -342,8 +335,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
342
335
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
343
336
|
}
|
|
344
337
|
let _timeUnit;
|
|
345
|
-
if ("timeUnit" in configuration)
|
|
346
|
-
_timeUnit = configuration.timeUnit;
|
|
338
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
347
339
|
return {
|
|
348
340
|
endpoint: "/sapi/v2/loan/flexible/collateral/data",
|
|
349
341
|
method: "GET",
|
|
@@ -390,8 +382,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
390
382
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
391
383
|
}
|
|
392
384
|
let _timeUnit;
|
|
393
|
-
if ("timeUnit" in configuration)
|
|
394
|
-
_timeUnit = configuration.timeUnit;
|
|
385
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
395
386
|
return {
|
|
396
387
|
endpoint: "/sapi/v2/loan/flexible/liquidation/history",
|
|
397
388
|
method: "GET",
|
|
@@ -442,8 +433,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
442
433
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
443
434
|
}
|
|
444
435
|
let _timeUnit;
|
|
445
|
-
if ("timeUnit" in configuration)
|
|
446
|
-
_timeUnit = configuration.timeUnit;
|
|
436
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
447
437
|
return {
|
|
448
438
|
endpoint: "/sapi/v2/loan/flexible/ltv/adjustment/history",
|
|
449
439
|
method: "GET",
|
|
@@ -483,8 +473,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
483
473
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
484
474
|
}
|
|
485
475
|
let _timeUnit;
|
|
486
|
-
if ("timeUnit" in configuration)
|
|
487
|
-
_timeUnit = configuration.timeUnit;
|
|
476
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
488
477
|
return {
|
|
489
478
|
endpoint: "/sapi/v2/loan/flexible/ongoing/orders",
|
|
490
479
|
method: "GET",
|
|
@@ -535,8 +524,7 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
535
524
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
536
525
|
}
|
|
537
526
|
let _timeUnit;
|
|
538
|
-
if ("timeUnit" in configuration)
|
|
539
|
-
_timeUnit = configuration.timeUnit;
|
|
527
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
540
528
|
return {
|
|
541
529
|
endpoint: "/sapi/v2/loan/flexible/repay/history",
|
|
542
530
|
method: "GET",
|
|
@@ -957,8 +945,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
957
945
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
958
946
|
}
|
|
959
947
|
let _timeUnit;
|
|
960
|
-
if ("timeUnit" in configuration)
|
|
961
|
-
_timeUnit = configuration.timeUnit;
|
|
948
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
962
949
|
return {
|
|
963
950
|
endpoint: "/sapi/v1/loan/repay/collateral/rate",
|
|
964
951
|
method: "GET",
|
|
@@ -997,8 +984,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
997
984
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
998
985
|
}
|
|
999
986
|
let _timeUnit;
|
|
1000
|
-
if ("timeUnit" in configuration)
|
|
1001
|
-
_timeUnit = configuration.timeUnit;
|
|
987
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1002
988
|
return {
|
|
1003
989
|
endpoint: "/sapi/v1/loan/adjust/ltv",
|
|
1004
990
|
method: "POST",
|
|
@@ -1037,8 +1023,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1037
1023
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1038
1024
|
}
|
|
1039
1025
|
let _timeUnit;
|
|
1040
|
-
if ("timeUnit" in configuration)
|
|
1041
|
-
_timeUnit = configuration.timeUnit;
|
|
1026
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1042
1027
|
return {
|
|
1043
1028
|
endpoint: "/sapi/v1/loan/borrow",
|
|
1044
1029
|
method: "POST",
|
|
@@ -1067,8 +1052,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1067
1052
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1068
1053
|
}
|
|
1069
1054
|
let _timeUnit;
|
|
1070
|
-
if ("timeUnit" in configuration)
|
|
1071
|
-
_timeUnit = configuration.timeUnit;
|
|
1055
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1072
1056
|
return {
|
|
1073
1057
|
endpoint: "/sapi/v1/loan/customize/margin_call",
|
|
1074
1058
|
method: "POST",
|
|
@@ -1110,8 +1094,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1110
1094
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1111
1095
|
}
|
|
1112
1096
|
let _timeUnit;
|
|
1113
|
-
if ("timeUnit" in configuration)
|
|
1114
|
-
_timeUnit = configuration.timeUnit;
|
|
1097
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1115
1098
|
return {
|
|
1116
1099
|
endpoint: "/sapi/v1/loan/repay",
|
|
1117
1100
|
method: "POST",
|
|
@@ -1143,8 +1126,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1143
1126
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1144
1127
|
}
|
|
1145
1128
|
let _timeUnit;
|
|
1146
|
-
if ("timeUnit" in configuration)
|
|
1147
|
-
_timeUnit = configuration.timeUnit;
|
|
1129
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1148
1130
|
return {
|
|
1149
1131
|
endpoint: "/sapi/v1/loan/collateral/data",
|
|
1150
1132
|
method: "GET",
|
|
@@ -1191,8 +1173,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1191
1173
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1192
1174
|
}
|
|
1193
1175
|
let _timeUnit;
|
|
1194
|
-
if ("timeUnit" in configuration)
|
|
1195
|
-
_timeUnit = configuration.timeUnit;
|
|
1176
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1196
1177
|
return {
|
|
1197
1178
|
endpoint: "/sapi/v1/loan/income",
|
|
1198
1179
|
method: "GET",
|
|
@@ -1247,8 +1228,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1247
1228
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1248
1229
|
}
|
|
1249
1230
|
let _timeUnit;
|
|
1250
|
-
if ("timeUnit" in configuration)
|
|
1251
|
-
_timeUnit = configuration.timeUnit;
|
|
1231
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1252
1232
|
return {
|
|
1253
1233
|
endpoint: "/sapi/v1/loan/borrow/history",
|
|
1254
1234
|
method: "GET",
|
|
@@ -1303,8 +1283,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1303
1283
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1304
1284
|
}
|
|
1305
1285
|
let _timeUnit;
|
|
1306
|
-
if ("timeUnit" in configuration)
|
|
1307
|
-
_timeUnit = configuration.timeUnit;
|
|
1286
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1308
1287
|
return {
|
|
1309
1288
|
endpoint: "/sapi/v1/loan/ltv/adjustment/history",
|
|
1310
1289
|
method: "GET",
|
|
@@ -1348,8 +1327,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1348
1327
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1349
1328
|
}
|
|
1350
1329
|
let _timeUnit;
|
|
1351
|
-
if ("timeUnit" in configuration)
|
|
1352
|
-
_timeUnit = configuration.timeUnit;
|
|
1330
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1353
1331
|
return {
|
|
1354
1332
|
endpoint: "/sapi/v1/loan/ongoing/orders",
|
|
1355
1333
|
method: "GET",
|
|
@@ -1404,8 +1382,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1404
1382
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1405
1383
|
}
|
|
1406
1384
|
let _timeUnit;
|
|
1407
|
-
if ("timeUnit" in configuration)
|
|
1408
|
-
_timeUnit = configuration.timeUnit;
|
|
1385
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1409
1386
|
return {
|
|
1410
1387
|
endpoint: "/sapi/v1/loan/repay/history",
|
|
1411
1388
|
method: "GET",
|
|
@@ -1437,8 +1414,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
|
|
|
1437
1414
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1438
1415
|
}
|
|
1439
1416
|
let _timeUnit;
|
|
1440
|
-
if ("timeUnit" in configuration)
|
|
1441
|
-
_timeUnit = configuration.timeUnit;
|
|
1417
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1442
1418
|
return {
|
|
1443
1419
|
endpoint: "/sapi/v1/loan/loanable/data",
|
|
1444
1420
|
method: "GET",
|
|
@@ -2232,7 +2208,6 @@ var CryptoLoan = class {
|
|
|
2232
2208
|
// src/index.ts
|
|
2233
2209
|
import {
|
|
2234
2210
|
CRYPTO_LOAN_REST_API_PROD_URL as CRYPTO_LOAN_REST_API_PROD_URL2,
|
|
2235
|
-
CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
2236
2211
|
ConnectorClientError,
|
|
2237
2212
|
RequiredError,
|
|
2238
2213
|
UnauthorizedError,
|
|
@@ -2247,7 +2222,6 @@ import {
|
|
|
2247
2222
|
export {
|
|
2248
2223
|
BadRequestError,
|
|
2249
2224
|
CRYPTO_LOAN_REST_API_PROD_URL2 as CRYPTO_LOAN_REST_API_PROD_URL,
|
|
2250
|
-
CRYPTO_LOAN_REST_API_TESTNET_URL,
|
|
2251
2225
|
ConnectorClientError,
|
|
2252
2226
|
CryptoLoan,
|
|
2253
2227
|
rest_api_exports as CryptoLoanRestAPI,
|