@binance/crypto-loan 4.0.0 → 6.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/dist/index.js CHANGED
@@ -42,7 +42,7 @@ var import_common4 = require("@binance/common");
42
42
 
43
43
  // package.json
44
44
  var name = "@binance/crypto-loan";
45
- var version = "4.0.0";
45
+ var version = "6.0.0";
46
46
 
47
47
  // src/rest-api/index.ts
48
48
  var rest_api_exports = {};
@@ -173,48 +173,6 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
173
173
  timeUnit: _timeUnit
174
174
  };
175
175
  },
176
- /**
177
- *
178
- * Weight: 6000
179
- *
180
- * @summary Flexible Loan Collateral Repayment (TRADE)
181
- * @param {string} loanCoin
182
- * @param {string} collateralCoin
183
- * @param {number} repayAmount repay amount of loanCoin
184
- * @param {boolean} [fullRepayment] Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount
185
- * @param {number} [recvWindow]
186
- *
187
- * @throws {RequiredError}
188
- */
189
- flexibleLoanCollateralRepayment: async (loanCoin, collateralCoin, repayAmount, fullRepayment, recvWindow) => {
190
- (0, import_common.assertParamExists)("flexibleLoanCollateralRepayment", "loanCoin", loanCoin);
191
- (0, import_common.assertParamExists)("flexibleLoanCollateralRepayment", "collateralCoin", collateralCoin);
192
- (0, import_common.assertParamExists)("flexibleLoanCollateralRepayment", "repayAmount", repayAmount);
193
- const localVarQueryParameter = {};
194
- if (loanCoin !== void 0 && loanCoin !== null) {
195
- localVarQueryParameter["loanCoin"] = loanCoin;
196
- }
197
- if (collateralCoin !== void 0 && collateralCoin !== null) {
198
- localVarQueryParameter["collateralCoin"] = collateralCoin;
199
- }
200
- if (repayAmount !== void 0 && repayAmount !== null) {
201
- localVarQueryParameter["repayAmount"] = repayAmount;
202
- }
203
- if (fullRepayment !== void 0 && fullRepayment !== null) {
204
- localVarQueryParameter["fullRepayment"] = fullRepayment;
205
- }
206
- if (recvWindow !== void 0 && recvWindow !== null) {
207
- localVarQueryParameter["recvWindow"] = recvWindow;
208
- }
209
- let _timeUnit;
210
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
211
- return {
212
- endpoint: "/sapi/v2/loan/flexible/repay/collateral",
213
- method: "POST",
214
- params: localVarQueryParameter,
215
- timeUnit: _timeUnit
216
- };
217
- },
218
176
  /**
219
177
  * Flexible Loan Repay
220
178
  *
@@ -660,34 +618,6 @@ var FlexibleRateApi = class {
660
618
  { isSigned: true }
661
619
  );
662
620
  }
663
- /**
664
- *
665
- * Weight: 6000
666
- *
667
- * @summary Flexible Loan Collateral Repayment (TRADE)
668
- * @param {FlexibleLoanCollateralRepaymentRequest} requestParameters Request parameters.
669
- * @returns {Promise<RestApiResponse<FlexibleLoanCollateralRepaymentResponse>>}
670
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
671
- * @memberof FlexibleRateApi
672
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Collateral-Repay Binance API Documentation}
673
- */
674
- async flexibleLoanCollateralRepayment(requestParameters) {
675
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.flexibleLoanCollateralRepayment(
676
- requestParameters?.loanCoin,
677
- requestParameters?.collateralCoin,
678
- requestParameters?.repayAmount,
679
- requestParameters?.fullRepayment,
680
- requestParameters?.recvWindow
681
- );
682
- return (0, import_common.sendRequest)(
683
- this.configuration,
684
- localVarAxiosArgs.endpoint,
685
- localVarAxiosArgs.method,
686
- localVarAxiosArgs.params,
687
- localVarAxiosArgs?.timeUnit,
688
- { isSigned: true }
689
- );
690
- }
691
621
  /**
692
622
  * Flexible Loan Repay
693
623
  *
@@ -984,187 +914,6 @@ var StableRateApiAxiosParamCreator = function(configuration) {
984
914
  timeUnit: _timeUnit
985
915
  };
986
916
  },
987
- /**
988
- * Crypto Loan Adjust LTV
989
- *
990
- * Weight: 6000
991
- *
992
- * @summary Crypto Loan Adjust LTV(TRADE)
993
- * @param {number} orderId
994
- * @param {number} amount
995
- * @param {string} direction "ADDITIONAL", "REDUCED"
996
- * @param {number} [recvWindow]
997
- *
998
- * @throws {RequiredError}
999
- */
1000
- cryptoLoanAdjustLtv: async (orderId, amount, direction, recvWindow) => {
1001
- (0, import_common2.assertParamExists)("cryptoLoanAdjustLtv", "orderId", orderId);
1002
- (0, import_common2.assertParamExists)("cryptoLoanAdjustLtv", "amount", amount);
1003
- (0, import_common2.assertParamExists)("cryptoLoanAdjustLtv", "direction", direction);
1004
- const localVarQueryParameter = {};
1005
- if (orderId !== void 0 && orderId !== null) {
1006
- localVarQueryParameter["orderId"] = orderId;
1007
- }
1008
- if (amount !== void 0 && amount !== null) {
1009
- localVarQueryParameter["amount"] = amount;
1010
- }
1011
- if (direction !== void 0 && direction !== null) {
1012
- localVarQueryParameter["direction"] = direction;
1013
- }
1014
- if (recvWindow !== void 0 && recvWindow !== null) {
1015
- localVarQueryParameter["recvWindow"] = recvWindow;
1016
- }
1017
- let _timeUnit;
1018
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1019
- return {
1020
- endpoint: "/sapi/v1/loan/adjust/ltv",
1021
- method: "POST",
1022
- params: localVarQueryParameter,
1023
- timeUnit: _timeUnit
1024
- };
1025
- },
1026
- /**
1027
- * Crypto Loan Borrow
1028
- *
1029
- * Weight: 6000
1030
- *
1031
- * @summary Crypto Loan Borrow(TRADE)
1032
- * @param {string} loanCoin
1033
- * @param {string} collateralCoin
1034
- * @param {number} loanTerm 7/30 days
1035
- * @param {number} [recvWindow]
1036
- *
1037
- * @throws {RequiredError}
1038
- */
1039
- cryptoLoanBorrow: async (loanCoin, collateralCoin, loanTerm, recvWindow) => {
1040
- (0, import_common2.assertParamExists)("cryptoLoanBorrow", "loanCoin", loanCoin);
1041
- (0, import_common2.assertParamExists)("cryptoLoanBorrow", "collateralCoin", collateralCoin);
1042
- (0, import_common2.assertParamExists)("cryptoLoanBorrow", "loanTerm", loanTerm);
1043
- const localVarQueryParameter = {};
1044
- if (loanCoin !== void 0 && loanCoin !== null) {
1045
- localVarQueryParameter["loanCoin"] = loanCoin;
1046
- }
1047
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1048
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1049
- }
1050
- if (loanTerm !== void 0 && loanTerm !== null) {
1051
- localVarQueryParameter["loanTerm"] = loanTerm;
1052
- }
1053
- if (recvWindow !== void 0 && recvWindow !== null) {
1054
- localVarQueryParameter["recvWindow"] = recvWindow;
1055
- }
1056
- let _timeUnit;
1057
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1058
- return {
1059
- endpoint: "/sapi/v1/loan/borrow",
1060
- method: "POST",
1061
- params: localVarQueryParameter,
1062
- timeUnit: _timeUnit
1063
- };
1064
- },
1065
- /**
1066
- * Customize Margin Call
1067
- *
1068
- * Weight: 6000
1069
- *
1070
- * @summary Crypto Loan Customize Margin Call(TRADE)
1071
- * @param {number} marginCall
1072
- * @param {number} [recvWindow]
1073
- *
1074
- * @throws {RequiredError}
1075
- */
1076
- cryptoLoanCustomizeMarginCall: async (marginCall, recvWindow) => {
1077
- (0, import_common2.assertParamExists)("cryptoLoanCustomizeMarginCall", "marginCall", marginCall);
1078
- const localVarQueryParameter = {};
1079
- if (marginCall !== void 0 && marginCall !== null) {
1080
- localVarQueryParameter["marginCall"] = marginCall;
1081
- }
1082
- if (recvWindow !== void 0 && recvWindow !== null) {
1083
- localVarQueryParameter["recvWindow"] = recvWindow;
1084
- }
1085
- let _timeUnit;
1086
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1087
- return {
1088
- endpoint: "/sapi/v1/loan/customize/margin_call",
1089
- method: "POST",
1090
- params: localVarQueryParameter,
1091
- timeUnit: _timeUnit
1092
- };
1093
- },
1094
- /**
1095
- * Crypto Loan Repay
1096
- *
1097
- * Weight: 6000
1098
- *
1099
- * @summary Crypto Loan Repay(TRADE)
1100
- * @param {number} orderId
1101
- * @param {number} amount
1102
- * @param {number} [type] Default: 1. 1 for "repay with borrowed coin"; 2 for "repay with collateral".
1103
- * @param {boolean} [collateralReturn] Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order, and lower LTV.
1104
- * @param {number} [recvWindow]
1105
- *
1106
- * @throws {RequiredError}
1107
- */
1108
- cryptoLoanRepay: async (orderId, amount, type, collateralReturn, recvWindow) => {
1109
- (0, import_common2.assertParamExists)("cryptoLoanRepay", "orderId", orderId);
1110
- (0, import_common2.assertParamExists)("cryptoLoanRepay", "amount", amount);
1111
- const localVarQueryParameter = {};
1112
- if (orderId !== void 0 && orderId !== null) {
1113
- localVarQueryParameter["orderId"] = orderId;
1114
- }
1115
- if (amount !== void 0 && amount !== null) {
1116
- localVarQueryParameter["amount"] = amount;
1117
- }
1118
- if (type !== void 0 && type !== null) {
1119
- localVarQueryParameter["type"] = type;
1120
- }
1121
- if (collateralReturn !== void 0 && collateralReturn !== null) {
1122
- localVarQueryParameter["collateralReturn"] = collateralReturn;
1123
- }
1124
- if (recvWindow !== void 0 && recvWindow !== null) {
1125
- localVarQueryParameter["recvWindow"] = recvWindow;
1126
- }
1127
- let _timeUnit;
1128
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1129
- return {
1130
- endpoint: "/sapi/v1/loan/repay",
1131
- method: "POST",
1132
- params: localVarQueryParameter,
1133
- timeUnit: _timeUnit
1134
- };
1135
- },
1136
- /**
1137
- * Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
1138
- *
1139
- * Weight: 400
1140
- *
1141
- * @summary Get Collateral Assets Data(USER_DATA)
1142
- * @param {string} [collateralCoin]
1143
- * @param {number} [vipLevel] Default: user's vip level. Send "-1" to check specified configuration
1144
- * @param {number} [recvWindow]
1145
- *
1146
- * @throws {RequiredError}
1147
- */
1148
- getCollateralAssetsData: async (collateralCoin, vipLevel, recvWindow) => {
1149
- const localVarQueryParameter = {};
1150
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1151
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1152
- }
1153
- if (vipLevel !== void 0 && vipLevel !== null) {
1154
- localVarQueryParameter["vipLevel"] = vipLevel;
1155
- }
1156
- if (recvWindow !== void 0 && recvWindow !== null) {
1157
- localVarQueryParameter["recvWindow"] = recvWindow;
1158
- }
1159
- let _timeUnit;
1160
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1161
- return {
1162
- endpoint: "/sapi/v1/loan/collateral/data",
1163
- method: "GET",
1164
- params: localVarQueryParameter,
1165
- timeUnit: _timeUnit
1166
- };
1167
- },
1168
917
  /**
1169
918
  * Get Crypto Loans Income History
1170
919
  *
@@ -1221,7 +970,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
1221
970
  * Weight: 400
1222
971
  *
1223
972
  * @summary Get Loan Borrow History(USER_DATA)
1224
- * @param {number} [orderId]
973
+ * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
1225
974
  * @param {string} [loanCoin]
1226
975
  * @param {string} [collateralCoin]
1227
976
  * @param {number} [startTime]
@@ -1276,7 +1025,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
1276
1025
  * Weight: 400
1277
1026
  *
1278
1027
  * @summary Get Loan LTV Adjustment History(USER_DATA)
1279
- * @param {number} [orderId]
1028
+ * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
1280
1029
  * @param {string} [loanCoin]
1281
1030
  * @param {string} [collateralCoin]
1282
1031
  * @param {number} [startTime]
@@ -1322,50 +1071,6 @@ var StableRateApiAxiosParamCreator = function(configuration) {
1322
1071
  timeUnit: _timeUnit
1323
1072
  };
1324
1073
  },
1325
- /**
1326
- * Get Loan Ongoing Orders
1327
- *
1328
- * Weight: 300
1329
- *
1330
- * @summary Get Loan Ongoing Orders(USER_DATA)
1331
- * @param {number} [orderId]
1332
- * @param {string} [loanCoin]
1333
- * @param {string} [collateralCoin]
1334
- * @param {number} [current] Current querying page. Start from 1; default: 1; max: 1000
1335
- * @param {number} [limit] Default: 10; max: 100
1336
- * @param {number} [recvWindow]
1337
- *
1338
- * @throws {RequiredError}
1339
- */
1340
- getLoanOngoingOrders: async (orderId, loanCoin, collateralCoin, current, limit, recvWindow) => {
1341
- const localVarQueryParameter = {};
1342
- if (orderId !== void 0 && orderId !== null) {
1343
- localVarQueryParameter["orderId"] = orderId;
1344
- }
1345
- if (loanCoin !== void 0 && loanCoin !== null) {
1346
- localVarQueryParameter["loanCoin"] = loanCoin;
1347
- }
1348
- if (collateralCoin !== void 0 && collateralCoin !== null) {
1349
- localVarQueryParameter["collateralCoin"] = collateralCoin;
1350
- }
1351
- if (current !== void 0 && current !== null) {
1352
- localVarQueryParameter["current"] = current;
1353
- }
1354
- if (limit !== void 0 && limit !== null) {
1355
- localVarQueryParameter["limit"] = limit;
1356
- }
1357
- if (recvWindow !== void 0 && recvWindow !== null) {
1358
- localVarQueryParameter["recvWindow"] = recvWindow;
1359
- }
1360
- let _timeUnit;
1361
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1362
- return {
1363
- endpoint: "/sapi/v1/loan/ongoing/orders",
1364
- method: "GET",
1365
- params: localVarQueryParameter,
1366
- timeUnit: _timeUnit
1367
- };
1368
- },
1369
1074
  /**
1370
1075
  * Get Loan Repayment History
1371
1076
  *
@@ -1375,7 +1080,7 @@ var StableRateApiAxiosParamCreator = function(configuration) {
1375
1080
  * Weight: 400
1376
1081
  *
1377
1082
  * @summary Get Loan Repayment History(USER_DATA)
1378
- * @param {number} [orderId]
1083
+ * @param {number} [orderId] orderId in `POST /sapi/v1/loan/borrow`
1379
1084
  * @param {string} [loanCoin]
1380
1085
  * @param {string} [collateralCoin]
1381
1086
  * @param {number} [startTime]
@@ -1420,38 +1125,6 @@ var StableRateApiAxiosParamCreator = function(configuration) {
1420
1125
  params: localVarQueryParameter,
1421
1126
  timeUnit: _timeUnit
1422
1127
  };
1423
- },
1424
- /**
1425
- * Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
1426
- *
1427
- * Weight: 400
1428
- *
1429
- * @summary Get Loanable Assets Data(USER_DATA)
1430
- * @param {string} [loanCoin]
1431
- * @param {number} [vipLevel] Default: user's vip level. Send "-1" to check specified configuration
1432
- * @param {number} [recvWindow]
1433
- *
1434
- * @throws {RequiredError}
1435
- */
1436
- getLoanableAssetsData: async (loanCoin, vipLevel, recvWindow) => {
1437
- const localVarQueryParameter = {};
1438
- if (loanCoin !== void 0 && loanCoin !== null) {
1439
- localVarQueryParameter["loanCoin"] = loanCoin;
1440
- }
1441
- if (vipLevel !== void 0 && vipLevel !== null) {
1442
- localVarQueryParameter["vipLevel"] = vipLevel;
1443
- }
1444
- if (recvWindow !== void 0 && recvWindow !== null) {
1445
- localVarQueryParameter["recvWindow"] = recvWindow;
1446
- }
1447
- let _timeUnit;
1448
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1449
- return {
1450
- endpoint: "/sapi/v1/loan/loanable/data",
1451
- method: "GET",
1452
- params: localVarQueryParameter,
1453
- timeUnit: _timeUnit
1454
- };
1455
1128
  }
