@binance/margin-trading 10.1.2 → 12.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
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/margin-trading";
17
- var version = "10.1.2";
17
+ var version = "12.0.0";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/account-api.ts
@@ -786,6 +786,32 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
786
786
  timeUnit: _timeUnit
787
787
  };
788
788
  },
789
+ getMarginAssetRiskBasedLiquidationRatio: async () => {
790
+ const localVarQueryParameter = {};
791
+ const localVarBodyParameter = {};
792
+ let _timeUnit;
793
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
794
+ return {
795
+ endpoint: "/sapi/v1/margin/risk-based-liquidation-ratio",
796
+ method: "GET",
797
+ queryParams: localVarQueryParameter,
798
+ bodyParams: localVarBodyParameter,
799
+ timeUnit: _timeUnit
800
+ };
801
+ },
802
+ getMarginRestrictedAssets: async () => {
803
+ const localVarQueryParameter = {};
804
+ const localVarBodyParameter = {};
805
+ let _timeUnit;
806
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
807
+ return {
808
+ endpoint: "/sapi/v1/margin/restricted-asset",
809
+ method: "GET",
810
+ queryParams: localVarQueryParameter,
811
+ bodyParams: localVarBodyParameter,
812
+ timeUnit: _timeUnit
813
+ };
814
+ },
789
815
  queryIsolatedMarginTierData: async (symbol, tier, recvWindow) => {
790
816
  (0, __binance_common.assertParamExists)("queryIsolatedMarginTierData", "symbol", symbol);
791
817
  const localVarQueryParameter = {};
@@ -973,6 +999,36 @@ var MarketDataApi = class {
973
999
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
974
1000
  }
975
1001
  /**
1002
+ * Get Margin Asset Risk-Based Liquidation Ratio
1003
+ *
1004
+ * Weight: 1
1005
+ *
1006
+ * @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
1007
+ * @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
1008
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1009
+ * @memberof MarketDataApi
1010
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Asset-Risk-Based-Liquidation-Ratio Binance API Documentation}
1011
+ */
1012
+ async getMarginAssetRiskBasedLiquidationRatio() {
1013
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginAssetRiskBasedLiquidationRatio();
1014
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1015
+ }
1016
+ /**
1017
+ * Get Margin Restricted Assets
1018
+ *
1019
+ * Weight: 1
1020
+ *
1021
+ * @summary Get Margin Restricted Assets (MARKET_DATA)
1022
+ * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
1023
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1024
+ * @memberof MarketDataApi
1025
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
1026
+ */
1027
+ async getMarginRestrictedAssets() {
1028
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginRestrictedAssets();
1029
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1030
+ }
1031
+ /**
976
1032
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
977
1033
  *
978
1034
  * Weight: 1(IP)
@@ -1667,6 +1723,26 @@ const TradeApiAxiosParamCreator = function(configuration) {
1667
1723
  timeUnit: _timeUnit
1668
1724
  };
1669
1725
  },
1726
+ queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated) => {
1727
+ (0, __binance_common.assertParamExists)("queryPreventedMatches", "symbol", symbol);
1728
+ const localVarQueryParameter = {};
1729
+ const localVarBodyParameter = {};
1730
+ if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
1731
+ if (preventedMatchId !== void 0 && preventedMatchId !== null) localVarQueryParameter["preventedMatchId"] = preventedMatchId;
1732
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
1733
+ if (fromPreventedMatchId !== void 0 && fromPreventedMatchId !== null) localVarQueryParameter["fromPreventedMatchId"] = fromPreventedMatchId;
1734
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1735
+ if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
1736
+ let _timeUnit;
1737
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1738
+ return {
1739
+ endpoint: "/sapi/v1/margin/myPreventedMatches",
1740
+ method: "GET",
1741
+ queryParams: localVarQueryParameter,
1742
+ bodyParams: localVarBodyParameter,
1743
+ timeUnit: _timeUnit
1744
+ };
1745
+ },
1670
1746
  querySpecialKey: async (symbol, recvWindow) => {
1671
1747
  const localVarQueryParameter = {};
1672
1748
  const localVarBodyParameter = {};
@@ -2151,6 +2227,21 @@ var TradeApi = class {
2151
2227
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2152
2228
  }
2153
2229
  /**
2230
+ *
2231
+ * Weight: 10(IP)
2232
+ *
2233
+ * @summary Query Prevented Matches(USER_DATA)
2234
+ * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
2235
+ * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
2236
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2237
+ * @memberof TradeApi
2238
+ * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
2239
+ */
2240
+ async queryPreventedMatches(requestParameters) {
2241
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.recvWindow, requestParameters?.isIsolated);
2242
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2243
+ }
2244
+ /**
2154
2245
  * Query Special Key Information.
2155
2246
  *
2156
2247
  * This only applies to Special Key for Low Latency Trading.
@@ -2793,6 +2884,34 @@ var RestAPI = class {
2793
2884
  return this.marketDataApi.getListSchedule(requestParameters);
2794
2885
  }
2795
2886
  /**
2887
+ * Get Margin Asset Risk-Based Liquidation Ratio
2888
+ *
2889
+ * Weight: 1
2890
+ *
2891
+ * @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
2892
+ *
2893
+ * @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
2894
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2895
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Asset-Risk-Based-Liquidation-Ratio Binance API Documentation}
2896
+ */
2897
+ getMarginAssetRiskBasedLiquidationRatio() {
2898
+ return this.marketDataApi.getMarginAssetRiskBasedLiquidationRatio();
2899
+ }
2900
+ /**
2901
+ * Get Margin Restricted Assets
2902
+ *
2903
+ * Weight: 1
2904
+ *
2905
+ * @summary Get Margin Restricted Assets (MARKET_DATA)
2906
+ *
2907
+ * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
2908
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2909
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
2910
+ */
2911
+ getMarginRestrictedAssets() {
2912
+ return this.marketDataApi.getMarginRestrictedAssets();
2913
+ }
2914
+ /**
2796
2915
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
2797
2916
  *
2798
2917
  * Weight: 1(IP)
@@ -3299,6 +3418,20 @@ var RestAPI = class {
3299
3418
  return this.tradeApi.queryMarginAccountsTradeList(requestParameters);
3300
3419
  }
3301
3420
  /**
3421
+ *
3422
+ * Weight: 10(IP)
3423
+ *
3424
+ * @summary Query Prevented Matches(USER_DATA)
3425
+ * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
3426
+ *
3427
+ * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
3428
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3429
+ * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
3430
+ */
3431
+ queryPreventedMatches(requestParameters) {
3432
+ return this.tradeApi.queryPreventedMatches(requestParameters);
3433
+ }
3434
+ /**
3302
3435
  * Query Special Key Information.
3303
3436
  *
3304
3437
  * This only applies to Special Key for Low Latency Trading.