@binance/derivatives-trading-portfolio-margin-pro 2.0.0 → 3.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.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
 
14
14
  // package.json
15
15
  var name = "@binance/derivatives-trading-portfolio-margin-pro";
16
- var version = "2.0.0";
16
+ var version = "3.0.0";
17
17
 
18
18
  // src/rest-api/index.ts
19
19
  var rest_api_exports = {};
@@ -131,7 +131,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
131
131
  * Weight: 60
132
132
  *
133
133
  * @summary Fund Collection by Asset(USER_DATA)
134
- * @param {string} asset
134
+ * @param {string} asset `LDUSDT` only
135
135
  * @param {number} [recvWindow]
136
136
  *
137
137
  * @throws {RequiredError}
@@ -254,6 +254,44 @@ var AccountApiAxiosParamCreator = function(configuration) {
254
254
  timeUnit: _timeUnit
255
255
  };
256
256
  },
257
+ /**
258
+ * Get transferable earn asset balance for all types of Portfolio Margin account
259
+ *
260
+ * Weight: 1500
261
+ *
262
+ * @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
263
+ * @param {string} asset `LDUSDT` only
264
+ * @param {string} transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN`
265
+ * @param {number} [recvWindow]
266
+ *
267
+ * @throws {RequiredError}
268
+ */
269
+ getTransferableEarnAssetBalanceForPortfolioMargin: async (asset, transferType, recvWindow) => {
270
+ assertParamExists("getTransferableEarnAssetBalanceForPortfolioMargin", "asset", asset);
271
+ assertParamExists(
272
+ "getTransferableEarnAssetBalanceForPortfolioMargin",
273
+ "transferType",
274
+ transferType
275
+ );
276
+ const localVarQueryParameter = {};
277
+ if (asset !== void 0 && asset !== null) {
278
+ localVarQueryParameter["asset"] = asset;
279
+ }
280
+ if (transferType !== void 0 && transferType !== null) {
281
+ localVarQueryParameter["transferType"] = transferType;
282
+ }
283
+ if (recvWindow !== void 0 && recvWindow !== null) {
284
+ localVarQueryParameter["recvWindow"] = recvWindow;
285
+ }
286
+ let _timeUnit;
287
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
288
+ return {
289
+ endpoint: "/sapi/v1/portfolio/earn-asset-balance",
290
+ method: "GET",
291
+ params: localVarQueryParameter,
292
+ timeUnit: _timeUnit
293
+ };
294
+ },
257
295
  /**
258
296
  * Mint BFUSD for all types of Portfolio Margin account
259
297
  *
@@ -498,6 +536,45 @@ var AccountApiAxiosParamCreator = function(configuration) {
498
536
  params: localVarQueryParameter,
499
537
  timeUnit: _timeUnit
500
538
  };
539
+ },
540
+ /**
541
+ * Transfer LDUSDT as collateral for all types of Portfolio Margin account
542
+ *
543
+ * Weight: 1500
544
+ *
545
+ * @summary Transfer LDUSDT for Portfolio Margin(TRADE)
546
+ * @param {string} asset `LDUSDT` only
547
+ * @param {string} transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN`
548
+ * @param {number} amount
549
+ * @param {number} [recvWindow]
550
+ *
551
+ * @throws {RequiredError}
552
+ */
553
+ transferLdusdtForPortfolioMargin: async (asset, transferType, amount, recvWindow) => {
554
+ assertParamExists("transferLdusdtForPortfolioMargin", "asset", asset);
555
+ assertParamExists("transferLdusdtForPortfolioMargin", "transferType", transferType);
556
+ assertParamExists("transferLdusdtForPortfolioMargin", "amount", amount);
557
+ const localVarQueryParameter = {};
558
+ if (asset !== void 0 && asset !== null) {
559
+ localVarQueryParameter["asset"] = asset;
560
+ }
561
+ if (transferType !== void 0 && transferType !== null) {
562
+ localVarQueryParameter["transferType"] = transferType;
563
+ }
564
+ if (amount !== void 0 && amount !== null) {
565
+ localVarQueryParameter["amount"] = amount;
566
+ }
567
+ if (recvWindow !== void 0 && recvWindow !== null) {
568
+ localVarQueryParameter["recvWindow"] = recvWindow;
569
+ }
570
+ let _timeUnit;
571
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
572
+ return {
573
+ endpoint: "/sapi/v1/portfolio/earn-asset-balance",
574
+ method: "POST",
575
+ params: localVarQueryParameter,
576
+ timeUnit: _timeUnit
577
+ };
501
578
  }
502
579
  };
503
580
  };
@@ -719,6 +796,33 @@ var AccountApi = class {
719
796
  { isSigned: true }
720
797
  );
721
798
  }
