@binance/w3w-prediction 2.0.1 → 2.1.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
@@ -19,7 +19,14 @@ let __binance_common = require("@binance/common");
19
19
 
20
20
  //#region package.json
21
21
  var name = "@binance/w3w-prediction";
22
- var version = "2.0.1";
22
+ var version = "2.1.0";
23
+
24
+ //#endregion
25
+ //#region src/rest-api/types/get-otc-reserved-balances-assets-parameter-inner.ts
26
+ const GetOtcReservedBalancesAssetsParameterInnerTypeEnum = {
27
+ USDT: "USDT",
28
+ SHARE: "SHARE"
29
+ };
23
30
 
24
31
  //#endregion
25
32
  //#region src/rest-api/modules/market-data-api.ts
@@ -270,6 +277,391 @@ let ListPredictionMarketsOrderByEnum = /* @__PURE__ */ function(ListPredictionMa
270
277
  return ListPredictionMarketsOrderByEnum$1;
271
278
  }({});
272
279
 
280
+ //#endregion
281
+ //#region src/rest-api/modules/otc-api.ts
282
+ /**
283
+ * Prediction Trading REST API
284
+ *
285
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
286
+ *
287
+ * The version of the OpenAPI document: 1.0.0
288
+ *
289
+ *
290
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
291
+ * https://openapi-generator.tech
292
+ * Do not edit the class manually.
293
+ */
294
+ /**
295
+ * OtcApi - axios parameter creator
296
+ */
297
+ const OtcApiAxiosParamCreator = function(configuration) {
298
+ return {
299
+ createOtcBlocktrade: async (marketId, tokenId, side, makerAmount, takerAmount, pricePerShare, expiration) => {
300
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "marketId", marketId);
301
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "tokenId", tokenId);
302
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "side", side);
303
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "makerAmount", makerAmount);
304
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "takerAmount", takerAmount);
305
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "pricePerShare", pricePerShare);
306
+ (0, __binance_common.assertParamExists)("createOtcBlocktrade", "expiration", expiration);
307
+ const localVarQueryParameter = {};
308
+ const localVarBodyParameter = {};
309
+ const localVarHeaderParameter = {};
310
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
311
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
312
+ if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
313
+ if (makerAmount !== void 0 && makerAmount !== null) localVarQueryParameter["makerAmount"] = makerAmount;
314
+ if (takerAmount !== void 0 && takerAmount !== null) localVarQueryParameter["takerAmount"] = takerAmount;
315
+ if (pricePerShare !== void 0 && pricePerShare !== null) localVarQueryParameter["pricePerShare"] = pricePerShare;
316
+ if (expiration !== void 0 && expiration !== null) localVarQueryParameter["expiration"] = expiration;
317
+ let _timeUnit;
318
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
319
+ return {
320
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/create",
321
+ method: "POST",
322
+ queryParams: localVarQueryParameter,
323
+ bodyParams: localVarBodyParameter,
324
+ headerParams: localVarHeaderParameter,
325
+ timeUnit: _timeUnit
326
+ };
327
+ },
328
+ fulfilOtcBlocktrade: async (orderId, secretToken) => {
329
+ (0, __binance_common.assertParamExists)("fulfilOtcBlocktrade", "orderId", orderId);
330
+ (0, __binance_common.assertParamExists)("fulfilOtcBlocktrade", "secretToken", secretToken);
331
+ const localVarQueryParameter = {};
332
+ const localVarBodyParameter = {};
333
+ const localVarHeaderParameter = {};
334
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
335
+ if (secretToken !== void 0 && secretToken !== null) localVarQueryParameter["secretToken"] = secretToken;
336
+ let _timeUnit;
337
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
338
+ return {
339
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/fulfil",
340
+ method: "POST",
341
+ queryParams: localVarQueryParameter,
342
+ bodyParams: localVarBodyParameter,
343
+ headerParams: localVarHeaderParameter,
344
+ timeUnit: _timeUnit
345
+ };
346
+ },
347
+ getOtcBlocktradeDetail: async (orderId) => {
348
+ (0, __binance_common.assertParamExists)("getOtcBlocktradeDetail", "orderId", orderId);
349
+ const localVarQueryParameter = {};
350
+ const localVarBodyParameter = {};
351
+ const localVarHeaderParameter = {};
352
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
353
+ let _timeUnit;
354
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
355
+ return {
356
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/detail",
357
+ method: "POST",
358
+ queryParams: localVarQueryParameter,
359
+ bodyParams: localVarBodyParameter,
360
+ headerParams: localVarHeaderParameter,
361
+ timeUnit: _timeUnit
362
+ };
363
+ },
364
+ getOtcBlocktradeEvents: async (first, after, eventTypes, marketId) => {
365
+ const localVarQueryParameter = {};
366
+ const localVarBodyParameter = {};
367
+ const localVarHeaderParameter = {};
368
+ if (first !== void 0 && first !== null) localVarQueryParameter["first"] = first;
369
+ if (after !== void 0 && after !== null) localVarQueryParameter["after"] = after;
370
+ if (eventTypes) localVarQueryParameter["eventTypes"] = eventTypes;
371
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
372
+ let _timeUnit;
373
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
374
+ return {
375
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/events",
376
+ method: "POST",
377
+ queryParams: localVarQueryParameter,
378
+ bodyParams: localVarBodyParameter,
379
+ headerParams: localVarHeaderParameter,
380
+ timeUnit: _timeUnit
381
+ };
382
+ },
383
+ getOtcReservedBalances: async (assets) => {
384
+ (0, __binance_common.assertParamExists)("getOtcReservedBalances", "assets", assets);
385
+ const localVarQueryParameter = {};
386
+ const localVarBodyParameter = {};
387
+ const localVarHeaderParameter = {};
388
+ if (assets) localVarQueryParameter["assets"] = assets;
389
+ let _timeUnit;
390
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
391
+ return {
392
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/reserved-balances",
393
+ method: "POST",
394
+ queryParams: localVarQueryParameter,
395
+ bodyParams: localVarBodyParameter,
396
+ headerParams: localVarHeaderParameter,
397
+ timeUnit: _timeUnit
398
+ };
399
+ },
400
+ listOtcBlocktrades: async (first, after, status) => {
401
+ const localVarQueryParameter = {};
402
+ const localVarBodyParameter = {};
403
+ const localVarHeaderParameter = {};
404
+ if (first !== void 0 && first !== null) localVarQueryParameter["first"] = first;
405
+ if (after !== void 0 && after !== null) localVarQueryParameter["after"] = after;
406
+ if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
407
+ let _timeUnit;
408
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
409
+ return {
410
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/list",
411
+ method: "POST",
412
+ queryParams: localVarQueryParameter,
413
+ bodyParams: localVarBodyParameter,
414
+ headerParams: localVarHeaderParameter,
415
+ timeUnit: _timeUnit
416
+ };
417
+ },
418
+ previewOtcBlocktrade: async (secretToken) => {
419
+ (0, __binance_common.assertParamExists)("previewOtcBlocktrade", "secretToken", secretToken);
420
+ const localVarQueryParameter = {};
421
+ const localVarBodyParameter = {};
422
+ const localVarHeaderParameter = {};
423
+ if (secretToken !== void 0 && secretToken !== null) localVarQueryParameter["secretToken"] = secretToken;
424
+ let _timeUnit;
425
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
426
+ return {
427
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/preview",
428
+ method: "POST",
429
+ queryParams: localVarQueryParameter,
430
+ bodyParams: localVarBodyParameter,
431
+ headerParams: localVarHeaderParameter,
432
+ timeUnit: _timeUnit
433
+ };
434
+ },
435
+ removeOtcBlocktrades: async (orderIds) => {
436
+ (0, __binance_common.assertParamExists)("removeOtcBlocktrades", "orderIds", orderIds);
437
+ const localVarQueryParameter = {};
438
+ const localVarBodyParameter = {};
439
+ const localVarHeaderParameter = {};
440
+ if (orderIds) localVarQueryParameter["orderIds"] = orderIds;
441
+ let _timeUnit;
442
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
443
+ return {
444
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/remove",
445
+ method: "POST",
446
+ queryParams: localVarQueryParameter,
447
+ bodyParams: localVarBodyParameter,
448
+ headerParams: localVarHeaderParameter,
449
+ timeUnit: _timeUnit
450
+ };
451
+ }
452
+ };
453
+ };
454
+ /**
455
+ * OtcApi - object-oriented interface
456
+ * @class OtcApi
457
+ */
458
+ var OtcApi = class {
459
+ constructor(configuration) {
460
+ this.configuration = configuration;
461
+ this.localVarAxiosParamCreator = OtcApiAxiosParamCreator(configuration);
462
+ }
463
+ /**
464
+ * Create an OTC blocktrade as the maker (BID to buy outcome shares with USDT, or ASK to sell outcome shares for USDT). The maker wallet is resolved server-side by `userId`; signing is done server-side via SAS `typedDataSign`. Returns `orderId` and a one-time `secretToken` to share out-of-band with the intended taker.
465
+ *
466
+ * Weight(IP): 200
467
+ *
468
+ * Security Type: PREDICTION_TRADE
469
+ *
470
+ * Notes:
471
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
472
+ * - Side & Amount Rules:
473
+ *
474
+ * | side | makerAmount | takerAmount |
475
+ * | ------ | ------------- | ------------- |
476
+ * | `BUY` | USDT (wei) | shares (wei) |
477
+ * | `SELL` | shares (wei) | USDT (wei) |
478
+ * - "Note on `side` encoding: this request uses a string enum (`BUY`/`SELL`). Responses from Get Blocktrade Detail / Preview / List return `side` as an integer and also include a `quoteType` string — both encode the same concept."
479
+ *
480
+ * | Request `side` | Response `side` (Integer) | Response `quoteType` |
481
+ * | --------------- | -------------------------- | ---------------------- |
482
+ * | `BUY` | `0` | `"Bid"` |
483
+ * | `SELL` | `1` | `"Ask"` |
484
+ *
485
+ * @summary Create OTC Blocktrade (PREDICTION_TRADE)
486
+ * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.
487
+ * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}
488
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
489
+ * @memberof OtcApi
490
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}
491
+ */
492
+ async createOtcBlocktrade(requestParameters) {
493
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOtcBlocktrade(requestParameters?.marketId, requestParameters?.tokenId, requestParameters?.side, requestParameters?.makerAmount, requestParameters?.takerAmount, requestParameters?.pricePerShare, requestParameters?.expiration);
494
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
495
+ }
496
+ /**
497
+ * Fulfil an open maker blocktrade as the taker, using the `secretToken` the maker shared out-of-band. All-or-nothing fill (no partial fill); the taker order is the server-derived symmetric inverse of the maker order.
498
+ *
499
+ * Weight(IP): 200
500
+ *
501
+ * Security Type: PREDICTION_TRADE
502
+ *
503
+ * Notes:
504
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
505
+ *
506
+ * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)
507
+ * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.
508
+ * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}
509
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
510
+ * @memberof OtcApi
511
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}
512
+ */
513
+ async fulfilOtcBlocktrade(requestParameters) {
514
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.fulfilOtcBlocktrade(requestParameters?.orderId, requestParameters?.secretToken);
515
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
516
+ }
517
+ /**
518
+ * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.
519
+ *
520
+ * Weight(IP): 200
521
+ *
522
+ * Security Type: PREDICTION_TRADE
523
+ *
524
+ * Notes:
525
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
526
+ *
527
+ * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)
528
+ * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.
529
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}
530
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
531
+ * @memberof OtcApi
532
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}
533
+ */
534
+ async getOtcBlocktradeDetail(requestParameters) {
535
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeDetail(requestParameters?.orderId);
536
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
537
+ }
538
+ /**
539
+ * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).
540
+ *
541
+ * Weight(IP): 200
542
+ *
543
+ * Security Type: PREDICTION_TRADE
544
+ *
545
+ * Notes:
546
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
547
+ *
548
+ * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)
549
+ * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.
550
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}
551
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
552
+ * @memberof OtcApi
553
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}
554
+ */
555
+ async getOtcBlocktradeEvents(requestParameters = {}) {
556
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeEvents(requestParameters?.first, requestParameters?.after, requestParameters?.eventTypes, requestParameters?.marketId);
557
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
558
+ }
559
+ /**
560
+ * Query PredictFun reserved balances for the caller's bound wallet — these are funds locked by the caller's open OTC blocktrade orders (maker BID locks USDT, maker ASK locks shares). Not tied to a specific blocktrade id; the path nesting under `otc/blocktrade` reflects the cause of the lock, not a per-order query. Returns one entry per requested asset, aligned with the request order. Pass `{type:"USDT"}` for reserved USDT, or `{type:"SHARE", tokenId:"..."}` for a specific outcome token's reserved shares.
561
+ *
562
+ * Weight(IP): 200
563
+ *
564
+ * Security Type: PREDICTION_TRADE
565
+ *
566
+ * Notes:
567
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
568
+ * - AssetQuery:
569
+ *
570
+ * | Name | Type | Mandatory | Description |
571
+ * | ------- | ------ | --------- | ----------- |
572
+ * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |
573
+ * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |
574
+ *
575
+ * @summary Get OTC Reserved Balances (PREDICTION_TRADE)
576
+ * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.
577
+ * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}
578
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
579
+ * @memberof OtcApi
580
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}
581
+ */
582
+ async getOtcReservedBalances(requestParameters) {
583
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcReservedBalances(requestParameters?.assets);
584
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
585
+ }
586
+ /**
587
+ * List the maker's own blocktrades with optional status filter and cursor pagination.
588
+ *
589
+ * Weight(IP): 200
590
+ *
591
+ * Security Type: PREDICTION_TRADE
592
+ *
593
+ * Notes:
594
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
595
+ *
596
+ * @summary List OTC Blocktrades (PREDICTION_TRADE)
597
+ * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.
598
+ * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}
599
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
600
+ * @memberof OtcApi
601
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}
602
+ */
603
+ async listOtcBlocktrades(requestParameters = {}) {
604
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.listOtcBlocktrades(requestParameters?.first, requestParameters?.after, requestParameters?.status);
605
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
606
+ }
607
+ /**
608
+ * Inspect an open blocktrade by `secretToken` (no `orderId` needed). Taker uses this to preview the maker order before fulfilling. Returns the same shape as `Get Blocktrade Detail`, but `orderId` is `null` and `secretToken` is never returned from this endpoint.
609
+ *
610
+ * Weight(IP): 200
611
+ *
612
+ * Security Type: PREDICTION_TRADE
613
+ *
614
+ * Notes:
615
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
616
+ *
617
+ * @summary Preview OTC Blocktrade (PREDICTION_TRADE)
618
+ * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.
619
+ * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}
620
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
621
+ * @memberof OtcApi
622
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}
623
+ */
624
+ async previewOtcBlocktrade(requestParameters) {
625
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.previewOtcBlocktrade(requestParameters?.secretToken);
626
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
627
+ }
628
+ /**
629
+ * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.
630
+ *
631
+ * Weight(IP): 200
632
+ *
633
+ * Security Type: PREDICTION_TRADE
634
+ *
635
+ * Notes:
636
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
637
+ *
638
+ * @summary Remove OTC Blocktrades (PREDICTION_TRADE)
639
+ * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.
640
+ * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}
641
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
642
+ * @memberof OtcApi
643
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}
644
+ */
645
+ async removeOtcBlocktrades(requestParameters) {
646
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.removeOtcBlocktrades(requestParameters?.orderIds);
647
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
648
+ }
649
+ };
650
+ let CreateOtcBlocktradeSideEnum = /* @__PURE__ */ function(CreateOtcBlocktradeSideEnum$1) {
651
+ CreateOtcBlocktradeSideEnum$1["BUY"] = "BUY";
652
+ CreateOtcBlocktradeSideEnum$1["SELL"] = "SELL";
653
+ return CreateOtcBlocktradeSideEnum$1;
654
+ }({});
655
+ let ListOtcBlocktradesStatusEnum = /* @__PURE__ */ function(ListOtcBlocktradesStatusEnum$1) {
656
+ ListOtcBlocktradesStatusEnum$1["OPEN"] = "OPEN";
657
+ ListOtcBlocktradesStatusEnum$1["FULFILLED"] = "FULFILLED";
658
+ ListOtcBlocktradesStatusEnum$1["MATCHED"] = "MATCHED";
659
+ ListOtcBlocktradesStatusEnum$1["CANCELLED"] = "CANCELLED";
660
+ ListOtcBlocktradesStatusEnum$1["EXPIRED"] = "EXPIRED";
661
+ ListOtcBlocktradesStatusEnum$1["FAILED"] = "FAILED";
662
+ return ListOtcBlocktradesStatusEnum$1;
663
+ }({});
664
+
273
665
  //#endregion
