@binance/margin-trading 12.0.12 → 13.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,14 +14,14 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/margin-trading";
17
- var version = "12.0.12";
17
+ var version = "13.0.0";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/account-api.ts
21
21
  /**
22
- * Binance Margin Trading REST API
22
+ * Margin REST API
23
23
  *
24
- * OpenAPI Specification for the Binance Margin Trading REST API
24
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
25
25
  *
26
26
  * The version of the OpenAPI document: 1.0.0
27
27
  *
@@ -242,33 +242,37 @@ var AccountApi = class {
242
242
  /**
243
243
  * Adjust cross margin max leverage
244
244
  *
245
- * The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
245
+ * Weight(UID): 3000, 1 times/min per IP
246
246
  *
247
- * Weight: 3000
247
+ * Security Type: USER_DATA
248
+ *
249
+ * Notes:
250
+ * - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
248
251
  *
249
252
  * @summary Adjust cross margin max leverage (USER_DATA)
250
253
  * @param {AdjustCrossMarginMaxLeverageRequest} requestParameters Request parameters.
251
254
  * @returns {Promise<RestApiResponse<AdjustCrossMarginMaxLeverageResponse>>}
252
255
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
253
256
  * @memberof AccountApi
254
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Adjust-cross-margin-max-leverage Binance API Documentation}
257
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage Binance API Documentation}
255
258
  */
256
259
  async adjustCrossMarginMaxLeverage(requestParameters) {
257
260
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.adjustCrossMarginMaxLeverage(requestParameters?.maxLeverage);
258
261
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
259
262
  }
260
263
  /**
261
- * Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
262
- * hours.
264
+ * Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours.
265
+ *
266
+ * Weight(UID): 300
263
267
  *
264
- * Weight: 300(UID)
268
+ * Security Type: TRADE
265
269
  *
266
270
  * @summary Disable Isolated Margin Account (TRADE)
267
271
  * @param {DisableIsolatedMarginAccountRequest} requestParameters Request parameters.
268
272
  * @returns {Promise<RestApiResponse<DisableIsolatedMarginAccountResponse>>}
269
273
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
270
274
  * @memberof AccountApi
271
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Disable-Isolated-Margin-Account Binance API Documentation}
275
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account Binance API Documentation}
272
276
  */
