@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.d.mts +192 -2
- package/dist/index.d.ts +192 -2
- package/dist/index.js +162 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var import_common4 = require("@binance/common");
|
|
|
43
43
|
|
|
44
44
|
// package.json
|
|
45
45
|
var name = "@binance/derivatives-trading-portfolio-margin-pro";
|
|
46
|
-
var version = "
|
|
46
|
+
var version = "3.0.0";
|
|
47
47
|
|
|
48
48
|
// src/rest-api/index.ts
|
|
49
49
|
var rest_api_exports = {};
|
|
@@ -158,7 +158,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
158
158
|
* Weight: 60
|
|
159
159
|
*
|
|
160
160
|
* @summary Fund Collection by Asset(USER_DATA)
|
|
161
|
-
* @param {string} asset
|
|
161
|
+
* @param {string} asset `LDUSDT` only
|
|
162
162
|
* @param {number} [recvWindow]
|
|
163
163
|
*
|
|
164
164
|
* @throws {RequiredError}
|
|
@@ -281,6 +281,44 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
281
281
|
timeUnit: _timeUnit
|
|
282
282
|
};
|
|
283
283
|
},
|
|
284
|
+
/**
|
|
285
|
+
* Get transferable earn asset balance for all types of Portfolio Margin account
|
|
286
|
+
*
|
|
287
|
+
* Weight: 1500
|
|
288
|
+
*
|
|
289
|
+
* @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
|
|
290
|
+
* @param {string} asset `LDUSDT` only
|
|
291
|
+
* @param {string} transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN`
|
|
292
|
+
* @param {number} [recvWindow]
|
|
293
|
+
*
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
*/
|
|
296
|
+
getTransferableEarnAssetBalanceForPortfolioMargin: async (asset, transferType, recvWindow) => {
|
|
297
|
+
(0, import_common.assertParamExists)("getTransferableEarnAssetBalanceForPortfolioMargin", "asset", asset);
|
|
298
|
+
(0, import_common.assertParamExists)(
|
|
299
|
+
"getTransferableEarnAssetBalanceForPortfolioMargin",
|
|
300
|
+
"transferType",
|
|
301
|
+
transferType
|
|
302
|
+
);
|
|
303
|
+
const localVarQueryParameter = {};
|
|
304
|
+
if (asset !== void 0 && asset !== null) {
|
|
305
|
+
localVarQueryParameter["asset"] = asset;
|
|
306
|
+
}
|
|
307
|
+
if (transferType !== void 0 && transferType !== null) {
|
|
308
|
+
localVarQueryParameter["transferType"] = transferType;
|
|
309
|
+
}
|
|
310
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
311
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
312
|
+
}
|
|
313
|
+
let _timeUnit;
|
|
314
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
315
|
+
return {
|
|
316
|
+
endpoint: "/sapi/v1/portfolio/earn-asset-balance",
|
|
317
|
+
method: "GET",
|
|
318
|
+
params: localVarQueryParameter,
|
|
319
|
+
timeUnit: _timeUnit
|
|
320
|
+
};
|
|
321
|
+
},
|
|
284
322
|
/**
|
|
285
323
|
* Mint BFUSD for all types of Portfolio Margin account
|
|
286
324
|
*
|
|
@@ -525,6 +563,45 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
525
563
|
params: localVarQueryParameter,
|
|
526
564
|
timeUnit: _timeUnit
|
|
527
565
|
};
|
|
566
|
+
},
|
|
567
|
+
/**
|
|
568
|
+
* Transfer LDUSDT as collateral for all types of Portfolio Margin account
|
|
569
|
+
*
|
|
570
|
+
* Weight: 1500
|
|
571
|
+
*
|
|
572
|
+
* @summary Transfer LDUSDT for Portfolio Margin(TRADE)
|
|
573
|
+
* @param {string} asset `LDUSDT` only
|
|
574
|
+
* @param {string} transferType `EARN_TO_FUTURE` /`FUTURE_TO_EARN`
|
|
575
|
+
* @param {number} amount
|
|
576
|
+
* @param {number} [recvWindow]
|
|
577
|
+
*
|
|
578
|
+
* @throws {RequiredError}
|
|
579
|
+
*/
|
|
580
|
+
transferLdusdtForPortfolioMargin: async (asset, transferType, amount, recvWindow) => {
|
|
581
|
+
(0, import_common.assertParamExists)("transferLdusdtForPortfolioMargin", "asset", asset);
|
|
582
|
+
(0, import_common.assertParamExists)("transferLdusdtForPortfolioMargin", "transferType", transferType);
|
|
583
|
+
(0, import_common.assertParamExists)("transferLdusdtForPortfolioMargin", "amount", amount);
|
|
584
|
+
const localVarQueryParameter = {};
|
|
585
|
+
if (asset !== void 0 && asset !== null) {
|
|
586
|
+
localVarQueryParameter["asset"] = asset;
|
|
587
|
+
}
|
|
588
|
+
if (transferType !== void 0 && transferType !== null) {
|
|
589
|
+
localVarQueryParameter["transferType"] = transferType;
|
|
590
|
+
}
|
|
591
|
+
if (amount !== void 0 && amount !== null) {
|
|
592
|
+
localVarQueryParameter["amount"] = amount;
|
|
593
|
+
}
|
|
594
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
595
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
596
|
+
}
|
|
597
|
+
let _timeUnit;
|
|
598
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
599
|
+
return {
|
|
600
|
+
endpoint: "/sapi/v1/portfolio/earn-asset-balance",
|
|
601
|
+
method: "POST",
|
|
602
|
+
params: localVarQueryParameter,
|
|
603
|
+
timeUnit: _timeUnit
|
|
604
|
+
};
|
|
528
605
|
}
|
|
529
606
|
};
|
|
530
607
|
};
|
|
@@ -746,6 +823,33 @@ var AccountApi = class {
|
|
|
746
823
|
{ isSigned: true }
|
|
747
824
|
);
|
|
748
825
|
}
|
|
826
|
+
/**
|
|
827
|
+
* Get transferable earn asset balance for all types of Portfolio Margin account
|
|
828
|
+
*
|
|
829
|
+
* Weight: 1500
|
|
830
|
+
*
|
|
831
|
+
* @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
|
|
832
|
+
* @param {GetTransferableEarnAssetBalanceForPortfolioMarginRequest} requestParameters Request parameters.
|
|
833
|
+
* @returns {Promise<RestApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse>>}
|
|
834
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
835
|
+
* @memberof AccountApi
|
|
836
|
+
* @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Transferable-Earn-Asset-Balance-for-Portfolio-Margin Binance API Documentation}
|
|
837
|
+
*/
|
|
838
|
+
async getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters) {
|
|
839
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getTransferableEarnAssetBalanceForPortfolioMargin(
|
|
840
|
+
requestParameters?.asset,
|
|
841
|
+
requestParameters?.transferType,
|
|
842
|
+
requestParameters?.recvWindow
|
|
843
|
+
);
|
|
844
|
+
return (0, import_common.sendRequest)(
|
|
845
|
+
this.configuration,
|
|
846
|
+
localVarAxiosArgs.endpoint,
|
|
847
|
+
localVarAxiosArgs.method,
|
|
848
|
+
localVarAxiosArgs.params,
|
|
849
|
+
localVarAxiosArgs?.timeUnit,
|
|
850
|
+
{ isSigned: true }
|
|
851
|
+
);
|
|
852
|
+
}
|
|
749
853
|
/**
|
|
750
854
|
* Mint BFUSD for all types of Portfolio Margin account
|
|
751
855
|
*
|
|
@@ -944,6 +1048,34 @@ var AccountApi = class {
|
|
|
944
1048
|
{ isSigned: true }
|
|
945
1049
|
);
|
|
946
1050
|
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Transfer LDUSDT as collateral for all types of Portfolio Margin account
|
|
1053
|
+
*
|
|
1054
|
+
* Weight: 1500
|
|
1055
|
+
*
|
|
1056
|
+
* @summary Transfer LDUSDT for Portfolio Margin(TRADE)
|
|
1057
|
+
* @param {TransferLdusdtForPortfolioMarginRequest} requestParameters Request parameters.
|
|
1058
|
+
* @returns {Promise<RestApiResponse<TransferLdusdtForPortfolioMarginResponse>>}
|
|
1059
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1060
|
+
* @memberof AccountApi
|
|
1061
|
+
* @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Transfer-LDUSDT-for-Portfolio-Margin Binance API Documentation}
|
|
1062
|
+
*/
|
|
1063
|
+
async transferLdusdtForPortfolioMargin(requestParameters) {
|
|
1064
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.transferLdusdtForPortfolioMargin(
|
|
1065
|
+
requestParameters?.asset,
|
|
1066
|
+
requestParameters?.transferType,
|
|
1067
|
+
requestParameters?.amount,
|
|
1068
|
+
requestParameters?.recvWindow
|
|
1069
|
+
);
|
|
1070
|
+
return (0, import_common.sendRequest)(
|
|
1071
|
+
this.configuration,
|
|
1072
|
+
localVarAxiosArgs.endpoint,
|
|
1073
|
+
localVarAxiosArgs.method,
|
|
1074
|
+
localVarAxiosArgs.params,
|
|
1075
|
+
localVarAxiosArgs?.timeUnit,
|
|
1076
|
+
{ isSigned: true }
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
947
1079
|
};
|
|
948
1080
|
|
|
949
1081
|
// src/rest-api/modules/market-data-api.ts
|
|
@@ -1293,6 +1425,20 @@ var RestAPI = class {
|
|
|
1293
1425
|
getPortfolioMarginProSpanAccountInfo(requestParameters = {}) {
|
|
1294
1426
|
return this.accountApi.getPortfolioMarginProSpanAccountInfo(requestParameters);
|
|
1295
1427
|
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Get transferable earn asset balance for all types of Portfolio Margin account
|
|
1430
|
+
*
|
|
1431
|
+
* Weight: 1500
|
|
1432
|
+
*
|
|
1433
|
+
* @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA)
|
|
1434
|
+
* @param {GetTransferableEarnAssetBalanceForPortfolioMarginRequest} requestParameters Request parameters.
|
|
1435
|
+
* @returns {Promise<RestApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse>>}
|
|
1436
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1437
|
+
* @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Transferable-Earn-Asset-Balance-for-Portfolio-Margin Binance API Documentation}
|
|
1438
|
+
*/
|
|
1439
|
+
getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters) {
|
|
1440
|
+
return this.accountApi.getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters);
|
|
1441
|
+
}
|
|
1296
1442
|
/**
|
|
1297
1443
|
* Mint BFUSD for all types of Portfolio Margin account
|
|
1298
1444
|
*
|
|
@@ -1400,6 +1546,20 @@ var RestAPI = class {
|
|
|
1400
1546
|
repayFuturesNegativeBalance(requestParameters = {}) {
|
|
1401
1547
|
return this.accountApi.repayFuturesNegativeBalance(requestParameters);
|
|
1402
1548
|
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Transfer LDUSDT as collateral for all types of Portfolio Margin account
|
|
1551
|
+
*
|
|
1552
|
+
* Weight: 1500
|
|
1553
|
+
*
|
|
1554
|
+
* @summary Transfer LDUSDT for Portfolio Margin(TRADE)
|
|
1555
|
+
* @param {TransferLdusdtForPortfolioMarginRequest} requestParameters Request parameters.
|
|
1556
|
+
* @returns {Promise<RestApiResponse<TransferLdusdtForPortfolioMarginResponse>>}
|
|
1557
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1558
|
+
* @see {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Transfer-LDUSDT-for-Portfolio-Margin Binance API Documentation}
|
|
1559
|
+
*/
|
|
1560
|
+
transferLdusdtForPortfolioMargin(requestParameters) {
|
|
1561
|
+
return this.accountApi.transferLdusdtForPortfolioMargin(requestParameters);
|
|
1562
|
+
}
|
|
1403
1563
|
/**
|
|
1404
1564
|
* Get Portfolio Margin Asset Leverage
|
|
1405
1565
|
*
|