1456
1129
  };
1457
1130
  };
@@ -1488,144 +1161,6 @@ var StableRateApi = class {
1488
1161
  { isSigned: true }
1489
1162
  );
1490
1163
  }
1491
- /**
1492
- * Crypto Loan Adjust LTV
1493
- *
1494
- * Weight: 6000
1495
- *
1496
- * @summary Crypto Loan Adjust LTV(TRADE)
1497
- * @param {CryptoLoanAdjustLtvRequest} requestParameters Request parameters.
1498
- * @returns {Promise<RestApiResponse<CryptoLoanAdjustLtvResponse>>}
1499
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1500
- * @memberof StableRateApi
1501
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Adjust-LTV Binance API Documentation}
1502
- */
1503
- async cryptoLoanAdjustLtv(requestParameters) {
1504
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanAdjustLtv(
1505
- requestParameters?.orderId,
1506
- requestParameters?.amount,
1507
- requestParameters?.direction,
1508
- requestParameters?.recvWindow
1509
- );
1510
- return (0, import_common2.sendRequest)(
1511
- this.configuration,
1512
- localVarAxiosArgs.endpoint,
1513
- localVarAxiosArgs.method,
1514
- localVarAxiosArgs.params,
1515
- localVarAxiosArgs?.timeUnit,
1516
- { isSigned: true }
1517
- );
1518
- }
1519
- /**
1520
- * Crypto Loan Borrow
1521
- *
1522
- * Weight: 6000
1523
- *
1524
- * @summary Crypto Loan Borrow(TRADE)
1525
- * @param {CryptoLoanBorrowRequest} requestParameters Request parameters.
1526
- * @returns {Promise<RestApiResponse<CryptoLoanBorrowResponse>>}
1527
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1528
- * @memberof StableRateApi
1529
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Borrow Binance API Documentation}
1530
- */
1531
- async cryptoLoanBorrow(requestParameters) {
1532
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanBorrow(
1533
- requestParameters?.loanCoin,
1534
- requestParameters?.collateralCoin,
1535
- requestParameters?.loanTerm,
1536
- requestParameters?.recvWindow
1537
- );
1538
- return (0, import_common2.sendRequest)(
1539
- this.configuration,
1540
- localVarAxiosArgs.endpoint,
1541
- localVarAxiosArgs.method,
1542
- localVarAxiosArgs.params,
1543
- localVarAxiosArgs?.timeUnit,
1544
- { isSigned: true }
1545
- );
1546
- }
1547
- /**
1548
- * Customize Margin Call
1549
- *
1550
- * Weight: 6000
1551
- *
1552
- * @summary Crypto Loan Customize Margin Call(TRADE)
1553
- * @param {CryptoLoanCustomizeMarginCallRequest} requestParameters Request parameters.
1554
- * @returns {Promise<RestApiResponse<CryptoLoanCustomizeMarginCallResponse>>}
1555
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1556
- * @memberof StableRateApi
1557
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Customize-Margin-Call Binance API Documentation}
1558
- */
1559
- async cryptoLoanCustomizeMarginCall(requestParameters) {
1560
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanCustomizeMarginCall(
1561
- requestParameters?.marginCall,
1562
- requestParameters?.recvWindow
1563
- );
1564
- return (0, import_common2.sendRequest)(
1565
- this.configuration,
1566
- localVarAxiosArgs.endpoint,
1567
- localVarAxiosArgs.method,
1568
- localVarAxiosArgs.params,
1569
- localVarAxiosArgs?.timeUnit,
1570
- { isSigned: true }
1571
- );
1572
- }
1573
- /**
1574
- * Crypto Loan Repay
1575
- *
1576
- * Weight: 6000
1577
- *
1578
- * @summary Crypto Loan Repay(TRADE)
1579
- * @param {CryptoLoanRepayRequest} requestParameters Request parameters.
1580
- * @returns {Promise<RestApiResponse<CryptoLoanRepayResponse>>}
1581
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1582
- * @memberof StableRateApi
1583
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Repay Binance API Documentation}
1584
- */
1585
- async cryptoLoanRepay(requestParameters) {
1586
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.cryptoLoanRepay(
1587
- requestParameters?.orderId,
1588
- requestParameters?.amount,
1589
- requestParameters?.type,
1590
- requestParameters?.collateralReturn,
1591
- requestParameters?.recvWindow
1592
- );
1593
- return (0, import_common2.sendRequest)(
1594
- this.configuration,
1595
- localVarAxiosArgs.endpoint,
1596
- localVarAxiosArgs.method,
1597
- localVarAxiosArgs.params,
1598
- localVarAxiosArgs?.timeUnit,
1599
- { isSigned: true }
1600
- );
1601
- }
1602
- /**
1603
- * Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
1604
- *
1605
- * Weight: 400
1606
- *
1607
- * @summary Get Collateral Assets Data(USER_DATA)
1608
- * @param {GetCollateralAssetsDataRequest} requestParameters Request parameters.
1609
- * @returns {Promise<RestApiResponse<GetCollateralAssetsDataResponse>>}
1610
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1611
- * @memberof StableRateApi
1612
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Collateral-Assets-Data Binance API Documentation}
1613
- */
1614
- async getCollateralAssetsData(requestParameters = {}) {
1615
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCollateralAssetsData(
1616
- requestParameters?.collateralCoin,
1617
- requestParameters?.vipLevel,
1618
- requestParameters?.recvWindow
1619
- );
1620
- return (0, import_common2.sendRequest)(
1621
- this.configuration,
1622
- localVarAxiosArgs.endpoint,
1623
- localVarAxiosArgs.method,
1624
- localVarAxiosArgs.params,
1625
- localVarAxiosArgs?.timeUnit,
1626
- { isSigned: true }
1627
- );
1628
- }
1629
1164
  /**
1630
1165
  * Get Crypto Loans Income History
1631
1166
  *
@@ -1729,36 +1264,6 @@ var StableRateApi = class {
1729
1264
  { isSigned: true }
1730
1265
  );
1731
1266
  }
1732
- /**
1733
- * Get Loan Ongoing Orders
1734
- *
1735
- * Weight: 300
1736
- *
1737
- * @summary Get Loan Ongoing Orders(USER_DATA)
1738
- * @param {GetLoanOngoingOrdersRequest} requestParameters Request parameters.
1739
- * @returns {Promise<RestApiResponse<GetLoanOngoingOrdersResponse>>}
1740
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1741
- * @memberof StableRateApi
1742
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Ongoing-Orders Binance API Documentation}
1743
- */
1744
- async getLoanOngoingOrders(requestParameters = {}) {
1745
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanOngoingOrders(
1746
- requestParameters?.orderId,
1747
- requestParameters?.loanCoin,
1748
- requestParameters?.collateralCoin,
1749
- requestParameters?.current,
1750
- requestParameters?.limit,
1751
- requestParameters?.recvWindow
1752
- );
1753
- return (0, import_common2.sendRequest)(
1754
- this.configuration,
1755
- localVarAxiosArgs.endpoint,
1756
- localVarAxiosArgs.method,
1757
- localVarAxiosArgs.params,
1758
- localVarAxiosArgs?.timeUnit,
1759
- { isSigned: true }
1760
- );
1761
- }
1762
1267
  /**
1763
1268
  * Get Loan Repayment History
1764
1269
  *
@@ -1794,33 +1299,6 @@ var StableRateApi = class {
1794
1299
  { isSigned: true }
1795
1300
  );
1796
1301
  }
1797
- /**
1798
- * Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
1799
- *
1800
- * Weight: 400
1801
- *
1802
- * @summary Get Loanable Assets Data(USER_DATA)
1803
- * @param {GetLoanableAssetsDataRequest} requestParameters Request parameters.
1804
- * @returns {Promise<RestApiResponse<GetLoanableAssetsDataResponse>>}
1805
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1806
- * @memberof StableRateApi
1807
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Loanable-Assets-Data Binance API Documentation}
1808
- */
1809
- async getLoanableAssetsData(requestParameters = {}) {
1810
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLoanableAssetsData(
1811
- requestParameters?.loanCoin,
1812
- requestParameters?.vipLevel,
1813
- requestParameters?.recvWindow
1814
- );
1815
- return (0, import_common2.sendRequest)(
1816
- this.configuration,
1817
- localVarAxiosArgs.endpoint,
1818
- localVarAxiosArgs.method,
1819
- localVarAxiosArgs.params,
1820
- localVarAxiosArgs?.timeUnit,
1821
- { isSigned: true }
1822
- );
1823
- }
1824
1302
  };
