@binance/margin-trading 11.0.0 → 12.0.1

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
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConfigurationWebsocketStreams, C
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/margin-trading";
6
- var version = "11.0.0";
6
+ var version = "12.0.1";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/account-api.ts
@@ -788,6 +788,19 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
788
788
  timeUnit: _timeUnit
789
789
  };
790
790
  },
791
+ getMarginRestrictedAssets: async () => {
792
+ const localVarQueryParameter = {};
793
+ const localVarBodyParameter = {};
794
+ let _timeUnit;
795
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
796
+ return {
797
+ endpoint: "/sapi/v1/margin/restricted-asset",
798
+ method: "GET",
799
+ queryParams: localVarQueryParameter,
800
+ bodyParams: localVarBodyParameter,
801
+ timeUnit: _timeUnit
802
+ };
803
+ },
791
804
  queryIsolatedMarginTierData: async (symbol, tier, recvWindow) => {
792
805
  assertParamExists("queryIsolatedMarginTierData", "symbol", symbol);
793
806
  const localVarQueryParameter = {};
@@ -990,6 +1003,21 @@ var MarketDataApi = class {
990
1003
  return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
991
1004
  }
992
1005
  /**
1006
+ * Get Margin Restricted Assets
1007
+ *
1008
+ * Weight: 1
1009
+ *
1010
+ * @summary Get Margin Restricted Assets (MARKET_DATA)
1011
+ * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
1012
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1013
+ * @memberof MarketDataApi
1014
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
1015
+ */
1016
+ async getMarginRestrictedAssets() {
1017
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginRestrictedAssets();
1018
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1019
+ }
1020
+ /**
993
1021
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
994
1022
  *
995
1023
  * Weight: 1(IP)
@@ -1684,6 +1712,26 @@ const TradeApiAxiosParamCreator = function(configuration) {
1684
1712
  timeUnit: _timeUnit
1685
1713
  };
1686
1714
  },
1715
+ queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated) => {
1716
+ assertParamExists("queryPreventedMatches", "symbol", symbol);
1717
+ const localVarQueryParameter = {};
1718
+ const localVarBodyParameter = {};
1719
+ if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
1720
+ if (preventedMatchId !== void 0 && preventedMatchId !== null) localVarQueryParameter["preventedMatchId"] = preventedMatchId;
1721
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
1722
+ if (fromPreventedMatchId !== void 0 && fromPreventedMatchId !== null) localVarQueryParameter["fromPreventedMatchId"] = fromPreventedMatchId;
1723
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1724
+ if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
1725
+ let _timeUnit;
1726
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1727
+ return {
1728
+ endpoint: "/sapi/v1/margin/myPreventedMatches",
1729
+ method: "GET",
1730
+ queryParams: localVarQueryParameter,
1731
+ bodyParams: localVarBodyParameter,
1732
+ timeUnit: _timeUnit
1733
+ };
1734
+ },
1687
1735
  querySpecialKey: async (symbol, recvWindow) => {
1688
1736
  const localVarQueryParameter = {};
1689
1737
  const localVarBodyParameter = {};
@@ -2168,6 +2216,21 @@ var TradeApi = class {
2168
2216
  return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2169
2217
  }
2170
2218
  /**
2219
+ *
2220
+ * Weight: 10(IP)
2221
+ *
2222
+ * @summary Query Prevented Matches(USER_DATA)
2223
+ * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
2224
+ * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
2225
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2226
+ * @memberof TradeApi
2227
+ * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
2228
+ */
2229
+ async queryPreventedMatches(requestParameters) {
2230
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.recvWindow, requestParameters?.isIsolated);
2231
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2232
+ }
2233
+ /**
2171
2234
  * Query Special Key Information.
2172
2235
  *
2173
2236
  * This only applies to Special Key for Low Latency Trading.
@@ -2824,6 +2887,20 @@ var RestAPI = class {
2824
2887
  return this.marketDataApi.getMarginAssetRiskBasedLiquidationRatio();
2825
2888
  }
2826
2889
  /**
2890
+ * Get Margin Restricted Assets
2891
+ *
2892
+ * Weight: 1
2893
+ *
2894
+ * @summary Get Margin Restricted Assets (MARKET_DATA)
2895
+ *
2896
+ * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
2897
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2898
+ * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
2899
+ */
2900
+ getMarginRestrictedAssets() {
2901
+ return this.marketDataApi.getMarginRestrictedAssets();
2902
+ }
2903
+ /**
2827
2904
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
2828
2905
  *
2829
2906
  * Weight: 1(IP)
@@ -3330,6 +3407,20 @@ var RestAPI = class {
3330
3407
  return this.tradeApi.queryMarginAccountsTradeList(requestParameters);
3331
3408
  }
3332
3409
  /**
3410
+ *
3411
+ * Weight: 10(IP)
3412
+ *
3413
+ * @summary Query Prevented Matches(USER_DATA)
3414
+ * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
3415
+ *
3416
+ * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
3417
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3418
+ * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
3419
+ */
3420
+ queryPreventedMatches(requestParameters) {
3421
+ return this.tradeApi.queryPreventedMatches(requestParameters);
3422
+ }
3423
+ /**
3333
3424
  * Query Special Key Information.
3334
3425
  *
3335
3426
  * This only applies to Special Key for Low Latency Trading.