799
+ /**
800
+ * Get transferable earn asset balance for all types of Portfolio Margin account
801
+ *
802
+ * Weight: 1500
803
+ *
804
+ * @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
805
+ * @param {GetTransferableEarnAssetBalanceForPortfolioMarginRequest} requestParameters Request parameters.
806
+ * @returns {Promise<RestApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse>>}
807
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
808
+ * @memberof AccountApi
809
+ * @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Transferable-Earn-Asset-Balance-for-Portfolio-Margin Binance API Documentation}
810
+ */
811
+ async getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters) {
812
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getTransferableEarnAssetBalanceForPortfolioMargin(
813
+ requestParameters?.asset,
814
+ requestParameters?.transferType,
815
+ requestParameters?.recvWindow
816
+ );
817
+ return sendRequest(
818
+ this.configuration,
819
+ localVarAxiosArgs.endpoint,
820
+ localVarAxiosArgs.method,
821
+ localVarAxiosArgs.params,
822
+ localVarAxiosArgs?.timeUnit,
823
+ { isSigned: true }
824
+ );
825
+ }
722
826
  /**
723
827
  * Mint BFUSD for all types of Portfolio Margin account
724
828
  *
@@ -917,6 +1021,34 @@ var AccountApi = class {
917
1021
  { isSigned: true }
918
1022
  );
919
1023
  }
1024
+ /**
1025
+ * Transfer LDUSDT as collateral for all types of Portfolio Margin account
1026
+ *
1027
+ * Weight: 1500
1028
+ *
1029
+ * @summary Transfer LDUSDT for Portfolio Margin(TRADE)
1030
+ * @param {TransferLdusdtForPortfolioMarginRequest} requestParameters Request parameters.
1031
+ * @returns {Promise<RestApiResponse<TransferLdusdtForPortfolioMarginResponse>>}
1032
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1033
+ * @memberof AccountApi
1034
+ * @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Transfer-LDUSDT-for-Portfolio-Margin Binance API Documentation}
1035
+ */
1036
+ async transferLdusdtForPortfolioMargin(requestParameters) {
1037
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.transferLdusdtForPortfolioMargin(
1038
+ requestParameters?.asset,
1039
+ requestParameters?.transferType,
1040
+ requestParameters?.amount,
1041
+ requestParameters?.recvWindow
1042
+ );
1043
+ return sendRequest(
1044
+ this.configuration,
1045
+ localVarAxiosArgs.endpoint,
1046
+ localVarAxiosArgs.method,
1047
+ localVarAxiosArgs.params,
1048
+ localVarAxiosArgs?.timeUnit,
1049
+ { isSigned: true }
1050
+ );
1051
+ }
920
1052
  };
921
1053
 
922
1054
  // src/rest-api/modules/market-data-api.ts
@@ -1268,6 +1400,20 @@ var RestAPI = class {
1268
1400
  getPortfolioMarginProSpanAccountInfo(requestParameters = {}) {
1269
1401
  return this.accountApi.getPortfolioMarginProSpanAccountInfo(requestParameters);
1270
1402
  }
1403
+ /**
1404
+ * Get transferable earn asset balance for all types of Portfolio Margin account
1405
+ *
1406
+ * Weight: 1500
1407
+ *
1408
+ * @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
1409
+ * @param {GetTransferableEarnAssetBalanceForPortfolioMarginRequest} requestParameters Request parameters.
1410
+ * @returns {Promise<RestApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse>>}
1411
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1412
+ * @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Transferable-Earn-Asset-Balance-for-Portfolio-Margin Binance API Documentation}
1413
+ */
1414
+ getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters) {
1415
+ return this.accountApi.getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters);
1416
+ }
1271
1417
  /**
1272
1418
  * Mint BFUSD for all types of Portfolio Margin account
1273
1419
  *
@@ -1375,6 +1521,20 @@ var RestAPI = class {
1375
1521
  repayFuturesNegativeBalance(requestParameters = {}) {
1376
1522
  return this.accountApi.repayFuturesNegativeBalance(requestParameters);
1377
1523
  }
1524
+ /**
1525
+ * Transfer LDUSDT as collateral for all types of Portfolio Margin account
1526
+ *
1527
+ * Weight: 1500
1528
+ *
1529
+ * @summary Transfer LDUSDT for Portfolio Margin(TRADE)
1530
+ * @param {TransferLdusdtForPortfolioMarginRequest} requestParameters Request parameters.
1531
+ * @returns {Promise<RestApiResponse<TransferLdusdtForPortfolioMarginResponse>>}
1532
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1533
+ * @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Transfer-LDUSDT-for-Portfolio-Margin Binance API Documentation}
1534
+ */
1535
+ transferLdusdtForPortfolioMargin(requestParameters) {
1536
+ return this.accountApi.transferLdusdtForPortfolioMargin(requestParameters);
1537
+ }
1378
1538
  /**
1379
1539
  * Get Portfolio Margin Asset Leverage
1380
1540
  *