1825
1303
 
1826
1304
  // src/rest-api/rest-api.ts
@@ -1902,19 +1380,6 @@ var RestAPI = class {
1902
1380
  flexibleLoanBorrow(requestParameters) {
1903
1381
  return this.flexibleRateApi.flexibleLoanBorrow(requestParameters);
1904
1382
  }
1905
- /**
1906
- *
1907
- * Weight: 6000
1908
- *
1909
- * @summary Flexible Loan Collateral Repayment (TRADE)
1910
- * @param {FlexibleLoanCollateralRepaymentRequest} requestParameters Request parameters.
1911
- * @returns {Promise<RestApiResponse<FlexibleLoanCollateralRepaymentResponse>>}
1912
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1913
- * @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/trade/Flexible-Loan-Collateral-Repay Binance API Documentation}
1914
- */
1915
- flexibleLoanCollateralRepayment(requestParameters) {
1916
- return this.flexibleRateApi.flexibleLoanCollateralRepayment(requestParameters);
1917
- }
1918
1383
  /**
1919
1384
  * Flexible Loan Repay
1920
1385
  *
@@ -2052,76 +1517,6 @@ var RestAPI = class {
2052
1517
  checkCollateralRepayRateStableRate(requestParameters) {
2053
1518
  return this.stableRateApi.checkCollateralRepayRateStableRate(requestParameters);
2054
1519
  }
2055
- /**
2056
- * Crypto Loan Adjust LTV
2057
- *
2058
- * Weight: 6000
2059
- *
2060
- * @summary Crypto Loan Adjust LTV(TRADE)
2061
- * @param {CryptoLoanAdjustLtvRequest} requestParameters Request parameters.
2062
- * @returns {Promise<RestApiResponse<CryptoLoanAdjustLtvResponse>>}
2063
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2064
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Adjust-LTV Binance API Documentation}
2065
- */
2066
- cryptoLoanAdjustLtv(requestParameters) {
2067
- return this.stableRateApi.cryptoLoanAdjustLtv(requestParameters);
2068
- }
2069
- /**
2070
- * Crypto Loan Borrow
2071
- *
2072
- * Weight: 6000
2073
- *
2074
- * @summary Crypto Loan Borrow(TRADE)
2075
- * @param {CryptoLoanBorrowRequest} requestParameters Request parameters.
2076
- * @returns {Promise<RestApiResponse<CryptoLoanBorrowResponse>>}
2077
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2078
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Borrow Binance API Documentation}
2079
- */
2080
- cryptoLoanBorrow(requestParameters) {
2081
- return this.stableRateApi.cryptoLoanBorrow(requestParameters);
2082
- }
2083
- /**
2084
- * Customize Margin Call
2085
- *
2086
- * Weight: 6000
2087
- *
2088
- * @summary Crypto Loan Customize Margin Call(TRADE)
2089
- * @param {CryptoLoanCustomizeMarginCallRequest} requestParameters Request parameters.
2090
- * @returns {Promise<RestApiResponse<CryptoLoanCustomizeMarginCallResponse>>}
2091
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2092
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Customize-Margin-Call Binance API Documentation}
2093
- */
2094
- cryptoLoanCustomizeMarginCall(requestParameters) {
2095
- return this.stableRateApi.cryptoLoanCustomizeMarginCall(requestParameters);
2096
- }
2097
- /**
2098
- * Crypto Loan Repay
2099
- *
2100
- * Weight: 6000
2101
- *
2102
- * @summary Crypto Loan Repay(TRADE)
2103
- * @param {CryptoLoanRepayRequest} requestParameters Request parameters.
2104
- * @returns {Promise<RestApiResponse<CryptoLoanRepayResponse>>}
2105
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2106
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/trade/Crypto-Loan-Repay Binance API Documentation}
2107
- */
2108
- cryptoLoanRepay(requestParameters) {
2109
- return this.stableRateApi.cryptoLoanRepay(requestParameters);
2110
- }
2111
- /**
2112
- * Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.
2113
- *
2114
- * Weight: 400
2115
- *
2116
- * @summary Get Collateral Assets Data(USER_DATA)
2117
- * @param {GetCollateralAssetsDataRequest} requestParameters Request parameters.
2118
- * @returns {Promise<RestApiResponse<GetCollateralAssetsDataResponse>>}
2119
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2120
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Collateral-Assets-Data Binance API Documentation}
2121
- */
2122
- getCollateralAssetsData(requestParameters = {}) {
2123
- return this.stableRateApi.getCollateralAssetsData(requestParameters);
2124
- }
2125
1520
  /**
2126
1521
  * Get Crypto Loans Income History
2127
1522
  *
@@ -2173,20 +1568,6 @@ var RestAPI = class {
2173
1568
  getLoanLtvAdjustmentHistory(requestParameters = {}) {
2174
1569
  return this.stableRateApi.getLoanLtvAdjustmentHistory(requestParameters);
2175
1570
  }
2176
- /**
2177
- * Get Loan Ongoing Orders
2178
- *
2179
- * Weight: 300
2180
- *
2181
- * @summary Get Loan Ongoing Orders(USER_DATA)
2182
- * @param {GetLoanOngoingOrdersRequest} requestParameters Request parameters.
2183
- * @returns {Promise<RestApiResponse<GetLoanOngoingOrdersResponse>>}
2184
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2185
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/user-information/Get-Loan-Ongoing-Orders Binance API Documentation}
2186
- */
2187
- getLoanOngoingOrders(requestParameters = {}) {
2188
- return this.stableRateApi.getLoanOngoingOrders(requestParameters);
2189
- }
2190
1571
  /**
2191
1572
  * Get Loan Repayment History
2192
1573
  *
@@ -2204,20 +1585,6 @@ var RestAPI = class {
2204
1585
  getLoanRepaymentHistory(requestParameters = {}) {
2205
1586
  return this.stableRateApi.getLoanRepaymentHistory(requestParameters);
2206
1587
  }
2207
- /**
2208
- * Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.
2209
- *
2210
- * Weight: 400
2211
- *
2212
- * @summary Get Loanable Assets Data(USER_DATA)
2213
- * @param {GetLoanableAssetsDataRequest} requestParameters Request parameters.
2214
- * @returns {Promise<RestApiResponse<GetLoanableAssetsDataResponse>>}
2215
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2216
- * @see {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Loanable-Assets-Data Binance API Documentation}
2217
- */
2218
- getLoanableAssetsData(requestParameters = {}) {
2219
- return this.stableRateApi.getLoanableAssetsData(requestParameters);
2220
- }
2221
1588
  };
2222
1589
 
2223
1590
  // src/crypto-loan.ts