274
666
  //#region src/rest-api/modules/position-api.ts
275
667
  /**
@@ -410,9 +802,9 @@ var PositionApi = class {
410
802
  *
411
803
  * Weight(IP): 200
412
804
  *
413
- * Security Type: USER_DATA
805
+ * Security Type: PREDICTION_TRADE
414
806
  *
415
- * @summary Get Position by Token (USER_DATA)
807
+ * @summary Get Position by Token (PREDICTION_TRADE)
416
808
  * @param {GetPositionByTokenRequest} requestParameters Request parameters.
417
809
  * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
418
810
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -428,9 +820,9 @@ var PositionApi = class {
428
820
  *
429
821
  * Weight(IP): 200
430
822
  *
431
- * Security Type: USER_DATA
823
+ * Security Type: PREDICTION_TRADE
432
824
  *
433
- * @summary Query PnL (USER_DATA)
825
+ * @summary Query PnL (PREDICTION_TRADE)
434
826
  * @param {QueryPnLRequest} requestParameters Request parameters.
435
827
  * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
436
828
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -446,9 +838,9 @@ var PositionApi = class {
446
838
  *
447
839
  * Weight(IP): 200
448
840
  *
449
- * Security Type: USER_DATA
841
+ * Security Type: PREDICTION_TRADE
450
842
  *
451
- * @summary Query Positions (USER_DATA)
843
+ * @summary Query Positions (PREDICTION_TRADE)
452
844
  * @param {QueryPositionsRequest} requestParameters Request parameters.
453
845
  * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
454
846
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -464,9 +856,9 @@ var PositionApi = class {
464
856
  *
465
857
  * Weight(IP): 200
466
858
  *
467
- * Security Type: USER_DATA
859
+ * Security Type: PREDICTION_TRADE
468
860
  *
469
- * @summary Query Positions by Filter (USER_DATA)
861
+ * @summary Query Positions by Filter (PREDICTION_TRADE)
470
862
  * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
471
863
  * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
472
864
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -482,9 +874,9 @@ var PositionApi = class {
482
874
  *
483
875
  * Weight(IP): 200
484
876
  *
485
- * Security Type: USER_DATA
877
+ * Security Type: PREDICTION_TRADE
486
878
  *
487
- * @summary Query Settled Position History (USER_DATA)
879
+ * @summary Query Settled Position History (PREDICTION_TRADE)
488
880
  * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
489
881
  * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
490
882
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -574,9 +966,9 @@ var RedeemApi = class {
574
966
  *
575
967
  * Weight(IP): 200
576
968
  *
577
- * Security Type: TRADE
969
+ * Security Type: PREDICTION_TRADE
578
970
  *
579
- * @summary Batch Redeem (TRADE)
971
+ * @summary Batch Redeem (PREDICTION_TRADE)
580
972
  * @param {BatchRedeemRequest} requestParameters Request parameters.
581
973
  * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
582
974
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -592,7 +984,7 @@ var RedeemApi = class {
592
984
  *
593
985
  * Weight(IP): 200
594
986
  *
595
- * Security Type: USER_DATA
987
+ * Security Type: PREDICTION_TRADE
596
988
  *
597
989
  * Response Notes:
598
990
  * - Status values:
@@ -604,7 +996,7 @@ var RedeemApi = class {
604
996
  * | `FAILED` | Transaction failed |
605
997
  * | `NOT_FOUND` | Transaction hash not found |
606
998
  *
607
- * @summary Get Redeem Status (USER_DATA)
999
+ * @summary Get Redeem Status (PREDICTION_TRADE)
608
1000
  * @param {GetRedeemStatusRequest} requestParameters Request parameters.
609
1001
  * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
610
1002
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -792,13 +1184,13 @@ var TradeApi = class {
792
1184
  *
793
1185
  * Weight(IP): 200
794
1186
  *
795
- * Security Type: TRADE
1187
+ * Security Type: PREDICTION_TRADE
796
1188
  *
797
1189
  * Notes:
798
1190
  * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
799
1191
  * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
800
1192
  *
801
- * @summary Batch Cancel Orders (TRADE)
1193
+ * @summary Batch Cancel Orders (PREDICTION_TRADE)
802
1194
  * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
803
1195
  * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
804
1196
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -814,13 +1206,13 @@ var TradeApi = class {
814
1206
  *
815
1207
  * Weight(IP): 200
816
1208
  *
817
- * Security Type: TRADE
1209
+ * Security Type: PREDICTION_TRADE
818
1210
  *
819
1211
  * Response Notes:
820
1212
  * - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds.
821
1213
  * - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders.
822
1214
  *
823
- * @summary Get Quote (TRADE)
1215
+ * @summary Get Quote (PREDICTION_TRADE)
824
1216
  * @param {GetQuoteRequest} requestParameters Request parameters.
825
1217
  * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
826
1218
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -836,7 +1228,7 @@ var TradeApi = class {
836
1228
  *
837
1229
  * Weight(IP): 200
838
1230
  *
839
- * Security Type: TRADE
1231
+ * Security Type: PREDICTION_TRADE
840
1232
  *
841
1233
  * Notes:
842
1234
  * - Validation rules:
@@ -846,7 +1238,7 @@ var TradeApi = class {
846
1238
  * | `MARKET` | Must be `FOK` | Not required |
847
1239
  * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
848
1240
  *
849
- * @summary Place Order (TRADE)
1241
+ * @summary Place Order (PREDICTION_TRADE)
850
1242
  * @param {PlaceOrderRequest} requestParameters Request parameters.
851
1243
  * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
852
1244
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -862,9 +1254,9 @@ var TradeApi = class {
862
1254
  *
863
1255
  * Weight(IP): 200
864
1256
  *
865
- * Security Type: USER_DATA
1257
+ * Security Type: PREDICTION_TRADE
866
1258
  *
867
- * @summary Query Active Orders (USER_DATA)
1259
+ * @summary Query Active Orders (PREDICTION_TRADE)
868
1260
  * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
869
1261
  * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
870
1262
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -880,9 +1272,9 @@ var TradeApi = class {
880
1272
  *
881
1273
  * Weight(IP): 200
882
1274
  *
883
- * Security Type: USER_DATA
1275
+ * Security Type: PREDICTION_TRADE
884
1276
  *
885
- * @summary Query Order History (USER_DATA)
1277
+ * @summary Query Order History (PREDICTION_TRADE)
886
1278
  * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
887
1279
  * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
888
1280
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -954,6 +1346,54 @@ let QueryOrderHistoryOrderTypeEnum = /* @__PURE__ */ function(QueryOrderHistoryO
954
1346
  */
955
1347
  const TransferApiAxiosParamCreator = function(configuration) {
956
1348
  return {
1349
+ applyMmDeposit: async (fromToken, fromTokenAmount, toToken, accountType, chainId) => {
1350
+ (0, __binance_common.assertParamExists)("applyMmDeposit", "fromToken", fromToken);
1351
+ (0, __binance_common.assertParamExists)("applyMmDeposit", "fromTokenAmount", fromTokenAmount);
1352
+ (0, __binance_common.assertParamExists)("applyMmDeposit", "toToken", toToken);
1353
+ (0, __binance_common.assertParamExists)("applyMmDeposit", "accountType", accountType);
1354
+ const localVarQueryParameter = {};
1355
+ const localVarBodyParameter = {};
1356
+ const localVarHeaderParameter = {};
1357
+ if (fromToken !== void 0 && fromToken !== null) localVarQueryParameter["fromToken"] = fromToken;
1358
+ if (fromTokenAmount !== void 0 && fromTokenAmount !== null) localVarQueryParameter["fromTokenAmount"] = fromTokenAmount;
1359
+ if (toToken !== void 0 && toToken !== null) localVarQueryParameter["toToken"] = toToken;
1360
+ if (accountType !== void 0 && accountType !== null) localVarQueryParameter["accountType"] = accountType;
1361
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
1362
+ let _timeUnit;
1363
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1364
+ return {
1365
+ endpoint: "/sapi/v1/w3w/wallet/prediction/deposit/apply",
1366
+ method: "POST",
1367
+ queryParams: localVarQueryParameter,
1368
+ bodyParams: localVarBodyParameter,
1369
+ headerParams: localVarHeaderParameter,
1370
+ timeUnit: _timeUnit
1371
+ };
1372
+ },
1373
+ applyMmWithdraw: async (coin, network, amount, withdrawOrderId, walletType, name$1) => {
1374
+ (0, __binance_common.assertParamExists)("applyMmWithdraw", "coin", coin);
1375
+ (0, __binance_common.assertParamExists)("applyMmWithdraw", "network", network);
1376
+ (0, __binance_common.assertParamExists)("applyMmWithdraw", "amount", amount);
1377
+ const localVarQueryParameter = {};
1378
+ const localVarBodyParameter = {};
1379
+ const localVarHeaderParameter = {};
1380
+ if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
1381
+ if (network !== void 0 && network !== null) localVarQueryParameter["network"] = network;
1382
+ if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
1383
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
1384
+ if (walletType !== void 0 && walletType !== null) localVarQueryParameter["walletType"] = walletType;
1385
+ if (name$1 !== void 0 && name$1 !== null) localVarQueryParameter["name"] = name$1;
1386
+ let _timeUnit;
1387
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1388
+ return {
1389
+ endpoint: "/sapi/v1/w3w/wallet/prediction/withdraw/apply",
1390
+ method: "POST",
1391
+ queryParams: localVarQueryParameter,
1392
+ bodyParams: localVarBodyParameter,
1393
+ headerParams: localVarHeaderParameter,
1394
+ timeUnit: _timeUnit
1395
+ };
1396
+ },
957
1397
  createInboundTransfer: async (walletId, walletAddress, fromTokenAmount, accountType, fromToken, toToken, chainId) => {
958
1398
  (0, __binance_common.assertParamExists)("createInboundTransfer", "walletId", walletId);
959
1399
  (0, __binance_common.assertParamExists)("createInboundTransfer", "walletAddress", walletAddress);
@@ -1064,15 +1504,67 @@ var TransferApi = class {
1064
1504
  this.localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration);
1065
1505
  }
1066
1506
  /**
1507
+ * Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is resolved server-side by `userId`; the caller does not pass wallet or signature.
1508
+ *
1509
+ * Weight(IP): 200
1510
+ *
1511
+ * Security Type: PREDICTION_TRADE
1512
+ *
1513
+ * Notes:
1514
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1515
+ * - "Note on `fromToken` / `toToken`: typically the same symbol (e.g. both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol conversion is not guaranteed for all pairs — prefer using the same symbol."
1516
+ *
1517
+ * @summary Apply MM Deposit (PREDICTION_TRADE)
1518
+ * @param {ApplyMmDepositRequest} requestParameters Request parameters.
1519
+ * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}
1520
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1521
+ * @memberof TransferApi
1522
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}
1523
+ */
1524
+ async applyMmDeposit(requestParameters) {
1525
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmDeposit(requestParameters?.fromToken, requestParameters?.fromTokenAmount, requestParameters?.toToken, requestParameters?.accountType, requestParameters?.chainId);
1526
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1527
+ }
1528
+ /**
1529
+ * Withdraw funds from the user's CEX account (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the backend resolves the user's bound CeDeFi MPC wallet address by `userId` and reuses the existing capital withdraw flow with that address as the target.
1530
+ *
1531
+ * Weight(IP): 200
1532
+ *
1533
+ * Security Type: PREDICTION_TRADE
1534
+ *
1535
+ * Notes:
1536
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1537
+ * - walletType Validation:
1538
+ *
1539
+ * | Value | Behavior |
1540
+ * | --------------- | ------------------------------- |
1541
+ * | `null` | Allowed — defaults to SPOT |
1542
+ * | `0` | Allowed — source = SPOT |
1543
+ * | `1` | Allowed — source = FUNDING |
1544
+ * | Other (e.g. `99`) | Rejected — returns validation error |
1545
+ * - "Note on field naming: this endpoint uses `walletType` (INT `0`/`1`) for the source CEX account, while Apply MM Deposit uses `accountType` (STRING `SPOT`/`FUNDING`) for the target. The difference is intentional: withdraw reuses the existing `v1/capital/withdraw/apply` flow, which inherits that flow's integer `walletType` field."
1546
+ *
1547
+ * @summary Apply MM Withdraw (PREDICTION_TRADE)
1548
+ * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.
1549
+ * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}
1550
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1551
+ * @memberof TransferApi
1552
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}
1553
+ */
1554
+ async applyMmWithdraw(requestParameters) {
1555
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmWithdraw(requestParameters?.coin, requestParameters?.network, requestParameters?.amount, requestParameters?.withdrawOrderId, requestParameters?.walletType, requestParameters?.name);
1556
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1557
+ }
1558
+ /**
1067
1559
  * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1068
1560
  *
1069
1561
  * ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint.
1070
1562
  *
1071
1563
  * Weight(IP): 200
1072
1564
  *
1073
- * Security Type: TRADE
1565
+ * Security Type: PREDICTION_TRADE
1074
1566
  *
1075
- * @summary Create Inbound Transfer (TRADE)
1567
+ * @summary Create Inbound Transfer (PREDICTION_TRADE)
1076
1568
  * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1077
1569
  * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
1078
1570
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1088,9 +1580,9 @@ var TransferApi = class {
1088
1580
  *
1089
1581
  * Weight(IP): 200
1090
1582
  *
1091
- * Security Type: TRADE
1583
+ * Security Type: PREDICTION_TRADE
1092
1584
  *
1093
- * @summary Create Outbound Transfer (TRADE)
1585
+ * @summary Create Outbound Transfer (PREDICTION_TRADE)
1094
1586
  * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1095
1587
  * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
1096
1588
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1106,9 +1598,9 @@ var TransferApi = class {
1106
1598
  *
1107
1599
  * Weight(IP): 200
1108
1600
  *
1109
- * Security Type: USER_DATA
1601
+ * Security Type: PREDICTION_TRADE
1110
1602
  *
1111
- * @summary Query Transfer List (USER_DATA)
1603
+ * @summary Query Transfer List (PREDICTION_TRADE)
1112
1604
  * @param {QueryTransferListRequest} requestParameters Request parameters.
1113
1605
  * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
1114
1606
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1126,9 +1618,9 @@ var TransferApi = class {
1126
1618
  *
1127
1619
  * Weight(IP): 200
1128
1620
  *
1129
- * Security Type: USER_DATA
1621
+ * Security Type: PREDICTION_TRADE
1130
1622
  *
1131
- * @summary Query Transfer Status (USER_DATA)
1623
+ * @summary Query Transfer Status (PREDICTION_TRADE)
1132
1624
  * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1133
1625
  * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
1134
1626
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1140,6 +1632,16 @@ var TransferApi = class {
1140
1632
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1141
1633
  }
1142
1634
  };
1635
+ let ApplyMmDepositAccountTypeEnum = /* @__PURE__ */ function(ApplyMmDepositAccountTypeEnum$1) {
1636
+ ApplyMmDepositAccountTypeEnum$1["SPOT"] = "SPOT";
1637
+ ApplyMmDepositAccountTypeEnum$1["FUNDING"] = "FUNDING";
1638
+ return ApplyMmDepositAccountTypeEnum$1;
1639
+ }({});
1640
+ let ApplyMmWithdrawWalletTypeEnum = /* @__PURE__ */ function(ApplyMmWithdrawWalletTypeEnum$1) {
1641
+ ApplyMmWithdrawWalletTypeEnum$1[ApplyMmWithdrawWalletTypeEnum$1["WALLET_TYPE_0"] = 0] = "WALLET_TYPE_0";
1642
+ ApplyMmWithdrawWalletTypeEnum$1[ApplyMmWithdrawWalletTypeEnum$1["WALLET_TYPE_1"] = 1] = "WALLET_TYPE_1";
1643
+ return ApplyMmWithdrawWalletTypeEnum$1;
1644
+ }({});
1143
1645
  let CreateInboundTransferAccountTypeEnum = /* @__PURE__ */ function(CreateInboundTransferAccountTypeEnum$1) {
1144
1646
  CreateInboundTransferAccountTypeEnum$1["SPOT"] = "SPOT";
1145
1647
  CreateInboundTransferAccountTypeEnum$1["FUNDING"] = "FUNDING";
@@ -1266,9 +1768,9 @@ var WalletApi = class {
1266
1768
  *
1267
1769
  * Weight(IP): 200
1268
1770
  *
1269
- * Security Type: USER_DATA
1771
+ * Security Type: PREDICTION_TRADE
1270
1772
  *
1271
- * @summary Get Portfolio (USER_DATA)
1773
+ * @summary Get Portfolio (PREDICTION_TRADE)
1272
1774
  * @param {GetPortfolioRequest} requestParameters Request parameters.
1273
1775
  * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
1274
1776
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1284,9 +1786,9 @@ var WalletApi = class {
1284
1786
  *
1285
1787
  * Weight(IP): 200
1286
1788
  *
1287
- * Security Type: USER_DATA
1789
+ * Security Type: PREDICTION_TRADE
1288
1790
  *
1289
- * @summary Get Quota Status (USER_DATA)
1791
+ * @summary Get Quota Status (PREDICTION_TRADE)
1290
1792
  * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1291
1793
  * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
1292
1794
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1302,9 +1804,9 @@ var WalletApi = class {
1302
1804
  *
1303
1805
  * Weight(IP): 200
1304
1806
  *
1305
- * Security Type: USER_DATA
1807
+ * Security Type: PREDICTION_TRADE
1306
1808
  *
1307
- * @summary List Prediction Wallets (USER_DATA)
1809
+ * @summary List Prediction Wallets (PREDICTION_TRADE)
1308
1810
  * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1309
1811
  * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
1310
1812
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1320,9 +1822,9 @@ var WalletApi = class {
1320
1822
  *
1321
1823
  * Weight(IP): 200
1322
1824
  *
1323
- * Security Type: USER_DATA
1825
+ * Security Type: PREDICTION_TRADE
1324
1826
  *
1325
- * @summary Query Payment Option Balances (USER_DATA)
1827
+ * @summary Query Payment Option Balances (PREDICTION_TRADE)
1326
1828
  * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1327
1829
  * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
1328
1830
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1353,6 +1855,7 @@ var RestAPI = class {
1353
1855
  constructor(configuration) {
1354
1856
  this.configuration = configuration;
1355
1857
  this.marketDataApi = new MarketDataApi(configuration);
1858
+ this.otcApi = new OtcApi(configuration);
1356
1859
  this.positionApi = new PositionApi(configuration);
1357
1860
  this.redeemApi = new RedeemApi(configuration);
1358
1861
  this.tradeApi = new TradeApi(configuration);
@@ -1473,13 +1976,191 @@ var RestAPI = class {
1473
1976
  return this.marketDataApi.queryOrderBook(requestParameters);
1474
1977
  }
1475
1978
  /**
1979
+ * Create an OTC blocktrade as the maker (BID to buy outcome shares with USDT, or ASK to sell outcome shares for USDT). The maker wallet is resolved server-side by `userId`; signing is done server-side via SAS `typedDataSign`. Returns `orderId` and a one-time `secretToken` to share out-of-band with the intended taker.
1980
+ *
1981
+ * Weight(IP): 200
1982
+ *
1983
+ * Security Type: PREDICTION_TRADE
1984
+ *
1985
+ * Notes:
1986
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1987
+ * - Side & Amount Rules:
1988
+ *
1989
+ * | side | makerAmount | takerAmount |
1990
+ * | ------ | ------------- | ------------- |
1991
+ * | `BUY` | USDT (wei) | shares (wei) |
1992
+ * | `SELL` | shares (wei) | USDT (wei) |
1993
+ * - "Note on `side` encoding: this request uses a string enum (`BUY`/`SELL`). Responses from Get Blocktrade Detail / Preview / List return `side` as an integer and also include a `quoteType` string — both encode the same concept."
1994
+ *
1995
+ * | Request `side` | Response `side` (Integer) | Response `quoteType` |
1996
+ * | --------------- | -------------------------- | ---------------------- |
1997
+ * | `BUY` | `0` | `"Bid"` |
1998
+ * | `SELL` | `1` | `"Ask"` |
1999
+ *
2000
+ * @summary Create OTC Blocktrade (PREDICTION_TRADE)
2001
+ * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.
2002
+ *
2003
+ * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}
2004
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2005
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}
2006
+ */
2007
+ createOtcBlocktrade(requestParameters) {
2008
+ return this.otcApi.createOtcBlocktrade(requestParameters);
2009
+ }
2010
+ /**
2011
+ * Fulfil an open maker blocktrade as the taker, using the `secretToken` the maker shared out-of-band. All-or-nothing fill (no partial fill); the taker order is the server-derived symmetric inverse of the maker order.
2012
+ *
2013
+ * Weight(IP): 200
2014
+ *
2015
+ * Security Type: PREDICTION_TRADE
2016
+ *
2017
+ * Notes:
2018
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2019
+ *
2020
+ * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)
2021
+ * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.
2022
+ *
2023
+ * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}
2024
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2025
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}
2026
+ */
2027
+ fulfilOtcBlocktrade(requestParameters) {
2028
+ return this.otcApi.fulfilOtcBlocktrade(requestParameters);
2029
+ }
2030
+ /**
2031
+ * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.
2032
+ *
2033
+ * Weight(IP): 200
2034
+ *
2035
+ * Security Type: PREDICTION_TRADE
2036
+ *
2037
+ * Notes:
2038
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2039
+ *
2040
+ * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)
2041
+ * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.
2042
+ *
2043
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}
2044
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2045
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}
2046
+ */
2047
+ getOtcBlocktradeDetail(requestParameters) {
2048
+ return this.otcApi.getOtcBlocktradeDetail(requestParameters);
2049
+ }
2050
+ /**
2051
+ * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).
2052
+ *
2053
+ * Weight(IP): 200
2054
+ *
2055
+ * Security Type: PREDICTION_TRADE
2056
+ *
2057
+ * Notes:
2058
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2059
+ *
2060
+ * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)
2061
+ * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.
2062
+ *
2063
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}
2064
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2065
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}
2066
+ */
2067
+ getOtcBlocktradeEvents(requestParameters = {}) {
2068
+ return this.otcApi.getOtcBlocktradeEvents(requestParameters);
2069
+ }
2070
+ /**
2071
+ * Query PredictFun reserved balances for the caller's bound wallet — these are funds locked by the caller's open OTC blocktrade orders (maker BID locks USDT, maker ASK locks shares). Not tied to a specific blocktrade id; the path nesting under `otc/blocktrade` reflects the cause of the lock, not a per-order query. Returns one entry per requested asset, aligned with the request order. Pass `{type:"USDT"}` for reserved USDT, or `{type:"SHARE", tokenId:"..."}` for a specific outcome token's reserved shares.
2072
+ *
2073
+ * Weight(IP): 200
2074
+ *
2075
+ * Security Type: PREDICTION_TRADE
2076
+ *
2077
+ * Notes:
2078
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2079
+ * - AssetQuery:
2080
+ *
2081
+ * | Name | Type | Mandatory | Description |
2082
+ * | ------- | ------ | --------- | ----------- |
2083
+ * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |
2084
+ * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |
2085
+ *
2086
+ * @summary Get OTC Reserved Balances (PREDICTION_TRADE)
2087
+ * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.
2088
+ *
2089
+ * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}
2090
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2091
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}
2092
+ */
2093
+ getOtcReservedBalances(requestParameters) {
2094
+ return this.otcApi.getOtcReservedBalances(requestParameters);
2095
+ }
2096
+ /**
2097
+ * List the maker's own blocktrades with optional status filter and cursor pagination.
2098
+ *
2099
+ * Weight(IP): 200
2100
+ *
2101
+ * Security Type: PREDICTION_TRADE
2102
+ *
2103
+ * Notes:
2104
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2105
+ *
2106
+ * @summary List OTC Blocktrades (PREDICTION_TRADE)
2107
+ * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.
2108
+ *
2109
+ * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}
2110
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2111
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}
2112
+ */
2113
+ listOtcBlocktrades(requestParameters = {}) {
2114
+ return this.otcApi.listOtcBlocktrades(requestParameters);
2115
+ }
2116
+ /**
2117
+ * Inspect an open blocktrade by `secretToken` (no `orderId` needed). Taker uses this to preview the maker order before fulfilling. Returns the same shape as `Get Blocktrade Detail`, but `orderId` is `null` and `secretToken` is never returned from this endpoint.
2118
+ *
2119
+ * Weight(IP): 200
2120
+ *
2121
+ * Security Type: PREDICTION_TRADE
2122
+ *
2123
+ * Notes:
2124
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2125
+ *
2126
+ * @summary Preview OTC Blocktrade (PREDICTION_TRADE)
2127
+ * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.
2128
+ *
2129
+ * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}
2130
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2131
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}
2132
+ */
2133
+ previewOtcBlocktrade(requestParameters) {
2134
+ return this.otcApi.previewOtcBlocktrade(requestParameters);
2135
+ }
2136
+ /**
2137
+ * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.
2138
+ *
2139
+ * Weight(IP): 200
2140
+ *
2141
+ * Security Type: PREDICTION_TRADE
2142
+ *
2143
+ * Notes:
2144
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2145
+ *
2146
+ * @summary Remove OTC Blocktrades (PREDICTION_TRADE)
2147
+ * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.
2148
+ *
2149
+ * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}
2150
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2151
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}
2152
+ */
2153
+ removeOtcBlocktrades(requestParameters) {
2154
+ return this.otcApi.removeOtcBlocktrades(requestParameters);
2155
+ }
2156
+ /**
1476
2157
  * Get the authenticated user's position detail for a specific prediction token.
1477
2158
  *
1478
2159
  * Weight(IP): 200
1479
2160
  *
1480
- * Security Type: USER_DATA
2161
+ * Security Type: PREDICTION_TRADE
1481
2162
  *
1482
- * @summary Get Position by Token (USER_DATA)
2163
+ * @summary Get Position by Token (PREDICTION_TRADE)
1483
2164
  * @param {GetPositionByTokenRequest} requestParameters Request parameters.
1484
2165
  *
1485
2166
  * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
@@ -1494,9 +2175,9 @@ var RestAPI = class {
1494
2175
  *
1495
2176
  * Weight(IP): 200
1496
2177
  *
1497
- * Security Type: USER_DATA
2178
+ * Security Type: PREDICTION_TRADE
1498
2179
  *
1499
- * @summary Query PnL (USER_DATA)
2180
+ * @summary Query PnL (PREDICTION_TRADE)
1500
2181
  * @param {QueryPnLRequest} requestParameters Request parameters.
1501
2182
  *
1502
2183
  * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
@@ -1511,9 +2192,9 @@ var RestAPI = class {
1511
2192
  *
1512
2193
  * Weight(IP): 200
1513
2194
  *
1514
- * Security Type: USER_DATA
2195
+ * Security Type: PREDICTION_TRADE
1515
2196
  *
1516
- * @summary Query Positions (USER_DATA)
2197
+ * @summary Query Positions (PREDICTION_TRADE)
1517
2198
  * @param {QueryPositionsRequest} requestParameters Request parameters.
1518
2199
  *
1519
2200
  * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
@@ -1528,9 +2209,9 @@ var RestAPI = class {
1528
2209
  *
1529
2210
  * Weight(IP): 200
1530
2211
  *
1531
- * Security Type: USER_DATA
2212
+ * Security Type: PREDICTION_TRADE
1532
2213
  *
1533
- * @summary Query Positions by Filter (USER_DATA)
2214
+ * @summary Query Positions by Filter (PREDICTION_TRADE)
1534
2215
  * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
1535
2216
  *
1536
2217
  * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
@@ -1545,9 +2226,9 @@ var RestAPI = class {
1545
2226
  *
1546
2227
  * Weight(IP): 200
1547
2228
  *
1548
- * Security Type: USER_DATA
2229
+ * Security Type: PREDICTION_TRADE
1549
2230
  *
1550
- * @summary Query Settled Position History (USER_DATA)
2231
+ * @summary Query Settled Position History (PREDICTION_TRADE)
1551
2232
  * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
1552
2233
  *
1553
2234
  * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
@@ -1562,9 +2243,9 @@ var RestAPI = class {
1562
2243
  *
1563
2244
  * Weight(IP): 200
1564
2245
  *
1565
- * Security Type: TRADE
2246
+ * Security Type: PREDICTION_TRADE
1566
2247
  *
1567
- * @summary Batch Redeem (TRADE)
2248
+ * @summary Batch Redeem (PREDICTION_TRADE)
1568
2249
  * @param {BatchRedeemRequest} requestParameters Request parameters.
1569
2250
  *
1570
2251
  * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
@@ -1579,7 +2260,7 @@ var RestAPI = class {
1579
2260
  *
1580
2261
  * Weight(IP): 200
1581
2262
  *
1582
- * Security Type: USER_DATA
2263
+ * Security Type: PREDICTION_TRADE
1583
2264
  *
1584
2265
  * Response Notes:
1585
2266
  * - Status values:
@@ -1591,7 +2272,7 @@ var RestAPI = class {
1591
2272
  * | `FAILED` | Transaction failed |
1592
2273
  * | `NOT_FOUND` | Transaction hash not found |
1593
2274
  *
1594
- * @summary Get Redeem Status (USER_DATA)
2275
+ * @summary Get Redeem Status (PREDICTION_TRADE)
1595
2276
  * @param {GetRedeemStatusRequest} requestParameters Request parameters.
1596
2277
  *
1597
2278
  * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
@@ -1614,13 +2295,13 @@ var RestAPI = class {
1614
2295
  *
1615
2296
  * Weight(IP): 200
1616
2297
  *
1617
- * Security Type: TRADE
2298
+ * Security Type: PREDICTION_TRADE
1618
2299
  *
1619
2300
  * Notes:
1620
2301
  * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
1621
2302
  * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
1622
2303
  *
1623
- * @summary Batch Cancel Orders (TRADE)
2304
+ * @summary Batch Cancel Orders (PREDICTION_TRADE)
1624
2305
  * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
1625
2306
  *
1626
2307
  * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
@@ -1635,13 +2316,13 @@ var RestAPI = class {
1635
2316
  *
1636
2317
  * Weight(IP): 200
1637
2318
  *
1638
- * Security Type: TRADE
2319
+ * Security Type: PREDICTION_TRADE
1639
2320
  *
1640
2321
  * Response Notes:
1641
2322
  * - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds.
1642
2323
  * - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders.
1643
2324
  *
1644
- * @summary Get Quote (TRADE)
2325
+ * @summary Get Quote (PREDICTION_TRADE)
1645
2326
  * @param {GetQuoteRequest} requestParameters Request parameters.
1646
2327
  *
1647
2328
  * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
@@ -1656,7 +2337,7 @@ var RestAPI = class {
1656
2337
  *
1657
2338
  * Weight(IP): 200
1658
2339
  *
1659
- * Security Type: TRADE
2340
+ * Security Type: PREDICTION_TRADE
1660
2341
  *
1661
2342
  * Notes:
1662
2343
  * - Validation rules:
@@ -1666,7 +2347,7 @@ var RestAPI = class {
1666
2347
  * | `MARKET` | Must be `FOK` | Not required |
1667
2348
  * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
1668
2349
  *
1669
- * @summary Place Order (TRADE)
2350
+ * @summary Place Order (PREDICTION_TRADE)
1670
2351
  * @param {PlaceOrderRequest} requestParameters Request parameters.
1671
2352
  *
1672
2353
  * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
@@ -1681,9 +2362,9 @@ var RestAPI = class {
1681
2362
  *
1682
2363
  * Weight(IP): 200
1683
2364
  *
1684
- * Security Type: USER_DATA
2365
+ * Security Type: PREDICTION_TRADE
1685
2366
  *
1686
- * @summary Query Active Orders (USER_DATA)
2367
+ * @summary Query Active Orders (PREDICTION_TRADE)
1687
2368
  * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
1688
2369
  *
1689
2370
  * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
@@ -1698,9 +2379,9 @@ var RestAPI = class {
1698
2379
  *
1699
2380
  * Weight(IP): 200
1700
2381
  *
1701
- * Security Type: USER_DATA
2382
+ * Security Type: PREDICTION_TRADE
1702
2383
  *
1703
- * @summary Query Order History (USER_DATA)
2384
+ * @summary Query Order History (PREDICTION_TRADE)
1704
2385
  * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
1705
2386
  *
1706
2387
  * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
@@ -1711,15 +2392,65 @@ var RestAPI = class {
1711
2392
  return this.tradeApi.queryOrderHistory(requestParameters);
1712
2393
  }
1713
2394
  /**
2395
+ * Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is resolved server-side by `userId`; the caller does not pass wallet or signature.
2396
+ *
2397
+ * Weight(IP): 200
2398
+ *
2399
+ * Security Type: PREDICTION_TRADE
2400
+ *
2401
+ * Notes:
2402
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2403
+ * - "Note on `fromToken` / `toToken`: typically the same symbol (e.g. both `USDT`). When they differ, the backend may attempt a swap, but cross-symbol conversion is not guaranteed for all pairs — prefer using the same symbol."
2404
+ *
2405
+ * @summary Apply MM Deposit (PREDICTION_TRADE)
2406
+ * @param {ApplyMmDepositRequest} requestParameters Request parameters.
2407
+ *
2408
+ * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}
2409
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2410
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}
2411
+ */
2412
+ applyMmDeposit(requestParameters) {
2413
+ return this.transferApi.applyMmDeposit(requestParameters);
2414
+ }
2415
+ /**
2416
+ * Withdraw funds from the user's CEX account (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike `v1/capital/withdraw/apply`, the caller does NOT pass `address`; the backend resolves the user's bound CeDeFi MPC wallet address by `userId` and reuses the existing capital withdraw flow with that address as the target.
2417
+ *
2418
+ * Weight(IP): 200
2419
+ *
2420
+ * Security Type: PREDICTION_TRADE
2421
+ *
2422
+ * Notes:
2423
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2424
+ * - walletType Validation:
2425
+ *
2426
+ * | Value | Behavior |
2427
+ * | --------------- | ------------------------------- |
2428
+ * | `null` | Allowed — defaults to SPOT |
2429
+ * | `0` | Allowed — source = SPOT |
2430
+ * | `1` | Allowed — source = FUNDING |
2431
+ * | Other (e.g. `99`) | Rejected — returns validation error |
2432
+ * - "Note on field naming: this endpoint uses `walletType` (INT `0`/`1`) for the source CEX account, while Apply MM Deposit uses `accountType` (STRING `SPOT`/`FUNDING`) for the target. The difference is intentional: withdraw reuses the existing `v1/capital/withdraw/apply` flow, which inherits that flow's integer `walletType` field."
2433
+ *
2434
+ * @summary Apply MM Withdraw (PREDICTION_TRADE)
2435
+ * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.
2436
+ *
2437
+ * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}
2438
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2439
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}
2440
+ */
2441
+ applyMmWithdraw(requestParameters) {
2442
+ return this.transferApi.applyMmWithdraw(requestParameters);
2443
+ }
2444
+ /**
1714
2445
  * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1715
2446
  *
1716
2447
  * ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint.
1717
2448
  *
1718
2449
  * Weight(IP): 200
1719
2450
  *
1720
- * Security Type: TRADE
2451
+ * Security Type: PREDICTION_TRADE
1721
2452
  *
1722
- * @summary Create Inbound Transfer (TRADE)
2453
+ * @summary Create Inbound Transfer (PREDICTION_TRADE)
1723
2454
  * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1724
2455
  *
1725
2456
  * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
@@ -1734,9 +2465,9 @@ var RestAPI = class {
1734
2465
  *
1735
2466
  * Weight(IP): 200
1736
2467
  *
1737
- * Security Type: TRADE
2468
+ * Security Type: PREDICTION_TRADE
1738
2469
  *
1739
- * @summary Create Outbound Transfer (TRADE)
2470
+ * @summary Create Outbound Transfer (PREDICTION_TRADE)
1740
2471
  * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1741
2472
  *
1742
2473
  * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
@@ -1751,9 +2482,9 @@ var RestAPI = class {
1751
2482
  *
1752
2483
  * Weight(IP): 200
1753
2484
  *
1754
- * Security Type: USER_DATA
2485
+ * Security Type: PREDICTION_TRADE
1755
2486
  *
1756
- * @summary Query Transfer List (USER_DATA)
2487
+ * @summary Query Transfer List (PREDICTION_TRADE)
1757
2488
  * @param {QueryTransferListRequest} requestParameters Request parameters.
1758
2489
  *
1759
2490
  * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
@@ -1770,9 +2501,9 @@ var RestAPI = class {
1770
2501
  *
1771
2502
  * Weight(IP): 200
1772
2503
  *
1773
- * Security Type: USER_DATA
2504
+ * Security Type: PREDICTION_TRADE
1774
2505
  *
1775
- * @summary Query Transfer Status (USER_DATA)
2506
+ * @summary Query Transfer Status (PREDICTION_TRADE)
1776
2507
  * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1777
2508
  *
1778
2509
  * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
@@ -1787,9 +2518,9 @@ var RestAPI = class {
1787
2518
  *
1788
2519
  * Weight(IP): 200
1789
2520
  *
1790
- * Security Type: USER_DATA
2521
+ * Security Type: PREDICTION_TRADE
1791
2522
  *
1792
- * @summary Get Portfolio (USER_DATA)
2523
+ * @summary Get Portfolio (PREDICTION_TRADE)
1793
2524
  * @param {GetPortfolioRequest} requestParameters Request parameters.
1794
2525
  *
1795
2526
  * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
@@ -1804,9 +2535,9 @@ var RestAPI = class {
1804
2535
  *
1805
2536
  * Weight(IP): 200
1806
2537
  *
1807
- * Security Type: USER_DATA
2538
+ * Security Type: PREDICTION_TRADE
1808
2539
  *
1809
- * @summary Get Quota Status (USER_DATA)
2540
+ * @summary Get Quota Status (PREDICTION_TRADE)
1810
2541
  * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1811
2542
  *
1812
2543
  * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
@@ -1821,9 +2552,9 @@ var RestAPI = class {
1821
2552
  *
1822
2553
  * Weight(IP): 200
1823
2554
  *
1824
- * Security Type: USER_DATA
2555
+ * Security Type: PREDICTION_TRADE
1825
2556
  *
1826
- * @summary List Prediction Wallets (USER_DATA)
2557
+ * @summary List Prediction Wallets (PREDICTION_TRADE)
1827
2558
  * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1828
2559
  *
1829
2560
  * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
@@ -1838,9 +2569,9 @@ var RestAPI = class {
1838
2569
  *
1839
2570
  * Weight(IP): 200
1840
2571
  *
1841
- * Security Type: USER_DATA
2572
+ * Security Type: PREDICTION_TRADE
1842
2573
  *
1843
- * @summary Query Payment Option Balances (USER_DATA)
2574
+ * @summary Query Payment Option Balances (PREDICTION_TRADE)
1844
2575
  * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1845
2576
  *
1846
2577
  * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
@@ -1855,15 +2586,21 @@ var RestAPI = class {
1855
2586
  //#endregion
1856
2587
  //#region src/rest-api/index.ts
1857
2588
  var rest_api_exports = /* @__PURE__ */ __export({
2589
+ ApplyMmDepositAccountTypeEnum: () => ApplyMmDepositAccountTypeEnum,
2590
+ ApplyMmWithdrawWalletTypeEnum: () => ApplyMmWithdrawWalletTypeEnum,
1858
2591
  CreateInboundTransferAccountTypeEnum: () => CreateInboundTransferAccountTypeEnum,
2592
+ CreateOtcBlocktradeSideEnum: () => CreateOtcBlocktradeSideEnum,
1859
2593
  CreateOutboundTransferAccountTypeEnum: () => CreateOutboundTransferAccountTypeEnum,
1860
2594
  CreateOutboundTransferSourceBizEnum: () => CreateOutboundTransferSourceBizEnum,
2595
+ GetOtcReservedBalancesAssetsParameterInnerTypeEnum: () => GetOtcReservedBalancesAssetsParameterInnerTypeEnum,
1861
2596
  GetQuoteFundingSourceEnum: () => GetQuoteFundingSourceEnum,
1862
2597
  GetQuoteOrderTypeEnum: () => GetQuoteOrderTypeEnum,
1863
2598
  GetQuoteSideEnum: () => GetQuoteSideEnum,
2599
+ ListOtcBlocktradesStatusEnum: () => ListOtcBlocktradesStatusEnum,
1864
2600
  ListPredictionMarketsOrderByEnum: () => ListPredictionMarketsOrderByEnum,
1865
2601
  ListPredictionMarketsSortByEnum: () => ListPredictionMarketsSortByEnum,
1866
2602
  MarketDataApi: () => MarketDataApi,
2603
+ OtcApi: () => OtcApi,
1867
2604
  PlaceOrderAccountTypeEnum: () => PlaceOrderAccountTypeEnum,
1868
2605
  PlaceOrderFundingSourceEnum: () => PlaceOrderFundingSourceEnum,
1869
2606
  PlaceOrderOrderTypeEnum: () => PlaceOrderOrderTypeEnum,