273
277
  async disableIsolatedMarginAccount(requestParameters) {
274
278
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
@@ -277,14 +281,16 @@ var AccountApi = class {
277
281
  /**
278
282
  * Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
279
283
  *
280
- * Weight: 300(UID)
284
+ * Weight(UID): 300
285
+ *
286
+ * Security Type: TRADE
281
287
  *
282
288
  * @summary Enable Isolated Margin Account (TRADE)
283
289
  * @param {EnableIsolatedMarginAccountRequest} requestParameters Request parameters.
284
290
  * @returns {Promise<RestApiResponse<EnableIsolatedMarginAccountResponse>>}
285
291
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
286
292
  * @memberof AccountApi
287
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Enable-Isolated-Margin-Account Binance API Documentation}
293
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account Binance API Documentation}
288
294
  */
289
295
  async enableIsolatedMarginAccount(requestParameters) {
290
296
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableIsolatedMarginAccount(requestParameters?.symbol, requestParameters?.recvWindow);
@@ -293,14 +299,16 @@ var AccountApi = class {
293
299
  /**
294
300
  * Get BNB Burn Status
295
301
  *
296
- * Weight: 1(IP)
302
+ * Weight(IP): 1
303
+ *
304
+ * Security Type: USER_DATA
297
305
  *
298
306
  * @summary Get BNB Burn Status (USER_DATA)
299
307
  * @param {GetBnbBurnStatusRequest} requestParameters Request parameters.
300
308
  * @returns {Promise<RestApiResponse<GetBnbBurnStatusResponse>>}
301
309
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
302
310
  * @memberof AccountApi
303
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Get-BNB-Burn-Status Binance API Documentation}
311
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status Binance API Documentation}
304
312
  */
305
313
  async getBnbBurnStatus(requestParameters = {}) {
306
314
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBnbBurnStatus(requestParameters?.recvWindow);
@@ -309,14 +317,16 @@ var AccountApi = class {
309
317
  /**
310
318
  * Get personal margin level information
311
319
  *
312
- * Weight: 10(IP)
320
+ * Weight(IP): 10
321
+ *
322
+ * Security Type: USER_DATA
313
323
  *
314
324
  * @summary Get Summary of Margin account (USER_DATA)
315
325
  * @param {GetSummaryOfMarginAccountRequest} requestParameters Request parameters.
316
326
  * @returns {Promise<RestApiResponse<GetSummaryOfMarginAccountResponse>>}
317
327
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
318
328
  * @memberof AccountApi
319
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Get-Summary-of-Margin-account Binance API Documentation}
329
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account Binance API Documentation}
320
330
  */
321
331
  async getSummaryOfMarginAccount(requestParameters = {}) {
322
332
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSummaryOfMarginAccount(requestParameters?.recvWindow);
@@ -325,14 +335,26 @@ var AccountApi = class {
325
335
  /**
326
336
  * Query Cross Isolated Margin Capital Flow
327
337
  *
328
- * Weight: 100(IP)
338
+ * Weight(IP): 100
339
+ *
340
+ * Security Type: USER_DATA
341
+ *
342
+ * Notes:
343
+ * - Only supports querying the data of the last 90 days
344
+ *
345
+ * - The time between startTime and endTime cannot be longer than 7 days.
346
+ *
347
+ * - If fromId is set, the data with id > fromId will be returned.
348
+ * Otherwise the latest data will be returned
349
+ *
350
+ * - To query isolated data, Symbol needs to be entered.
329
351
  *
330
352
  * @summary Query Cross Isolated Margin Capital Flow (USER_DATA)
331
353
  * @param {QueryCrossIsolatedMarginCapitalFlowRequest} requestParameters Request parameters.
332
354
  * @returns {Promise<RestApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse>>}
333
355
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
334
356
  * @memberof AccountApi
335
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Isolated-Margin-Capital-Flow Binance API Documentation}
357
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow Binance API Documentation}
336
358
  */
337
359
  async queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
338
360
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossIsolatedMarginCapitalFlow(requestParameters?.asset, requestParameters?.symbol, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
@@ -341,14 +363,16 @@ var AccountApi = class {
341
363
  /**
342
364
  * Query Cross Margin Account Details
343
365
  *
344
- * Weight: 10(IP)
366
+ * Weight(IP): 10
367
+ *
368
+ * Security Type: USER_DATA
345
369
  *
346
370
  * @summary Query Cross Margin Account Details (USER_DATA)
347
371
  * @param {QueryCrossMarginAccountDetailsRequest} requestParameters Request parameters.
348
372
  * @returns {Promise<RestApiResponse<QueryCrossMarginAccountDetailsResponse>>}
349
373
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
350
374
  * @memberof AccountApi
351
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details Binance API Documentation}
375
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details Binance API Documentation}
352
376
  */
353
377
  async queryCrossMarginAccountDetails(requestParameters = {}) {
354
378
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginAccountDetails(requestParameters?.recvWindow);
@@ -357,14 +381,16 @@ var AccountApi = class {
357
381
  /**
358
382
  * Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
359
383
  *
360
- * Weight: 1 when coin is specified;(IP)
384
+ * Weight: 1 when coin is specified;(IP) 5 when the coin parameter is omitted(IP)
385
+ *
386
+ * Security Type: USER_DATA
361
387
  *
362
388
  * @summary Query Cross Margin Fee Data (USER_DATA)
363
389
  * @param {QueryCrossMarginFeeDataRequest} requestParameters Request parameters.
364
390
  * @returns {Promise<RestApiResponse<QueryCrossMarginFeeDataResponse>>}
365
391
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
366
392
  * @memberof AccountApi
367
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Fee-Data Binance API Documentation}
393
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data Binance API Documentation}
368
394
  */
369
395
  async queryCrossMarginFeeData(requestParameters = {}) {
370
396
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCrossMarginFeeData(requestParameters?.vipLevel, requestParameters?.coin, requestParameters?.recvWindow);
@@ -373,14 +399,16 @@ var AccountApi = class {
373
399
  /**
374
400
  * Query enabled isolated margin account limit.
375
401
  *
376
- * Weight: 1(IP)
402
+ * Weight(IP): 1
403
+ *
404
+ * Security Type: USER_DATA
377
405
  *
378
406
  * @summary Query Enabled Isolated Margin Account Limit (USER_DATA)
379
407
  * @param {QueryEnabledIsolatedMarginAccountLimitRequest} requestParameters Request parameters.
380
408
  * @returns {Promise<RestApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse>>}
381
409
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
382
410
  * @memberof AccountApi
383
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Enabled-Isolated-Margin-Account-Limit Binance API Documentation}
411
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit Binance API Documentation}
384
412
  */
385
413
  async queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
386
414
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryEnabledIsolatedMarginAccountLimit(requestParameters?.recvWindow);
@@ -389,17 +417,22 @@ var AccountApi = class {
389
417
  /**
390
418
  * Query Isolated Margin Account Info
391
419
  *
392
- * If "symbols" is not sent, all isolated assets will be returned.
393
- * If "symbols" is sent, only the isolated assets of the sent symbols will be returned.
420
+ * Weight(IP): 10
421
+ *
422
+ * Security Type: USER_DATA
394
423
  *
395
- * Weight: 10(IP)
424
+ * Notes:
425
+ * - If "symbols" is not sent, all isolated assets will be returned.
426
+ *
427
+ * - If "symbols" is sent, only the isolated assets of the sent symbols
428
+ * will be returned.
396
429
  *
397
430
  * @summary Query Isolated Margin Account Info (USER_DATA)
398
431
  * @param {QueryIsolatedMarginAccountInfoRequest} requestParameters Request parameters.
399
432
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginAccountInfoResponse>>}
400
433
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
401
434
  * @memberof AccountApi
402
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info Binance API Documentation}
435
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info Binance API Documentation}
403
436
  */
404
437
  async queryIsolatedMarginAccountInfo(requestParameters = {}) {
405
438
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginAccountInfo(requestParameters?.symbols, requestParameters?.recvWindow);
@@ -408,27 +441,48 @@ var AccountApi = class {
408
441
  /**
409
442
  * Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
410
443
  *
411
- * Weight: 1 when a single is specified;(IP)
444
+ * Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP)
445
+ *
446
+ * Security Type: USER_DATA
412
447
  *
413
448
  * @summary Query Isolated Margin Fee Data (USER_DATA)
414
449
  * @param {QueryIsolatedMarginFeeDataRequest} requestParameters Request parameters.
415
450
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginFeeDataResponse>>}
416
451
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
417
452
  * @memberof AccountApi
418
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data Binance API Documentation}
453
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data Binance API Documentation}
419
454
  */
420
455
  async queryIsolatedMarginFeeData(requestParameters = {}) {
421
456
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginFeeData(requestParameters?.vipLevel, requestParameters?.symbol, requestParameters?.recvWindow);
422
457
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
423
458
  }
424
459
  };
460
+ let QueryCrossIsolatedMarginCapitalFlowTypeEnum = /* @__PURE__ */ function(QueryCrossIsolatedMarginCapitalFlowTypeEnum$1) {
461
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["TRANSFER"] = "TRANSFER";
462
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BORROW"] = "BORROW";
463
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["REPAY"] = "REPAY";
464
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_INCOME"] = "BUY_INCOME";
465
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_EXPENSE"] = "BUY_EXPENSE";
466
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_INCOME"] = "SELL_INCOME";
467
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_EXPENSE"] = "SELL_EXPENSE";
468
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["TRADING_COMMISSION"] = "TRADING_COMMISSION";
469
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["BUY_LIQUIDATION"] = "BUY_LIQUIDATION";
470
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SELL_LIQUIDATION"] = "SELL_LIQUIDATION";
471
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["REPAY_LIQUIDATION"] = "REPAY_LIQUIDATION";
472
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["OTHER_LIQUIDATION"] = "OTHER_LIQUIDATION";
473
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["LIQUIDATION_FEE"] = "LIQUIDATION_FEE";
474
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SMALL_BALANCE_CONVERT"] = "SMALL_BALANCE_CONVERT";
475
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["COMMISSION_RETURN"] = "COMMISSION_RETURN";
476
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum$1["SMALL_CONVERT"] = "SMALL_CONVERT";
477
+ return QueryCrossIsolatedMarginCapitalFlowTypeEnum$1;
478
+ }({});
425
479
 
426
480
  //#endregion
427
481
  //#region src/rest-api/modules/borrow-repay-api.ts
428
482
  /**
429
- * Binance Margin Trading REST API
483
+ * Margin REST API
430
484
  *
431
- * OpenAPI Specification for the Binance Margin Trading REST API
485
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
432
486
  *
433
487
  * The version of the OpenAPI document: 1.0.0
434
488
  *
@@ -483,10 +537,9 @@ const BorrowRepayApiAxiosParamCreator = function(configuration) {
483
537
  timeUnit: _timeUnit
484
538
  };
485
539
  },
486
- marginAccountBorrowRepay: async (asset, isIsolated, symbol, amount, type, recvWindow) => {
540
+ marginAccountBorrowRepay: async (asset, isIsolated, amount, type, symbol, recvWindow) => {
487
541
  (0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "asset", asset);
488
542
  (0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "isIsolated", isIsolated);
489
- (0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "symbol", symbol);
490
543
  (0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "amount", amount);
491
544
  (0, __binance_common.assertParamExists)("marginAccountBorrowRepay", "type", type);
492
545
  const localVarQueryParameter = {};
@@ -588,14 +641,16 @@ var BorrowRepayApi = class {
588
641
  /**
589
642
  * Get future hourly interest rate
590
643
  *
591
- * Weight: 100
644
+ * Weight(IP): 100
645
+ *
646
+ * Security Type: USER_DATA
592
647
  *
593
648
  * @summary Get future hourly interest rate (USER_DATA)
594
649
  * @param {GetFutureHourlyInterestRateRequest} requestParameters Request parameters.
595
650
  * @returns {Promise<RestApiResponse<GetFutureHourlyInterestRateResponse>>}
596
651
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
597
652
  * @memberof BorrowRepayApi
598
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate Binance API Documentation}
653
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate Binance API Documentation}
599
654
  */
600
655
  async getFutureHourlyInterestRate(requestParameters) {
601
656
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFutureHourlyInterestRate(requestParameters?.assets, requestParameters?.isIsolated);
@@ -604,64 +659,94 @@ var BorrowRepayApi = class {
604
659
  /**
605
660
  * Get Interest History
606
661
  *
607
- * Response in descending order
608
- * If isolatedSymbol is not sent, crossed margin data will be returned
609
- * The max interval between `startTime` and `endTime` is 30 days. It is a MUST to ensure data correctness.
610
- * If `startTime`and `endTime` not sent, return records of the last 7 days by default.
611
- * If `startTime` is sent and `endTime` is not sent, return records of [max(`startTime`, now-30d), now].
612
- * If `startTime` is not sent and `endTime` is sent, return records of [`endTime`-7, `endTime`]
613
- * `type` in response has 4 enums:
614
- * `PERIODIC` interest charged per hour
615
- * `ON_BORROW` first interest charged on borrow
616
- * `PERIODIC_CONVERTED` interest charged per hour converted into BNB
617
- * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB
618
- * `PORTFOLIO` interest charged daily on the portfolio margin negative balance
619
- *
620
- * Weight: 1(IP)
662
+ * Weight(IP): 1
663
+ *
664
+ * Security Type: USER_DATA
665
+ *
666
+ * Notes:
667
+ * - Response in descending order
668
+ *
669
+ * - If isolatedSymbol is not sent, crossed margin data will be returned
670
+ *
671
+ * - The max interval between `startTime` and `endTime` is 30 days. It is a
672
+ * MUST to ensure data correctness.
673
+ *
674
+ * - If `startTime`and `endTime` not sent, return records of the last 7
675
+ * days by default.
676
+ *
677
+ * - If `startTime` is sent and `endTime` is not sent, return records of
678
+ * [max(`startTime`, now-30d), now].
679
+ *
680
+ * - If `startTime` is not sent and `endTime` is sent, return records of
681
+ * [`endTime`-7, `endTime`]
682
+ *
683
+ * - `type` in response has 4 enums:
684
+ *
685
+ * - `PERIODIC` interest charged per hour
686
+ *
687
+ * - `ON_BORROW` first interest charged on borrow
688
+ *
689
+ * - `PERIODIC_CONVERTED` interest charged per hour converted into BNB
690
+ *
691
+ * - `ON_BORROW_CONVERTED` first interest charged on borrow converted into
692
+ * BNB
693
+ *
694
+ * - `PORTFOLIO` interest charged daily on the portfolio margin negative
695
+ * balance
621
696
  *
622
697
  * @summary Get Interest History (USER_DATA)
623
698
  * @param {GetInterestHistoryRequest} requestParameters Request parameters.
624
699
  * @returns {Promise<RestApiResponse<GetInterestHistoryResponse>>}
625
700
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
626
701
  * @memberof BorrowRepayApi
627
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History Binance API Documentation}
702
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history Binance API Documentation}
628
703
  */
629
704
  async getInterestHistory(requestParameters = {}) {
630
705
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getInterestHistory(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
631
706
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
632
707
  }
633
708
  /**
634
- * Margin account borrow/repay(MARGIN)
709
+ * Margin account borrow/repay
710
+ *
711
+ * Weight(UID): 1500
635
712
  *
636
- * Weight: 1500
713
+ * Security Type: USER_DATA
637
714
  *
638
- * @summary Margin account borrow/repay(MARGIN)
715
+ * @summary Margin account borrow/repay (USER_DATA)
639
716
  * @param {MarginAccountBorrowRepayRequest} requestParameters Request parameters.
640
717
  * @returns {Promise<RestApiResponse<MarginAccountBorrowRepayResponse>>}
641
718
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
642
719
  * @memberof BorrowRepayApi
643
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-account-borrow-repay Binance API Documentation}
720
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay Binance API Documentation}
644
721
  */
645
722
  async marginAccountBorrowRepay(requestParameters) {
646
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.amount, requestParameters?.type, requestParameters?.recvWindow);
723
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountBorrowRepay(requestParameters?.asset, requestParameters?.isIsolated, requestParameters?.amount, requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
647
724
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
648
725
  }
649
726
  /**
650
727
  * Query borrow/repay records in Margin account
651
728
  *
652
- * `txId` or `startTime` must be sent. `txId` takes precedence.
653
- * If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
654
- * If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
655
- * `startTime` set as `endTime` - 7days by default, `endTime` set as current time by default
729
+ * Weight(IP): 10
656
730
  *
657
- * Weight: 10(IP)
731
+ * Security Type: USER_DATA
658
732
  *
659
- * @summary Query borrow/repay records in Margin account(USER_DATA)
733
+ * Notes:
734
+ * - `txId` or `startTime` must be sent. `txId` takes precedence.
735
+ *
736
+ * - Response in descending order
737
+ *
738
+ * - If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
739
+ *
740
+ * - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
741
+ *
742
+ * - `startTime` set as `endTime` - 7 days by default, `endTime` set as current time by default
743
+ *
744
+ * @summary Query borrow/repay records in Margin account (USER_DATA)
660
745
  * @param {QueryBorrowRepayRecordsInMarginAccountRequest} requestParameters Request parameters.
661
746
  * @returns {Promise<RestApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse>>}
662
747
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
663
748
  * @memberof BorrowRepayApi
664
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Borrow-Repay Binance API Documentation}
749
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account Binance API Documentation}
665
750
  */
666
751
  async queryBorrowRepayRecordsInMarginAccount(requestParameters) {
667
752
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryBorrowRepayRecordsInMarginAccount(requestParameters?.type, requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.txId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
@@ -670,14 +755,16 @@ var BorrowRepayApi = class {
670
755
  /**
671
756
  * Query Margin Interest Rate History
672
757
  *
673
- * Weight: 1(IP)
758
+ * Weight(IP): 1
759
+ *
760
+ * Security Type: USER_DATA
674
761
  *
675
762
  * @summary Query Margin Interest Rate History (USER_DATA)
676
763
  * @param {QueryMarginInterestRateHistoryRequest} requestParameters Request parameters.
677
764
  * @returns {Promise<RestApiResponse<QueryMarginInterestRateHistoryResponse>>}
678
765
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
679
766
  * @memberof BorrowRepayApi
680
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History Binance API Documentation}
767
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history Binance API Documentation}
681
768
  */
682
769
  async queryMarginInterestRateHistory(requestParameters) {
683
770
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginInterestRateHistory(requestParameters?.asset, requestParameters?.vipLevel, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
@@ -686,30 +773,53 @@ var BorrowRepayApi = class {
686
773
  /**
687
774
  * Query Max Borrow
688
775
  *
689
- * If isolatedSymbol is not sent, crossed margin data will be sent.
690
- * `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
776
+ * Weight(IP): 50
691
777
  *
692
- * Weight: 50(IP)
778
+ * Security Type: USER_DATA
779
+ *
780
+ * Notes:
781
+ * - If isolatedSymbol is not sent, crossed margin data will be sent.
782
+ * - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
693
783
  *
694
784
  * @summary Query Max Borrow (USER_DATA)
695
785
  * @param {QueryMaxBorrowRequest} requestParameters Request parameters.
696
786
  * @returns {Promise<RestApiResponse<QueryMaxBorrowResponse>>}
697
787
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
698
788
  * @memberof BorrowRepayApi
699
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Max-Borrow Binance API Documentation}
789
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow Binance API Documentation}
700
790
  */
701
791
  async queryMaxBorrow(requestParameters) {
702
792
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxBorrow(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
703
793
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
704
794
  }
705
795
  };
796
+ let GetFutureHourlyInterestRateIsIsolatedEnum = /* @__PURE__ */ function(GetFutureHourlyInterestRateIsIsolatedEnum$1) {
797
+ GetFutureHourlyInterestRateIsIsolatedEnum$1["TRUE"] = "TRUE";
798
+ GetFutureHourlyInterestRateIsIsolatedEnum$1["FALSE"] = "FALSE";
799
+ return GetFutureHourlyInterestRateIsIsolatedEnum$1;
800
+ }({});
801
+ let MarginAccountBorrowRepayIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountBorrowRepayIsIsolatedEnum$1) {
802
+ MarginAccountBorrowRepayIsIsolatedEnum$1["TRUE"] = "TRUE";
803
+ MarginAccountBorrowRepayIsIsolatedEnum$1["FALSE"] = "FALSE";
804
+ return MarginAccountBorrowRepayIsIsolatedEnum$1;
805
+ }({});
806
+ let MarginAccountBorrowRepayTypeEnum = /* @__PURE__ */ function(MarginAccountBorrowRepayTypeEnum$1) {
807
+ MarginAccountBorrowRepayTypeEnum$1["BORROW"] = "BORROW";
808
+ MarginAccountBorrowRepayTypeEnum$1["REPAY"] = "REPAY";
809
+ return MarginAccountBorrowRepayTypeEnum$1;
810
+ }({});
811
+ let QueryBorrowRepayRecordsInMarginAccountTypeEnum = /* @__PURE__ */ function(QueryBorrowRepayRecordsInMarginAccountTypeEnum$1) {
812
+ QueryBorrowRepayRecordsInMarginAccountTypeEnum$1["BORROW"] = "BORROW";
813
+ QueryBorrowRepayRecordsInMarginAccountTypeEnum$1["REPAY"] = "REPAY";
814
+ return QueryBorrowRepayRecordsInMarginAccountTypeEnum$1;
815
+ }({});
706
816
 
707
817
  //#endregion
708
818
  //#region src/rest-api/modules/market-data-api.ts
709
819
  /**
710
- * Binance Margin Trading REST API
820
+ * Margin REST API
711
821
  *
712
- * OpenAPI Specification for the Binance Margin Trading REST API
822
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
713
823
  *
714
824
  * The version of the OpenAPI document: 1.0.0
715
825
  *
@@ -946,13 +1056,15 @@ var MarketDataApi = class {
946
1056
  /**
947
1057
  * Cross margin collateral ratio
948
1058
  *
949
- * Weight: 100(IP)
1059
+ * Weight(IP): 100
1060
+ *
1061
+ * Security Type: MARKET_DATA
950
1062
  *
951
1063
  * @summary Cross margin collateral ratio (MARKET_DATA)
952
1064
  * @returns {Promise<RestApiResponse<CrossMarginCollateralRatioResponse>>}
953
1065
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
954
1066
  * @memberof MarketDataApi
955
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Cross-margin-collateral-ratio Binance API Documentation}
1067
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio Binance API Documentation}
956
1068
  */
957
1069
  async crossMarginCollateralRatio() {
958
1070
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.crossMarginCollateralRatio();
@@ -961,14 +1073,16 @@ var MarketDataApi = class {
961
1073
  /**
962
1074
  * Get All Cross Margin Pairs
963
1075
  *
964
- * Weight: 1(IP)
1076
+ * Weight(IP): 1
1077
+ *
1078
+ * Security Type: MARKET_DATA
965
1079
  *
966
1080
  * @summary Get All Cross Margin Pairs (MARKET_DATA)
967
1081
  * @param {GetAllCrossMarginPairsRequest} requestParameters Request parameters.
968
1082
  * @returns {Promise<RestApiResponse<GetAllCrossMarginPairsResponse>>}
969
1083
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
970
1084
  * @memberof MarketDataApi
971
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs Binance API Documentation}
1085
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs Binance API Documentation}
972
1086
  */
973
1087
  async getAllCrossMarginPairs(requestParameters = {}) {
974
1088
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllCrossMarginPairs(requestParameters?.symbol);
@@ -977,14 +1091,16 @@ var MarketDataApi = class {
977
1091
  /**
978
1092
  * Get All Isolated Margin Symbol
979
1093
  *
980
- * Weight: 10(IP)
1094
+ * Weight(IP): 10
1095
+ *
1096
+ * Security Type: MARKET_DATA
981
1097
  *
982
- * @summary Get All Isolated Margin Symbol(MARKET_DATA)
1098
+ * @summary Get All Isolated Margin Symbol (MARKET_DATA)
983
1099
  * @param {GetAllIsolatedMarginSymbolRequest} requestParameters Request parameters.
984
1100
  * @returns {Promise<RestApiResponse<GetAllIsolatedMarginSymbolResponse>>}
985
1101
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
986
1102
  * @memberof MarketDataApi
987
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol Binance API Documentation}
1103
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol Binance API Documentation}
988
1104
  */
989
1105
  async getAllIsolatedMarginSymbol(requestParameters = {}) {
990
1106
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllIsolatedMarginSymbol(requestParameters?.symbol, requestParameters?.recvWindow);
@@ -993,14 +1109,16 @@ var MarketDataApi = class {
993
1109
  /**
994
1110
  * Get All Margin Assets.
995
1111
  *
996
- * Weight: 1(IP)
1112
+ * Weight(IP): 1
1113
+ *
1114
+ * Security Type: MARKET_DATA
997
1115
  *
998
1116
  * @summary Get All Margin Assets (MARKET_DATA)
999
1117
  * @param {GetAllMarginAssetsRequest} requestParameters Request parameters.
1000
1118
  * @returns {Promise<RestApiResponse<GetAllMarginAssetsResponse>>}
1001
1119
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1002
1120
  * @memberof MarketDataApi
1003
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets Binance API Documentation}
1121
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets Binance API Documentation}
1004
1122
  */
1005
1123
  async getAllMarginAssets(requestParameters = {}) {
1006
1124
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAllMarginAssets(requestParameters?.asset);
@@ -1009,14 +1127,16 @@ var MarketDataApi = class {
1009
1127
  /**
1010
1128
  * Get tokens or symbols delist schedule for cross margin and isolated margin
1011
1129
  *
1012
- * Weight: 100
1130
+ * Weight(IP): 100
1131
+ *
1132
+ * Security Type: MARKET_DATA
1013
1133
  *
1014
1134
  * @summary Get Delist Schedule (MARKET_DATA)
1015
1135
  * @param {GetDelistScheduleRequest} requestParameters Request parameters.
1016
1136
  * @returns {Promise<RestApiResponse<GetDelistScheduleResponse>>}
1017
1137
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1018
1138
  * @memberof MarketDataApi
1019
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Delist-Schedule Binance API Documentation}
1139
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule Binance API Documentation}
1020
1140
  */
1021
1141
  async getDelistSchedule(requestParameters = {}) {
1022
1142
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDelistSchedule(requestParameters?.recvWindow);
@@ -1024,19 +1144,32 @@ var MarketDataApi = class {
1024
1144
  }
1025
1145
  /**
1026
1146
  * Query trading pairs with restriction on limit price range.
1027
- * In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price.
1028
1147
  *
1029
- * - Buy order: Your order will be rejected with an error message notification if the limit price is 15% above the index price.
1030
- * - Sell order: Your order will be rejected with an error message notification if the limit price is 15% below the index price.
1031
- * Please review the limit price order placing strategy, backtest and calibrate the planned order size with the trading volume and order book depth to prevent trading loss.
1148
+ * In margin trading, you can place orders with limit price. Limit price
1149
+ * should be within (-15%, 15%) of current index price for a list of margin
1150
+ * trading pairs. This rule only impacts limit sell orders with limit price
1151
+ * that is lower than current index price and limit buy orders with limit
1152
+ * price that is higher than current index price.
1032
1153
  *
1033
- * Weight: 1
1154
+ * - Buy order: Your order will be rejected with an error message
1155
+ * notification if the limit price is 15% above the index price.
1034
1156
  *
1035
- * @summary Get Limit Price Pairs(MARKET_DATA)
1157
+ * - Sell order: Your order will be rejected with an error message
1158
+ * notification if the limit price is 15% below the index price.
1159
+ *
1160
+ * Please review the limit price order placing strategy, backtest and
1161
+ * calibrate the planned order size with the trading volume and order book
1162
+ * depth to prevent trading loss.
1163
+ *
1164
+ * Weight(IP): 1
1165
+ *
1166
+ * Security Type: MARKET_DATA
1167
+ *
1168
+ * @summary Get Limit Price Pairs (MARKET_DATA)
1036
1169
  * @returns {Promise<RestApiResponse<GetLimitPricePairsResponse>>}
1037
1170
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1038
1171
  * @memberof MarketDataApi
1039
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Limit-Price-Pairs Binance API Documentation}
1172
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs Binance API Documentation}
1040
1173
  */
1041
1174
  async getLimitPricePairs() {
1042
1175
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getLimitPricePairs();
@@ -1045,14 +1178,16 @@ var MarketDataApi = class {
1045
1178
  /**
1046
1179
  * Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
1047
1180
  *
1048
- * Weight: 100
1181
+ * Weight(IP): 100
1182
+ *
1183
+ * Security Type: MARKET_DATA
1049
1184
  *
1050
1185
  * @summary Get list Schedule (MARKET_DATA)
1051
1186
  * @param {GetListScheduleRequest} requestParameters Request parameters.
1052
1187
  * @returns {Promise<RestApiResponse<GetListScheduleResponse>>}
1053
1188
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1054
1189
  * @memberof MarketDataApi
1055
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule Binance API Documentation}
1190
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule Binance API Documentation}
1056
1191
  */
1057
1192
  async getListSchedule(requestParameters = {}) {
1058
1193
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getListSchedule(requestParameters?.recvWindow);
@@ -1061,28 +1196,32 @@ var MarketDataApi = class {
1061
1196
  /**
1062
1197
  * Get Margin Asset Risk-Based Liquidation Ratio
1063
1198
  *
1064
- * Weight: 1
1199
+ * Weight(IP): 1
1200
+ *
1201
+ * Security Type: MARKET_DATA
1065
1202
  *
1066
1203
  * @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
1067
1204
  * @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
1068
1205
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1069
1206
  * @memberof MarketDataApi
1070
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Asset-Risk-Based-Liquidation-Ratio Binance API Documentation}
1207
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio Binance API Documentation}
1071
1208
  */
1072
1209
  async getMarginAssetRiskBasedLiquidationRatio() {
1073
1210
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginAssetRiskBasedLiquidationRatio();
1074
1211
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1075
1212
  }
1076
1213
  /**
1077
- * Get Margin Restricted Assets
1214
+ * Get the list of margin-restricted assets.
1078
1215
  *
1079
- * Weight: 1
1216
+ * Weight(IP): 1
1217
+ *
1218
+ * Security Type: MARKET_DATA
1080
1219
  *
1081
1220
  * @summary Get Margin Restricted Assets (MARKET_DATA)
1082
1221
  * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
1083
1222
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1084
1223
  * @memberof MarketDataApi
1085
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
1224
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets Binance API Documentation}
1086
1225
  */
1087
1226
  async getMarginRestrictedAssets() {
1088
1227
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarginRestrictedAssets();
@@ -1091,14 +1230,16 @@ var MarketDataApi = class {
1091
1230
  /**
1092
1231
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
1093
1232
  *
1094
- * Weight: 1(IP)
1233
+ * Weight(IP): 1
1234
+ *
1235
+ * Security Type: USER_DATA
1095
1236
  *
1096
1237
  * @summary Query Isolated Margin Tier Data (USER_DATA)
1097
1238
  * @param {QueryIsolatedMarginTierDataRequest} requestParameters Request parameters.
1098
1239
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginTierDataResponse>>}
1099
1240
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1100
1241
  * @memberof MarketDataApi
1101
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Isolated-Margin-Tier-Data Binance API Documentation}
1242
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data Binance API Documentation}
1102
1243
  */
1103
1244
  async queryIsolatedMarginTierData(requestParameters) {
1104
1245
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryIsolatedMarginTierData(requestParameters?.symbol, requestParameters?.tier, requestParameters?.recvWindow);
@@ -1107,13 +1248,15 @@ var MarketDataApi = class {
1107
1248
  /**
1108
1249
  * Liability Coin Leverage Bracket in Cross Margin Pro Mode
1109
1250
  *
1110
- * Weight: 1
1251
+ * Weight(IP): 1
1111
1252
  *
1112
- * @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA)
1253
+ * Security Type: MARKET_DATA
1254
+ *
1255
+ * @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA)
1113
1256
  * @returns {Promise<RestApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse>>}
1114
1257
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1115
1258
  * @memberof MarketDataApi
1116
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Liability-Coin-Leverage-Bracket-in-Cross-Margin-Pro-Mode Binance API Documentation}
1259
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode Binance API Documentation}
1117
1260
  */
1118
1261
  async queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
1119
1262
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
@@ -1122,14 +1265,16 @@ var MarketDataApi = class {
1122
1265
  /**
1123
1266
  * Margin available Inventory query
1124
1267
  *
1125
- * Weight: 50
1268
+ * Weight(UID): 50
1269
+ *
1270
+ * Security Type: USER_DATA
1126
1271
  *
1127
- * @summary Query Margin Available Inventory(USER_DATA)
1272
+ * @summary Query Margin Available Inventory (USER_DATA)
1128
1273
  * @param {QueryMarginAvailableInventoryRequest} requestParameters Request parameters.
1129
1274
  * @returns {Promise<RestApiResponse<QueryMarginAvailableInventoryResponse>>}
1130
1275
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1131
1276
  * @memberof MarketDataApi
1132
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-margin-avaliable-inventory Binance API Documentation}
1277
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory Binance API Documentation}
1133
1278
  */
1134
1279
  async queryMarginAvailableInventory(requestParameters) {
1135
1280
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAvailableInventory(requestParameters?.type);
@@ -1138,152 +1283,34 @@ var MarketDataApi = class {
1138
1283
  /**
1139
1284
  * Query Margin PriceIndex
1140
1285
  *
1141
- * Weight: 10(IP)
1286
+ * Weight(IP): 10
1287
+ *
1288
+ * Security Type: MARKET_DATA
1142
1289
  *
1143
1290
  * @summary Query Margin PriceIndex (MARKET_DATA)
1144
1291
  * @param {QueryMarginPriceindexRequest} requestParameters Request parameters.
1145
1292
  * @returns {Promise<RestApiResponse<QueryMarginPriceindexResponse>>}
1146
1293
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1147
1294
  * @memberof MarketDataApi
1148
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Margin-PriceIndex Binance API Documentation}
1295
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex Binance API Documentation}
1149
1296
  */
1150
1297
  async queryMarginPriceindex(requestParameters) {
1151
1298
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginPriceindex(requestParameters?.symbol);
1152
1299
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1153
1300
  }
1154
1301
  };
1155
-
1156
- //#endregion
1157
- //#region src/rest-api/modules/risk-data-stream-api.ts
1158
- /**
1159
- * Binance Margin Trading REST API
1160
- *
1161
- * OpenAPI Specification for the Binance Margin Trading REST API
1162
- *
1163
- * The version of the OpenAPI document: 1.0.0
1164
- *
1165
- *
1166
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1167
- * https://openapi-generator.tech
1168
- * Do not edit the class manually.
1169
- */
1170
- /**
1171
- * RiskDataStreamApi - axios parameter creator
1172
- */
1173
- const RiskDataStreamApiAxiosParamCreator = function(configuration) {
1174
- return {
1175
- closeUserDataStream: async () => {
1176
- const localVarQueryParameter = {};
1177
- const localVarBodyParameter = {};
1178
- const localVarHeaderParameter = {};
1179
- let _timeUnit;
1180
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1181
- return {
1182
- endpoint: "/sapi/v1/margin/listen-key",
1183
- method: "DELETE",
1184
- queryParams: localVarQueryParameter,
1185
- bodyParams: localVarBodyParameter,
1186
- headerParams: localVarHeaderParameter,
1187
- timeUnit: _timeUnit
1188
- };
1189
- },
1190
- keepaliveUserDataStream: async (listenKey) => {
1191
- (0, __binance_common.assertParamExists)("keepaliveUserDataStream", "listenKey", listenKey);
1192
- const localVarQueryParameter = {};
1193
- const localVarBodyParameter = {};
1194
- const localVarHeaderParameter = {};
1195
- if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
1196
- let _timeUnit;
1197
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1198
- return {
1199
- endpoint: "/sapi/v1/margin/listen-key",
1200
- method: "PUT",
1201
- queryParams: localVarQueryParameter,
1202
- bodyParams: localVarBodyParameter,
1203
- headerParams: localVarHeaderParameter,
1204
- timeUnit: _timeUnit
1205
- };
1206
- },
1207
- startUserDataStream: async () => {
1208
- const localVarQueryParameter = {};
1209
- const localVarBodyParameter = {};
1210
- const localVarHeaderParameter = {};
1211
- let _timeUnit;
1212
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1213
- return {
1214
- endpoint: "/sapi/v1/margin/listen-key",
1215
- method: "POST",
1216
- queryParams: localVarQueryParameter,
1217
- bodyParams: localVarBodyParameter,
1218
- headerParams: localVarHeaderParameter,
1219
- timeUnit: _timeUnit
1220
- };
1221
- }
1222
- };
1223
- };
1224
- /**
1225
- * RiskDataStreamApi - object-oriented interface
1226
- * @class RiskDataStreamApi
1227
- */
1228
- var RiskDataStreamApi = class {
1229
- constructor(configuration) {
1230
- this.configuration = configuration;
1231
- this.localVarAxiosParamCreator = RiskDataStreamApiAxiosParamCreator(configuration);
1232
- }
1233
- /**
1234
- * Close out a user data stream.
1235
- *
1236
- * Weight: 3000
1237
- *
1238
- * @summary Close User Data Stream (USER_STREAM)
1239
- * @returns {Promise<RestApiResponse<void>>}
1240
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1241
- * @memberof RiskDataStreamApi
1242
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Close-User-Data-Stream Binance API Documentation}
1243
- */
1244
- async closeUserDataStream() {
1245
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
1246
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1247
- }
1248
- /**
1249
- * Keepalive a user data stream to prevent a time out.
1250
- *
1251
- * Weight: 1
1252
- *
1253
- * @summary Keepalive User Data Stream (USER_STREAM)
1254
- * @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
1255
- * @returns {Promise<RestApiResponse<void>>}
1256
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1257
- * @memberof RiskDataStreamApi
1258
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Keepalive-User-Data-Stream Binance API Documentation}
1259
- */
1260
- async keepaliveUserDataStream(requestParameters) {
1261
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
1262
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1263
- }
1264
- /**
1265
- * Start a new user data stream.
1266
- *
1267
- * Weight: 1
1268
- *
1269
- * @summary Start User Data Stream (USER_STREAM)
1270
- * @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
1271
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1272
- * @memberof RiskDataStreamApi
1273
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Start-User-Data-Stream Binance API Documentation}
1274
- */
1275
- async startUserDataStream() {
1276
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
1277
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
1278
- }
1279
- };
1302
+ let QueryMarginAvailableInventoryTypeEnum = /* @__PURE__ */ function(QueryMarginAvailableInventoryTypeEnum$1) {
1303
+ QueryMarginAvailableInventoryTypeEnum$1["MARGIN"] = "MARGIN";
1304
+ QueryMarginAvailableInventoryTypeEnum$1["ISOLATED"] = "ISOLATED";
1305
+ return QueryMarginAvailableInventoryTypeEnum$1;
1306
+ }({});
1280
1307
 
1281
1308
  //#endregion
1282
1309
  //#region src/rest-api/modules/trade-api.ts
1283
1310
  /**
1284
- * Binance Margin Trading REST API
1311
+ * Margin REST API
1285
1312
  *
1286
- * OpenAPI Specification for the Binance Margin Trading REST API
1313
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
1287
1314
  *
1288
1315
  * The version of the OpenAPI document: 1.0.0
1289
1316
  *
@@ -1356,6 +1383,22 @@ const TradeApiAxiosParamCreator = function(configuration) {
1356
1383
  timeUnit: _timeUnit
1357
1384
  };
1358
1385
  },
1386
+ exitSpecialKeyMode: async (recvWindow) => {
1387
+ const localVarQueryParameter = {};
1388
+ const localVarBodyParameter = {};
1389
+ const localVarHeaderParameter = {};
1390
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1391
+ let _timeUnit;
1392
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1393
+ return {
1394
+ endpoint: "/sapi/v1/margin/exit-special-key-mode",
1395
+ method: "POST",
1396
+ queryParams: localVarQueryParameter,
1397
+ bodyParams: localVarBodyParameter,
1398
+ headerParams: localVarHeaderParameter,
1399
+ timeUnit: _timeUnit
1400
+ };
1401
+ },
1359
1402
  getForceLiquidationRecord: async (startTime, endTime, isolatedSymbol, current, size, recvWindow) => {
1360
1403
  const localVarQueryParameter = {};
1361
1404
  const localVarBodyParameter = {};
@@ -1415,6 +1458,26 @@ const TradeApiAxiosParamCreator = function(configuration) {
1415
1458
  timeUnit: _timeUnit
1416
1459
  };
1417
1460
  },
1461
+ liquidationLoanRepay: async (asset, amount, recvWindow) => {
1462
+ (0, __binance_common.assertParamExists)("liquidationLoanRepay", "asset", asset);
1463
+ (0, __binance_common.assertParamExists)("liquidationLoanRepay", "amount", amount);
1464
+ const localVarQueryParameter = {};
1465
+ const localVarBodyParameter = {};
1466
+ const localVarHeaderParameter = {};
1467
+ if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
1468
+ if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
1469
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1470
+ let _timeUnit;
1471
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1472
+ return {
1473
+ endpoint: "/sapi/v1/margin/liquidation-loan/repay",
1474
+ method: "POST",
1475
+ queryParams: localVarQueryParameter,
1476
+ bodyParams: localVarBodyParameter,
1477
+ headerParams: localVarHeaderParameter,
1478
+ timeUnit: _timeUnit
1479
+ };
1480
+ },
1418
1481
  marginAccountCancelAllOpenOrdersOnASymbol: async (symbol, isIsolated, recvWindow) => {
1419
1482
  (0, __binance_common.assertParamExists)("marginAccountCancelAllOpenOrdersOnASymbol", "symbol", symbol);
1420
1483
  const localVarQueryParameter = {};
@@ -1516,7 +1579,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
1516
1579
  timeUnit: _timeUnit
1517
1580
  };
1518
1581
  },
1519
- marginAccountNewOrder: async (symbol, side, type, isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, autoRepayAtCancel, recvWindow) => {
1582
+ marginAccountNewOrder: async (symbol, side, type, isIsolated, quantity, quoteOrderQty, price, stopPrice, newClientOrderId, icebergQty, newOrderRespType, sideEffectType, timeInForce, selfTradePreventionMode, trailingDelta, autoRepayAtCancel, recvWindow) => {
1520
1583
  (0, __binance_common.assertParamExists)("marginAccountNewOrder", "symbol", symbol);
1521
1584
  (0, __binance_common.assertParamExists)("marginAccountNewOrder", "side", side);
1522
1585
  (0, __binance_common.assertParamExists)("marginAccountNewOrder", "type", type);
@@ -1537,6 +1600,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
1537
1600
  if (sideEffectType !== void 0 && sideEffectType !== null) localVarQueryParameter["sideEffectType"] = sideEffectType;
1538
1601
  if (timeInForce !== void 0 && timeInForce !== null) localVarQueryParameter["timeInForce"] = timeInForce;
1539
1602
  if (selfTradePreventionMode !== void 0 && selfTradePreventionMode !== null) localVarQueryParameter["selfTradePreventionMode"] = selfTradePreventionMode;
1603
+ if (trailingDelta !== void 0 && trailingDelta !== null) localVarQueryParameter["trailingDelta"] = trailingDelta;
1540
1604
  if (autoRepayAtCancel !== void 0 && autoRepayAtCancel !== null) localVarQueryParameter["autoRepayAtCancel"] = autoRepayAtCancel;
1541
1605
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1542
1606
  let _timeUnit;
@@ -1687,6 +1751,42 @@ const TradeApiAxiosParamCreator = function(configuration) {
1687
1751
  timeUnit: _timeUnit
1688
1752
  };
1689
1753
  },
1754
+ queryLiquidationLoan: async (recvWindow) => {
1755
+ const localVarQueryParameter = {};
1756
+ const localVarBodyParameter = {};
1757
+ const localVarHeaderParameter = {};
1758
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1759
+ let _timeUnit;
1760
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1761
+ return {
1762
+ endpoint: "/sapi/v1/margin/liquidation-loan",
1763
+ method: "GET",
1764
+ queryParams: localVarQueryParameter,
1765
+ bodyParams: localVarBodyParameter,
1766
+ headerParams: localVarHeaderParameter,
1767
+ timeUnit: _timeUnit
1768
+ };
1769
+ },
1770
+ queryLiquidationLoanRepayHistory: async (startTime, endTime, current, size, recvWindow) => {
1771
+ const localVarQueryParameter = {};
1772
+ const localVarBodyParameter = {};
1773
+ const localVarHeaderParameter = {};
1774
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
1775
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
1776
+ if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
1777
+ if (size !== void 0 && size !== null) localVarQueryParameter["size"] = size;
1778
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1779
+ let _timeUnit;
1780
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1781
+ return {
1782
+ endpoint: "/sapi/v1/margin/liquidation-loan/repay-history",
1783
+ method: "GET",
1784
+ queryParams: localVarQueryParameter,
1785
+ bodyParams: localVarBodyParameter,
1786
+ headerParams: localVarHeaderParameter,
1787
+ timeUnit: _timeUnit
1788
+ };
1789
+ },
1690
1790
  queryMarginAccountsAllOco: async (isIsolated, symbol, fromId, startTime, endTime, limit, recvWindow) => {
1691
1791
  const localVarQueryParameter = {};
1692
1792
  const localVarBodyParameter = {};
@@ -1833,7 +1933,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
1833
1933
  timeUnit: _timeUnit
1834
1934
  };
1835
1935
  },
1836
- queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId, recvWindow, isIsolated) => {
1936
+ queryPreventedMatches: async (symbol, preventedMatchId, orderId, fromPreventedMatchId, isIsolated, recvWindow) => {
1837
1937
  (0, __binance_common.assertParamExists)("queryPreventedMatches", "symbol", symbol);
1838
1938
  const localVarQueryParameter = {};
1839
1939
  const localVarBodyParameter = {};
@@ -1842,8 +1942,8 @@ const TradeApiAxiosParamCreator = function(configuration) {
1842
1942
  if (preventedMatchId !== void 0 && preventedMatchId !== null) localVarQueryParameter["preventedMatchId"] = preventedMatchId;
1843
1943
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
1844
1944
  if (fromPreventedMatchId !== void 0 && fromPreventedMatchId !== null) localVarQueryParameter["fromPreventedMatchId"] = fromPreventedMatchId;
1845
- if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1846
1945
  if (isIsolated !== void 0 && isIsolated !== null) localVarQueryParameter["isIsolated"] = isIsolated;
1946
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1847
1947
  let _timeUnit;
1848
1948
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1849
1949
  return {
@@ -1894,7 +1994,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
1894
1994
  const localVarQueryParameter = {};
1895
1995
  const localVarBodyParameter = {};
1896
1996
  const localVarHeaderParameter = {};
1897
- if (assetNames) localVarQueryParameter["assetNames"] = assetNames;
1997
+ if (assetNames !== void 0 && assetNames !== null) localVarQueryParameter["assetNames"] = assetNames;
1898
1998
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1899
1999
  let _timeUnit;
1900
2000
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -1919,8 +2019,14 @@ var TradeApi = class {
1919
2019
  this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
1920
2020
  }
1921
2021
  /**
2022
+ * **Eligibility**
2023
+ *
1922
2024
  * - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher.
1923
2025
  * - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias.
2026
+ * - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key.
2027
+ * - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy.
2028
+ *
2029
+ * For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
1924
2030
  *
1925
2031
  **Supported Products:**
1926
2032
  *
@@ -1940,86 +2046,166 @@ var TradeApi = class {
1940
2046
  *
1941
2047
  * We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) .
1942
2048
  *
1943
- * Weight: 1(UID)
2049
+ **How to use the Margin Special Key**
2050
+ * - Use the below `sapi` endpoint to create your margin special API Key.
2051
+ * - For accessing the Cross Margin account, do not send the `symbol` parameter.
2052
+ * - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request.
2053
+ * - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/*`) endpoints.
2054
+ *
2055
+ * Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys
2056
+ *
2057
+ * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
2058
+ *
2059
+ * Weight(UID): 1
2060
+ *
2061
+ * Security Type: TRADE
2062
+ *
2063
+ * Response Notes:
2064
+ * - Error Code Description
2065
+ *
2066
+ * - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported
2067
+ * product, please change the account type to a supported margin product.
1944
2068
  *
1945
- * @summary Create Special Key(Low-Latency Trading)(TRADE)
2069
+ * - **Forbidden**: Cross Margin Pro accounts require additional
2070
+ * agreements, please contact your relationship manager.
2071
+ *
2072
+ * @summary Create Special Key(Low-Latency Trading) (TRADE)
1946
2073
  * @param {CreateSpecialKeyRequest} requestParameters Request parameters.
1947
2074
  * @returns {Promise<RestApiResponse<CreateSpecialKeyResponse>>}
1948
2075
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1949
2076
  * @memberof TradeApi
1950
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Create-Special-Key-of-Low-Latency-Trading Binance API Documentation}
2077
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key Binance API Documentation}
1951
2078
  */
1952
2079
  async createSpecialKey(requestParameters) {
1953
2080
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.createSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.ip, requestParameters?.publicKey, requestParameters?.permissionMode, requestParameters?.recvWindow);
1954
2081
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1955
2082
  }
1956
2083
  /**
1957
- * This only applies to Special Key for Low Latency Trading.
2084
+ * Deleting your Margin Special Key alone does not exit you from the Margin Special Key framework or discharge your obligations under the Margin Special Key Supplemental Product Terms. To fully exit, you must:
1958
2085
  *
1959
- * If apiKey is given, apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be deleted.
2086
+ * 1. Delete your Margin Special Key.
2087
+ * 2. Ensure there are no outstanding liabilities on the account.
2088
+ * 3. Call the Exit Margin Special Key API endpoint.
2089
+ * 4. Confirm the exit status via the API response.
1960
2090
  *
1961
- * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
2091
+ * Only after step 4 is completed and the exit status is confirmed by Binance will your account revert to standard liquidation logic and no longer be subject to the Margin Special Key Supplemental Product Terms.
2092
+ *
2093
+ * If apiKey is given, apiName will be ignored. If apiName is given with no
2094
+ * apiKey, all apikeys with given apiName will be deleted.
1962
2095
  *
1963
- * Weight: 1(UID)
2096
+ * You need to enable Permits “Enable Spot & Margin” option for the API Key
2097
+ * which requests this endpoint.
1964
2098
  *
1965
- * @summary Delete Special Key(Low-Latency Trading)(TRADE)
2099
+ * Weight(UID): 1
2100
+ *
2101
+ * Security Type: TRADE
2102
+ *
2103
+ * @summary Delete Special Key(Low-Latency Trading) (TRADE)
1966
2104
  * @param {DeleteSpecialKeyRequest} requestParameters Request parameters.
1967
2105
  * @returns {Promise<RestApiResponse<void>>}
1968
2106
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1969
2107
  * @memberof TradeApi
1970
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Delete-Special-Key-of-Low-Latency-Trading Binance API Documentation}
2108
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key Binance API Documentation}
1971
2109
  */
1972
2110
  async deleteSpecialKey(requestParameters = {}) {
1973
2111
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.deleteSpecialKey(requestParameters?.apiName, requestParameters?.symbol, requestParameters?.recvWindow);
1974
2112
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1975
2113
  }
1976
2114
  /**
1977
- * Edit ip restriction. This only applies to Special Key for Low Latency Trading.
2115
+ * Edit ip restriction. This only applies to Special Key for Low Latency
2116
+ * Trading.
1978
2117
  *
1979
- * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
2118
+ * You need to enable Permits “Enable Spot & Margin” option for the API Key
2119
+ * which requests this endpoint.
2120
+ *
2121
+ * Weight(UID): 1
1980
2122
  *
1981
- * Weight: 1(UID)
2123
+ * Security Type: TRADE
1982
2124
  *
1983
- * @summary Edit ip for Special Key(Low-Latency Trading)(TRADE)
2125
+ * @summary Edit ip for Special Key(Low-Latency Trading) (TRADE)
1984
2126
  * @param {EditIpForSpecialKeyRequest} requestParameters Request parameters.
1985
2127
  * @returns {Promise<RestApiResponse<void>>}
1986
2128
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1987
2129
  * @memberof TradeApi
1988
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Edit-ip-for-Special-Key-of-Low-Latency-Trading Binance API Documentation}
2130
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key Binance API Documentation}
1989
2131
  */
1990
2132
  async editIpForSpecialKey(requestParameters) {
1991
2133
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.editIpForSpecialKey(requestParameters?.ip, requestParameters?.symbol, requestParameters?.recvWindow);
1992
2134
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1993
2135
  }
1994
2136
  /**
1995
- * Get Force Liquidation Record
2137
+ * Exit the Margin Special Key mode for Cross Margin Classic accounts.
1996
2138
  *
1997
- * Response in descending order
2139
+ **All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit.
1998
2140
  *
1999
- * Weight: 1(IP)
2141
+ * When a user creates a Margin Special API Key, the account enters "Special Key Mode". Upon a successful request, the following actions will be performed atomically:
2000
2142
  *
2001
- * @summary Get Force Liquidation Record (USER_DATA)
2002
- * @param {GetForceLiquidationRecordRequest} requestParameters Request parameters.
2003
- * @returns {Promise<RestApiResponse<GetForceLiquidationRecordResponse>>}
2004
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2005
- * @memberof TradeApi
2006
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record Binance API Documentation}
2007
- */
2008
- async getForceLiquidationRecord(requestParameters = {}) {
2143
+ * 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted.
2144
+ * 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode.
2145
+ * 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys.
2146
+ *
2147
+ * For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
2148
+ *
2149
+ **Preconditions:**
2150
+ *
2151
+ * The following conditions must be met; otherwise the request will be rejected:
2152
+ *
2153
+ * - Account type must be **Cross Margin Classic**.
2154
+ * - Account must currently be in **Special Key Mode**. If not, the request silently succeeds.
2155
+ * - Account must **not be in liquidation**.
2156
+ * - Account must **have no liability**.
2157
+ *
2158
+ * You need to enable "Permits Enable Spot & Margin Trading" option for the API Key which requests this endpoint.
2159
+ *
2160
+ * Weight(UID): 10
2161
+ *
2162
+ * Security Type: TRADE
2163
+ *
2164
+ * @summary Exit Special Key Mode (TRADE)
2165
+ * @param {ExitSpecialKeyModeRequest} requestParameters Request parameters.
2166
+ * @returns {Promise<RestApiResponse<object>>}
2167
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2168
+ * @memberof TradeApi
2169
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode Binance API Documentation}
2170
+ */
2171
+ async exitSpecialKeyMode(requestParameters = {}) {
2172
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.exitSpecialKeyMode(requestParameters?.recvWindow);
2173
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2174
+ }
2175
+ /**
2176
+ * Get Force Liquidation Record
2177
+ *
2178
+ * Weight(IP): 1
2179
+ *
2180
+ * Security Type: USER_DATA
2181
+ *
2182
+ * Notes:
2183
+ * - Response in descending order
2184
+ *
2185
+ * @summary Get Force Liquidation Record (USER_DATA)
2186
+ * @param {GetForceLiquidationRecordRequest} requestParameters Request parameters.
2187
+ * @returns {Promise<RestApiResponse<GetForceLiquidationRecordResponse>>}
2188
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2189
+ * @memberof TradeApi
2190
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record Binance API Documentation}
2191
+ */
2192
+ async getForceLiquidationRecord(requestParameters = {}) {
2009
2193
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getForceLiquidationRecord(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.isolatedSymbol, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
2010
2194
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2011
2195
  }
2012
2196
  /**
2013
2197
  * Query the coins which can be small liability exchange
2014
2198
  *
2015
- * Weight: 100
2199
+ * Weight(IP): 100
2200
+ *
2201
+ * Security Type: USER_DATA
2016
2202
  *
2017
2203
  * @summary Get Small Liability Exchange Coin List (USER_DATA)
2018
2204
  * @param {GetSmallLiabilityExchangeCoinListRequest} requestParameters Request parameters.
2019
2205
  * @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeCoinListResponse>>}
2020
2206
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2021
2207
  * @memberof TradeApi
2022
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-Coin-List Binance API Documentation}
2208
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list Binance API Documentation}
2023
2209
  */
2024
2210
  async getSmallLiabilityExchangeCoinList(requestParameters = {}) {
2025
2211
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeCoinList(requestParameters?.recvWindow);
@@ -2028,31 +2214,53 @@ var TradeApi = class {
2028
2214
  /**
2029
2215
  * Get Small liability Exchange History
2030
2216
  *
2031
- * Weight: 100(UID)
2217
+ * Weight(UID): 100
2218
+ *
2219
+ * Security Type: USER_DATA
2032
2220
  *
2033
2221
  * @summary Get Small Liability Exchange History (USER_DATA)
2034
2222
  * @param {GetSmallLiabilityExchangeHistoryRequest} requestParameters Request parameters.
2035
2223
  * @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeHistoryResponse>>}
2036
2224
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2037
2225
  * @memberof TradeApi
2038
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-History Binance API Documentation}
2226
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history Binance API Documentation}
2039
2227
  */
2040
2228
  async getSmallLiabilityExchangeHistory(requestParameters) {
2041
2229
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSmallLiabilityExchangeHistory(requestParameters?.current, requestParameters?.size, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
2042
2230
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2043
2231
  }
2044
2232
  /**
2233
+ * Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A liquidation loan represents the account deficit incurred when account equity turns negative during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the repayment will fail.
2234
+ *
2235
+ * Weight(UID): 100
2236
+ *
2237
+ * Security Type: MARGIN
2238
+ *
2239
+ * @summary Liquidation Loan Repay (MARGIN)
2240
+ * @param {LiquidationLoanRepayRequest} requestParameters Request parameters.
2241
+ * @returns {Promise<RestApiResponse<LiquidationLoanRepayResponse>>}
2242
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2243
+ * @memberof TradeApi
2244
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#liquidation-loan-repay Binance API Documentation}
2245
+ */
2246
+ async liquidationLoanRepay(requestParameters) {
2247
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.liquidationLoanRepay(requestParameters?.asset, requestParameters?.amount, requestParameters?.recvWindow);
2248
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2249
+ }
2250
+ /**
2045
2251
  * Cancels all active orders on a symbol for margin account.<br></br>
2046
2252
  * This includes OCO orders.
2047
2253
  *
2048
- * Weight: 1
2254
+ * Weight(IP): 1
2255
+ *
2256
+ * Security Type: TRADE
2049
2257
  *
2050
2258
  * @summary Margin Account Cancel all Open Orders on a Symbol (TRADE)
2051
2259
  * @param {MarginAccountCancelAllOpenOrdersOnASymbolRequest} requestParameters Request parameters.
2052
2260
  * @returns {Promise<RestApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse>>}
2053
2261
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2054
2262
  * @memberof TradeApi
2055
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders Binance API Documentation}
2263
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol Binance API Documentation}
2056
2264
  */
2057
2265
  async marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
2058
2266
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
@@ -2061,16 +2269,19 @@ var TradeApi = class {
2061
2269
  /**
2062
2270
  * Cancel an entire Order List for a margin account.
2063
2271
  *
2064
- * Canceling an individual leg will cancel the entire OCO
2272
+ * Weight(UID): 1
2065
2273
  *
2066
- * Weight: 1(UID)
2274
+ * Security Type: TRADE
2275
+ *
2276
+ * Notes:
2277
+ * - Canceling an individual leg will cancel the entire OCO
2067
2278
  *
2068
2279
  * @summary Margin Account Cancel OCO (TRADE)
2069
2280
  * @param {MarginAccountCancelOcoRequest} requestParameters Request parameters.
2070
2281
  * @returns {Promise<RestApiResponse<MarginAccountCancelOcoResponse>>}
2071
2282
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2072
2283
  * @memberof TradeApi
2073
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-OCO Binance API Documentation}
2284
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco Binance API Documentation}
2074
2285
  */
2075
2286
  async marginAccountCancelOco(requestParameters) {
2076
2287
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOco(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderListId, requestParameters?.listClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
@@ -2079,16 +2290,19 @@ var TradeApi = class {
2079
2290
  /**
2080
2291
  * Cancel an active order for margin account.
2081
2292
  *
2082
- * Either orderId or origClientOrderId must be sent.
2293
+ * Weight(IP): 10
2294
+ *
2295
+ * Security Type: TRADE
2083
2296
  *
2084
- * Weight: 10(IP)
2297
+ * Notes:
2298
+ * - Either orderId or origClientOrderId must be sent.
2085
2299
  *
2086
2300
  * @summary Margin Account Cancel Order (TRADE)
2087
2301
  * @param {MarginAccountCancelOrderRequest} requestParameters Request parameters.
2088
2302
  * @returns {Promise<RestApiResponse<MarginAccountCancelOrderResponse>>}
2089
2303
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2090
2304
  * @memberof TradeApi
2091
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order Binance API Documentation}
2305
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order Binance API Documentation}
2092
2306
  */
2093
2307
  async marginAccountCancelOrder(requestParameters) {
2094
2308
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountCancelOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.newClientOrderId, requestParameters?.recvWindow);
@@ -2097,16 +2311,19 @@ var TradeApi = class {
2097
2311
  /**
2098
2312
  * Send in a new OCO for a margin account
2099
2313
  *
2100
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2314
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
2101
2315
  *
2102
- * Weight: 6(UID)
2316
+ * Security Type: TRADE
2317
+ *
2318
+ * Notes:
2319
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2103
2320
  *
2104
2321
  * @summary Margin Account New OCO (TRADE)
2105
2322
  * @param {MarginAccountNewOcoRequest} requestParameters Request parameters.
2106
2323
  * @returns {Promise<RestApiResponse<MarginAccountNewOcoResponse>>}
2107
2324
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2108
2325
  * @memberof TradeApi
2109
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO Binance API Documentation}
2326
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco Binance API Documentation}
2110
2327
  */
2111
2328
  async marginAccountNewOco(requestParameters) {
2112
2329
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOco(requestParameters?.symbol, requestParameters?.side, requestParameters?.quantity, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.limitClientOrderId, requestParameters?.limitIcebergQty, requestParameters?.stopClientOrderId, requestParameters?.stopLimitPrice, requestParameters?.stopIcebergQty, requestParameters?.stopLimitTimeInForce, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
@@ -2115,42 +2332,66 @@ var TradeApi = class {
2115
2332
  /**
2116
2333
  * Post a new order for margin account.
2117
2334
  *
2118
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2335
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
2336
+ *
2337
+ * Security Type: TRADE
2119
2338
  *
2120
- * Weight: 6(UID)
2339
+ * Notes:
2340
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2121
2341
  *
2122
2342
  * @summary Margin Account New Order (TRADE)
2123
2343
  * @param {MarginAccountNewOrderRequest} requestParameters Request parameters.
2124
2344
  * @returns {Promise<RestApiResponse<MarginAccountNewOrderResponse>>}
2125
2345
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2126
2346
  * @memberof TradeApi
2127
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order Binance API Documentation}
2347
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order Binance API Documentation}
2128
2348
  */
2129
2349
  async marginAccountNewOrder(requestParameters) {
2130
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.isIsolated, requestParameters?.quantity, requestParameters?.quoteOrderQty, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.newClientOrderId, requestParameters?.icebergQty, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.timeInForce, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
2350
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.isIsolated, requestParameters?.quantity, requestParameters?.quoteOrderQty, requestParameters?.price, requestParameters?.stopPrice, requestParameters?.newClientOrderId, requestParameters?.icebergQty, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.timeInForce, requestParameters?.selfTradePreventionMode, requestParameters?.trailingDelta, requestParameters?.autoRepayAtCancel, requestParameters?.recvWindow);
2131
2351
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2132
2352
  }
2133
2353
  /**
2134
2354
  * Post a new OTO order for margin account:
2135
2355
  *
2136
- * - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders.
2137
- * - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book.
2138
- * - The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**.
2139
- * - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired.
2140
- * - When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status.
2141
- * - OTOs add **2 orders** to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
2356
+ * - An OTO (One-Triggers-the-Other) is an order list comprised of 2
2357
+ * orders.
2358
+ *
2359
+ * - The first order is called the **working order** and must be `LIMIT` or
2360
+ * `LIMIT_MAKER`. Initially, only the working order goes on the order book.
2361
+ *
2362
+ * - The second order is called the **pending order**. It can be any order
2363
+ * type except for `MARKET` orders using parameter `quoteOrderQty`. The
2364
+ * pending order is only placed on the order book when the working order
2365
+ * gets **fully filled**.
2366
+ *
2367
+ * - If either the working order or the pending order is cancelled
2368
+ * individually, the other order in the order list will also be canceled or
2369
+ * expired.
2142
2370
  *
2143
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2144
- * Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory:
2371
+ * - When the order list is placed, if the working order gets **immediately
2372
+ * fully filled**, the placement response will show the working order as
2373
+ * `FILLED` but the pending order will still appear as `PENDING_NEW`. You
2374
+ * need to query the status of the pending order again to see its updated
2375
+ * status.
2145
2376
  *
2146
- * Weight: 6(UID)
2377
+ * - OTOs add **2 orders** to the unfilled order count,
2378
+ * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
2379
+ *
2380
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
2381
+ *
2382
+ * Security Type: TRADE
2383
+ *
2384
+ * Notes:
2385
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2386
+ * - Depending on the `pendingType` or `workingType`, some optional
2387
+ * - parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | -------------------------------------------------------- | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingType` = `LIMIT` | `pendingPrice`, `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or `TAKE_PROFIT` | `pendingStopPrice` and/or `pendingTrailingDelta` | | | `pendingType` = `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | `pendingPrice` | |
2147
2388
  *
2148
2389
  * @summary Margin Account New OTO (TRADE)
2149
2390
  * @param {MarginAccountNewOtoRequest} requestParameters Request parameters.
2150
2391
  * @returns {Promise<RestApiResponse<MarginAccountNewOtoResponse>>}
2151
2392
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2152
2393
  * @memberof TradeApi
2153
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTO Binance API Documentation}
2394
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto Binance API Documentation}
2154
2395
  */
2155
2396
  async marginAccountNewOto(requestParameters) {
2156
2397
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOto(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.workingIcebergQty, requestParameters?.pendingType, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.isIsolated, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.sideEffectType, requestParameters?.selfTradePreventionMode, requestParameters?.autoRepayAtCancel, requestParameters?.workingClientOrderId, requestParameters?.workingTimeInForce, requestParameters?.pendingClientOrderId, requestParameters?.pendingPrice, requestParameters?.pendingStopPrice, requestParameters?.pendingTrailingDelta, requestParameters?.pendingIcebergQty, requestParameters?.pendingTimeInForce);
@@ -2159,24 +2400,34 @@ var TradeApi = class {
2159
2400
  /**
2160
2401
  * Post a new OTOCO order for margin account:
2161
2402
  *
2162
- * - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders.
2163
- * - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book.
2403
+ *
2404
+ * - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list
2405
+ * comprised of 3 orders.
2406
+ *
2407
+ * - The first order is called the **working order** and must be `LIMIT` or
2408
+ * `LIMIT_MAKER`. Initially, only the working order goes on the order book.
2164
2409
  * - The behavior of the working order is the same as the OTO.
2165
- * - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**.
2166
- * - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO).
2167
- * - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
2410
+ * - OTOCO has 2 pending orders (pending above and pending below), forming
2411
+ * an OCO pair. The pending orders are only placed on the order book when
2412
+ * the working order gets **fully filled**.
2413
+ * - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco).
2414
+ * - OTOCOs add **3 orders** against the unfilled order count,
2415
+ * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
2416
+ *
2417
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
2168
2418
  *
2169
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2170
- * Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory:
2419
+ * Security Type: TRADE
2171
2420
  *
2172
- * Weight: 6(UID)
2421
+ * Notes:
2422
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
2423
+ * - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | |
2173
2424
  *
2174
2425
  * @summary Margin Account New OTOCO (TRADE)
2175
2426
  * @param {MarginAccountNewOtocoRequest} requestParameters Request parameters.
2176
2427
  * @returns {Promise<RestApiResponse<MarginAccountNewOtocoResponse>>}
2177
2428
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2178
2429
  * @memberof TradeApi
2179
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTOCO Binance API Documentation}
2430
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco Binance API Documentation}
2180
2431
  */
2181
2432
  async marginAccountNewOtoco(requestParameters) {
2182
2433
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginAccountNewOtoco(requestParameters?.symbol, requestParameters?.workingType, requestParameters?.workingSide, requestParameters?.workingPrice, requestParameters?.workingQuantity, requestParameters?.pendingSide, requestParameters?.pendingQuantity, requestParameters?.pendingAboveType, requestParameters?.isIsolated, requestParameters?.sideEffectType, requestParameters?.autoRepayAtCancel, requestParameters?.listClientOrderId, requestParameters?.newOrderRespType, requestParameters?.selfTradePreventionMode, requestParameters?.workingClientOrderId, requestParameters?.workingIcebergQty, requestParameters?.workingTimeInForce, requestParameters?.pendingAboveClientOrderId, requestParameters?.pendingAbovePrice, requestParameters?.pendingAboveStopPrice, requestParameters?.pendingAboveTrailingDelta, requestParameters?.pendingAboveIcebergQty, requestParameters?.pendingAboveTimeInForce, requestParameters?.pendingBelowType, requestParameters?.pendingBelowClientOrderId, requestParameters?.pendingBelowPrice, requestParameters?.pendingBelowStopPrice, requestParameters?.pendingBelowTrailingDelta, requestParameters?.pendingBelowIcebergQty, requestParameters?.pendingBelowTimeInForce);
@@ -2185,17 +2436,20 @@ var TradeApi = class {
2185
2436
  /**
2186
2437
  * Margin Manual Liquidation
2187
2438
  *
2188
- * This endpoint can support Cross Margin Classic Mode and Pro Mode.
2189
- * And only support Isolated Margin for restricted region.
2439
+ * Weight(UID): 3000
2190
2440
  *
2191
- * Weight: 3000
2441
+ * Security Type: TRADE
2192
2442
  *
2193
- * @summary Margin Manual Liquidation(MARGIN)
2443
+ * Notes:
2444
+ * - This endpoint supports Cross Margin Classic Mode and Pro Mode.
2445
+ * - Isolated Margin is only supported in restricted regions.
2446
+ *
2447
+ * @summary Margin Manual Liquidation (TRADE)
2194
2448
  * @param {MarginManualLiquidationRequest} requestParameters Request parameters.
2195
2449
  * @returns {Promise<RestApiResponse<MarginManualLiquidationResponse>>}
2196
2450
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2197
2451
  * @memberof TradeApi
2198
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Manual-Liquidation Binance API Documentation}
2452
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation Binance API Documentation}
2199
2453
  */
2200
2454
  async marginManualLiquidation(requestParameters) {
2201
2455
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.marginManualLiquidation(requestParameters?.type, requestParameters?.symbol, requestParameters?.recvWindow);
@@ -2204,30 +2458,74 @@ var TradeApi = class {
2204
2458
  /**
2205
2459
  * Displays the user's current margin order count usage for all intervals.
2206
2460
  *
2207
- * Weight: 20(IP)
2461
+ * Weight(IP): 20
2462
+ *
2463
+ * Security Type: TRADE
2208
2464
  *
2209
2465
  * @summary Query Current Margin Order Count Usage (TRADE)
2210
2466
  * @param {QueryCurrentMarginOrderCountUsageRequest} requestParameters Request parameters.
2211
2467
  * @returns {Promise<RestApiResponse<QueryCurrentMarginOrderCountUsageResponse>>}
2212
2468
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2213
2469
  * @memberof TradeApi
2214
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Current-Margin-Order-Count-Usage Binance API Documentation}
2470
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage Binance API Documentation}
2215
2471
  */
2216
2472
  async queryCurrentMarginOrderCountUsage(requestParameters = {}) {
2217
2473
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentMarginOrderCountUsage(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
2218
2474
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2219
2475
  }
2220
2476
  /**
2477
+ * Query the current user's cross-margin liquidation loan information, including the original loan amount, repaid amount, and remaining amount. When a cross-margin account is liquidated and the account equity turns negative (bankruptcy), the system generates a liquidation loan record representing the deficit. This represents the shortfall amount denominated in USDC.
2478
+ *
2479
+ * Weight(UID): 100
2480
+ *
2481
+ * Security Type: USER_DATA
2482
+ *
2483
+ * @summary Query Liquidation Loan (USER_DATA)
2484
+ * @param {QueryLiquidationLoanRequest} requestParameters Request parameters.
2485
+ * @returns {Promise<RestApiResponse<QueryLiquidationLoanResponse>>}
2486
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2487
+ * @memberof TradeApi
2488
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan Binance API Documentation}
2489
+ */
2490
+ async queryLiquidationLoan(requestParameters = {}) {
2491
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiquidationLoan(requestParameters?.recvWindow);
2492
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2493
+ }
2494
+ /**
2495
+ * Query the repayment history of cross-margin liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range filtering and pagination.
2496
+ *
2497
+ * Weight(UID): 100
2498
+ *
2499
+ * Security Type: USER_DATA
2500
+ *
2501
+ * Notes:
2502
+ * - The maximum query range is 90 days. If `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago.
2503
+ * - Only records with status `SUCCESS` or `PENDING` are returned. Failed repayment records are excluded.
2504
+ *
2505
+ * @summary Query Liquidation Loan Repay History (USER_DATA)
2506
+ * @param {QueryLiquidationLoanRepayHistoryRequest} requestParameters Request parameters.
2507
+ * @returns {Promise<RestApiResponse<QueryLiquidationLoanRepayHistoryResponse>>}
2508
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2509
+ * @memberof TradeApi
2510
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan-repay-history Binance API Documentation}
2511
+ */
2512
+ async queryLiquidationLoanRepayHistory(requestParameters = {}) {
2513
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLiquidationLoanRepayHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.recvWindow);
2514
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2515
+ }
2516
+ /**
2221
2517
  * Retrieves all OCO for a specific margin account based on provided optional parameters
2222
2518
  *
2223
- * Weight: 200(IP)
2519
+ * Weight(IP): 200
2520
+ *
2521
+ * Security Type: USER_DATA
2224
2522
  *
2225
2523
  * @summary Query Margin Account\'s all OCO (USER_DATA)
2226
2524
  * @param {QueryMarginAccountsAllOcoRequest} requestParameters Request parameters.
2227
2525
  * @returns {Promise<RestApiResponse<QueryMarginAccountsAllOcoResponse>>}
2228
2526
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2229
2527
  * @memberof TradeApi
2230
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-all-OCO Binance API Documentation}
2528
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco Binance API Documentation}
2231
2529
  */
2232
2530
  async queryMarginAccountsAllOco(requestParameters = {}) {
2233
2531
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.fromId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
@@ -2236,18 +2534,25 @@ var TradeApi = class {
2236
2534
  /**
2237
2535
  * Query Margin Account's All Orders
2238
2536
  *
2239
- * If orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 hours are returned.
2240
- * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
2241
- * Less than 24 hours between startTime and endTime.
2537
+ * Weight(IP): 200
2538
+ *
2539
+ * Security Type: USER_DATA
2540
+ *
2541
+ * Notes:
2542
+ * - If orderId is set, it will get orders >= that orderId. Otherwise the
2543
+ * orders within 24 hours are returned.
2242
2544
  *
2243
- * Weight: 200(IP)
2545
+ * - For some historical orders cummulativeQuoteQty will be < 0, meaning
2546
+ * the data is not available at this time.
2547
+ *
2548
+ * - Less than 24 hours between startTime and endTime.
2244
2549
  *
2245
2550
  * @summary Query Margin Account\'s All Orders (USER_DATA)
2246
2551
  * @param {QueryMarginAccountsAllOrdersRequest} requestParameters Request parameters.
2247
2552
  * @returns {Promise<RestApiResponse<QueryMarginAccountsAllOrdersResponse>>}
2248
2553
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2249
2554
  * @memberof TradeApi
2250
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders Binance API Documentation}
2555
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders Binance API Documentation}
2251
2556
  */
2252
2557
  async queryMarginAccountsAllOrders(requestParameters) {
2253
2558
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsAllOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
@@ -2256,14 +2561,16 @@ var TradeApi = class {
2256
2561
  /**
2257
2562
  * Retrieves a specific OCO based on provided optional parameters
2258
2563
  *
2259
- * Weight: 10(IP)
2564
+ * Weight(IP): 10
2565
+ *
2566
+ * Security Type: USER_DATA
2260
2567
  *
2261
2568
  * @summary Query Margin Account\'s OCO (USER_DATA)
2262
2569
  * @param {QueryMarginAccountsOcoRequest} requestParameters Request parameters.
2263
2570
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOcoResponse>>}
2264
2571
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2265
2572
  * @memberof TradeApi
2266
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-OCO Binance API Documentation}
2573
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco Binance API Documentation}
2267
2574
  */
2268
2575
  async queryMarginAccountsOco(requestParameters = {}) {
2269
2576
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.orderListId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
@@ -2272,14 +2579,16 @@ var TradeApi = class {
2272
2579
  /**
2273
2580
  * Query Margin Account's Open OCO
2274
2581
  *
2275
- * Weight: 10(IP)
2582
+ * Weight(IP): 10
2583
+ *
2584
+ * Security Type: USER_DATA
2276
2585
  *
2277
2586
  * @summary Query Margin Account\'s Open OCO (USER_DATA)
2278
2587
  * @param {QueryMarginAccountsOpenOcoRequest} requestParameters Request parameters.
2279
2588
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOcoResponse>>}
2280
2589
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2281
2590
  * @memberof TradeApi
2282
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-OCO Binance API Documentation}
2591
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco Binance API Documentation}
2283
2592
  */
2284
2593
  async queryMarginAccountsOpenOco(requestParameters = {}) {
2285
2594
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOco(requestParameters?.isIsolated, requestParameters?.symbol, requestParameters?.recvWindow);
@@ -2288,18 +2597,26 @@ var TradeApi = class {
2288
2597
  /**
2289
2598
  * Query Margin Account's Open Orders
2290
2599
  *
2291
- * If the symbol is not sent, orders for all symbols will be returned in an array.
2292
- * When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange.
2293
- * If isIsolated ="TRUE", symbol must be sent.
2600
+ * Weight(IP): 10
2601
+ *
2602
+ * Security Type: USER_DATA
2294
2603
  *
2295
- * Weight: 10(IP)
2604
+ * Notes:
2605
+ * - If the symbol is not sent, orders for all symbols will be returned in
2606
+ * an array.
2607
+ *
2608
+ * - When all symbols are returned, the number of requests counted against
2609
+ * the rate limiter is equal to the number of symbols currently trading on
2610
+ * the exchange.
2611
+ *
2612
+ * - If isIsolated ="TRUE", symbol must be sent.
2296
2613
  *
2297
2614
  * @summary Query Margin Account\'s Open Orders (USER_DATA)
2298
2615
  * @param {QueryMarginAccountsOpenOrdersRequest} requestParameters Request parameters.
2299
2616
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOrdersResponse>>}
2300
2617
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2301
2618
  * @memberof TradeApi
2302
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders Binance API Documentation}
2619
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders Binance API Documentation}
2303
2620
  */
2304
2621
  async queryMarginAccountsOpenOrders(requestParameters = {}) {
2305
2622
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOpenOrders(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.recvWindow);
@@ -2308,17 +2625,22 @@ var TradeApi = class {
2308
2625
  /**
2309
2626
  * Query Margin Account's Order
2310
2627
  *
2311
- * Either orderId or origClientOrderId must be sent.
2312
- * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
2628
+ * Weight(IP): 10
2629
+ *
2630
+ * Security Type: USER_DATA
2631
+ *
2632
+ * Notes:
2633
+ * - Either orderId or origClientOrderId must be sent.
2313
2634
  *
2314
- * Weight: 10(IP)
2635
+ * - For some historical orders cummulativeQuoteQty will be < 0, meaning
2636
+ * the data is not available at this time.
2315
2637
  *
2316
2638
  * @summary Query Margin Account\'s Order (USER_DATA)
2317
2639
  * @param {QueryMarginAccountsOrderRequest} requestParameters Request parameters.
2318
2640
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOrderResponse>>}
2319
2641
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2320
2642
  * @memberof TradeApi
2321
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order Binance API Documentation}
2643
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order Binance API Documentation}
2322
2644
  */
2323
2645
  async queryMarginAccountsOrder(requestParameters) {
2324
2646
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsOrder(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.origClientOrderId, requestParameters?.recvWindow);
@@ -2327,35 +2649,62 @@ var TradeApi = class {
2327
2649
  /**
2328
2650
  * Query Margin Account's Trade List
2329
2651
  *
2330
- * If fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 hours are returned.
2331
- * Less than 24 hours between startTime and endTime.
2652
+ * Weight(IP): 10
2332
2653
  *
2333
- * Weight: 10(IP)
2654
+ * Security Type: USER_DATA
2655
+ *
2656
+ * Notes:
2657
+ * - If fromId is set, it will get trades >= that fromId. Otherwise the
2658
+ * trades within 24 hours are returned.
2659
+ *
2660
+ * - Less than 24 hours between startTime and endTime.
2334
2661
  *
2335
2662
  * @summary Query Margin Account\'s Trade List (USER_DATA)
2336
2663
  * @param {QueryMarginAccountsTradeListRequest} requestParameters Request parameters.
2337
2664
  * @returns {Promise<RestApiResponse<QueryMarginAccountsTradeListResponse>>}
2338
2665
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2339
2666
  * @memberof TradeApi
2340
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List Binance API Documentation}
2667
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list Binance API Documentation}
2341
2668
  */
2342
2669
  async queryMarginAccountsTradeList(requestParameters) {
2343
2670
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMarginAccountsTradeList(requestParameters?.symbol, requestParameters?.isIsolated, requestParameters?.orderId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.fromId, requestParameters?.limit, requestParameters?.recvWindow);
2344
2671
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2345
2672
  }
2346
2673
  /**
2674
+ * Displays the list of orders that were expired due to STP. (Self-Trade Prevention).
2675
+ *
2676
+ * Weight(IP): 10
2677
+ *
2678
+ * Security Type: USER_DATA
2679
+ *
2680
+ * Notes:
2681
+ * - Supported parameter combinations:
2682
+ *
2683
+ * - `symbol` + `preventedMatchId`
2684
+ *
2685
+ * - `symbol` + `orderId`
2347
2686
  *
2348
- * Weight: 10(IP)
2687
+ * - `symbol` + `orderId` + `fromPreventedMatchId`
2349
2688
  *
2350
- * @summary Query Prevented Matches(USER_DATA)
2689
+ * - If `orderId` is provided, all prevented matches for that order will be
2690
+ * returned.
2691
+ *
2692
+ * - If `preventedMatchId` is provided, the specific prevented match will
2693
+ * be returned.
2694
+ *
2695
+ * - A single request returns a maximum of 500 records. If there are more
2696
+ * than 500 records, use `symbol` + `orderId` + `fromPreventedMatchId`
2697
+ * combination for pagination.
2698
+ *
2699
+ * @summary Query Prevented Matches (USER_DATA)
2351
2700
  * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
2352
2701
  * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
2353
2702
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2354
2703
  * @memberof TradeApi
2355
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
2704
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches Binance API Documentation}
2356
2705
  */
2357
2706
  async queryPreventedMatches(requestParameters) {
2358
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.recvWindow, requestParameters?.isIsolated);
2707
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPreventedMatches(requestParameters?.symbol, requestParameters?.preventedMatchId, requestParameters?.orderId, requestParameters?.fromPreventedMatchId, requestParameters?.isIsolated, requestParameters?.recvWindow);
2359
2708
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2360
2709
  }
2361
2710
  /**
@@ -2363,14 +2712,16 @@ var TradeApi = class {
2363
2712
  *
2364
2713
  * This only applies to Special Key for Low Latency Trading.
2365
2714
  *
2366
- * Weight: 1(UID)
2715
+ * Weight(UID): 1
2716
+ *
2717
+ * Security Type: TRADE
2367
2718
  *
2368
- * @summary Query Special key(Low Latency Trading)(TRADE)
2719
+ * @summary Query Special key(Low Latency Trading) (TRADE)
2369
2720
  * @param {QuerySpecialKeyRequest} requestParameters Request parameters.
2370
2721
  * @returns {Promise<RestApiResponse<QuerySpecialKeyResponse>>}
2371
2722
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2372
2723
  * @memberof TradeApi
2373
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-of-Low-Latency-Trading Binance API Documentation}
2724
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key Binance API Documentation}
2374
2725
  */
2375
2726
  async querySpecialKey(requestParameters = {}) {
2376
2727
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKey(requestParameters?.symbol, requestParameters?.recvWindow);
@@ -2379,14 +2730,16 @@ var TradeApi = class {
2379
2730
  /**
2380
2731
  * This only applies to Special Key for Low Latency Trading.
2381
2732
  *
2382
- * Weight: 1(UID)
2733
+ * Weight(UID): 1
2383
2734
  *
2384
- * @summary Query Special key List(Low Latency Trading)(TRADE)
2735
+ * Security Type: TRADE
2736
+ *
2737
+ * @summary Query Special key List(Low Latency Trading) (TRADE)
2385
2738
  * @param {QuerySpecialKeyListRequest} requestParameters Request parameters.
2386
2739
  * @returns {Promise<RestApiResponse<QuerySpecialKeyListResponse>>}
2387
2740
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2388
2741
  * @memberof TradeApi
2389
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-List-of-Low-Latency-Trading Binance API Documentation}
2742
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list Binance API Documentation}
2390
2743
  */
2391
2744
  async querySpecialKeyList(requestParameters = {}) {
2392
2745
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySpecialKeyList(requestParameters?.symbol, requestParameters?.recvWindow);
@@ -2395,71 +2748,314 @@ var TradeApi = class {
2395
2748
  /**
2396
2749
  * Small Liability Exchange
2397
2750
  *
2398
- * Only convert once within 6 hours
2399
- * Only liability valuation less than 10 USDT are supported
2400
- * The maximum number of coin is 10
2751
+ * Weight(UID): 3000
2752
+ *
2753
+ * Security Type: MARGIN
2401
2754
  *
2402
- * Weight: 3000(UID)
2755
+ * Notes:
2756
+ * - Only convert once within 6 hours
2757
+ * - Only liability valuation less than 10 USDT are supported
2758
+ * - The maximum number of coin is 10
2403
2759
  *
2404
2760
  * @summary Small Liability Exchange (MARGIN)
2405
2761
  * @param {SmallLiabilityExchangeRequest} requestParameters Request parameters.
2406
2762
  * @returns {Promise<RestApiResponse<void>>}
2407
2763
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2408
2764
  * @memberof TradeApi
2409
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Small-Liability-Exchange Binance API Documentation}
2765
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange Binance API Documentation}
2410
2766
  */
2411
2767
  async smallLiabilityExchange(requestParameters) {
2412
2768
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.smallLiabilityExchange(requestParameters?.assetNames, requestParameters?.recvWindow);
2413
2769
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2414
2770
  }
2415
2771
  };
2772
+ let CreateSpecialKeyPermissionModeEnum = /* @__PURE__ */ function(CreateSpecialKeyPermissionModeEnum$1) {
2773
+ CreateSpecialKeyPermissionModeEnum$1["TRADE"] = "TRADE";
2774
+ CreateSpecialKeyPermissionModeEnum$1["READ"] = "READ";
2775
+ return CreateSpecialKeyPermissionModeEnum$1;
2776
+ }({});
2777
+ let MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1) {
2778
+ MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1["TRUE"] = "TRUE";
2779
+ MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1["FALSE"] = "FALSE";
2780
+ return MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum$1;
2781
+ }({});
2782
+ let MarginAccountCancelOcoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelOcoIsIsolatedEnum$1) {
2783
+ MarginAccountCancelOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
2784
+ MarginAccountCancelOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
2785
+ return MarginAccountCancelOcoIsIsolatedEnum$1;
2786
+ }({});
2787
+ let MarginAccountCancelOrderIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountCancelOrderIsIsolatedEnum$1) {
2788
+ MarginAccountCancelOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
2789
+ MarginAccountCancelOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
2790
+ return MarginAccountCancelOrderIsIsolatedEnum$1;
2791
+ }({});
2416
2792
  let MarginAccountNewOcoSideEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEnum$1) {
2417
2793
  MarginAccountNewOcoSideEnum$1["BUY"] = "BUY";
2418
2794
  MarginAccountNewOcoSideEnum$1["SELL"] = "SELL";
2419
2795
  return MarginAccountNewOcoSideEnum$1;
2420
2796
  }({});
2797
+ let MarginAccountNewOcoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOcoIsIsolatedEnum$1) {
2798
+ MarginAccountNewOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
2799
+ MarginAccountNewOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
2800
+ return MarginAccountNewOcoIsIsolatedEnum$1;
2801
+ }({});
2802
+ let MarginAccountNewOcoStopLimitTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOcoStopLimitTimeInForceEnum$1) {
2803
+ MarginAccountNewOcoStopLimitTimeInForceEnum$1["GTC"] = "GTC";
2804
+ MarginAccountNewOcoStopLimitTimeInForceEnum$1["FOK"] = "FOK";
2805
+ MarginAccountNewOcoStopLimitTimeInForceEnum$1["IOC"] = "IOC";
2806
+ return MarginAccountNewOcoStopLimitTimeInForceEnum$1;
2807
+ }({});
2421
2808
  let MarginAccountNewOcoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOcoNewOrderRespTypeEnum$1) {
2422
2809
  MarginAccountNewOcoNewOrderRespTypeEnum$1["ACK"] = "ACK";
2423
2810
  MarginAccountNewOcoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
2424
2811
  MarginAccountNewOcoNewOrderRespTypeEnum$1["FULL"] = "FULL";
2425
2812
  return MarginAccountNewOcoNewOrderRespTypeEnum$1;
2426
2813
  }({});
2814
+ let MarginAccountNewOcoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOcoSideEffectTypeEnum$1) {
2815
+ MarginAccountNewOcoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
2816
+ MarginAccountNewOcoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
2817
+ MarginAccountNewOcoSideEffectTypeEnum$1["AUTO_REPAY"] = "AUTO_REPAY";
2818
+ MarginAccountNewOcoSideEffectTypeEnum$1["AUTO_BORROW_REPAY"] = "AUTO_BORROW_REPAY";
2819
+ return MarginAccountNewOcoSideEffectTypeEnum$1;
2820
+ }({});
2821
+ let MarginAccountNewOcoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOcoSelfTradePreventionModeEnum$1) {
2822
+ MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
2823
+ MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
2824
+ MarginAccountNewOcoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
2825
+ MarginAccountNewOcoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
2826
+ return MarginAccountNewOcoSelfTradePreventionModeEnum$1;
2827
+ }({});
2427
2828
  let MarginAccountNewOrderSideEnum = /* @__PURE__ */ function(MarginAccountNewOrderSideEnum$1) {
2428
2829
  MarginAccountNewOrderSideEnum$1["BUY"] = "BUY";
2429
2830
  MarginAccountNewOrderSideEnum$1["SELL"] = "SELL";
2430
2831
  return MarginAccountNewOrderSideEnum$1;
2431
2832
  }({});
2833
+ let MarginAccountNewOrderTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderTypeEnum$1) {
2834
+ MarginAccountNewOrderTypeEnum$1["LIMIT"] = "LIMIT";
2835
+ MarginAccountNewOrderTypeEnum$1["MARKET"] = "MARKET";
2836
+ MarginAccountNewOrderTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
2837
+ MarginAccountNewOrderTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
2838
+ MarginAccountNewOrderTypeEnum$1["TAKE_PROFIT"] = "TAKE_PROFIT";
2839
+ MarginAccountNewOrderTypeEnum$1["TAKE_PROFIT_LIMIT"] = "TAKE_PROFIT_LIMIT";
2840
+ MarginAccountNewOrderTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2841
+ return MarginAccountNewOrderTypeEnum$1;
2842
+ }({});
2843
+ let MarginAccountNewOrderIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOrderIsIsolatedEnum$1) {
2844
+ MarginAccountNewOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
2845
+ MarginAccountNewOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
2846
+ return MarginAccountNewOrderIsIsolatedEnum$1;
2847
+ }({});
2432
2848
  let MarginAccountNewOrderNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderNewOrderRespTypeEnum$1) {
2433
2849
  MarginAccountNewOrderNewOrderRespTypeEnum$1["ACK"] = "ACK";
2434
2850
  MarginAccountNewOrderNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
2435
2851
  MarginAccountNewOrderNewOrderRespTypeEnum$1["FULL"] = "FULL";
2436
2852
  return MarginAccountNewOrderNewOrderRespTypeEnum$1;
2437
2853
  }({});
2854
+ let MarginAccountNewOrderSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOrderSideEffectTypeEnum$1) {
2855
+ MarginAccountNewOrderSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
2856
+ MarginAccountNewOrderSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
2857
+ MarginAccountNewOrderSideEffectTypeEnum$1["AUTO_REPAY"] = "AUTO_REPAY";
2858
+ MarginAccountNewOrderSideEffectTypeEnum$1["AUTO_BORROW_REPAY"] = "AUTO_BORROW_REPAY";
2859
+ return MarginAccountNewOrderSideEffectTypeEnum$1;
2860
+ }({});
2438
2861
  let MarginAccountNewOrderTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOrderTimeInForceEnum$1) {
2439
2862
  MarginAccountNewOrderTimeInForceEnum$1["GTC"] = "GTC";
2440
2863
  MarginAccountNewOrderTimeInForceEnum$1["IOC"] = "IOC";
2441
2864
  MarginAccountNewOrderTimeInForceEnum$1["FOK"] = "FOK";
2442
2865
  return MarginAccountNewOrderTimeInForceEnum$1;
2443
2866
  }({});
2867
+ let MarginAccountNewOrderSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOrderSelfTradePreventionModeEnum$1) {
2868
+ MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
2869
+ MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
2870
+ MarginAccountNewOrderSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
2871
+ MarginAccountNewOrderSelfTradePreventionModeEnum$1["NONE"] = "NONE";
2872
+ return MarginAccountNewOrderSelfTradePreventionModeEnum$1;
2873
+ }({});
2874
+ let MarginAccountNewOtoWorkingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingTypeEnum$1) {
2875
+ MarginAccountNewOtoWorkingTypeEnum$1["LIMIT"] = "LIMIT";
2876
+ MarginAccountNewOtoWorkingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2877
+ return MarginAccountNewOtoWorkingTypeEnum$1;
2878
+ }({});
2879
+ let MarginAccountNewOtoWorkingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingSideEnum$1) {
2880
+ MarginAccountNewOtoWorkingSideEnum$1["BUY"] = "BUY";
2881
+ MarginAccountNewOtoWorkingSideEnum$1["SELL"] = "SELL";
2882
+ return MarginAccountNewOtoWorkingSideEnum$1;
2883
+ }({});
2884
+ let MarginAccountNewOtoPendingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingTypeEnum$1) {
2885
+ MarginAccountNewOtoPendingTypeEnum$1["LIMIT"] = "LIMIT";
2886
+ MarginAccountNewOtoPendingTypeEnum$1["MARKET"] = "MARKET";
2887
+ MarginAccountNewOtoPendingTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
2888
+ MarginAccountNewOtoPendingTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
2889
+ MarginAccountNewOtoPendingTypeEnum$1["TAKE_PROFIT"] = "TAKE_PROFIT";
2890
+ MarginAccountNewOtoPendingTypeEnum$1["TAKE_PROFIT_LIMIT"] = "TAKE_PROFIT_LIMIT";
2891
+ MarginAccountNewOtoPendingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2892
+ return MarginAccountNewOtoPendingTypeEnum$1;
2893
+ }({});
2894
+ let MarginAccountNewOtoPendingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingSideEnum$1) {
2895
+ MarginAccountNewOtoPendingSideEnum$1["BUY"] = "BUY";
2896
+ MarginAccountNewOtoPendingSideEnum$1["SELL"] = "SELL";
2897
+ return MarginAccountNewOtoPendingSideEnum$1;
2898
+ }({});
2899
+ let MarginAccountNewOtoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOtoIsIsolatedEnum$1) {
2900
+ MarginAccountNewOtoIsIsolatedEnum$1["TRUE"] = "TRUE";
2901
+ MarginAccountNewOtoIsIsolatedEnum$1["FALSE"] = "FALSE";
2902
+ return MarginAccountNewOtoIsIsolatedEnum$1;
2903
+ }({});
2444
2904
  let MarginAccountNewOtoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoNewOrderRespTypeEnum$1) {
2445
2905
  MarginAccountNewOtoNewOrderRespTypeEnum$1["ACK"] = "ACK";
2446
2906
  MarginAccountNewOtoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
2447
2907
  MarginAccountNewOtoNewOrderRespTypeEnum$1["FULL"] = "FULL";
2448
2908
  return MarginAccountNewOtoNewOrderRespTypeEnum$1;
2449
2909
  }({});
2910
+ let MarginAccountNewOtoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtoSideEffectTypeEnum$1) {
2911
+ MarginAccountNewOtoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
2912
+ MarginAccountNewOtoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
2913
+ return MarginAccountNewOtoSideEffectTypeEnum$1;
2914
+ }({});
2915
+ let MarginAccountNewOtoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOtoSelfTradePreventionModeEnum$1) {
2916
+ MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
2917
+ MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
2918
+ MarginAccountNewOtoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
2919
+ MarginAccountNewOtoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
2920
+ return MarginAccountNewOtoSelfTradePreventionModeEnum$1;
2921
+ }({});
2922
+ let MarginAccountNewOtoWorkingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtoWorkingTimeInForceEnum$1) {
2923
+ MarginAccountNewOtoWorkingTimeInForceEnum$1["GTC"] = "GTC";
2924
+ MarginAccountNewOtoWorkingTimeInForceEnum$1["IOC"] = "IOC";
2925
+ MarginAccountNewOtoWorkingTimeInForceEnum$1["FOK"] = "FOK";
2926
+ return MarginAccountNewOtoWorkingTimeInForceEnum$1;
2927
+ }({});
2928
+ let MarginAccountNewOtoPendingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtoPendingTimeInForceEnum$1) {
2929
+ MarginAccountNewOtoPendingTimeInForceEnum$1["GTC"] = "GTC";
2930
+ MarginAccountNewOtoPendingTimeInForceEnum$1["IOC"] = "IOC";
2931
+ MarginAccountNewOtoPendingTimeInForceEnum$1["FOK"] = "FOK";
2932
+ return MarginAccountNewOtoPendingTimeInForceEnum$1;
2933
+ }({});
2934
+ let MarginAccountNewOtocoWorkingTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingTypeEnum$1) {
2935
+ MarginAccountNewOtocoWorkingTypeEnum$1["LIMIT"] = "LIMIT";
2936
+ MarginAccountNewOtocoWorkingTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2937
+ return MarginAccountNewOtocoWorkingTypeEnum$1;
2938
+ }({});
2939
+ let MarginAccountNewOtocoWorkingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingSideEnum$1) {
2940
+ MarginAccountNewOtocoWorkingSideEnum$1["BUY"] = "BUY";
2941
+ MarginAccountNewOtocoWorkingSideEnum$1["SELL"] = "SELL";
2942
+ return MarginAccountNewOtocoWorkingSideEnum$1;
2943
+ }({});
2944
+ let MarginAccountNewOtocoPendingSideEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingSideEnum$1) {
2945
+ MarginAccountNewOtocoPendingSideEnum$1["BUY"] = "BUY";
2946
+ MarginAccountNewOtocoPendingSideEnum$1["SELL"] = "SELL";
2947
+ return MarginAccountNewOtocoPendingSideEnum$1;
2948
+ }({});
2949
+ let MarginAccountNewOtocoPendingAboveTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingAboveTypeEnum$1) {
2950
+ MarginAccountNewOtocoPendingAboveTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2951
+ MarginAccountNewOtocoPendingAboveTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
2952
+ MarginAccountNewOtocoPendingAboveTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
2953
+ return MarginAccountNewOtocoPendingAboveTypeEnum$1;
2954
+ }({});
2955
+ let MarginAccountNewOtocoIsIsolatedEnum = /* @__PURE__ */ function(MarginAccountNewOtocoIsIsolatedEnum$1) {
2956
+ MarginAccountNewOtocoIsIsolatedEnum$1["TRUE"] = "TRUE";
2957
+ MarginAccountNewOtocoIsIsolatedEnum$1["FALSE"] = "FALSE";
2958
+ return MarginAccountNewOtocoIsIsolatedEnum$1;
2959
+ }({});
2960
+ let MarginAccountNewOtocoSideEffectTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoSideEffectTypeEnum$1) {
2961
+ MarginAccountNewOtocoSideEffectTypeEnum$1["NO_SIDE_EFFECT"] = "NO_SIDE_EFFECT";
2962
+ MarginAccountNewOtocoSideEffectTypeEnum$1["MARGIN_BUY"] = "MARGIN_BUY";
2963
+ return MarginAccountNewOtocoSideEffectTypeEnum$1;
2964
+ }({});
2450
2965
  let MarginAccountNewOtocoNewOrderRespTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoNewOrderRespTypeEnum$1) {
2451
2966
  MarginAccountNewOtocoNewOrderRespTypeEnum$1["ACK"] = "ACK";
2452
2967
  MarginAccountNewOtocoNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
2453
2968
  MarginAccountNewOtocoNewOrderRespTypeEnum$1["FULL"] = "FULL";
2454
2969
  return MarginAccountNewOtocoNewOrderRespTypeEnum$1;
2455
2970
  }({});
2971
+ let MarginAccountNewOtocoSelfTradePreventionModeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoSelfTradePreventionModeEnum$1) {
2972
+ MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
2973
+ MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
2974
+ MarginAccountNewOtocoSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
2975
+ MarginAccountNewOtocoSelfTradePreventionModeEnum$1["NONE"] = "NONE";
2976
+ return MarginAccountNewOtocoSelfTradePreventionModeEnum$1;
2977
+ }({});
2978
+ let MarginAccountNewOtocoWorkingTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoWorkingTimeInForceEnum$1) {
2979
+ MarginAccountNewOtocoWorkingTimeInForceEnum$1["GTC"] = "GTC";
2980
+ MarginAccountNewOtocoWorkingTimeInForceEnum$1["IOC"] = "IOC";
2981
+ MarginAccountNewOtocoWorkingTimeInForceEnum$1["FOK"] = "FOK";
2982
+ return MarginAccountNewOtocoWorkingTimeInForceEnum$1;
2983
+ }({});
2984
+ let MarginAccountNewOtocoPendingAboveTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingAboveTimeInForceEnum$1) {
2985
+ MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["GTC"] = "GTC";
2986
+ MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["IOC"] = "IOC";
2987
+ MarginAccountNewOtocoPendingAboveTimeInForceEnum$1["FOK"] = "FOK";
2988
+ return MarginAccountNewOtocoPendingAboveTimeInForceEnum$1;
2989
+ }({});
2990
+ let MarginAccountNewOtocoPendingBelowTypeEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingBelowTypeEnum$1) {
2991
+ MarginAccountNewOtocoPendingBelowTypeEnum$1["LIMIT_MAKER"] = "LIMIT_MAKER";
2992
+ MarginAccountNewOtocoPendingBelowTypeEnum$1["STOP_LOSS"] = "STOP_LOSS";
2993
+ MarginAccountNewOtocoPendingBelowTypeEnum$1["STOP_LOSS_LIMIT"] = "STOP_LOSS_LIMIT";
2994
+ return MarginAccountNewOtocoPendingBelowTypeEnum$1;
2995
+ }({});
2996
+ let MarginAccountNewOtocoPendingBelowTimeInForceEnum = /* @__PURE__ */ function(MarginAccountNewOtocoPendingBelowTimeInForceEnum$1) {
2997
+ MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["GTC"] = "GTC";
2998
+ MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["IOC"] = "IOC";
2999
+ MarginAccountNewOtocoPendingBelowTimeInForceEnum$1["FOK"] = "FOK";
3000
+ return MarginAccountNewOtocoPendingBelowTimeInForceEnum$1;
3001
+ }({});
3002
+ let MarginManualLiquidationTypeEnum = /* @__PURE__ */ function(MarginManualLiquidationTypeEnum$1) {
3003
+ MarginManualLiquidationTypeEnum$1["MARGIN"] = "MARGIN";
3004
+ MarginManualLiquidationTypeEnum$1["ISOLATED"] = "ISOLATED";
3005
+ return MarginManualLiquidationTypeEnum$1;
3006
+ }({});
3007
+ let QueryCurrentMarginOrderCountUsageIsIsolatedEnum = /* @__PURE__ */ function(QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1) {
3008
+ QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1["TRUE"] = "TRUE";
3009
+ QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1["FALSE"] = "FALSE";
3010
+ return QueryCurrentMarginOrderCountUsageIsIsolatedEnum$1;
3011
+ }({});
3012
+ let QueryMarginAccountsAllOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsAllOcoIsIsolatedEnum$1) {
3013
+ QueryMarginAccountsAllOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
3014
+ QueryMarginAccountsAllOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
3015
+ return QueryMarginAccountsAllOcoIsIsolatedEnum$1;
3016
+ }({});
3017
+ let QueryMarginAccountsAllOrdersIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsAllOrdersIsIsolatedEnum$1) {
3018
+ QueryMarginAccountsAllOrdersIsIsolatedEnum$1["TRUE"] = "TRUE";
3019
+ QueryMarginAccountsAllOrdersIsIsolatedEnum$1["FALSE"] = "FALSE";
3020
+ return QueryMarginAccountsAllOrdersIsIsolatedEnum$1;
3021
+ }({});
3022
+ let QueryMarginAccountsOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOcoIsIsolatedEnum$1) {
3023
+ QueryMarginAccountsOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
3024
+ QueryMarginAccountsOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
3025
+ return QueryMarginAccountsOcoIsIsolatedEnum$1;
3026
+ }({});
3027
+ let QueryMarginAccountsOpenOcoIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOpenOcoIsIsolatedEnum$1) {
3028
+ QueryMarginAccountsOpenOcoIsIsolatedEnum$1["TRUE"] = "TRUE";
3029
+ QueryMarginAccountsOpenOcoIsIsolatedEnum$1["FALSE"] = "FALSE";
3030
+ return QueryMarginAccountsOpenOcoIsIsolatedEnum$1;
3031
+ }({});
3032
+ let QueryMarginAccountsOpenOrdersIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOpenOrdersIsIsolatedEnum$1) {
3033
+ QueryMarginAccountsOpenOrdersIsIsolatedEnum$1["TRUE"] = "TRUE";
3034
+ QueryMarginAccountsOpenOrdersIsIsolatedEnum$1["FALSE"] = "FALSE";
3035
+ return QueryMarginAccountsOpenOrdersIsIsolatedEnum$1;
3036
+ }({});
3037
+ let QueryMarginAccountsOrderIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsOrderIsIsolatedEnum$1) {
3038
+ QueryMarginAccountsOrderIsIsolatedEnum$1["TRUE"] = "TRUE";
3039
+ QueryMarginAccountsOrderIsIsolatedEnum$1["FALSE"] = "FALSE";
3040
+ return QueryMarginAccountsOrderIsIsolatedEnum$1;
3041
+ }({});
3042
+ let QueryMarginAccountsTradeListIsIsolatedEnum = /* @__PURE__ */ function(QueryMarginAccountsTradeListIsIsolatedEnum$1) {
3043
+ QueryMarginAccountsTradeListIsIsolatedEnum$1["TRUE"] = "TRUE";
3044
+ QueryMarginAccountsTradeListIsIsolatedEnum$1["FALSE"] = "FALSE";
3045
+ return QueryMarginAccountsTradeListIsIsolatedEnum$1;
3046
+ }({});
3047
+ let QueryPreventedMatchesIsIsolatedEnum = /* @__PURE__ */ function(QueryPreventedMatchesIsIsolatedEnum$1) {
3048
+ QueryPreventedMatchesIsIsolatedEnum$1["TRUE"] = "TRUE";
3049
+ QueryPreventedMatchesIsIsolatedEnum$1["FALSE"] = "FALSE";
3050
+ return QueryPreventedMatchesIsIsolatedEnum$1;
3051
+ }({});
2456
3052
 
2457
3053
  //#endregion
2458
3054
  //#region src/rest-api/modules/transfer-api.ts
2459
3055
  /**
2460
- * Binance Margin Trading REST API
3056
+ * Margin REST API
2461
3057
  *
2462
- * OpenAPI Specification for the Binance Margin Trading REST API
3058
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
2463
3059
  *
2464
3060
  * The version of the OpenAPI document: 1.0.0
2465
3061
  *
@@ -2529,18 +3125,21 @@ var TransferApi = class {
2529
3125
  /**
2530
3126
  * Get Cross Margin Transfer History
2531
3127
  *
2532
- * Response in descending order
2533
- * The max interval between `startTime` and `endTime` is 30 days.
2534
- * Returns data for last 7 days by default
3128
+ * Weight(IP): 1
3129
+ *
3130
+ * Security Type: USER_DATA
2535
3131
  *
2536
- * Weight: 1(IP)
3132
+ * Notes:
3133
+ * - Response in descending order
3134
+ * - The max interval between `startTime` and `endTime` is 30 days.
3135
+ * - Returns data for last 7 days by default
2537
3136
  *
2538
3137
  * @summary Get Cross Margin Transfer History (USER_DATA)
2539
3138
  * @param {GetCrossMarginTransferHistoryRequest} requestParameters Request parameters.
2540
3139
  * @returns {Promise<RestApiResponse<GetCrossMarginTransferHistoryResponse>>}
2541
3140
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2542
3141
  * @memberof TransferApi
2543
- * @see {@link https://developers.binance.com/docs/margin_trading/transfer/Get-Cross-Margin-Transfer-History Binance API Documentation}
3142
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history Binance API Documentation}
2544
3143
  */
2545
3144
  async getCrossMarginTransferHistory(requestParameters = {}) {
2546
3145
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCrossMarginTransferHistory(requestParameters?.asset, requestParameters?.type, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.size, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
@@ -2549,29 +3148,168 @@ var TransferApi = class {
2549
3148
  /**
2550
3149
  * Query Max Transfer-Out Amount
2551
3150
  *
2552
- * If isolatedSymbol is not sent, crossed margin data will be sent.
3151
+ * Weight(IP): 50
2553
3152
  *
2554
- * Weight: 50(IP)
3153
+ * Security Type: USER_DATA
3154
+ *
3155
+ * Notes:
3156
+ * - If isolatedSymbol is not sent, crossed margin data will be sent.
2555
3157
  *
2556
3158
  * @summary Query Max Transfer-Out Amount (USER_DATA)
2557
3159
  * @param {QueryMaxTransferOutAmountRequest} requestParameters Request parameters.
2558
3160
  * @returns {Promise<RestApiResponse<QueryMaxTransferOutAmountResponse>>}
2559
3161
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2560
3162
  * @memberof TransferApi
2561
- * @see {@link https://developers.binance.com/docs/margin_trading/transfer/Query-Max-Transfer-Out-Amount Binance API Documentation}
3163
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount Binance API Documentation}
2562
3164
  */
2563
3165
  async queryMaxTransferOutAmount(requestParameters) {
2564
3166
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryMaxTransferOutAmount(requestParameters?.asset, requestParameters?.isolatedSymbol, requestParameters?.recvWindow);
2565
3167
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
2566
3168
  }
2567
3169
  };
3170
+ let GetCrossMarginTransferHistoryTypeEnum = /* @__PURE__ */ function(GetCrossMarginTransferHistoryTypeEnum$1) {
3171
+ GetCrossMarginTransferHistoryTypeEnum$1["ROLL_IN"] = "ROLL_IN";
3172
+ GetCrossMarginTransferHistoryTypeEnum$1["ROLL_OUT"] = "ROLL_OUT";
3173
+ return GetCrossMarginTransferHistoryTypeEnum$1;
3174
+ }({});
3175
+
3176
+ //#endregion
3177
+ //#region src/rest-api/modules/user-data-stream-api.ts
3178
+ /**
3179
+ * Margin REST API
3180
+ *
3181
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
3182
+ *
3183
+ * The version of the OpenAPI document: 1.0.0
3184
+ *
3185
+ *
3186
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3187
+ * https://openapi-generator.tech
3188
+ * Do not edit the class manually.
3189
+ */
3190
+ /**
3191
+ * UserDataStreamApi - axios parameter creator
3192
+ */
3193
+ const UserDataStreamApiAxiosParamCreator = function(configuration) {
3194
+ return {
3195
+ closeUserDataStream: async () => {
3196
+ const localVarQueryParameter = {};
3197
+ const localVarBodyParameter = {};
3198
+ const localVarHeaderParameter = {};
3199
+ let _timeUnit;
3200
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
3201
+ return {
3202
+ endpoint: "/sapi/v1/margin/listen-key",
3203
+ method: "DELETE",
3204
+ queryParams: localVarQueryParameter,
3205
+ bodyParams: localVarBodyParameter,
3206
+ headerParams: localVarHeaderParameter,
3207
+ timeUnit: _timeUnit
3208
+ };
3209
+ },
3210
+ keepaliveUserDataStream: async (listenKey) => {
3211
+ (0, __binance_common.assertParamExists)("keepaliveUserDataStream", "listenKey", listenKey);
3212
+ const localVarQueryParameter = {};
3213
+ const localVarBodyParameter = {};
3214
+ const localVarHeaderParameter = {};
3215
+ if (listenKey !== void 0 && listenKey !== null) localVarQueryParameter["listenKey"] = listenKey;
3216
+ let _timeUnit;
3217
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
3218
+ return {
3219
+ endpoint: "/sapi/v1/margin/listen-key",
3220
+ method: "PUT",
3221
+ queryParams: localVarQueryParameter,
3222
+ bodyParams: localVarBodyParameter,
3223
+ headerParams: localVarHeaderParameter,
3224
+ timeUnit: _timeUnit
3225
+ };
3226
+ },
3227
+ startUserDataStream: async () => {
3228
+ const localVarQueryParameter = {};
3229
+ const localVarBodyParameter = {};
3230
+ const localVarHeaderParameter = {};
3231
+ let _timeUnit;
3232
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
3233
+ return {
3234
+ endpoint: "/sapi/v1/margin/listen-key",
3235
+ method: "POST",
3236
+ queryParams: localVarQueryParameter,
3237
+ bodyParams: localVarBodyParameter,
3238
+ headerParams: localVarHeaderParameter,
3239
+ timeUnit: _timeUnit
3240
+ };
3241
+ }
3242
+ };
3243
+ };
3244
+ /**
3245
+ * UserDataStreamApi - object-oriented interface
3246
+ * @class UserDataStreamApi
3247
+ */
3248
+ var UserDataStreamApi = class {
3249
+ constructor(configuration) {
3250
+ this.configuration = configuration;
3251
+ this.localVarAxiosParamCreator = UserDataStreamApiAxiosParamCreator(configuration);
3252
+ }
3253
+ /**
3254
+ * Close out a user data stream.
3255
+ *
3256
+ * Weight(UID): 3000
3257
+ *
3258
+ * Security Type: USER_STREAM
3259
+ *
3260
+ * @summary Close User Data Stream (USER_STREAM)
3261
+ * @returns {Promise<RestApiResponse<void>>}
3262
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3263
+ * @memberof UserDataStreamApi
3264
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#close-user-data-stream Binance API Documentation}
3265
+ */
3266
+ async closeUserDataStream() {
3267
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.closeUserDataStream();
3268
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
3269
+ }
3270
+ /**
3271
+ * Keepalive a user data stream to prevent a time out.
3272
+ *
3273
+ * Weight(UID): 1
3274
+ *
3275
+ * Security Type: USER_STREAM
3276
+ *
3277
+ * @summary Keepalive User Data Stream (USER_STREAM)
3278
+ * @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
3279
+ * @returns {Promise<RestApiResponse<void>>}
3280
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3281
+ * @memberof UserDataStreamApi
3282
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#keepalive-user-data-stream Binance API Documentation}
3283
+ */
3284
+ async keepaliveUserDataStream(requestParameters) {
3285
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.keepaliveUserDataStream(requestParameters?.listenKey);
3286
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
3287
+ }
3288
+ /**
3289
+ * Start a new user data stream.
3290
+ *
3291
+ * Weight(UID): 1
3292
+ *
3293
+ * Security Type: USER_STREAM
3294
+ *
3295
+ * @summary Start User Data Stream (USER_STREAM)
3296
+ * @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
3297
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3298
+ * @memberof UserDataStreamApi
3299
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#start-user-data-stream Binance API Documentation}
3300
+ */
3301
+ async startUserDataStream() {
3302
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.startUserDataStream();
3303
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
3304
+ }
3305
+ };
2568
3306
 
2569
3307
  //#endregion
2570
3308
  //#region src/rest-api/rest-api.ts
2571
3309
  /**
2572
- * Binance Margin Trading REST API
3310
+ * Margin REST API
2573
3311
  *
2574
- * OpenAPI Specification for the Binance Margin Trading REST API
3312
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
2575
3313
  *
2576
3314
  * The version of the OpenAPI document: 1.0.0
2577
3315
  *
@@ -2586,9 +3324,9 @@ var RestAPI = class {
2586
3324
  this.accountApi = new AccountApi(configuration);
2587
3325
  this.borrowRepayApi = new BorrowRepayApi(configuration);
2588
3326
  this.marketDataApi = new MarketDataApi(configuration);
2589
- this.riskDataStreamApi = new RiskDataStreamApi(configuration);
2590
3327
  this.tradeApi = new TradeApi(configuration);
2591
3328
  this.transferApi = new TransferApi(configuration);
3329
+ this.userDataStreamApi = new UserDataStreamApi(configuration);
2592
3330
  }
2593
3331
  /**
2594
3332
  * Generic function to send a request.
@@ -2617,32 +3355,36 @@ var RestAPI = class {
2617
3355
  /**
2618
3356
  * Adjust cross margin max leverage
2619
3357
  *
2620
- * The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
3358
+ * Weight(UID): 3000, 1 times/min per IP
2621
3359
  *
2622
- * Weight: 3000
3360
+ * Security Type: USER_DATA
3361
+ *
3362
+ * Notes:
3363
+ * - The margin level need higher than the initial risk ratio of adjusted leverage, the initial risk ratio of 3x is 1.5 , the initial risk ratio of 5x is 1.25; The detail conditions on how to switch between Cross Margin Classic and Cross Margin Pro can refer to [the FAQ](https://www.binance.com/en/support/faq/how-to-activate-the-cross-margin-pro-mode-on-binance-e27786da05e743a694b8c625b3bc475d).
2623
3364
  *
2624
3365
  * @summary Adjust cross margin max leverage (USER_DATA)
2625
3366
  * @param {AdjustCrossMarginMaxLeverageRequest} requestParameters Request parameters.
2626
3367
  *
2627
3368
  * @returns {Promise<RestApiResponse<AdjustCrossMarginMaxLeverageResponse>>}
2628
3369
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2629
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Adjust-cross-margin-max-leverage Binance API Documentation}
3370
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#adjust-cross-margin-max-leverage Binance API Documentation}
2630
3371
  */
2631
3372
  adjustCrossMarginMaxLeverage(requestParameters) {
2632
3373
  return this.accountApi.adjustCrossMarginMaxLeverage(requestParameters);
2633
3374
  }
2634
3375
  /**
2635
- * Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24
2636
- * hours.
3376
+ * Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours.
3377
+ *
3378
+ * Weight(UID): 300
2637
3379
  *
2638
- * Weight: 300(UID)
3380
+ * Security Type: TRADE
2639
3381
  *
2640
3382
  * @summary Disable Isolated Margin Account (TRADE)
2641
3383
  * @param {DisableIsolatedMarginAccountRequest} requestParameters Request parameters.
2642
3384
  *
2643
3385
  * @returns {Promise<RestApiResponse<DisableIsolatedMarginAccountResponse>>}
2644
3386
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2645
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Disable-Isolated-Margin-Account Binance API Documentation}
3387
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#disable-isolated-margin-account Binance API Documentation}
2646
3388
  */
2647
3389
  disableIsolatedMarginAccount(requestParameters) {
2648
3390
  return this.accountApi.disableIsolatedMarginAccount(requestParameters);
@@ -2650,14 +3392,16 @@ var RestAPI = class {
2650
3392
  /**
2651
3393
  * Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
2652
3394
  *
2653
- * Weight: 300(UID)
3395
+ * Weight(UID): 300
3396
+ *
3397
+ * Security Type: TRADE
2654
3398
  *
2655
3399
  * @summary Enable Isolated Margin Account (TRADE)
2656
3400
  * @param {EnableIsolatedMarginAccountRequest} requestParameters Request parameters.
2657
3401
  *
2658
3402
  * @returns {Promise<RestApiResponse<EnableIsolatedMarginAccountResponse>>}
2659
3403
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2660
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Enable-Isolated-Margin-Account Binance API Documentation}
3404
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#enable-isolated-margin-account Binance API Documentation}
2661
3405
  */
2662
3406
  enableIsolatedMarginAccount(requestParameters) {
2663
3407
  return this.accountApi.enableIsolatedMarginAccount(requestParameters);
@@ -2665,14 +3409,16 @@ var RestAPI = class {
2665
3409
  /**
2666
3410
  * Get BNB Burn Status
2667
3411
  *
2668
- * Weight: 1(IP)
3412
+ * Weight(IP): 1
3413
+ *
3414
+ * Security Type: USER_DATA
2669
3415
  *
2670
3416
  * @summary Get BNB Burn Status (USER_DATA)
2671
3417
  * @param {GetBnbBurnStatusRequest} requestParameters Request parameters.
2672
3418
  *
2673
3419
  * @returns {Promise<RestApiResponse<GetBnbBurnStatusResponse>>}
2674
3420
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2675
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Get-BNB-Burn-Status Binance API Documentation}
3421
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-bnb-burn-status Binance API Documentation}
2676
3422
  */
2677
3423
  getBnbBurnStatus(requestParameters = {}) {
2678
3424
  return this.accountApi.getBnbBurnStatus(requestParameters);
@@ -2680,14 +3426,16 @@ var RestAPI = class {
2680
3426
  /**
2681
3427
  * Get personal margin level information
2682
3428
  *
2683
- * Weight: 10(IP)
3429
+ * Weight(IP): 10
3430
+ *
3431
+ * Security Type: USER_DATA
2684
3432
  *
2685
3433
  * @summary Get Summary of Margin account (USER_DATA)
2686
3434
  * @param {GetSummaryOfMarginAccountRequest} requestParameters Request parameters.
2687
3435
  *
2688
3436
  * @returns {Promise<RestApiResponse<GetSummaryOfMarginAccountResponse>>}
2689
3437
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2690
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Get-Summary-of-Margin-account Binance API Documentation}
3438
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#get-summary-of-margin-account Binance API Documentation}
2691
3439
  */
2692
3440
  getSummaryOfMarginAccount(requestParameters = {}) {
2693
3441
  return this.accountApi.getSummaryOfMarginAccount(requestParameters);
@@ -2695,14 +3443,26 @@ var RestAPI = class {
2695
3443
  /**
2696
3444
  * Query Cross Isolated Margin Capital Flow
2697
3445
  *
2698
- * Weight: 100(IP)
3446
+ * Weight(IP): 100
3447
+ *
3448
+ * Security Type: USER_DATA
3449
+ *
3450
+ * Notes:
3451
+ * - Only supports querying the data of the last 90 days
3452
+ *
3453
+ * - The time between startTime and endTime cannot be longer than 7 days.
3454
+ *
3455
+ * - If fromId is set, the data with id > fromId will be returned.
3456
+ * Otherwise the latest data will be returned
3457
+ *
3458
+ * - To query isolated data, Symbol needs to be entered.
2699
3459
  *
2700
3460
  * @summary Query Cross Isolated Margin Capital Flow (USER_DATA)
2701
3461
  * @param {QueryCrossIsolatedMarginCapitalFlowRequest} requestParameters Request parameters.
2702
3462
  *
2703
3463
  * @returns {Promise<RestApiResponse<QueryCrossIsolatedMarginCapitalFlowResponse>>}
2704
3464
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2705
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Isolated-Margin-Capital-Flow Binance API Documentation}
3465
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-isolated-margin-capital-flow Binance API Documentation}
2706
3466
  */
2707
3467
  queryCrossIsolatedMarginCapitalFlow(requestParameters = {}) {
2708
3468
  return this.accountApi.queryCrossIsolatedMarginCapitalFlow(requestParameters);
@@ -2710,14 +3470,16 @@ var RestAPI = class {
2710
3470
  /**
2711
3471
  * Query Cross Margin Account Details
2712
3472
  *
2713
- * Weight: 10(IP)
3473
+ * Weight(IP): 10
3474
+ *
3475
+ * Security Type: USER_DATA
2714
3476
  *
2715
3477
  * @summary Query Cross Margin Account Details (USER_DATA)
2716
3478
  * @param {QueryCrossMarginAccountDetailsRequest} requestParameters Request parameters.
2717
3479
  *
2718
3480
  * @returns {Promise<RestApiResponse<QueryCrossMarginAccountDetailsResponse>>}
2719
3481
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2720
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details Binance API Documentation}
3482
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-account-details Binance API Documentation}
2721
3483
  */
2722
3484
  queryCrossMarginAccountDetails(requestParameters = {}) {
2723
3485
  return this.accountApi.queryCrossMarginAccountDetails(requestParameters);
@@ -2725,14 +3487,16 @@ var RestAPI = class {
2725
3487
  /**
2726
3488
  * Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
2727
3489
  *
2728
- * Weight: 1 when coin is specified;(IP)
3490
+ * Weight: 1 when coin is specified;(IP) 5 when the coin parameter is omitted(IP)
3491
+ *
3492
+ * Security Type: USER_DATA
2729
3493
  *
2730
3494
  * @summary Query Cross Margin Fee Data (USER_DATA)
2731
3495
  * @param {QueryCrossMarginFeeDataRequest} requestParameters Request parameters.
2732
3496
  *
2733
3497
  * @returns {Promise<RestApiResponse<QueryCrossMarginFeeDataResponse>>}
2734
3498
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2735
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Fee-Data Binance API Documentation}
3499
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-cross-margin-fee-data Binance API Documentation}
2736
3500
  */
2737
3501
  queryCrossMarginFeeData(requestParameters = {}) {
2738
3502
  return this.accountApi.queryCrossMarginFeeData(requestParameters);
@@ -2740,14 +3504,16 @@ var RestAPI = class {
2740
3504
  /**
2741
3505
  * Query enabled isolated margin account limit.
2742
3506
  *
2743
- * Weight: 1(IP)
3507
+ * Weight(IP): 1
3508
+ *
3509
+ * Security Type: USER_DATA
2744
3510
  *
2745
3511
  * @summary Query Enabled Isolated Margin Account Limit (USER_DATA)
2746
3512
  * @param {QueryEnabledIsolatedMarginAccountLimitRequest} requestParameters Request parameters.
2747
3513
  *
2748
3514
  * @returns {Promise<RestApiResponse<QueryEnabledIsolatedMarginAccountLimitResponse>>}
2749
3515
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2750
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Enabled-Isolated-Margin-Account-Limit Binance API Documentation}
3516
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-enabled-isolated-margin-account-limit Binance API Documentation}
2751
3517
  */
2752
3518
  queryEnabledIsolatedMarginAccountLimit(requestParameters = {}) {
2753
3519
  return this.accountApi.queryEnabledIsolatedMarginAccountLimit(requestParameters);
@@ -2755,17 +3521,22 @@ var RestAPI = class {
2755
3521
  /**
2756
3522
  * Query Isolated Margin Account Info
2757
3523
  *
2758
- * If "symbols" is not sent, all isolated assets will be returned.
2759
- * If "symbols" is sent, only the isolated assets of the sent symbols will be returned.
3524
+ * Weight(IP): 10
3525
+ *
3526
+ * Security Type: USER_DATA
3527
+ *
3528
+ * Notes:
3529
+ * - If "symbols" is not sent, all isolated assets will be returned.
2760
3530
  *
2761
- * Weight: 10(IP)
3531
+ * - If "symbols" is sent, only the isolated assets of the sent symbols
3532
+ * will be returned.
2762
3533
  *
2763
3534
  * @summary Query Isolated Margin Account Info (USER_DATA)
2764
3535
  * @param {QueryIsolatedMarginAccountInfoRequest} requestParameters Request parameters.
2765
3536
  *
2766
3537
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginAccountInfoResponse>>}
2767
3538
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2768
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info Binance API Documentation}
3539
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-account-info Binance API Documentation}
2769
3540
  */
2770
3541
  queryIsolatedMarginAccountInfo(requestParameters = {}) {
2771
3542
  return this.accountApi.queryIsolatedMarginAccountInfo(requestParameters);
@@ -2773,14 +3544,16 @@ var RestAPI = class {
2773
3544
  /**
2774
3545
  * Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
2775
3546
  *
2776
- * Weight: 1 when a single is specified;(IP)
3547
+ * Weight: 1 when a single is specified;(IP) 10 when the symbol parameter is omitted(IP)
3548
+ *
3549
+ * Security Type: USER_DATA
2777
3550
  *
2778
3551
  * @summary Query Isolated Margin Fee Data (USER_DATA)
2779
3552
  * @param {QueryIsolatedMarginFeeDataRequest} requestParameters Request parameters.
2780
3553
  *
2781
3554
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginFeeDataResponse>>}
2782
3555
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2783
- * @see {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data Binance API Documentation}
3556
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/account#query-isolated-margin-fee-data Binance API Documentation}
2784
3557
  */
2785
3558
  queryIsolatedMarginFeeData(requestParameters = {}) {
2786
3559
  return this.accountApi.queryIsolatedMarginFeeData(requestParameters);
@@ -2788,14 +3561,16 @@ var RestAPI = class {
2788
3561
  /**
2789
3562
  * Get future hourly interest rate
2790
3563
  *
2791
- * Weight: 100
3564
+ * Weight(IP): 100
3565
+ *
3566
+ * Security Type: USER_DATA
2792
3567
  *
2793
3568
  * @summary Get future hourly interest rate (USER_DATA)
2794
3569
  * @param {GetFutureHourlyInterestRateRequest} requestParameters Request parameters.
2795
3570
  *
2796
3571
  * @returns {Promise<RestApiResponse<GetFutureHourlyInterestRateResponse>>}
2797
3572
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2798
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate Binance API Documentation}
3573
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-future-hourly-interest-rate Binance API Documentation}
2799
3574
  */
2800
3575
  getFutureHourlyInterestRate(requestParameters) {
2801
3576
  return this.borrowRepayApi.getFutureHourlyInterestRate(requestParameters);
@@ -2803,42 +3578,64 @@ var RestAPI = class {
2803
3578
  /**
2804
3579
  * Get Interest History
2805
3580
  *
2806
- * Response in descending order
2807
- * If isolatedSymbol is not sent, crossed margin data will be returned
2808
- * The max interval between `startTime` and `endTime` is 30 days. It is a MUST to ensure data correctness.
2809
- * If `startTime`and `endTime` not sent, return records of the last 7 days by default.
2810
- * If `startTime` is sent and `endTime` is not sent, return records of [max(`startTime`, now-30d), now].
2811
- * If `startTime` is not sent and `endTime` is sent, return records of [`endTime`-7, `endTime`]
2812
- * `type` in response has 4 enums:
2813
- * `PERIODIC` interest charged per hour
2814
- * `ON_BORROW` first interest charged on borrow
2815
- * `PERIODIC_CONVERTED` interest charged per hour converted into BNB
2816
- * `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB
2817
- * `PORTFOLIO` interest charged daily on the portfolio margin negative balance
2818
- *
2819
- * Weight: 1(IP)
3581
+ * Weight(IP): 1
3582
+ *
3583
+ * Security Type: USER_DATA
3584
+ *
3585
+ * Notes:
3586
+ * - Response in descending order
3587
+ *
3588
+ * - If isolatedSymbol is not sent, crossed margin data will be returned
3589
+ *
3590
+ * - The max interval between `startTime` and `endTime` is 30 days. It is a
3591
+ * MUST to ensure data correctness.
3592
+ *
3593
+ * - If `startTime`and `endTime` not sent, return records of the last 7
3594
+ * days by default.
3595
+ *
3596
+ * - If `startTime` is sent and `endTime` is not sent, return records of
3597
+ * [max(`startTime`, now-30d), now].
3598
+ *
3599
+ * - If `startTime` is not sent and `endTime` is sent, return records of
3600
+ * [`endTime`-7, `endTime`]
3601
+ *
3602
+ * - `type` in response has 4 enums:
3603
+ *
3604
+ * - `PERIODIC` interest charged per hour
3605
+ *
3606
+ * - `ON_BORROW` first interest charged on borrow
3607
+ *
3608
+ * - `PERIODIC_CONVERTED` interest charged per hour converted into BNB
3609
+ *
3610
+ * - `ON_BORROW_CONVERTED` first interest charged on borrow converted into
3611
+ * BNB
3612
+ *
3613
+ * - `PORTFOLIO` interest charged daily on the portfolio margin negative
3614
+ * balance
2820
3615
  *
2821
3616
  * @summary Get Interest History (USER_DATA)
2822
3617
  * @param {GetInterestHistoryRequest} requestParameters Request parameters.
2823
3618
  *
2824
3619
  * @returns {Promise<RestApiResponse<GetInterestHistoryResponse>>}
2825
3620
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2826
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History Binance API Documentation}
3621
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#get-interest-history Binance API Documentation}
2827
3622
  */
2828
3623
  getInterestHistory(requestParameters = {}) {
2829
3624
  return this.borrowRepayApi.getInterestHistory(requestParameters);
2830
3625
  }
2831
3626
  /**
2832
- * Margin account borrow/repay(MARGIN)
3627
+ * Margin account borrow/repay
2833
3628
  *
2834
- * Weight: 1500
3629
+ * Weight(UID): 1500
2835
3630
  *
2836
- * @summary Margin account borrow/repay(MARGIN)
3631
+ * Security Type: USER_DATA
3632
+ *
3633
+ * @summary Margin account borrow/repay (USER_DATA)
2837
3634
  * @param {MarginAccountBorrowRepayRequest} requestParameters Request parameters.
2838
3635
  *
2839
3636
  * @returns {Promise<RestApiResponse<MarginAccountBorrowRepayResponse>>}
2840
3637
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2841
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Margin-account-borrow-repay Binance API Documentation}
3638
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#margin-account-borrow-repay Binance API Documentation}
2842
3639
  */
2843
3640
  marginAccountBorrowRepay(requestParameters) {
2844
3641
  return this.borrowRepayApi.marginAccountBorrowRepay(requestParameters);
@@ -2846,19 +3643,27 @@ var RestAPI = class {
2846
3643
  /**
2847
3644
  * Query borrow/repay records in Margin account
2848
3645
  *
2849
- * `txId` or `startTime` must be sent. `txId` takes precedence.
2850
- * If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
2851
- * If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
2852
- * `startTime` set as `endTime` - 7days by default, `endTime` set as current time by default
3646
+ * Weight(IP): 10
3647
+ *
3648
+ * Security Type: USER_DATA
3649
+ *
3650
+ * Notes:
3651
+ * - `txId` or `startTime` must be sent. `txId` takes precedence.
2853
3652
  *
2854
- * Weight: 10(IP)
3653
+ * - Response in descending order
2855
3654
  *
2856
- * @summary Query borrow/repay records in Margin account(USER_DATA)
3655
+ * - If an asset is sent, data within 30 days before `endTime`; If an asset is not sent, data within 7 days before `endTime`
3656
+ *
3657
+ * - If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
3658
+ *
3659
+ * - `startTime` set as `endTime` - 7 days by default, `endTime` set as current time by default
3660
+ *
3661
+ * @summary Query borrow/repay records in Margin account (USER_DATA)
2857
3662
  * @param {QueryBorrowRepayRecordsInMarginAccountRequest} requestParameters Request parameters.
2858
3663
  *
2859
3664
  * @returns {Promise<RestApiResponse<QueryBorrowRepayRecordsInMarginAccountResponse>>}
2860
3665
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2861
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Borrow-Repay Binance API Documentation}
3666
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-borrow-repay-records-in-margin-account Binance API Documentation}
2862
3667
  */
2863
3668
  queryBorrowRepayRecordsInMarginAccount(requestParameters) {
2864
3669
  return this.borrowRepayApi.queryBorrowRepayRecordsInMarginAccount(requestParameters);
@@ -2866,14 +3671,16 @@ var RestAPI = class {
2866
3671
  /**
2867
3672
  * Query Margin Interest Rate History
2868
3673
  *
2869
- * Weight: 1(IP)
3674
+ * Weight(IP): 1
3675
+ *
3676
+ * Security Type: USER_DATA
2870
3677
  *
2871
3678
  * @summary Query Margin Interest Rate History (USER_DATA)
2872
3679
  * @param {QueryMarginInterestRateHistoryRequest} requestParameters Request parameters.
2873
3680
  *
2874
3681
  * @returns {Promise<RestApiResponse<QueryMarginInterestRateHistoryResponse>>}
2875
3682
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2876
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History Binance API Documentation}
3683
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-margin-interest-rate-history Binance API Documentation}
2877
3684
  */
2878
3685
  queryMarginInterestRateHistory(requestParameters) {
2879
3686
  return this.borrowRepayApi.queryMarginInterestRateHistory(requestParameters);
@@ -2881,17 +3688,20 @@ var RestAPI = class {
2881
3688
  /**
2882
3689
  * Query Max Borrow
2883
3690
  *
2884
- * If isolatedSymbol is not sent, crossed margin data will be sent.
2885
- * `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
3691
+ * Weight(IP): 50
2886
3692
  *
2887
- * Weight: 50(IP)
3693
+ * Security Type: USER_DATA
3694
+ *
3695
+ * Notes:
3696
+ * - If isolatedSymbol is not sent, crossed margin data will be sent.
3697
+ * - `borrowLimit` is also available from [https://www.binance.com/en/margin-fee](https://www.binance.com/en/margin-fee)
2888
3698
  *
2889
3699
  * @summary Query Max Borrow (USER_DATA)
2890
3700
  * @param {QueryMaxBorrowRequest} requestParameters Request parameters.
2891
3701
  *
2892
3702
  * @returns {Promise<RestApiResponse<QueryMaxBorrowResponse>>}
2893
3703
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2894
- * @see {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Max-Borrow Binance API Documentation}
3704
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/borrow-repay#query-max-borrow Binance API Documentation}
2895
3705
  */
2896
3706
  queryMaxBorrow(requestParameters) {
2897
3707
  return this.borrowRepayApi.queryMaxBorrow(requestParameters);
@@ -2899,13 +3709,15 @@ var RestAPI = class {
2899
3709
  /**
2900
3710
  * Cross margin collateral ratio
2901
3711
  *
2902
- * Weight: 100(IP)
3712
+ * Weight(IP): 100
3713
+ *
3714
+ * Security Type: MARKET_DATA
2903
3715
  *
2904
3716
  * @summary Cross margin collateral ratio (MARKET_DATA)
2905
3717
  *
2906
3718
  * @returns {Promise<RestApiResponse<CrossMarginCollateralRatioResponse>>}
2907
3719
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2908
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Cross-margin-collateral-ratio Binance API Documentation}
3720
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#cross-margin-collateral-ratio Binance API Documentation}
2909
3721
  */
2910
3722
  crossMarginCollateralRatio() {
2911
3723
  return this.marketDataApi.crossMarginCollateralRatio();
@@ -2913,14 +3725,16 @@ var RestAPI = class {
2913
3725
  /**
2914
3726
  * Get All Cross Margin Pairs
2915
3727
  *
2916
- * Weight: 1(IP)
3728
+ * Weight(IP): 1
3729
+ *
3730
+ * Security Type: MARKET_DATA
2917
3731
  *
2918
3732
  * @summary Get All Cross Margin Pairs (MARKET_DATA)
2919
3733
  * @param {GetAllCrossMarginPairsRequest} requestParameters Request parameters.
2920
3734
  *
2921
3735
  * @returns {Promise<RestApiResponse<GetAllCrossMarginPairsResponse>>}
2922
3736
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2923
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs Binance API Documentation}
3737
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-cross-margin-pairs Binance API Documentation}
2924
3738
  */
2925
3739
  getAllCrossMarginPairs(requestParameters = {}) {
2926
3740
  return this.marketDataApi.getAllCrossMarginPairs(requestParameters);
@@ -2928,14 +3742,16 @@ var RestAPI = class {
2928
3742
  /**
2929
3743
  * Get All Isolated Margin Symbol
2930
3744
  *
2931
- * Weight: 10(IP)
3745
+ * Weight(IP): 10
3746
+ *
3747
+ * Security Type: MARKET_DATA
2932
3748
  *
2933
- * @summary Get All Isolated Margin Symbol(MARKET_DATA)
3749
+ * @summary Get All Isolated Margin Symbol (MARKET_DATA)
2934
3750
  * @param {GetAllIsolatedMarginSymbolRequest} requestParameters Request parameters.
2935
3751
  *
2936
3752
  * @returns {Promise<RestApiResponse<GetAllIsolatedMarginSymbolResponse>>}
2937
3753
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2938
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol Binance API Documentation}
3754
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-isolated-margin-symbol Binance API Documentation}
2939
3755
  */
2940
3756
  getAllIsolatedMarginSymbol(requestParameters = {}) {
2941
3757
  return this.marketDataApi.getAllIsolatedMarginSymbol(requestParameters);
@@ -2943,14 +3759,16 @@ var RestAPI = class {
2943
3759
  /**
2944
3760
  * Get All Margin Assets.
2945
3761
  *
2946
- * Weight: 1(IP)
3762
+ * Weight(IP): 1
3763
+ *
3764
+ * Security Type: MARKET_DATA
2947
3765
  *
2948
3766
  * @summary Get All Margin Assets (MARKET_DATA)
2949
3767
  * @param {GetAllMarginAssetsRequest} requestParameters Request parameters.
2950
3768
  *
2951
3769
  * @returns {Promise<RestApiResponse<GetAllMarginAssetsResponse>>}
2952
3770
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2953
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets Binance API Documentation}
3771
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-all-margin-assets Binance API Documentation}
2954
3772
  */
2955
3773
  getAllMarginAssets(requestParameters = {}) {
2956
3774
  return this.marketDataApi.getAllMarginAssets(requestParameters);
@@ -2958,33 +3776,48 @@ var RestAPI = class {
2958
3776
  /**
2959
3777
  * Get tokens or symbols delist schedule for cross margin and isolated margin
2960
3778
  *
2961
- * Weight: 100
3779
+ * Weight(IP): 100
3780
+ *
3781
+ * Security Type: MARKET_DATA
2962
3782
  *
2963
3783
  * @summary Get Delist Schedule (MARKET_DATA)
2964
3784
  * @param {GetDelistScheduleRequest} requestParameters Request parameters.
2965
3785
  *
2966
3786
  * @returns {Promise<RestApiResponse<GetDelistScheduleResponse>>}
2967
3787
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2968
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Delist-Schedule Binance API Documentation}
3788
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-delist-schedule Binance API Documentation}
2969
3789
  */
2970
3790
  getDelistSchedule(requestParameters = {}) {
2971
3791
  return this.marketDataApi.getDelistSchedule(requestParameters);
2972
3792
  }
2973
3793
  /**
2974
3794
  * Query trading pairs with restriction on limit price range.
2975
- * In margin trading, you can place orders with limit price. Limit price should be within (-15%, 15%) of current index price for a list of margin trading pairs. This rule only impacts limit sell orders with limit price that is lower than current index price and limit buy orders with limit price that is higher than current index price.
2976
3795
  *
2977
- * - Buy order: Your order will be rejected with an error message notification if the limit price is 15% above the index price.
2978
- * - Sell order: Your order will be rejected with an error message notification if the limit price is 15% below the index price.
2979
- * Please review the limit price order placing strategy, backtest and calibrate the planned order size with the trading volume and order book depth to prevent trading loss.
3796
+ * In margin trading, you can place orders with limit price. Limit price
3797
+ * should be within (-15%, 15%) of current index price for a list of margin
3798
+ * trading pairs. This rule only impacts limit sell orders with limit price
3799
+ * that is lower than current index price and limit buy orders with limit
3800
+ * price that is higher than current index price.
3801
+ *
3802
+ * - Buy order: Your order will be rejected with an error message
3803
+ * notification if the limit price is 15% above the index price.
3804
+ *
3805
+ * - Sell order: Your order will be rejected with an error message
3806
+ * notification if the limit price is 15% below the index price.
2980
3807
  *
2981
- * Weight: 1
3808
+ * Please review the limit price order placing strategy, backtest and
3809
+ * calibrate the planned order size with the trading volume and order book
3810
+ * depth to prevent trading loss.
2982
3811
  *
2983
- * @summary Get Limit Price Pairs(MARKET_DATA)
3812
+ * Weight(IP): 1
3813
+ *
3814
+ * Security Type: MARKET_DATA
3815
+ *
3816
+ * @summary Get Limit Price Pairs (MARKET_DATA)
2984
3817
  *
2985
3818
  * @returns {Promise<RestApiResponse<GetLimitPricePairsResponse>>}
2986
3819
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2987
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Limit-Price-Pairs Binance API Documentation}
3820
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-limit-price-pairs Binance API Documentation}
2988
3821
  */
2989
3822
  getLimitPricePairs() {
2990
3823
  return this.marketDataApi.getLimitPricePairs();
@@ -2992,14 +3825,16 @@ var RestAPI = class {
2992
3825
  /**
2993
3826
  * Get the upcoming tokens or symbols listing schedule for Cross Margin and Isolated Margin.
2994
3827
  *
2995
- * Weight: 100
3828
+ * Weight(IP): 100
3829
+ *
3830
+ * Security Type: MARKET_DATA
2996
3831
  *
2997
3832
  * @summary Get list Schedule (MARKET_DATA)
2998
3833
  * @param {GetListScheduleRequest} requestParameters Request parameters.
2999
3834
  *
3000
3835
  * @returns {Promise<RestApiResponse<GetListScheduleResponse>>}
3001
3836
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3002
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-list-Schedule Binance API Documentation}
3837
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-list-schedule Binance API Documentation}
3003
3838
  */
3004
3839
  getListSchedule(requestParameters = {}) {
3005
3840
  return this.marketDataApi.getListSchedule(requestParameters);
@@ -3007,27 +3842,31 @@ var RestAPI = class {
3007
3842
  /**
3008
3843
  * Get Margin Asset Risk-Based Liquidation Ratio
3009
3844
  *
3010
- * Weight: 1
3845
+ * Weight(IP): 1
3846
+ *
3847
+ * Security Type: MARKET_DATA
3011
3848
  *
3012
3849
  * @summary Get Margin Asset Risk-Based Liquidation Ratio (MARKET_DATA)
3013
3850
  *
3014
3851
  * @returns {Promise<RestApiResponse<GetMarginAssetRiskBasedLiquidationRatioResponse>>}
3015
3852
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3016
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Asset-Risk-Based-Liquidation-Ratio Binance API Documentation}
3853
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-asset-risk-based-liquidation-ratio Binance API Documentation}
3017
3854
  */
3018
3855
  getMarginAssetRiskBasedLiquidationRatio() {
3019
3856
  return this.marketDataApi.getMarginAssetRiskBasedLiquidationRatio();
3020
3857
  }
3021
3858
  /**
3022
- * Get Margin Restricted Assets
3859
+ * Get the list of margin-restricted assets.
3860
+ *
3861
+ * Weight(IP): 1
3023
3862
  *
3024
- * Weight: 1
3863
+ * Security Type: MARKET_DATA
3025
3864
  *
3026
3865
  * @summary Get Margin Restricted Assets (MARKET_DATA)
3027
3866
  *
3028
3867
  * @returns {Promise<RestApiResponse<GetMarginRestrictedAssetsResponse>>}
3029
3868
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3030
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Get-Margin-Restricted-Assets Binance API Documentation}
3869
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#get-margin-restricted-assets Binance API Documentation}
3031
3870
  */
3032
3871
  getMarginRestrictedAssets() {
3033
3872
  return this.marketDataApi.getMarginRestrictedAssets();
@@ -3035,14 +3874,16 @@ var RestAPI = class {
3035
3874
  /**
3036
3875
  * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
3037
3876
  *
3038
- * Weight: 1(IP)
3877
+ * Weight(IP): 1
3878
+ *
3879
+ * Security Type: USER_DATA
3039
3880
  *
3040
3881
  * @summary Query Isolated Margin Tier Data (USER_DATA)
3041
3882
  * @param {QueryIsolatedMarginTierDataRequest} requestParameters Request parameters.
3042
3883
  *
3043
3884
  * @returns {Promise<RestApiResponse<QueryIsolatedMarginTierDataResponse>>}
3044
3885
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3045
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Isolated-Margin-Tier-Data Binance API Documentation}
3886
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-isolated-margin-tier-data Binance API Documentation}
3046
3887
  */
3047
3888
  queryIsolatedMarginTierData(requestParameters) {
3048
3889
  return this.marketDataApi.queryIsolatedMarginTierData(requestParameters);
@@ -3050,13 +3891,15 @@ var RestAPI = class {
3050
3891
  /**
3051
3892
  * Liability Coin Leverage Bracket in Cross Margin Pro Mode
3052
3893
  *
3053
- * Weight: 1
3894
+ * Weight(IP): 1
3895
+ *
3896
+ * Security Type: MARKET_DATA
3054
3897
  *
3055
- * @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode(MARKET_DATA)
3898
+ * @summary Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA)
3056
3899
  *
3057
3900
  * @returns {Promise<RestApiResponse<QueryLiabilityCoinLeverageBracketInCrossMarginProModeResponse>>}
3058
3901
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3059
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Liability-Coin-Leverage-Bracket-in-Cross-Margin-Pro-Mode Binance API Documentation}
3902
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-liability-coin-leverage-bracket-in-cross-margin-pro-mode Binance API Documentation}
3060
3903
  */
3061
3904
  queryLiabilityCoinLeverageBracketInCrossMarginProMode() {
3062
3905
  return this.marketDataApi.queryLiabilityCoinLeverageBracketInCrossMarginProMode();
@@ -3064,14 +3907,16 @@ var RestAPI = class {
3064
3907
  /**
3065
3908
  * Margin available Inventory query
3066
3909
  *
3067
- * Weight: 50
3910
+ * Weight(UID): 50
3068
3911
  *
3069
- * @summary Query Margin Available Inventory(USER_DATA)
3912
+ * Security Type: USER_DATA
3913
+ *
3914
+ * @summary Query Margin Available Inventory (USER_DATA)
3070
3915
  * @param {QueryMarginAvailableInventoryRequest} requestParameters Request parameters.
3071
3916
  *
3072
3917
  * @returns {Promise<RestApiResponse<QueryMarginAvailableInventoryResponse>>}
3073
3918
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3074
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-margin-avaliable-inventory Binance API Documentation}
3919
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-available-inventory Binance API Documentation}
3075
3920
  */
3076
3921
  queryMarginAvailableInventory(requestParameters) {
3077
3922
  return this.marketDataApi.queryMarginAvailableInventory(requestParameters);
@@ -3079,64 +3924,29 @@ var RestAPI = class {
3079
3924
  /**
3080
3925
  * Query Margin PriceIndex
3081
3926
  *
3082
- * Weight: 10(IP)
3927
+ * Weight(IP): 10
3928
+ *
3929
+ * Security Type: MARKET_DATA
3083
3930
  *
3084
3931
  * @summary Query Margin PriceIndex (MARKET_DATA)
3085
3932
  * @param {QueryMarginPriceindexRequest} requestParameters Request parameters.
3086
3933
  *
3087
3934
  * @returns {Promise<RestApiResponse<QueryMarginPriceindexResponse>>}
3088
3935
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3089
- * @see {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Margin-PriceIndex Binance API Documentation}
3936
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/market-data#query-margin-priceindex Binance API Documentation}
3090
3937
  */
3091
3938
  queryMarginPriceindex(requestParameters) {
3092
3939
  return this.marketDataApi.queryMarginPriceindex(requestParameters);
3093
3940
  }
3094
3941
  /**
3095
- * Close out a user data stream.
3096
- *
3097
- * Weight: 3000
3098
- *
3099
- * @summary Close User Data Stream (USER_STREAM)
3100
- *
3101
- * @returns {Promise<RestApiResponse<void>>}
3102
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3103
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Close-User-Data-Stream Binance API Documentation}
3104
- */
3105
- closeUserDataStream() {
3106
- return this.riskDataStreamApi.closeUserDataStream();
3107
- }
3108
- /**
3109
- * Keepalive a user data stream to prevent a time out.
3110
- *
3111
- * Weight: 1
3112
- *
3113
- * @summary Keepalive User Data Stream (USER_STREAM)
3114
- * @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
3115
- *
3116
- * @returns {Promise<RestApiResponse<void>>}
3117
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3118
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Keepalive-User-Data-Stream Binance API Documentation}
3119
- */
3120
- keepaliveUserDataStream(requestParameters) {
3121
- return this.riskDataStreamApi.keepaliveUserDataStream(requestParameters);
3122
- }
3123
- /**
3124
- * Start a new user data stream.
3942
+ * **Eligibility**
3125
3943
  *
3126
- * Weight: 1
3127
- *
3128
- * @summary Start User Data Stream (USER_STREAM)
3129
- *
3130
- * @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
3131
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3132
- * @see {@link https://developers.binance.com/docs/margin_trading/risk-data-stream/Start-User-Data-Stream Binance API Documentation}
3133
- */
3134
- startUserDataStream() {
3135
- return this.riskDataStreamApi.startUserDataStream();
3136
- }
3137
- /**
3138
3944
  * - Binance Margin offers low-latency trading through a [special key](https://www.binance.com/en/support/faq/frequently-asked-questions-on-margin-special-api-key-3208663e900d4d2e9fec4140e1832f4e), available exclusively to users with VIP level 7 or higher.
3139
3945
  * - If you are VIP level 6 or below, please contact your VIP manager for eligibility criterias.
3946
+ * - All new Margin Special Key users are required to read, understand, and agree to the Margin Special Key Supplemental Product Terms at the master account level before creating a Margin Special Key.
3947
+ * - Once signed at the master account level, the agreement applies to all sub-accounts. The master account and all sub-accounts (Cross Margin Classic and Portfolio Margin Pro) are authorized to create a Margin Special Key and are subject to the LiquidationLoan policy.
3948
+ *
3949
+ * For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
3140
3950
  *
3141
3951
  **Supported Products:**
3142
3952
  *
@@ -3156,67 +3966,144 @@ var RestAPI = class {
3156
3966
  *
3157
3967
  * We recommend to **use Ed25519 API keys** as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below [FAQ](https://www.binance.com/en/support/faq/how-to-generate-an-rsa-key-pair-to-send-api-requests-on-binance-2b79728f331e43079b27440d9d15c5db) .
3158
3968
  *
3159
- * Weight: 1(UID)
3969
+ **How to use the Margin Special Key**
3970
+ * - Use the below `sapi` endpoint to create your margin special API Key.
3971
+ * - For accessing the Cross Margin account, do not send the `symbol` parameter.
3972
+ * - For accessing the Isolated Margin account(s), pass the relevant `symbol` parameter in the API Key creation request.
3973
+ * - Use the generated API Key (and Secret key, if applicable) to perform margin trading and listenKey generation via **Spot** REST API (`https://api.binance.com/api/v3/*`) endpoints.
3974
+ *
3975
+ * Read [REST API](/products/spot/rest-api#signed-trade-and-user_data-endpoint-security) or [WebSocket API](/products/spot/web-socket-api#request-security) documentation to learn how to use different API keys
3976
+ *
3977
+ * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
3978
+ *
3979
+ * Weight(UID): 1
3980
+ *
3981
+ * Security Type: TRADE
3160
3982
  *
3161
- * @summary Create Special Key(Low-Latency Trading)(TRADE)
3983
+ * Response Notes:
3984
+ * - Error Code Description
3985
+ *
3986
+ * - **UNSUPPORTED_OPERATION** : Portfolio Margin is an unsupported
3987
+ * product, please change the account type to a supported margin product.
3988
+ *
3989
+ * - **Forbidden**: Cross Margin Pro accounts require additional
3990
+ * agreements, please contact your relationship manager.
3991
+ *
3992
+ * @summary Create Special Key(Low-Latency Trading) (TRADE)
3162
3993
  * @param {CreateSpecialKeyRequest} requestParameters Request parameters.
3163
3994
  *
3164
3995
  * @returns {Promise<RestApiResponse<CreateSpecialKeyResponse>>}
3165
3996
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3166
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Create-Special-Key-of-Low-Latency-Trading Binance API Documentation}
3997
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#create-special-key Binance API Documentation}
3167
3998
  */
3168
3999
  createSpecialKey(requestParameters) {
3169
4000
  return this.tradeApi.createSpecialKey(requestParameters);
3170
4001
  }
3171
4002
  /**
3172
- * This only applies to Special Key for Low Latency Trading.
4003
+ * Deleting your Margin Special Key alone does not exit you from the Margin Special Key framework or discharge your obligations under the Margin Special Key Supplemental Product Terms. To fully exit, you must:
3173
4004
  *
3174
- * If apiKey is given, apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be deleted.
4005
+ * 1. Delete your Margin Special Key.
4006
+ * 2. Ensure there are no outstanding liabilities on the account.
4007
+ * 3. Call the Exit Margin Special Key API endpoint.
4008
+ * 4. Confirm the exit status via the API response.
3175
4009
  *
3176
- * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
4010
+ * Only after step 4 is completed and the exit status is confirmed by Binance will your account revert to standard liquidation logic and no longer be subject to the Margin Special Key Supplemental Product Terms.
4011
+ *
4012
+ * If apiKey is given, apiName will be ignored. If apiName is given with no
4013
+ * apiKey, all apikeys with given apiName will be deleted.
4014
+ *
4015
+ * You need to enable Permits “Enable Spot & Margin” option for the API Key
4016
+ * which requests this endpoint.
3177
4017
  *
3178
- * Weight: 1(UID)
4018
+ * Weight(UID): 1
3179
4019
  *
3180
- * @summary Delete Special Key(Low-Latency Trading)(TRADE)
4020
+ * Security Type: TRADE
4021
+ *
4022
+ * @summary Delete Special Key(Low-Latency Trading) (TRADE)
3181
4023
  * @param {DeleteSpecialKeyRequest} requestParameters Request parameters.
3182
4024
  *
3183
4025
  * @returns {Promise<RestApiResponse<void>>}
3184
4026
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3185
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Delete-Special-Key-of-Low-Latency-Trading Binance API Documentation}
4027
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#delete-special-key Binance API Documentation}
3186
4028
  */
3187
4029
  deleteSpecialKey(requestParameters = {}) {
3188
4030
  return this.tradeApi.deleteSpecialKey(requestParameters);
3189
4031
  }
3190
4032
  /**
3191
- * Edit ip restriction. This only applies to Special Key for Low Latency Trading.
4033
+ * Edit ip restriction. This only applies to Special Key for Low Latency
4034
+ * Trading.
3192
4035
  *
3193
- * You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
4036
+ * You need to enable Permits “Enable Spot & Margin” option for the API Key
4037
+ * which requests this endpoint.
3194
4038
  *
3195
- * Weight: 1(UID)
4039
+ * Weight(UID): 1
3196
4040
  *
3197
- * @summary Edit ip for Special Key(Low-Latency Trading)(TRADE)
4041
+ * Security Type: TRADE
4042
+ *
4043
+ * @summary Edit ip for Special Key(Low-Latency Trading) (TRADE)
3198
4044
  * @param {EditIpForSpecialKeyRequest} requestParameters Request parameters.
3199
4045
  *
3200
4046
  * @returns {Promise<RestApiResponse<void>>}
3201
4047
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3202
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Edit-ip-for-Special-Key-of-Low-Latency-Trading Binance API Documentation}
4048
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#edit-ip-for-special-key Binance API Documentation}
3203
4049
  */
3204
4050
  editIpForSpecialKey(requestParameters) {
3205
4051
  return this.tradeApi.editIpForSpecialKey(requestParameters);
3206
4052
  }
3207
4053
  /**
4054
+ * Exit the Margin Special Key mode for Cross Margin Classic accounts.
4055
+ *
4056
+ **All outstanding liabilities under the Cross Margin Classic account must be fully repaid before calling this endpoint.** Deleting the Margin Special Key alone does not constitute a valid exit.
4057
+ *
4058
+ * When a user creates a Margin Special API Key, the account enters "Special Key Mode". Upon a successful request, the following actions will be performed atomically:
4059
+ *
4060
+ * 1. All existing Margin Special API Keys under the Cross Margin Classic mode account will be deleted.
4061
+ * 2. All pre-execution margin checks (including Open-order-loss calculation) will revert to standard mode.
4062
+ * 3. A cooldown period (default: 24 hours) will be enforced, during which the account will not be permitted to create new Margin Special API Keys.
4063
+ *
4064
+ * For more information, please refer to [FAQ](https://www.binance.com/en/support/faq/detail/3208663e900d4d2e9fec4140e1832f4e).
4065
+ *
4066
+ **Preconditions:**
4067
+ *
4068
+ * The following conditions must be met; otherwise the request will be rejected:
4069
+ *
4070
+ * - Account type must be **Cross Margin Classic**.
4071
+ * - Account must currently be in **Special Key Mode**. If not, the request silently succeeds.
4072
+ * - Account must **not be in liquidation**.
4073
+ * - Account must **have no liability**.
4074
+ *
4075
+ * You need to enable "Permits Enable Spot & Margin Trading" option for the API Key which requests this endpoint.
4076
+ *
4077
+ * Weight(UID): 10
4078
+ *
4079
+ * Security Type: TRADE
4080
+ *
4081
+ * @summary Exit Special Key Mode (TRADE)
4082
+ * @param {ExitSpecialKeyModeRequest} requestParameters Request parameters.
4083
+ *
4084
+ * @returns {Promise<RestApiResponse<object>>}
4085
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4086
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#exit-special-key-mode Binance API Documentation}
4087
+ */
4088
+ exitSpecialKeyMode(requestParameters = {}) {
4089
+ return this.tradeApi.exitSpecialKeyMode(requestParameters);
4090
+ }
4091
+ /**
3208
4092
  * Get Force Liquidation Record
3209
4093
  *
3210
- * Response in descending order
4094
+ * Weight(IP): 1
3211
4095
  *
3212
- * Weight: 1(IP)
4096
+ * Security Type: USER_DATA
4097
+ *
4098
+ * Notes:
4099
+ * - Response in descending order
3213
4100
  *
3214
4101
  * @summary Get Force Liquidation Record (USER_DATA)
3215
4102
  * @param {GetForceLiquidationRecordRequest} requestParameters Request parameters.
3216
4103
  *
3217
4104
  * @returns {Promise<RestApiResponse<GetForceLiquidationRecordResponse>>}
3218
4105
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3219
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record Binance API Documentation}
4106
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-force-liquidation-record Binance API Documentation}
3220
4107
  */
3221
4108
  getForceLiquidationRecord(requestParameters = {}) {
3222
4109
  return this.tradeApi.getForceLiquidationRecord(requestParameters);
@@ -3224,14 +4111,16 @@ var RestAPI = class {
3224
4111
  /**
3225
4112
  * Query the coins which can be small liability exchange
3226
4113
  *
3227
- * Weight: 100
4114
+ * Weight(IP): 100
4115
+ *
4116
+ * Security Type: USER_DATA
3228
4117
  *
3229
4118
  * @summary Get Small Liability Exchange Coin List (USER_DATA)
3230
4119
  * @param {GetSmallLiabilityExchangeCoinListRequest} requestParameters Request parameters.
3231
4120
  *
3232
4121
  * @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeCoinListResponse>>}
3233
4122
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3234
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-Coin-List Binance API Documentation}
4123
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-coin-list Binance API Documentation}
3235
4124
  */
3236
4125
  getSmallLiabilityExchangeCoinList(requestParameters = {}) {
3237
4126
  return this.tradeApi.getSmallLiabilityExchangeCoinList(requestParameters);
@@ -3239,30 +4128,51 @@ var RestAPI = class {
3239
4128
  /**
3240
4129
  * Get Small liability Exchange History
3241
4130
  *
3242
- * Weight: 100(UID)
4131
+ * Weight(UID): 100
4132
+ *
4133
+ * Security Type: USER_DATA
3243
4134
  *
3244
4135
  * @summary Get Small Liability Exchange History (USER_DATA)
3245
4136
  * @param {GetSmallLiabilityExchangeHistoryRequest} requestParameters Request parameters.
3246
4137
  *
3247
4138
  * @returns {Promise<RestApiResponse<GetSmallLiabilityExchangeHistoryResponse>>}
3248
4139
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3249
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Get-Small-Liability-Exchange-History Binance API Documentation}
4140
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#get-small-liability-exchange-history Binance API Documentation}
3250
4141
  */
3251
4142
  getSmallLiabilityExchangeHistory(requestParameters) {
3252
4143
  return this.tradeApi.getSmallLiabilityExchangeHistory(requestParameters);
3253
4144
  }
3254
4145
  /**
4146
+ * Repays the outstanding cross-margin liquidation loan from the user's spot wallet. A liquidation loan represents the account deficit incurred when account equity turns negative during liquidation (bankruptcy). The repayment amount must be greater than 0 and cannot exceed the remaining loan balance. If the Spot Account has insufficient USDC balance, the repayment will fail.
4147
+ *
4148
+ * Weight(UID): 100
4149
+ *
4150
+ * Security Type: MARGIN
4151
+ *
4152
+ * @summary Liquidation Loan Repay (MARGIN)
4153
+ * @param {LiquidationLoanRepayRequest} requestParameters Request parameters.
4154
+ *
4155
+ * @returns {Promise<RestApiResponse<LiquidationLoanRepayResponse>>}
4156
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4157
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#liquidation-loan-repay Binance API Documentation}
4158
+ */
4159
+ liquidationLoanRepay(requestParameters) {
4160
+ return this.tradeApi.liquidationLoanRepay(requestParameters);
4161
+ }
4162
+ /**
3255
4163
  * Cancels all active orders on a symbol for margin account.<br></br>
3256
4164
  * This includes OCO orders.
3257
4165
  *
3258
- * Weight: 1
4166
+ * Weight(IP): 1
4167
+ *
4168
+ * Security Type: TRADE
3259
4169
  *
3260
4170
  * @summary Margin Account Cancel all Open Orders on a Symbol (TRADE)
3261
4171
  * @param {MarginAccountCancelAllOpenOrdersOnASymbolRequest} requestParameters Request parameters.
3262
4172
  *
3263
4173
  * @returns {Promise<RestApiResponse<MarginAccountCancelAllOpenOrdersOnASymbolResponse>>}
3264
4174
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3265
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders Binance API Documentation}
4175
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-all-open-orders-on-asymbol Binance API Documentation}
3266
4176
  */
3267
4177
  marginAccountCancelAllOpenOrdersOnASymbol(requestParameters) {
3268
4178
  return this.tradeApi.marginAccountCancelAllOpenOrdersOnASymbol(requestParameters);
@@ -3270,16 +4180,19 @@ var RestAPI = class {
3270
4180
  /**
3271
4181
  * Cancel an entire Order List for a margin account.
3272
4182
  *
3273
- * Canceling an individual leg will cancel the entire OCO
4183
+ * Weight(UID): 1
4184
+ *
4185
+ * Security Type: TRADE
3274
4186
  *
3275
- * Weight: 1(UID)
4187
+ * Notes:
4188
+ * - Canceling an individual leg will cancel the entire OCO
3276
4189
  *
3277
4190
  * @summary Margin Account Cancel OCO (TRADE)
3278
4191
  * @param {MarginAccountCancelOcoRequest} requestParameters Request parameters.
3279
4192
  *
3280
4193
  * @returns {Promise<RestApiResponse<MarginAccountCancelOcoResponse>>}
3281
4194
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3282
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-OCO Binance API Documentation}
4195
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-oco Binance API Documentation}
3283
4196
  */
3284
4197
  marginAccountCancelOco(requestParameters) {
3285
4198
  return this.tradeApi.marginAccountCancelOco(requestParameters);
@@ -3287,16 +4200,19 @@ var RestAPI = class {
3287
4200
  /**
3288
4201
  * Cancel an active order for margin account.
3289
4202
  *
3290
- * Either orderId or origClientOrderId must be sent.
4203
+ * Weight(IP): 10
3291
4204
  *
3292
- * Weight: 10(IP)
4205
+ * Security Type: TRADE
4206
+ *
4207
+ * Notes:
4208
+ * - Either orderId or origClientOrderId must be sent.
3293
4209
  *
3294
4210
  * @summary Margin Account Cancel Order (TRADE)
3295
4211
  * @param {MarginAccountCancelOrderRequest} requestParameters Request parameters.
3296
4212
  *
3297
4213
  * @returns {Promise<RestApiResponse<MarginAccountCancelOrderResponse>>}
3298
4214
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3299
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order Binance API Documentation}
4215
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-cancel-order Binance API Documentation}
3300
4216
  */
3301
4217
  marginAccountCancelOrder(requestParameters) {
3302
4218
  return this.tradeApi.marginAccountCancelOrder(requestParameters);
@@ -3304,16 +4220,19 @@ var RestAPI = class {
3304
4220
  /**
3305
4221
  * Send in a new OCO for a margin account
3306
4222
  *
3307
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
4223
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
4224
+ *
4225
+ * Security Type: TRADE
3308
4226
  *
3309
- * Weight: 6(UID)
4227
+ * Notes:
4228
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
3310
4229
  *
3311
4230
  * @summary Margin Account New OCO (TRADE)
3312
4231
  * @param {MarginAccountNewOcoRequest} requestParameters Request parameters.
3313
4232
  *
3314
4233
  * @returns {Promise<RestApiResponse<MarginAccountNewOcoResponse>>}
3315
4234
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3316
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO Binance API Documentation}
4235
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco Binance API Documentation}
3317
4236
  */
3318
4237
  marginAccountNewOco(requestParameters) {
3319
4238
  return this.tradeApi.marginAccountNewOco(requestParameters);
@@ -3321,16 +4240,19 @@ var RestAPI = class {
3321
4240
  /**
3322
4241
  * Post a new order for margin account.
3323
4242
  *
3324
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
4243
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
3325
4244
  *
3326
- * Weight: 6(UID)
4245
+ * Security Type: TRADE
4246
+ *
4247
+ * Notes:
4248
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
3327
4249
  *
3328
4250
  * @summary Margin Account New Order (TRADE)
3329
4251
  * @param {MarginAccountNewOrderRequest} requestParameters Request parameters.
3330
4252
  *
3331
4253
  * @returns {Promise<RestApiResponse<MarginAccountNewOrderResponse>>}
3332
4254
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3333
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order Binance API Documentation}
4255
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-order Binance API Documentation}
3334
4256
  */
3335
4257
  marginAccountNewOrder(requestParameters) {
3336
4258
  return this.tradeApi.marginAccountNewOrder(requestParameters);
@@ -3338,24 +4260,45 @@ var RestAPI = class {
3338
4260
  /**
3339
4261
  * Post a new OTO order for margin account:
3340
4262
  *
3341
- * - An OTO (One-Triggers-the-Other) is an order list comprised of 2 orders.
3342
- * - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book.
3343
- * - The second order is called the **pending order**. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets **fully filled**.
3344
- * - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired.
3345
- * - When the order list is placed, if the working order gets **immediately fully filled**, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status.
3346
- * - OTOs add **2 orders** to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
4263
+ * - An OTO (One-Triggers-the-Other) is an order list comprised of 2
4264
+ * orders.
4265
+ *
4266
+ * - The first order is called the **working order** and must be `LIMIT` or
4267
+ * `LIMIT_MAKER`. Initially, only the working order goes on the order book.
4268
+ *
4269
+ * - The second order is called the **pending order**. It can be any order
4270
+ * type except for `MARKET` orders using parameter `quoteOrderQty`. The
4271
+ * pending order is only placed on the order book when the working order
4272
+ * gets **fully filled**.
3347
4273
  *
3348
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
3349
- * Depending on the `pendingType` or `workingType`, some optional parameters will become mandatory:
4274
+ * - If either the working order or the pending order is cancelled
4275
+ * individually, the other order in the order list will also be canceled or
4276
+ * expired.
3350
4277
  *
3351
- * Weight: 6(UID)
4278
+ * - When the order list is placed, if the working order gets **immediately
4279
+ * fully filled**, the placement response will show the working order as
4280
+ * `FILLED` but the pending order will still appear as `PENDING_NEW`. You
4281
+ * need to query the status of the pending order again to see its updated
4282
+ * status.
4283
+ *
4284
+ * - OTOs add **2 orders** to the unfilled order count,
4285
+ * `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter.
4286
+ *
4287
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
4288
+ *
4289
+ * Security Type: TRADE
4290
+ *
4291
+ * Notes:
4292
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
4293
+ * - Depending on the `pendingType` or `workingType`, some optional
4294
+ * - parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | -------------------------------------------------------- | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingType` = `LIMIT` | `pendingPrice`, `pendingTimeInForce` | | | `pendingType` = `STOP_LOSS` or `TAKE_PROFIT` | `pendingStopPrice` and/or `pendingTrailingDelta` | | | `pendingType` = `STOP_LOSS_LIMIT` or `TAKE_PROFIT_LIMIT` | `pendingPrice`, `pendingStopPrice` and/or `pendingTrailingDelta`, `pendingTimeInForce` | | | `pendingTrailingDelta` is provided | `pendingPrice` | |
3352
4295
  *
3353
4296
  * @summary Margin Account New OTO (TRADE)
3354
4297
  * @param {MarginAccountNewOtoRequest} requestParameters Request parameters.
3355
4298
  *
3356
4299
  * @returns {Promise<RestApiResponse<MarginAccountNewOtoResponse>>}
3357
4300
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3358
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTO Binance API Documentation}
4301
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oto Binance API Documentation}
3359
4302
  */
3360
4303
  marginAccountNewOto(requestParameters) {
3361
4304
  return this.tradeApi.marginAccountNewOto(requestParameters);
@@ -3363,24 +4306,34 @@ var RestAPI = class {
3363
4306
  /**
3364
4307
  * Post a new OTOCO order for margin account:
3365
4308
  *
3366
- * - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders.
3367
- * - The first order is called the **working order** and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book.
4309
+ *
4310
+ * - An OTOCO (One-Triggers-One-Cancels-the-Other) is an order list
4311
+ * comprised of 3 orders.
4312
+ *
4313
+ * - The first order is called the **working order** and must be `LIMIT` or
4314
+ * `LIMIT_MAKER`. Initially, only the working order goes on the order book.
3368
4315
  * - The behavior of the working order is the same as the OTO.
3369
- * - OTOCO has 2 pending orders (pending above and pending below), forming an OCO pair. The pending orders are only placed on the order book when the working order gets **fully filled**.
3370
- * - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO).
3371
- * - OTOCOs add **3 orders** against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
4316
+ * - OTOCO has 2 pending orders (pending above and pending below), forming
4317
+ * an OCO pair. The pending orders are only placed on the order book when
4318
+ * the working order gets **fully filled**.
4319
+ * - The rules of the pending above and pending below follow the same rules as the [Order List OCO](https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-oco).
4320
+ * - OTOCOs add **3 orders** against the unfilled order count,
4321
+ * `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter.
3372
4322
  *
3373
- * autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
3374
- * Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory:
4323
+ * Weight: 6(UID) or 1500(UID) when sideEffectType is MARGIN_BUY or AUTO_BORROW_REPAY
3375
4324
  *
3376
- * Weight: 6(UID)
4325
+ * Security Type: TRADE
4326
+ *
4327
+ * Notes:
4328
+ * - autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
4329
+ * - Depending on the `pendingAboveType`/`pendingBelowType` or `workingType`, some optional parameters will become mandatory: | Type | Additional mandatory parameters | Additional information | | ------------------------------------ | ------------------------------------------------------------ | ---------------------- | | `workingType` = `LIMIT` | `workingTimeInForce` | | | `pendingAboveType`= `LIMIT_MAKER` | `pendingAbovePrice` | | | `pendingAboveType`= `STOP_LOSS` | `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta` | | | `pendingAboveType`=`STOP_LOSS_LIMIT` | `pendingAbovePrice`, `pendingAboveStopPrice` and/or `pendingAboveTrailingDelta`, `pendingAboveTimeInForce` | | | `pendingBelowType`= `LIMIT_MAKER` | `pendingBelowPrice` | | | `pendingBelowType`= `STOP_LOSS` | `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta` | | | `pendingBelowType`=`STOP_LOSS_LIMIT` | `pendingBelowPrice`, `pendingBelowStopPrice` and/or `pendingBelowTrailingDelta`, `pendingBelowTimeInForce` | | | `pendingAboveTrailingDelta` is provided | `pendingAbovePrice` | | | `pendingBelowTrailingDelta` is provided | `pendingBelowPrice` | |
3377
4330
  *
3378
4331
  * @summary Margin Account New OTOCO (TRADE)
3379
4332
  * @param {MarginAccountNewOtocoRequest} requestParameters Request parameters.
3380
4333
  *
3381
4334
  * @returns {Promise<RestApiResponse<MarginAccountNewOtocoResponse>>}
3382
4335
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3383
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OTOCO Binance API Documentation}
4336
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-account-new-otoco Binance API Documentation}
3384
4337
  */
3385
4338
  marginAccountNewOtoco(requestParameters) {
3386
4339
  return this.tradeApi.marginAccountNewOtoco(requestParameters);
@@ -3388,17 +4341,20 @@ var RestAPI = class {
3388
4341
  /**
3389
4342
  * Margin Manual Liquidation
3390
4343
  *
3391
- * This endpoint can support Cross Margin Classic Mode and Pro Mode.
3392
- * And only support Isolated Margin for restricted region.
4344
+ * Weight(UID): 3000
4345
+ *
4346
+ * Security Type: TRADE
3393
4347
  *
3394
- * Weight: 3000
4348
+ * Notes:
4349
+ * - This endpoint supports Cross Margin Classic Mode and Pro Mode.
4350
+ * - Isolated Margin is only supported in restricted regions.
3395
4351
  *
3396
- * @summary Margin Manual Liquidation(MARGIN)
4352
+ * @summary Margin Manual Liquidation (TRADE)
3397
4353
  * @param {MarginManualLiquidationRequest} requestParameters Request parameters.
3398
4354
  *
3399
4355
  * @returns {Promise<RestApiResponse<MarginManualLiquidationResponse>>}
3400
4356
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3401
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Manual-Liquidation Binance API Documentation}
4357
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#margin-manual-liquidation Binance API Documentation}
3402
4358
  */
3403
4359
  marginManualLiquidation(requestParameters) {
3404
4360
  return this.tradeApi.marginManualLiquidation(requestParameters);
@@ -3406,29 +4362,71 @@ var RestAPI = class {
3406
4362
  /**
3407
4363
  * Displays the user's current margin order count usage for all intervals.
3408
4364
  *
3409
- * Weight: 20(IP)
4365
+ * Weight(IP): 20
4366
+ *
4367
+ * Security Type: TRADE
3410
4368
  *
3411
4369
  * @summary Query Current Margin Order Count Usage (TRADE)
3412
4370
  * @param {QueryCurrentMarginOrderCountUsageRequest} requestParameters Request parameters.
3413
4371
  *
3414
4372
  * @returns {Promise<RestApiResponse<QueryCurrentMarginOrderCountUsageResponse>>}
3415
4373
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3416
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Current-Margin-Order-Count-Usage Binance API Documentation}
4374
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-current-margin-order-count-usage Binance API Documentation}
3417
4375
  */
3418
4376
  queryCurrentMarginOrderCountUsage(requestParameters = {}) {
3419
4377
  return this.tradeApi.queryCurrentMarginOrderCountUsage(requestParameters);
3420
4378
  }
3421
4379
  /**
4380
+ * Query the current user's cross-margin liquidation loan information, including the original loan amount, repaid amount, and remaining amount. When a cross-margin account is liquidated and the account equity turns negative (bankruptcy), the system generates a liquidation loan record representing the deficit. This represents the shortfall amount denominated in USDC.
4381
+ *
4382
+ * Weight(UID): 100
4383
+ *
4384
+ * Security Type: USER_DATA
4385
+ *
4386
+ * @summary Query Liquidation Loan (USER_DATA)
4387
+ * @param {QueryLiquidationLoanRequest} requestParameters Request parameters.
4388
+ *
4389
+ * @returns {Promise<RestApiResponse<QueryLiquidationLoanResponse>>}
4390
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4391
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan Binance API Documentation}
4392
+ */
4393
+ queryLiquidationLoan(requestParameters = {}) {
4394
+ return this.tradeApi.queryLiquidationLoan(requestParameters);
4395
+ }
4396
+ /**
4397
+ * Query the repayment history of cross-margin liquidation loans (deficit caused by bankruptcy during liquidation). Supports time-range filtering and pagination.
4398
+ *
4399
+ * Weight(UID): 100
4400
+ *
4401
+ * Security Type: USER_DATA
4402
+ *
4403
+ * Notes:
4404
+ * - The maximum query range is 90 days. If `startTime` is earlier than 90 days ago, it will be clamped to 90 days ago.
4405
+ * - Only records with status `SUCCESS` or `PENDING` are returned. Failed repayment records are excluded.
4406
+ *
4407
+ * @summary Query Liquidation Loan Repay History (USER_DATA)
4408
+ * @param {QueryLiquidationLoanRepayHistoryRequest} requestParameters Request parameters.
4409
+ *
4410
+ * @returns {Promise<RestApiResponse<QueryLiquidationLoanRepayHistoryResponse>>}
4411
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4412
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-liquidation-loan-repay-history Binance API Documentation}
4413
+ */
4414
+ queryLiquidationLoanRepayHistory(requestParameters = {}) {
4415
+ return this.tradeApi.queryLiquidationLoanRepayHistory(requestParameters);
4416
+ }
4417
+ /**
3422
4418
  * Retrieves all OCO for a specific margin account based on provided optional parameters
3423
4419
  *
3424
- * Weight: 200(IP)
4420
+ * Weight(IP): 200
4421
+ *
4422
+ * Security Type: USER_DATA
3425
4423
  *
3426
4424
  * @summary Query Margin Account\'s all OCO (USER_DATA)
3427
4425
  * @param {QueryMarginAccountsAllOcoRequest} requestParameters Request parameters.
3428
4426
  *
3429
4427
  * @returns {Promise<RestApiResponse<QueryMarginAccountsAllOcoResponse>>}
3430
4428
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3431
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-all-OCO Binance API Documentation}
4429
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-oco Binance API Documentation}
3432
4430
  */
3433
4431
  queryMarginAccountsAllOco(requestParameters = {}) {
3434
4432
  return this.tradeApi.queryMarginAccountsAllOco(requestParameters);
@@ -3436,18 +4434,25 @@ var RestAPI = class {
3436
4434
  /**
3437
4435
  * Query Margin Account's All Orders
3438
4436
  *
3439
- * If orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 hours are returned.
3440
- * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
3441
- * Less than 24 hours between startTime and endTime.
4437
+ * Weight(IP): 200
4438
+ *
4439
+ * Security Type: USER_DATA
4440
+ *
4441
+ * Notes:
4442
+ * - If orderId is set, it will get orders >= that orderId. Otherwise the
4443
+ * orders within 24 hours are returned.
4444
+ *
4445
+ * - For some historical orders cummulativeQuoteQty will be < 0, meaning
4446
+ * the data is not available at this time.
3442
4447
  *
3443
- * Weight: 200(IP)
4448
+ * - Less than 24 hours between startTime and endTime.
3444
4449
  *
3445
4450
  * @summary Query Margin Account\'s All Orders (USER_DATA)
3446
4451
  * @param {QueryMarginAccountsAllOrdersRequest} requestParameters Request parameters.
3447
4452
  *
3448
4453
  * @returns {Promise<RestApiResponse<QueryMarginAccountsAllOrdersResponse>>}
3449
4454
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3450
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders Binance API Documentation}
4455
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-all-orders Binance API Documentation}
3451
4456
  */
3452
4457
  queryMarginAccountsAllOrders(requestParameters) {
3453
4458
  return this.tradeApi.queryMarginAccountsAllOrders(requestParameters);
@@ -3455,14 +4460,16 @@ var RestAPI = class {
3455
4460
  /**
3456
4461
  * Retrieves a specific OCO based on provided optional parameters
3457
4462
  *
3458
- * Weight: 10(IP)
4463
+ * Weight(IP): 10
4464
+ *
4465
+ * Security Type: USER_DATA
3459
4466
  *
3460
4467
  * @summary Query Margin Account\'s OCO (USER_DATA)
3461
4468
  * @param {QueryMarginAccountsOcoRequest} requestParameters Request parameters.
3462
4469
  *
3463
4470
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOcoResponse>>}
3464
4471
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3465
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-OCO Binance API Documentation}
4472
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-oco Binance API Documentation}
3466
4473
  */
3467
4474
  queryMarginAccountsOco(requestParameters = {}) {
3468
4475
  return this.tradeApi.queryMarginAccountsOco(requestParameters);
@@ -3470,14 +4477,16 @@ var RestAPI = class {
3470
4477
  /**
3471
4478
  * Query Margin Account's Open OCO
3472
4479
  *
3473
- * Weight: 10(IP)
4480
+ * Weight(IP): 10
4481
+ *
4482
+ * Security Type: USER_DATA
3474
4483
  *
3475
4484
  * @summary Query Margin Account\'s Open OCO (USER_DATA)
3476
4485
  * @param {QueryMarginAccountsOpenOcoRequest} requestParameters Request parameters.
3477
4486
  *
3478
4487
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOcoResponse>>}
3479
4488
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3480
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-OCO Binance API Documentation}
4489
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-oco Binance API Documentation}
3481
4490
  */
3482
4491
  queryMarginAccountsOpenOco(requestParameters = {}) {
3483
4492
  return this.tradeApi.queryMarginAccountsOpenOco(requestParameters);
@@ -3485,18 +4494,26 @@ var RestAPI = class {
3485
4494
  /**
3486
4495
  * Query Margin Account's Open Orders
3487
4496
  *
3488
- * If the symbol is not sent, orders for all symbols will be returned in an array.
3489
- * When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange.
3490
- * If isIsolated ="TRUE", symbol must be sent.
4497
+ * Weight(IP): 10
4498
+ *
4499
+ * Security Type: USER_DATA
4500
+ *
4501
+ * Notes:
4502
+ * - If the symbol is not sent, orders for all symbols will be returned in
4503
+ * an array.
3491
4504
  *
3492
- * Weight: 10(IP)
4505
+ * - When all symbols are returned, the number of requests counted against
4506
+ * the rate limiter is equal to the number of symbols currently trading on
4507
+ * the exchange.
4508
+ *
4509
+ * - If isIsolated ="TRUE", symbol must be sent.
3493
4510
  *
3494
4511
  * @summary Query Margin Account\'s Open Orders (USER_DATA)
3495
4512
  * @param {QueryMarginAccountsOpenOrdersRequest} requestParameters Request parameters.
3496
4513
  *
3497
4514
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOpenOrdersResponse>>}
3498
4515
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3499
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders Binance API Documentation}
4516
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-open-orders Binance API Documentation}
3500
4517
  */
3501
4518
  queryMarginAccountsOpenOrders(requestParameters = {}) {
3502
4519
  return this.tradeApi.queryMarginAccountsOpenOrders(requestParameters);
@@ -3504,17 +4521,22 @@ var RestAPI = class {
3504
4521
  /**
3505
4522
  * Query Margin Account's Order
3506
4523
  *
3507
- * Either orderId or origClientOrderId must be sent.
3508
- * For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
4524
+ * Weight(IP): 10
4525
+ *
4526
+ * Security Type: USER_DATA
3509
4527
  *
3510
- * Weight: 10(IP)
4528
+ * Notes:
4529
+ * - Either orderId or origClientOrderId must be sent.
4530
+ *
4531
+ * - For some historical orders cummulativeQuoteQty will be < 0, meaning
4532
+ * the data is not available at this time.
3511
4533
  *
3512
4534
  * @summary Query Margin Account\'s Order (USER_DATA)
3513
4535
  * @param {QueryMarginAccountsOrderRequest} requestParameters Request parameters.
3514
4536
  *
3515
4537
  * @returns {Promise<RestApiResponse<QueryMarginAccountsOrderResponse>>}
3516
4538
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3517
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order Binance API Documentation}
4539
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-order Binance API Documentation}
3518
4540
  */
3519
4541
  queryMarginAccountsOrder(requestParameters) {
3520
4542
  return this.tradeApi.queryMarginAccountsOrder(requestParameters);
@@ -3522,31 +4544,58 @@ var RestAPI = class {
3522
4544
  /**
3523
4545
  * Query Margin Account's Trade List
3524
4546
  *
3525
- * If fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 hours are returned.
3526
- * Less than 24 hours between startTime and endTime.
4547
+ * Weight(IP): 10
4548
+ *
4549
+ * Security Type: USER_DATA
3527
4550
  *
3528
- * Weight: 10(IP)
4551
+ * Notes:
4552
+ * - If fromId is set, it will get trades >= that fromId. Otherwise the
4553
+ * trades within 24 hours are returned.
4554
+ *
4555
+ * - Less than 24 hours between startTime and endTime.
3529
4556
  *
3530
4557
  * @summary Query Margin Account\'s Trade List (USER_DATA)
3531
4558
  * @param {QueryMarginAccountsTradeListRequest} requestParameters Request parameters.
3532
4559
  *
3533
4560
  * @returns {Promise<RestApiResponse<QueryMarginAccountsTradeListResponse>>}
3534
4561
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3535
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List Binance API Documentation}
4562
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-margin-accounts-trade-list Binance API Documentation}
3536
4563
  */
3537
4564
  queryMarginAccountsTradeList(requestParameters) {
3538
4565
  return this.tradeApi.queryMarginAccountsTradeList(requestParameters);
3539
4566
  }
3540
4567
  /**
4568
+ * Displays the list of orders that were expired due to STP. (Self-Trade Prevention).
4569
+ *
4570
+ * Weight(IP): 10
4571
+ *
4572
+ * Security Type: USER_DATA
4573
+ *
4574
+ * Notes:
4575
+ * - Supported parameter combinations:
4576
+ *
4577
+ * - `symbol` + `preventedMatchId`
4578
+ *
4579
+ * - `symbol` + `orderId`
4580
+ *
4581
+ * - `symbol` + `orderId` + `fromPreventedMatchId`
3541
4582
  *
3542
- * Weight: 10(IP)
4583
+ * - If `orderId` is provided, all prevented matches for that order will be
4584
+ * returned.
3543
4585
  *
3544
- * @summary Query Prevented Matches(USER_DATA)
4586
+ * - If `preventedMatchId` is provided, the specific prevented match will
4587
+ * be returned.
4588
+ *
4589
+ * - A single request returns a maximum of 500 records. If there are more
4590
+ * than 500 records, use `symbol` + `orderId` + `fromPreventedMatchId`
4591
+ * combination for pagination.
4592
+ *
4593
+ * @summary Query Prevented Matches (USER_DATA)
3545
4594
  * @param {QueryPreventedMatchesRequest} requestParameters Request parameters.
3546
4595
  *
3547
4596
  * @returns {Promise<RestApiResponse<QueryPreventedMatchesResponse>>}
3548
4597
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3549
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Prevented-Matches Binance API Documentation}
4598
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-prevented-matches Binance API Documentation}
3550
4599
  */
3551
4600
  queryPreventedMatches(requestParameters) {
3552
4601
  return this.tradeApi.queryPreventedMatches(requestParameters);
@@ -3556,14 +4605,16 @@ var RestAPI = class {
3556
4605
  *
3557
4606
  * This only applies to Special Key for Low Latency Trading.
3558
4607
  *
3559
- * Weight: 1(UID)
4608
+ * Weight(UID): 1
3560
4609
  *
3561
- * @summary Query Special key(Low Latency Trading)(TRADE)
4610
+ * Security Type: TRADE
4611
+ *
4612
+ * @summary Query Special key(Low Latency Trading) (TRADE)
3562
4613
  * @param {QuerySpecialKeyRequest} requestParameters Request parameters.
3563
4614
  *
3564
4615
  * @returns {Promise<RestApiResponse<QuerySpecialKeyResponse>>}
3565
4616
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3566
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-of-Low-Latency-Trading Binance API Documentation}
4617
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key Binance API Documentation}
3567
4618
  */
3568
4619
  querySpecialKey(requestParameters = {}) {
3569
4620
  return this.tradeApi.querySpecialKey(requestParameters);
@@ -3571,14 +4622,16 @@ var RestAPI = class {
3571
4622
  /**
3572
4623
  * This only applies to Special Key for Low Latency Trading.
3573
4624
  *
3574
- * Weight: 1(UID)
4625
+ * Weight(UID): 1
4626
+ *
4627
+ * Security Type: TRADE
3575
4628
  *
3576
- * @summary Query Special key List(Low Latency Trading)(TRADE)
4629
+ * @summary Query Special key List(Low Latency Trading) (TRADE)
3577
4630
  * @param {QuerySpecialKeyListRequest} requestParameters Request parameters.
3578
4631
  *
3579
4632
  * @returns {Promise<RestApiResponse<QuerySpecialKeyListResponse>>}
3580
4633
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3581
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Query-Special-Key-List-of-Low-Latency-Trading Binance API Documentation}
4634
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#query-special-key-list Binance API Documentation}
3582
4635
  */
3583
4636
  querySpecialKeyList(requestParameters = {}) {
3584
4637
  return this.tradeApi.querySpecialKeyList(requestParameters);
@@ -3586,18 +4639,21 @@ var RestAPI = class {
3586
4639
  /**
3587
4640
  * Small Liability Exchange
3588
4641
  *
3589
- * Only convert once within 6 hours
3590
- * Only liability valuation less than 10 USDT are supported
3591
- * The maximum number of coin is 10
4642
+ * Weight(UID): 3000
3592
4643
  *
3593
- * Weight: 3000(UID)
4644
+ * Security Type: MARGIN
4645
+ *
4646
+ * Notes:
4647
+ * - Only convert once within 6 hours
4648
+ * - Only liability valuation less than 10 USDT are supported
4649
+ * - The maximum number of coin is 10
3594
4650
  *
3595
4651
  * @summary Small Liability Exchange (MARGIN)
3596
4652
  * @param {SmallLiabilityExchangeRequest} requestParameters Request parameters.
3597
4653
  *
3598
4654
  * @returns {Promise<RestApiResponse<void>>}
3599
4655
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3600
- * @see {@link https://developers.binance.com/docs/margin_trading/trade/Small-Liability-Exchange Binance API Documentation}
4656
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/trade#small-liability-exchange Binance API Documentation}
3601
4657
  */
3602
4658
  smallLiabilityExchange(requestParameters) {
3603
4659
  return this.tradeApi.smallLiabilityExchange(requestParameters);
@@ -3605,18 +4661,21 @@ var RestAPI = class {
3605
4661
  /**
3606
4662
  * Get Cross Margin Transfer History
3607
4663
  *
3608
- * Response in descending order
3609
- * The max interval between `startTime` and `endTime` is 30 days.
3610
- * Returns data for last 7 days by default
4664
+ * Weight(IP): 1
4665
+ *
4666
+ * Security Type: USER_DATA
3611
4667
  *
3612
- * Weight: 1(IP)
4668
+ * Notes:
4669
+ * - Response in descending order
4670
+ * - The max interval between `startTime` and `endTime` is 30 days.
4671
+ * - Returns data for last 7 days by default
3613
4672
  *
3614
4673
  * @summary Get Cross Margin Transfer History (USER_DATA)
3615
4674
  * @param {GetCrossMarginTransferHistoryRequest} requestParameters Request parameters.
3616
4675
  *
3617
4676
  * @returns {Promise<RestApiResponse<GetCrossMarginTransferHistoryResponse>>}
3618
4677
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3619
- * @see {@link https://developers.binance.com/docs/margin_trading/transfer/Get-Cross-Margin-Transfer-History Binance API Documentation}
4678
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#get-cross-margin-transfer-history Binance API Documentation}
3620
4679
  */
3621
4680
  getCrossMarginTransferHistory(requestParameters = {}) {
3622
4681
  return this.transferApi.getCrossMarginTransferHistory(requestParameters);
@@ -3624,20 +4683,72 @@ var RestAPI = class {
3624
4683
  /**
3625
4684
  * Query Max Transfer-Out Amount
3626
4685
  *
3627
- * If isolatedSymbol is not sent, crossed margin data will be sent.
4686
+ * Weight(IP): 50
3628
4687
  *
3629
- * Weight: 50(IP)
4688
+ * Security Type: USER_DATA
4689
+ *
4690
+ * Notes:
4691
+ * - If isolatedSymbol is not sent, crossed margin data will be sent.
3630
4692
  *
3631
4693
  * @summary Query Max Transfer-Out Amount (USER_DATA)
3632
4694
  * @param {QueryMaxTransferOutAmountRequest} requestParameters Request parameters.
3633
4695
  *
3634
4696
  * @returns {Promise<RestApiResponse<QueryMaxTransferOutAmountResponse>>}
3635
4697
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3636
- * @see {@link https://developers.binance.com/docs/margin_trading/transfer/Query-Max-Transfer-Out-Amount Binance API Documentation}
4698
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/transfer#query-max-transfer-out-amount Binance API Documentation}
3637
4699
  */
3638
4700
  queryMaxTransferOutAmount(requestParameters) {
3639
4701
  return this.transferApi.queryMaxTransferOutAmount(requestParameters);
3640
4702
  }
4703
+ /**
4704
+ * Close out a user data stream.
4705
+ *
4706
+ * Weight(UID): 3000
4707
+ *
4708
+ * Security Type: USER_STREAM
4709
+ *
4710
+ * @summary Close User Data Stream (USER_STREAM)
4711
+ *
4712
+ * @returns {Promise<RestApiResponse<void>>}
4713
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4714
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#close-user-data-stream Binance API Documentation}
4715
+ */
4716
+ closeUserDataStream() {
4717
+ return this.userDataStreamApi.closeUserDataStream();
4718
+ }
4719
+ /**
4720
+ * Keepalive a user data stream to prevent a time out.
4721
+ *
4722
+ * Weight(UID): 1
4723
+ *
4724
+ * Security Type: USER_STREAM
4725
+ *
4726
+ * @summary Keepalive User Data Stream (USER_STREAM)
4727
+ * @param {KeepaliveUserDataStreamRequest} requestParameters Request parameters.
4728
+ *
4729
+ * @returns {Promise<RestApiResponse<void>>}
4730
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4731
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#keepalive-user-data-stream Binance API Documentation}
4732
+ */
4733
+ keepaliveUserDataStream(requestParameters) {
4734
+ return this.userDataStreamApi.keepaliveUserDataStream(requestParameters);
4735
+ }
4736
+ /**
4737
+ * Start a new user data stream.
4738
+ *
4739
+ * Weight(UID): 1
4740
+ *
4741
+ * Security Type: USER_STREAM
4742
+ *
4743
+ * @summary Start User Data Stream (USER_STREAM)
4744
+ *
4745
+ * @returns {Promise<RestApiResponse<StartUserDataStreamResponse>>}
4746
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
4747
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-margin-trading/api/rest-api/user-data-stream#start-user-data-stream Binance API Documentation}
4748
+ */
4749
+ startUserDataStream() {
4750
+ return this.userDataStreamApi.startUserDataStream();
4751
+ }
3641
4752
  };
3642
4753
 
3643
4754
  //#endregion
@@ -3645,26 +4756,75 @@ var RestAPI = class {
3645
4756
  var rest_api_exports = /* @__PURE__ */ __export({
3646
4757
  AccountApi: () => AccountApi,
3647
4758
  BorrowRepayApi: () => BorrowRepayApi,
4759
+ CreateSpecialKeyPermissionModeEnum: () => CreateSpecialKeyPermissionModeEnum,
4760
+ GetCrossMarginTransferHistoryTypeEnum: () => GetCrossMarginTransferHistoryTypeEnum,
4761
+ GetFutureHourlyInterestRateIsIsolatedEnum: () => GetFutureHourlyInterestRateIsIsolatedEnum,
4762
+ MarginAccountBorrowRepayIsIsolatedEnum: () => MarginAccountBorrowRepayIsIsolatedEnum,
4763
+ MarginAccountBorrowRepayTypeEnum: () => MarginAccountBorrowRepayTypeEnum,
4764
+ MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum: () => MarginAccountCancelAllOpenOrdersOnASymbolIsIsolatedEnum,
4765
+ MarginAccountCancelOcoIsIsolatedEnum: () => MarginAccountCancelOcoIsIsolatedEnum,
4766
+ MarginAccountCancelOrderIsIsolatedEnum: () => MarginAccountCancelOrderIsIsolatedEnum,
4767
+ MarginAccountNewOcoIsIsolatedEnum: () => MarginAccountNewOcoIsIsolatedEnum,
3648
4768
  MarginAccountNewOcoNewOrderRespTypeEnum: () => MarginAccountNewOcoNewOrderRespTypeEnum,
4769
+ MarginAccountNewOcoSelfTradePreventionModeEnum: () => MarginAccountNewOcoSelfTradePreventionModeEnum,
4770
+ MarginAccountNewOcoSideEffectTypeEnum: () => MarginAccountNewOcoSideEffectTypeEnum,
3649
4771
  MarginAccountNewOcoSideEnum: () => MarginAccountNewOcoSideEnum,
4772
+ MarginAccountNewOcoStopLimitTimeInForceEnum: () => MarginAccountNewOcoStopLimitTimeInForceEnum,
4773
+ MarginAccountNewOrderIsIsolatedEnum: () => MarginAccountNewOrderIsIsolatedEnum,
3650
4774
  MarginAccountNewOrderNewOrderRespTypeEnum: () => MarginAccountNewOrderNewOrderRespTypeEnum,
4775
+ MarginAccountNewOrderSelfTradePreventionModeEnum: () => MarginAccountNewOrderSelfTradePreventionModeEnum,
4776
+ MarginAccountNewOrderSideEffectTypeEnum: () => MarginAccountNewOrderSideEffectTypeEnum,
3651
4777
  MarginAccountNewOrderSideEnum: () => MarginAccountNewOrderSideEnum,
3652
4778
  MarginAccountNewOrderTimeInForceEnum: () => MarginAccountNewOrderTimeInForceEnum,
4779
+ MarginAccountNewOrderTypeEnum: () => MarginAccountNewOrderTypeEnum,
4780
+ MarginAccountNewOtoIsIsolatedEnum: () => MarginAccountNewOtoIsIsolatedEnum,
3653
4781
  MarginAccountNewOtoNewOrderRespTypeEnum: () => MarginAccountNewOtoNewOrderRespTypeEnum,
4782
+ MarginAccountNewOtoPendingSideEnum: () => MarginAccountNewOtoPendingSideEnum,
4783
+ MarginAccountNewOtoPendingTimeInForceEnum: () => MarginAccountNewOtoPendingTimeInForceEnum,
4784
+ MarginAccountNewOtoPendingTypeEnum: () => MarginAccountNewOtoPendingTypeEnum,
4785
+ MarginAccountNewOtoSelfTradePreventionModeEnum: () => MarginAccountNewOtoSelfTradePreventionModeEnum,
4786
+ MarginAccountNewOtoSideEffectTypeEnum: () => MarginAccountNewOtoSideEffectTypeEnum,
4787
+ MarginAccountNewOtoWorkingSideEnum: () => MarginAccountNewOtoWorkingSideEnum,
4788
+ MarginAccountNewOtoWorkingTimeInForceEnum: () => MarginAccountNewOtoWorkingTimeInForceEnum,
4789
+ MarginAccountNewOtoWorkingTypeEnum: () => MarginAccountNewOtoWorkingTypeEnum,
4790
+ MarginAccountNewOtocoIsIsolatedEnum: () => MarginAccountNewOtocoIsIsolatedEnum,
3654
4791
  MarginAccountNewOtocoNewOrderRespTypeEnum: () => MarginAccountNewOtocoNewOrderRespTypeEnum,
4792
+ MarginAccountNewOtocoPendingAboveTimeInForceEnum: () => MarginAccountNewOtocoPendingAboveTimeInForceEnum,
4793
+ MarginAccountNewOtocoPendingAboveTypeEnum: () => MarginAccountNewOtocoPendingAboveTypeEnum,
4794
+ MarginAccountNewOtocoPendingBelowTimeInForceEnum: () => MarginAccountNewOtocoPendingBelowTimeInForceEnum,
4795
+ MarginAccountNewOtocoPendingBelowTypeEnum: () => MarginAccountNewOtocoPendingBelowTypeEnum,
4796
+ MarginAccountNewOtocoPendingSideEnum: () => MarginAccountNewOtocoPendingSideEnum,
4797
+ MarginAccountNewOtocoSelfTradePreventionModeEnum: () => MarginAccountNewOtocoSelfTradePreventionModeEnum,
4798
+ MarginAccountNewOtocoSideEffectTypeEnum: () => MarginAccountNewOtocoSideEffectTypeEnum,
4799
+ MarginAccountNewOtocoWorkingSideEnum: () => MarginAccountNewOtocoWorkingSideEnum,
4800
+ MarginAccountNewOtocoWorkingTimeInForceEnum: () => MarginAccountNewOtocoWorkingTimeInForceEnum,
4801
+ MarginAccountNewOtocoWorkingTypeEnum: () => MarginAccountNewOtocoWorkingTypeEnum,
4802
+ MarginManualLiquidationTypeEnum: () => MarginManualLiquidationTypeEnum,
3655
4803
  MarketDataApi: () => MarketDataApi,
4804
+ QueryBorrowRepayRecordsInMarginAccountTypeEnum: () => QueryBorrowRepayRecordsInMarginAccountTypeEnum,
4805
+ QueryCrossIsolatedMarginCapitalFlowTypeEnum: () => QueryCrossIsolatedMarginCapitalFlowTypeEnum,
4806
+ QueryCurrentMarginOrderCountUsageIsIsolatedEnum: () => QueryCurrentMarginOrderCountUsageIsIsolatedEnum,
4807
+ QueryMarginAccountsAllOcoIsIsolatedEnum: () => QueryMarginAccountsAllOcoIsIsolatedEnum,
4808
+ QueryMarginAccountsAllOrdersIsIsolatedEnum: () => QueryMarginAccountsAllOrdersIsIsolatedEnum,
4809
+ QueryMarginAccountsOcoIsIsolatedEnum: () => QueryMarginAccountsOcoIsIsolatedEnum,
4810
+ QueryMarginAccountsOpenOcoIsIsolatedEnum: () => QueryMarginAccountsOpenOcoIsIsolatedEnum,
4811
+ QueryMarginAccountsOpenOrdersIsIsolatedEnum: () => QueryMarginAccountsOpenOrdersIsIsolatedEnum,
4812
+ QueryMarginAccountsOrderIsIsolatedEnum: () => QueryMarginAccountsOrderIsIsolatedEnum,
4813
+ QueryMarginAccountsTradeListIsIsolatedEnum: () => QueryMarginAccountsTradeListIsIsolatedEnum,
4814
+ QueryMarginAvailableInventoryTypeEnum: () => QueryMarginAvailableInventoryTypeEnum,
4815
+ QueryPreventedMatchesIsIsolatedEnum: () => QueryPreventedMatchesIsIsolatedEnum,
3656
4816
  RestAPI: () => RestAPI,
3657
- RiskDataStreamApi: () => RiskDataStreamApi,
3658
4817
  TradeApi: () => TradeApi,
3659
- TransferApi: () => TransferApi
4818
+ TransferApi: () => TransferApi,
4819
+ UserDataStreamApi: () => UserDataStreamApi
3660
4820
  });
3661
4821
 
3662
4822
  //#endregion
3663
4823
  //#region src/websocket-streams/websocket-streams-connection.ts
3664
4824
  /**
3665
- * Binance Margin Trading WebSocket Market Streams
4825
+ * Margin WebSocket Market Streams
3666
4826
  *
3667
- * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams
4827
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
3668
4828
  *
3669
4829
  * The version of the OpenAPI document: 1.0.0
3670
4830
  *
@@ -3771,9 +4931,9 @@ var WebsocketStreamsConnection = class {
3771
4931
  //#endregion
3772
4932
  //#region src/websocket-streams/websocket-streams.ts
3773
4933
  /**
3774
- * Binance Margin Trading WebSocket Market Streams
4934
+ * Margin WebSocket Market Streams
3775
4935
  *
3776
- * OpenAPI Specification for the Binance Margin Trading WebSocket Market Streams
4936
+ * Access account information, borrow and repay assets, and trade with Binance Margin.
3777
4937
  *
3778
4938
  * The version of the OpenAPI document: 1.0.0
3779
4939
  *