@binance/w3w-prediction 2.0.0 → 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.mjs CHANGED
@@ -3,7 +3,14 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/w3w-prediction";
6
- var version = "2.0.0";
6
+ var version = "2.1.0";
7
+
8
+ //#endregion
9
+ //#region src/rest-api/types/get-otc-reserved-balances-assets-parameter-inner.ts
10
+ const GetOtcReservedBalancesAssetsParameterInnerTypeEnum = {
11
+ USDT: "USDT",
12
+ SHARE: "SHARE"
13
+ };
7
14
 
8
15
  //#endregion
9
16
  //#region src/rest-api/modules/market-data-api.ts
@@ -254,6 +261,391 @@ let ListPredictionMarketsOrderByEnum = /* @__PURE__ */ function(ListPredictionMa
254
261
  return ListPredictionMarketsOrderByEnum$1;
255
262
  }({});
256
263
 
264
+ //#endregion
265
+ //#region src/rest-api/modules/otc-api.ts
266
+ /**
267
+ * Prediction Trading REST API
268
+ *
269
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
270
+ *
271
+ * The version of the OpenAPI document: 1.0.0
272
+ *
273
+ *
274
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
275
+ * https://openapi-generator.tech
276
+ * Do not edit the class manually.
277
+ */
278
+ /**
279
+ * OtcApi - axios parameter creator
280
+ */
281
+ const OtcApiAxiosParamCreator = function(configuration) {
282
+ return {
283
+ createOtcBlocktrade: async (marketId, tokenId, side, makerAmount, takerAmount, pricePerShare, expiration) => {
284
+ assertParamExists("createOtcBlocktrade", "marketId", marketId);
285
+ assertParamExists("createOtcBlocktrade", "tokenId", tokenId);
286
+ assertParamExists("createOtcBlocktrade", "side", side);
287
+ assertParamExists("createOtcBlocktrade", "makerAmount", makerAmount);
288
+ assertParamExists("createOtcBlocktrade", "takerAmount", takerAmount);
289
+ assertParamExists("createOtcBlocktrade", "pricePerShare", pricePerShare);
290
+ assertParamExists("createOtcBlocktrade", "expiration", expiration);
291
+ const localVarQueryParameter = {};
292
+ const localVarBodyParameter = {};
293
+ const localVarHeaderParameter = {};
294
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
295
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
296
+ if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
297
+ if (makerAmount !== void 0 && makerAmount !== null) localVarQueryParameter["makerAmount"] = makerAmount;
298
+ if (takerAmount !== void 0 && takerAmount !== null) localVarQueryParameter["takerAmount"] = takerAmount;
299
+ if (pricePerShare !== void 0 && pricePerShare !== null) localVarQueryParameter["pricePerShare"] = pricePerShare;
300
+ if (expiration !== void 0 && expiration !== null) localVarQueryParameter["expiration"] = expiration;
301
+ let _timeUnit;
302
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
303
+ return {
304
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/create",
305
+ method: "POST",
306
+ queryParams: localVarQueryParameter,
307
+ bodyParams: localVarBodyParameter,
308
+ headerParams: localVarHeaderParameter,
309
+ timeUnit: _timeUnit
310
+ };
311
+ },
312
+ fulfilOtcBlocktrade: async (orderId, secretToken) => {
313
+ assertParamExists("fulfilOtcBlocktrade", "orderId", orderId);
314
+ assertParamExists("fulfilOtcBlocktrade", "secretToken", secretToken);
315
+ const localVarQueryParameter = {};
316
+ const localVarBodyParameter = {};
317
+ const localVarHeaderParameter = {};
318
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
319
+ if (secretToken !== void 0 && secretToken !== null) localVarQueryParameter["secretToken"] = secretToken;
320
+ let _timeUnit;
321
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
322
+ return {
323
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/fulfil",
324
+ method: "POST",
325
+ queryParams: localVarQueryParameter,
326
+ bodyParams: localVarBodyParameter,
327
+ headerParams: localVarHeaderParameter,
328
+ timeUnit: _timeUnit
329
+ };
330
+ },
331
+ getOtcBlocktradeDetail: async (orderId) => {
332
+ assertParamExists("getOtcBlocktradeDetail", "orderId", orderId);
333
+ const localVarQueryParameter = {};
334
+ const localVarBodyParameter = {};
335
+ const localVarHeaderParameter = {};
336
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
337
+ let _timeUnit;
338
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
339
+ return {
340
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/detail",
341
+ method: "POST",
342
+ queryParams: localVarQueryParameter,
343
+ bodyParams: localVarBodyParameter,
344
+ headerParams: localVarHeaderParameter,
345
+ timeUnit: _timeUnit
346
+ };
347
+ },
348
+ getOtcBlocktradeEvents: async (first, after, eventTypes, marketId) => {
349
+ const localVarQueryParameter = {};
350
+ const localVarBodyParameter = {};
351
+ const localVarHeaderParameter = {};
352
+ if (first !== void 0 && first !== null) localVarQueryParameter["first"] = first;
353
+ if (after !== void 0 && after !== null) localVarQueryParameter["after"] = after;
354
+ if (eventTypes) localVarQueryParameter["eventTypes"] = eventTypes;
355
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
356
+ let _timeUnit;
357
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
358
+ return {
359
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/events",
360
+ method: "POST",
361
+ queryParams: localVarQueryParameter,
362
+ bodyParams: localVarBodyParameter,
363
+ headerParams: localVarHeaderParameter,
364
+ timeUnit: _timeUnit
365
+ };
366
+ },
367
+ getOtcReservedBalances: async (assets) => {
368
+ assertParamExists("getOtcReservedBalances", "assets", assets);
369
+ const localVarQueryParameter = {};
370
+ const localVarBodyParameter = {};
371
+ const localVarHeaderParameter = {};
372
+ if (assets) localVarQueryParameter["assets"] = assets;
373
+ let _timeUnit;
374
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
375
+ return {
376
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/reserved-balances",
377
+ method: "POST",
378
+ queryParams: localVarQueryParameter,
379
+ bodyParams: localVarBodyParameter,
380
+ headerParams: localVarHeaderParameter,
381
+ timeUnit: _timeUnit
382
+ };
383
+ },
384
+ listOtcBlocktrades: async (first, after, status) => {
385
+ const localVarQueryParameter = {};
386
+ const localVarBodyParameter = {};
387
+ const localVarHeaderParameter = {};
388
+ if (first !== void 0 && first !== null) localVarQueryParameter["first"] = first;
389
+ if (after !== void 0 && after !== null) localVarQueryParameter["after"] = after;
390
+ if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
391
+ let _timeUnit;
392
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
393
+ return {
394
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/list",
395
+ method: "POST",
396
+ queryParams: localVarQueryParameter,
397
+ bodyParams: localVarBodyParameter,
398
+ headerParams: localVarHeaderParameter,
399
+ timeUnit: _timeUnit
400
+ };
401
+ },
402
+ previewOtcBlocktrade: async (secretToken) => {
403
+ assertParamExists("previewOtcBlocktrade", "secretToken", secretToken);
404
+ const localVarQueryParameter = {};
405
+ const localVarBodyParameter = {};
406
+ const localVarHeaderParameter = {};
407
+ if (secretToken !== void 0 && secretToken !== null) localVarQueryParameter["secretToken"] = secretToken;
408
+ let _timeUnit;
409
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
410
+ return {
411
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/preview",
412
+ method: "POST",
413
+ queryParams: localVarQueryParameter,
414
+ bodyParams: localVarBodyParameter,
415
+ headerParams: localVarHeaderParameter,
416
+ timeUnit: _timeUnit
417
+ };
418
+ },
419
+ removeOtcBlocktrades: async (orderIds) => {
420
+ assertParamExists("removeOtcBlocktrades", "orderIds", orderIds);
421
+ const localVarQueryParameter = {};
422
+ const localVarBodyParameter = {};
423
+ const localVarHeaderParameter = {};
424
+ if (orderIds) localVarQueryParameter["orderIds"] = orderIds;
425
+ let _timeUnit;
426
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
427
+ return {
428
+ endpoint: "/sapi/v1/w3w/wallet/prediction/otc/blocktrade/remove",
429
+ method: "POST",
430
+ queryParams: localVarQueryParameter,
431
+ bodyParams: localVarBodyParameter,
432
+ headerParams: localVarHeaderParameter,
433
+ timeUnit: _timeUnit
434
+ };
435
+ }
436
+ };
437
+ };
438
+ /**
439
+ * OtcApi - object-oriented interface
440
+ * @class OtcApi
441
+ */
442
+ var OtcApi = class {
443
+ constructor(configuration) {
444
+ this.configuration = configuration;
445
+ this.localVarAxiosParamCreator = OtcApiAxiosParamCreator(configuration);
446
+ }
447
+ /**
448
+ * 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.
449
+ *
450
+ * Weight(IP): 200
451
+ *
452
+ * Security Type: PREDICTION_TRADE
453
+ *
454
+ * Notes:
455
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
456
+ * - Side & Amount Rules:
457
+ *
458
+ * | side | makerAmount | takerAmount |
459
+ * | ------ | ------------- | ------------- |
460
+ * | `BUY` | USDT (wei) | shares (wei) |
461
+ * | `SELL` | shares (wei) | USDT (wei) |
462
+ * - "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."
463
+ *
464
+ * | Request `side` | Response `side` (Integer) | Response `quoteType` |
465
+ * | --------------- | -------------------------- | ---------------------- |
466
+ * | `BUY` | `0` | `"Bid"` |
467
+ * | `SELL` | `1` | `"Ask"` |
468
+ *
469
+ * @summary Create OTC Blocktrade (PREDICTION_TRADE)
470
+ * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.
471
+ * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}
472
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
473
+ * @memberof OtcApi
474
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}
475
+ */
476
+ async createOtcBlocktrade(requestParameters) {
477
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOtcBlocktrade(requestParameters?.marketId, requestParameters?.tokenId, requestParameters?.side, requestParameters?.makerAmount, requestParameters?.takerAmount, requestParameters?.pricePerShare, requestParameters?.expiration);
478
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
479
+ }
480
+ /**
481
+ * 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.
482
+ *
483
+ * Weight(IP): 200
484
+ *
485
+ * Security Type: PREDICTION_TRADE
486
+ *
487
+ * Notes:
488
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
489
+ *
490
+ * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)
491
+ * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.
492
+ * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}
493
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
494
+ * @memberof OtcApi
495
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}
496
+ */
497
+ async fulfilOtcBlocktrade(requestParameters) {
498
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.fulfilOtcBlocktrade(requestParameters?.orderId, requestParameters?.secretToken);
499
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
500
+ }
501
+ /**
502
+ * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.
503
+ *
504
+ * Weight(IP): 200
505
+ *
506
+ * Security Type: PREDICTION_TRADE
507
+ *
508
+ * Notes:
509
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
510
+ *
511
+ * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)
512
+ * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.
513
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}
514
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
515
+ * @memberof OtcApi
516
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}
517
+ */
518
+ async getOtcBlocktradeDetail(requestParameters) {
519
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeDetail(requestParameters?.orderId);
520
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
521
+ }
522
+ /**
523
+ * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).
524
+ *
525
+ * Weight(IP): 200
526
+ *
527
+ * Security Type: PREDICTION_TRADE
528
+ *
529
+ * Notes:
530
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
531
+ *
532
+ * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)
533
+ * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.
534
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}
535
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
536
+ * @memberof OtcApi
537
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}
538
+ */
539
+ async getOtcBlocktradeEvents(requestParameters = {}) {
540
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeEvents(requestParameters?.first, requestParameters?.after, requestParameters?.eventTypes, requestParameters?.marketId);
541
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
542
+ }
543
+ /**
544
+ * 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.
545
+ *
546
+ * Weight(IP): 200
547
+ *
548
+ * Security Type: PREDICTION_TRADE
549
+ *
550
+ * Notes:
551
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
552
+ * - AssetQuery:
553
+ *
554
+ * | Name | Type | Mandatory | Description |
555
+ * | ------- | ------ | --------- | ----------- |
556
+ * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |
557
+ * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |
558
+ *
559
+ * @summary Get OTC Reserved Balances (PREDICTION_TRADE)
560
+ * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.
561
+ * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}
562
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
563
+ * @memberof OtcApi
564
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}
565
+ */
566
+ async getOtcReservedBalances(requestParameters) {
567
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcReservedBalances(requestParameters?.assets);
568
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
569
+ }
570
+ /**
571
+ * List the maker's own blocktrades with optional status filter and cursor pagination.
572
+ *
573
+ * Weight(IP): 200
574
+ *
575
+ * Security Type: PREDICTION_TRADE
576
+ *
577
+ * Notes:
578
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
579
+ *
580
+ * @summary List OTC Blocktrades (PREDICTION_TRADE)
581
+ * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.
582
+ * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}
583
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
584
+ * @memberof OtcApi
585
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}
586
+ */
587
+ async listOtcBlocktrades(requestParameters = {}) {
588
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.listOtcBlocktrades(requestParameters?.first, requestParameters?.after, requestParameters?.status);
589
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
590
+ }
591
+ /**
592
+ * 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.
593
+ *
594
+ * Weight(IP): 200
595
+ *
596
+ * Security Type: PREDICTION_TRADE
597
+ *
598
+ * Notes:
599
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
600
+ *
601
+ * @summary Preview OTC Blocktrade (PREDICTION_TRADE)
602
+ * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.
603
+ * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}
604
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
605
+ * @memberof OtcApi
606
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}
607
+ */
608
+ async previewOtcBlocktrade(requestParameters) {
609
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.previewOtcBlocktrade(requestParameters?.secretToken);
610
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
611
+ }
612
+ /**
613
+ * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.
614
+ *
615
+ * Weight(IP): 200
616
+ *
617
+ * Security Type: PREDICTION_TRADE
618
+ *
619
+ * Notes:
620
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
621
+ *
622
+ * @summary Remove OTC Blocktrades (PREDICTION_TRADE)
623
+ * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.
624
+ * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}
625
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
626
+ * @memberof OtcApi
627
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}
628
+ */
629
+ async removeOtcBlocktrades(requestParameters) {
630
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.removeOtcBlocktrades(requestParameters?.orderIds);
631
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
632
+ }
633
+ };
634
+ let CreateOtcBlocktradeSideEnum = /* @__PURE__ */ function(CreateOtcBlocktradeSideEnum$1) {
635
+ CreateOtcBlocktradeSideEnum$1["BUY"] = "BUY";
636
+ CreateOtcBlocktradeSideEnum$1["SELL"] = "SELL";
637
+ return CreateOtcBlocktradeSideEnum$1;
638
+ }({});
639
+ let ListOtcBlocktradesStatusEnum = /* @__PURE__ */ function(ListOtcBlocktradesStatusEnum$1) {
640
+ ListOtcBlocktradesStatusEnum$1["OPEN"] = "OPEN";
641
+ ListOtcBlocktradesStatusEnum$1["FULFILLED"] = "FULFILLED";
642
+ ListOtcBlocktradesStatusEnum$1["MATCHED"] = "MATCHED";
643
+ ListOtcBlocktradesStatusEnum$1["CANCELLED"] = "CANCELLED";
644
+ ListOtcBlocktradesStatusEnum$1["EXPIRED"] = "EXPIRED";
645
+ ListOtcBlocktradesStatusEnum$1["FAILED"] = "FAILED";
646
+ return ListOtcBlocktradesStatusEnum$1;
647
+ }({});
648
+
257
649
  //#endregion
258
650
  //#region src/rest-api/modules/position-api.ts
259
651
  /**
@@ -394,9 +786,9 @@ var PositionApi = class {
394
786
  *
395
787
  * Weight(IP): 200
396
788
  *
397
- * Security Type: USER_DATA
789
+ * Security Type: PREDICTION_TRADE
398
790
  *
399
- * @summary Get Position by Token (USER_DATA)
791
+ * @summary Get Position by Token (PREDICTION_TRADE)
400
792
  * @param {GetPositionByTokenRequest} requestParameters Request parameters.
401
793
  * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
402
794
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -412,9 +804,9 @@ var PositionApi = class {
412
804
  *
413
805
  * Weight(IP): 200
414
806
  *
415
- * Security Type: USER_DATA
807
+ * Security Type: PREDICTION_TRADE
416
808
  *
417
- * @summary Query PnL (USER_DATA)
809
+ * @summary Query PnL (PREDICTION_TRADE)
418
810
  * @param {QueryPnLRequest} requestParameters Request parameters.
419
811
  * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
420
812
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -430,9 +822,9 @@ var PositionApi = class {
430
822
  *
431
823
  * Weight(IP): 200
432
824
  *
433
- * Security Type: USER_DATA
825
+ * Security Type: PREDICTION_TRADE
434
826
  *
435
- * @summary Query Positions (USER_DATA)
827
+ * @summary Query Positions (PREDICTION_TRADE)
436
828
  * @param {QueryPositionsRequest} requestParameters Request parameters.
437
829
  * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
438
830
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -448,9 +840,9 @@ var PositionApi = class {
448
840
  *
449
841
  * Weight(IP): 200
450
842
  *
451
- * Security Type: USER_DATA
843
+ * Security Type: PREDICTION_TRADE
452
844
  *
453
- * @summary Query Positions by Filter (USER_DATA)
845
+ * @summary Query Positions by Filter (PREDICTION_TRADE)
454
846
  * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
455
847
  * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
456
848
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -466,9 +858,9 @@ var PositionApi = class {
466
858
  *
467
859
  * Weight(IP): 200
468
860
  *
469
- * Security Type: USER_DATA
861
+ * Security Type: PREDICTION_TRADE
470
862
  *
471
- * @summary Query Settled Position History (USER_DATA)
863
+ * @summary Query Settled Position History (PREDICTION_TRADE)
472
864
  * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
473
865
  * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
474
866
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -558,9 +950,9 @@ var RedeemApi = class {
558
950
  *
559
951
  * Weight(IP): 200
560
952
  *
561
- * Security Type: TRADE
953
+ * Security Type: PREDICTION_TRADE
562
954
  *
563
- * @summary Batch Redeem (TRADE)
955
+ * @summary Batch Redeem (PREDICTION_TRADE)
564
956
  * @param {BatchRedeemRequest} requestParameters Request parameters.
565
957
  * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
566
958
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -576,7 +968,7 @@ var RedeemApi = class {
576
968
  *
577
969
  * Weight(IP): 200
578
970
  *
579
- * Security Type: USER_DATA
971
+ * Security Type: PREDICTION_TRADE
580
972
  *
581
973
  * Response Notes:
582
974
  * - Status values:
@@ -588,7 +980,7 @@ var RedeemApi = class {
588
980
  * | `FAILED` | Transaction failed |
589
981
  * | `NOT_FOUND` | Transaction hash not found |
590
982
  *
591
- * @summary Get Redeem Status (USER_DATA)
983
+ * @summary Get Redeem Status (PREDICTION_TRADE)
592
984
  * @param {GetRedeemStatusRequest} requestParameters Request parameters.
593
985
  * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
594
986
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -776,13 +1168,13 @@ var TradeApi = class {
776
1168
  *
777
1169
  * Weight(IP): 200
778
1170
  *
779
- * Security Type: TRADE
1171
+ * Security Type: PREDICTION_TRADE
780
1172
  *
781
1173
  * Notes:
782
1174
  * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
783
1175
  * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
784
1176
  *
785
- * @summary Batch Cancel Orders (TRADE)
1177
+ * @summary Batch Cancel Orders (PREDICTION_TRADE)
786
1178
  * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
787
1179
  * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
788
1180
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -798,13 +1190,13 @@ var TradeApi = class {
798
1190
  *
799
1191
  * Weight(IP): 200
800
1192
  *
801
- * Security Type: TRADE
1193
+ * Security Type: PREDICTION_TRADE
802
1194
  *
803
1195
  * Response Notes:
804
1196
  * - `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.
805
1197
  * - **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.
806
1198
  *
807
- * @summary Get Quote (TRADE)
1199
+ * @summary Get Quote (PREDICTION_TRADE)
808
1200
  * @param {GetQuoteRequest} requestParameters Request parameters.
809
1201
  * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
810
1202
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -820,7 +1212,7 @@ var TradeApi = class {
820
1212
  *
821
1213
  * Weight(IP): 200
822
1214
  *
823
- * Security Type: TRADE
1215
+ * Security Type: PREDICTION_TRADE
824
1216
  *
825
1217
  * Notes:
826
1218
  * - Validation rules:
@@ -830,7 +1222,7 @@ var TradeApi = class {
830
1222
  * | `MARKET` | Must be `FOK` | Not required |
831
1223
  * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
832
1224
  *
833
- * @summary Place Order (TRADE)
1225
+ * @summary Place Order (PREDICTION_TRADE)
834
1226
  * @param {PlaceOrderRequest} requestParameters Request parameters.
835
1227
  * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
836
1228
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -846,9 +1238,9 @@ var TradeApi = class {
846
1238
  *
847
1239
  * Weight(IP): 200
848
1240
  *
849
- * Security Type: USER_DATA
1241
+ * Security Type: PREDICTION_TRADE
850
1242
  *
851
- * @summary Query Active Orders (USER_DATA)
1243
+ * @summary Query Active Orders (PREDICTION_TRADE)
852
1244
  * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
853
1245
  * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
854
1246
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -864,9 +1256,9 @@ var TradeApi = class {
864
1256
  *
865
1257
  * Weight(IP): 200
866
1258
  *
867
- * Security Type: USER_DATA
1259
+ * Security Type: PREDICTION_TRADE
868
1260
  *
869
- * @summary Query Order History (USER_DATA)
1261
+ * @summary Query Order History (PREDICTION_TRADE)
870
1262
  * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
871
1263
  * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
872
1264
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -938,6 +1330,54 @@ let QueryOrderHistoryOrderTypeEnum = /* @__PURE__ */ function(QueryOrderHistoryO
938
1330
  */
939
1331
  const TransferApiAxiosParamCreator = function(configuration) {
940
1332
  return {
1333
+ applyMmDeposit: async (fromToken, fromTokenAmount, toToken, accountType, chainId) => {
1334
+ assertParamExists("applyMmDeposit", "fromToken", fromToken);
1335
+ assertParamExists("applyMmDeposit", "fromTokenAmount", fromTokenAmount);
1336
+ assertParamExists("applyMmDeposit", "toToken", toToken);
1337
+ assertParamExists("applyMmDeposit", "accountType", accountType);
1338
+ const localVarQueryParameter = {};
1339
+ const localVarBodyParameter = {};
1340
+ const localVarHeaderParameter = {};
1341
+ if (fromToken !== void 0 && fromToken !== null) localVarQueryParameter["fromToken"] = fromToken;
1342
+ if (fromTokenAmount !== void 0 && fromTokenAmount !== null) localVarQueryParameter["fromTokenAmount"] = fromTokenAmount;
1343
+ if (toToken !== void 0 && toToken !== null) localVarQueryParameter["toToken"] = toToken;
1344
+ if (accountType !== void 0 && accountType !== null) localVarQueryParameter["accountType"] = accountType;
1345
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
1346
+ let _timeUnit;
1347
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1348
+ return {
1349
+ endpoint: "/sapi/v1/w3w/wallet/prediction/deposit/apply",
1350
+ method: "POST",
1351
+ queryParams: localVarQueryParameter,
1352
+ bodyParams: localVarBodyParameter,
1353
+ headerParams: localVarHeaderParameter,
1354
+ timeUnit: _timeUnit
1355
+ };
1356
+ },
1357
+ applyMmWithdraw: async (coin, network, amount, withdrawOrderId, walletType, name$1) => {
1358
+ assertParamExists("applyMmWithdraw", "coin", coin);
1359
+ assertParamExists("applyMmWithdraw", "network", network);
1360
+ assertParamExists("applyMmWithdraw", "amount", amount);
1361
+ const localVarQueryParameter = {};
1362
+ const localVarBodyParameter = {};
1363
+ const localVarHeaderParameter = {};
1364
+ if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
1365
+ if (network !== void 0 && network !== null) localVarQueryParameter["network"] = network;
1366
+ if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
1367
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
1368
+ if (walletType !== void 0 && walletType !== null) localVarQueryParameter["walletType"] = walletType;
1369
+ if (name$1 !== void 0 && name$1 !== null) localVarQueryParameter["name"] = name$1;
1370
+ let _timeUnit;
1371
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1372
+ return {
1373
+ endpoint: "/sapi/v1/w3w/wallet/prediction/withdraw/apply",
1374
+ method: "POST",
1375
+ queryParams: localVarQueryParameter,
1376
+ bodyParams: localVarBodyParameter,
1377
+ headerParams: localVarHeaderParameter,
1378
+ timeUnit: _timeUnit
1379
+ };
1380
+ },
941
1381
  createInboundTransfer: async (walletId, walletAddress, fromTokenAmount, accountType, fromToken, toToken, chainId) => {
942
1382
  assertParamExists("createInboundTransfer", "walletId", walletId);
943
1383
  assertParamExists("createInboundTransfer", "walletAddress", walletAddress);
@@ -1048,15 +1488,67 @@ var TransferApi = class {
1048
1488
  this.localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration);
1049
1489
  }
1050
1490
  /**
1491
+ * 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.
1492
+ *
1493
+ * Weight(IP): 200
1494
+ *
1495
+ * Security Type: PREDICTION_TRADE
1496
+ *
1497
+ * Notes:
1498
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1499
+ * - "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."
1500
+ *
1501
+ * @summary Apply MM Deposit (PREDICTION_TRADE)
1502
+ * @param {ApplyMmDepositRequest} requestParameters Request parameters.
1503
+ * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}
1504
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1505
+ * @memberof TransferApi
1506
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}
1507
+ */
1508
+ async applyMmDeposit(requestParameters) {
1509
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmDeposit(requestParameters?.fromToken, requestParameters?.fromTokenAmount, requestParameters?.toToken, requestParameters?.accountType, requestParameters?.chainId);
1510
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1511
+ }
1512
+ /**
1513
+ * 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.
1514
+ *
1515
+ * Weight(IP): 200
1516
+ *
1517
+ * Security Type: PREDICTION_TRADE
1518
+ *
1519
+ * Notes:
1520
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1521
+ * - walletType Validation:
1522
+ *
1523
+ * | Value | Behavior |
1524
+ * | --------------- | ------------------------------- |
1525
+ * | `null` | Allowed — defaults to SPOT |
1526
+ * | `0` | Allowed — source = SPOT |
1527
+ * | `1` | Allowed — source = FUNDING |
1528
+ * | Other (e.g. `99`) | Rejected — returns validation error |
1529
+ * - "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."
1530
+ *
1531
+ * @summary Apply MM Withdraw (PREDICTION_TRADE)
1532
+ * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.
1533
+ * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}
1534
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1535
+ * @memberof TransferApi
1536
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}
1537
+ */
1538
+ async applyMmWithdraw(requestParameters) {
1539
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmWithdraw(requestParameters?.coin, requestParameters?.network, requestParameters?.amount, requestParameters?.withdrawOrderId, requestParameters?.walletType, requestParameters?.name);
1540
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1541
+ }
1542
+ /**
1051
1543
  * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1052
1544
  *
1053
1545
  * ⚠️ **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.
1054
1546
  *
1055
1547
  * Weight(IP): 200
1056
1548
  *
1057
- * Security Type: TRADE
1549
+ * Security Type: PREDICTION_TRADE
1058
1550
  *
1059
- * @summary Create Inbound Transfer (TRADE)
1551
+ * @summary Create Inbound Transfer (PREDICTION_TRADE)
1060
1552
  * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1061
1553
  * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
1062
1554
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1072,9 +1564,9 @@ var TransferApi = class {
1072
1564
  *
1073
1565
  * Weight(IP): 200
1074
1566
  *
1075
- * Security Type: TRADE
1567
+ * Security Type: PREDICTION_TRADE
1076
1568
  *
1077
- * @summary Create Outbound Transfer (TRADE)
1569
+ * @summary Create Outbound Transfer (PREDICTION_TRADE)
1078
1570
  * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1079
1571
  * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
1080
1572
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1090,9 +1582,9 @@ var TransferApi = class {
1090
1582
  *
1091
1583
  * Weight(IP): 200
1092
1584
  *
1093
- * Security Type: USER_DATA
1585
+ * Security Type: PREDICTION_TRADE
1094
1586
  *
1095
- * @summary Query Transfer List (USER_DATA)
1587
+ * @summary Query Transfer List (PREDICTION_TRADE)
1096
1588
  * @param {QueryTransferListRequest} requestParameters Request parameters.
1097
1589
  * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
1098
1590
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1110,9 +1602,9 @@ var TransferApi = class {
1110
1602
  *
1111
1603
  * Weight(IP): 200
1112
1604
  *
1113
- * Security Type: USER_DATA
1605
+ * Security Type: PREDICTION_TRADE
1114
1606
  *
1115
- * @summary Query Transfer Status (USER_DATA)
1607
+ * @summary Query Transfer Status (PREDICTION_TRADE)
1116
1608
  * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1117
1609
  * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
1118
1610
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1124,6 +1616,16 @@ var TransferApi = class {
1124
1616
  return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1125
1617
  }
1126
1618
  };
1619
+ let ApplyMmDepositAccountTypeEnum = /* @__PURE__ */ function(ApplyMmDepositAccountTypeEnum$1) {
1620
+ ApplyMmDepositAccountTypeEnum$1["SPOT"] = "SPOT";
1621
+ ApplyMmDepositAccountTypeEnum$1["FUNDING"] = "FUNDING";
1622
+ return ApplyMmDepositAccountTypeEnum$1;
1623
+ }({});
1624
+ let ApplyMmWithdrawWalletTypeEnum = /* @__PURE__ */ function(ApplyMmWithdrawWalletTypeEnum$1) {
1625
+ ApplyMmWithdrawWalletTypeEnum$1[ApplyMmWithdrawWalletTypeEnum$1["WALLET_TYPE_0"] = 0] = "WALLET_TYPE_0";
1626
+ ApplyMmWithdrawWalletTypeEnum$1[ApplyMmWithdrawWalletTypeEnum$1["WALLET_TYPE_1"] = 1] = "WALLET_TYPE_1";
1627
+ return ApplyMmWithdrawWalletTypeEnum$1;
1628
+ }({});
1127
1629
  let CreateInboundTransferAccountTypeEnum = /* @__PURE__ */ function(CreateInboundTransferAccountTypeEnum$1) {
1128
1630
  CreateInboundTransferAccountTypeEnum$1["SPOT"] = "SPOT";
1129
1631
  CreateInboundTransferAccountTypeEnum$1["FUNDING"] = "FUNDING";
@@ -1250,9 +1752,9 @@ var WalletApi = class {
1250
1752
  *
1251
1753
  * Weight(IP): 200
1252
1754
  *
1253
- * Security Type: USER_DATA
1755
+ * Security Type: PREDICTION_TRADE
1254
1756
  *
1255
- * @summary Get Portfolio (USER_DATA)
1757
+ * @summary Get Portfolio (PREDICTION_TRADE)
1256
1758
  * @param {GetPortfolioRequest} requestParameters Request parameters.
1257
1759
  * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
1258
1760
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1268,9 +1770,9 @@ var WalletApi = class {
1268
1770
  *
1269
1771
  * Weight(IP): 200
1270
1772
  *
1271
- * Security Type: USER_DATA
1773
+ * Security Type: PREDICTION_TRADE
1272
1774
  *
1273
- * @summary Get Quota Status (USER_DATA)
1775
+ * @summary Get Quota Status (PREDICTION_TRADE)
1274
1776
  * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1275
1777
  * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
1276
1778
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1286,9 +1788,9 @@ var WalletApi = class {
1286
1788
  *
1287
1789
  * Weight(IP): 200
1288
1790
  *
1289
- * Security Type: USER_DATA
1791
+ * Security Type: PREDICTION_TRADE
1290
1792
  *
1291
- * @summary List Prediction Wallets (USER_DATA)
1793
+ * @summary List Prediction Wallets (PREDICTION_TRADE)
1292
1794
  * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1293
1795
  * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
1294
1796
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1304,9 +1806,9 @@ var WalletApi = class {
1304
1806
  *
1305
1807
  * Weight(IP): 200
1306
1808
  *
1307
- * Security Type: USER_DATA
1809
+ * Security Type: PREDICTION_TRADE
1308
1810
  *
1309
- * @summary Query Payment Option Balances (USER_DATA)
1811
+ * @summary Query Payment Option Balances (PREDICTION_TRADE)
1310
1812
  * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1311
1813
  * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
1312
1814
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
@@ -1337,6 +1839,7 @@ var RestAPI = class {
1337
1839
  constructor(configuration) {
1338
1840
  this.configuration = configuration;
1339
1841
  this.marketDataApi = new MarketDataApi(configuration);
1842
+ this.otcApi = new OtcApi(configuration);
1340
1843
  this.positionApi = new PositionApi(configuration);
1341
1844
  this.redeemApi = new RedeemApi(configuration);
1342
1845
  this.tradeApi = new TradeApi(configuration);
@@ -1457,13 +1960,191 @@ var RestAPI = class {
1457
1960
  return this.marketDataApi.queryOrderBook(requestParameters);
1458
1961
  }
1459
1962
  /**
1963
+ * 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.
1964
+ *
1965
+ * Weight(IP): 200
1966
+ *
1967
+ * Security Type: PREDICTION_TRADE
1968
+ *
1969
+ * Notes:
1970
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
1971
+ * - Side & Amount Rules:
1972
+ *
1973
+ * | side | makerAmount | takerAmount |
1974
+ * | ------ | ------------- | ------------- |
1975
+ * | `BUY` | USDT (wei) | shares (wei) |
1976
+ * | `SELL` | shares (wei) | USDT (wei) |
1977
+ * - "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."
1978
+ *
1979
+ * | Request `side` | Response `side` (Integer) | Response `quoteType` |
1980
+ * | --------------- | -------------------------- | ---------------------- |
1981
+ * | `BUY` | `0` | `"Bid"` |
1982
+ * | `SELL` | `1` | `"Ask"` |
1983
+ *
1984
+ * @summary Create OTC Blocktrade (PREDICTION_TRADE)
1985
+ * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.
1986
+ *
1987
+ * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}
1988
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1989
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}
1990
+ */
1991
+ createOtcBlocktrade(requestParameters) {
1992
+ return this.otcApi.createOtcBlocktrade(requestParameters);
1993
+ }
1994
+ /**
1995
+ * 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.
1996
+ *
1997
+ * Weight(IP): 200
1998
+ *
1999
+ * Security Type: PREDICTION_TRADE
2000
+ *
2001
+ * Notes:
2002
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2003
+ *
2004
+ * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)
2005
+ * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.
2006
+ *
2007
+ * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}
2008
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2009
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}
2010
+ */
2011
+ fulfilOtcBlocktrade(requestParameters) {
2012
+ return this.otcApi.fulfilOtcBlocktrade(requestParameters);
2013
+ }
2014
+ /**
2015
+ * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.
2016
+ *
2017
+ * Weight(IP): 200
2018
+ *
2019
+ * Security Type: PREDICTION_TRADE
2020
+ *
2021
+ * Notes:
2022
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2023
+ *
2024
+ * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)
2025
+ * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.
2026
+ *
2027
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}
2028
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2029
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}
2030
+ */
2031
+ getOtcBlocktradeDetail(requestParameters) {
2032
+ return this.otcApi.getOtcBlocktradeDetail(requestParameters);
2033
+ }
2034
+ /**
2035
+ * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).
2036
+ *
2037
+ * Weight(IP): 200
2038
+ *
2039
+ * Security Type: PREDICTION_TRADE
2040
+ *
2041
+ * Notes:
2042
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2043
+ *
2044
+ * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)
2045
+ * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.
2046
+ *
2047
+ * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}
2048
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2049
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}
2050
+ */
2051
+ getOtcBlocktradeEvents(requestParameters = {}) {
2052
+ return this.otcApi.getOtcBlocktradeEvents(requestParameters);
2053
+ }
2054
+ /**
2055
+ * 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.
2056
+ *
2057
+ * Weight(IP): 200
2058
+ *
2059
+ * Security Type: PREDICTION_TRADE
2060
+ *
2061
+ * Notes:
2062
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2063
+ * - AssetQuery:
2064
+ *
2065
+ * | Name | Type | Mandatory | Description |
2066
+ * | ------- | ------ | --------- | ----------- |
2067
+ * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |
2068
+ * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |
2069
+ *
2070
+ * @summary Get OTC Reserved Balances (PREDICTION_TRADE)
2071
+ * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.
2072
+ *
2073
+ * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}
2074
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2075
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}
2076
+ */
2077
+ getOtcReservedBalances(requestParameters) {
2078
+ return this.otcApi.getOtcReservedBalances(requestParameters);
2079
+ }
2080
+ /**
2081
+ * List the maker's own blocktrades with optional status filter and cursor pagination.
2082
+ *
2083
+ * Weight(IP): 200
2084
+ *
2085
+ * Security Type: PREDICTION_TRADE
2086
+ *
2087
+ * Notes:
2088
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2089
+ *
2090
+ * @summary List OTC Blocktrades (PREDICTION_TRADE)
2091
+ * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.
2092
+ *
2093
+ * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}
2094
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2095
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}
2096
+ */
2097
+ listOtcBlocktrades(requestParameters = {}) {
2098
+ return this.otcApi.listOtcBlocktrades(requestParameters);
2099
+ }
2100
+ /**
2101
+ * 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.
2102
+ *
2103
+ * Weight(IP): 200
2104
+ *
2105
+ * Security Type: PREDICTION_TRADE
2106
+ *
2107
+ * Notes:
2108
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2109
+ *
2110
+ * @summary Preview OTC Blocktrade (PREDICTION_TRADE)
2111
+ * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.
2112
+ *
2113
+ * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}
2114
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2115
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}
2116
+ */
2117
+ previewOtcBlocktrade(requestParameters) {
2118
+ return this.otcApi.previewOtcBlocktrade(requestParameters);
2119
+ }
2120
+ /**
2121
+ * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.
2122
+ *
2123
+ * Weight(IP): 200
2124
+ *
2125
+ * Security Type: PREDICTION_TRADE
2126
+ *
2127
+ * Notes:
2128
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2129
+ *
2130
+ * @summary Remove OTC Blocktrades (PREDICTION_TRADE)
2131
+ * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.
2132
+ *
2133
+ * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}
2134
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2135
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}
2136
+ */
2137
+ removeOtcBlocktrades(requestParameters) {
2138
+ return this.otcApi.removeOtcBlocktrades(requestParameters);
2139
+ }
2140
+ /**
1460
2141
  * Get the authenticated user's position detail for a specific prediction token.
1461
2142
  *
1462
2143
  * Weight(IP): 200
1463
2144
  *
1464
- * Security Type: USER_DATA
2145
+ * Security Type: PREDICTION_TRADE
1465
2146
  *
1466
- * @summary Get Position by Token (USER_DATA)
2147
+ * @summary Get Position by Token (PREDICTION_TRADE)
1467
2148
  * @param {GetPositionByTokenRequest} requestParameters Request parameters.
1468
2149
  *
1469
2150
  * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
@@ -1478,9 +2159,9 @@ var RestAPI = class {
1478
2159
  *
1479
2160
  * Weight(IP): 200
1480
2161
  *
1481
- * Security Type: USER_DATA
2162
+ * Security Type: PREDICTION_TRADE
1482
2163
  *
1483
- * @summary Query PnL (USER_DATA)
2164
+ * @summary Query PnL (PREDICTION_TRADE)
1484
2165
  * @param {QueryPnLRequest} requestParameters Request parameters.
1485
2166
  *
1486
2167
  * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
@@ -1495,9 +2176,9 @@ var RestAPI = class {
1495
2176
  *
1496
2177
  * Weight(IP): 200
1497
2178
  *
1498
- * Security Type: USER_DATA
2179
+ * Security Type: PREDICTION_TRADE
1499
2180
  *
1500
- * @summary Query Positions (USER_DATA)
2181
+ * @summary Query Positions (PREDICTION_TRADE)
1501
2182
  * @param {QueryPositionsRequest} requestParameters Request parameters.
1502
2183
  *
1503
2184
  * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
@@ -1512,9 +2193,9 @@ var RestAPI = class {
1512
2193
  *
1513
2194
  * Weight(IP): 200
1514
2195
  *
1515
- * Security Type: USER_DATA
2196
+ * Security Type: PREDICTION_TRADE
1516
2197
  *
1517
- * @summary Query Positions by Filter (USER_DATA)
2198
+ * @summary Query Positions by Filter (PREDICTION_TRADE)
1518
2199
  * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
1519
2200
  *
1520
2201
  * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
@@ -1529,9 +2210,9 @@ var RestAPI = class {
1529
2210
  *
1530
2211
  * Weight(IP): 200
1531
2212
  *
1532
- * Security Type: USER_DATA
2213
+ * Security Type: PREDICTION_TRADE
1533
2214
  *
1534
- * @summary Query Settled Position History (USER_DATA)
2215
+ * @summary Query Settled Position History (PREDICTION_TRADE)
1535
2216
  * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
1536
2217
  *
1537
2218
  * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
@@ -1546,9 +2227,9 @@ var RestAPI = class {
1546
2227
  *
1547
2228
  * Weight(IP): 200
1548
2229
  *
1549
- * Security Type: TRADE
2230
+ * Security Type: PREDICTION_TRADE
1550
2231
  *
1551
- * @summary Batch Redeem (TRADE)
2232
+ * @summary Batch Redeem (PREDICTION_TRADE)
1552
2233
  * @param {BatchRedeemRequest} requestParameters Request parameters.
1553
2234
  *
1554
2235
  * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
@@ -1563,7 +2244,7 @@ var RestAPI = class {
1563
2244
  *
1564
2245
  * Weight(IP): 200
1565
2246
  *
1566
- * Security Type: USER_DATA
2247
+ * Security Type: PREDICTION_TRADE
1567
2248
  *
1568
2249
  * Response Notes:
1569
2250
  * - Status values:
@@ -1575,7 +2256,7 @@ var RestAPI = class {
1575
2256
  * | `FAILED` | Transaction failed |
1576
2257
  * | `NOT_FOUND` | Transaction hash not found |
1577
2258
  *
1578
- * @summary Get Redeem Status (USER_DATA)
2259
+ * @summary Get Redeem Status (PREDICTION_TRADE)
1579
2260
  * @param {GetRedeemStatusRequest} requestParameters Request parameters.
1580
2261
  *
1581
2262
  * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
@@ -1598,13 +2279,13 @@ var RestAPI = class {
1598
2279
  *
1599
2280
  * Weight(IP): 200
1600
2281
  *
1601
- * Security Type: TRADE
2282
+ * Security Type: PREDICTION_TRADE
1602
2283
  *
1603
2284
  * Notes:
1604
2285
  * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
1605
2286
  * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
1606
2287
  *
1607
- * @summary Batch Cancel Orders (TRADE)
2288
+ * @summary Batch Cancel Orders (PREDICTION_TRADE)
1608
2289
  * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
1609
2290
  *
1610
2291
  * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
@@ -1619,13 +2300,13 @@ var RestAPI = class {
1619
2300
  *
1620
2301
  * Weight(IP): 200
1621
2302
  *
1622
- * Security Type: TRADE
2303
+ * Security Type: PREDICTION_TRADE
1623
2304
  *
1624
2305
  * Response Notes:
1625
2306
  * - `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.
1626
2307
  * - **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.
1627
2308
  *
1628
- * @summary Get Quote (TRADE)
2309
+ * @summary Get Quote (PREDICTION_TRADE)
1629
2310
  * @param {GetQuoteRequest} requestParameters Request parameters.
1630
2311
  *
1631
2312
  * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
@@ -1640,7 +2321,7 @@ var RestAPI = class {
1640
2321
  *
1641
2322
  * Weight(IP): 200
1642
2323
  *
1643
- * Security Type: TRADE
2324
+ * Security Type: PREDICTION_TRADE
1644
2325
  *
1645
2326
  * Notes:
1646
2327
  * - Validation rules:
@@ -1650,7 +2331,7 @@ var RestAPI = class {
1650
2331
  * | `MARKET` | Must be `FOK` | Not required |
1651
2332
  * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
1652
2333
  *
1653
- * @summary Place Order (TRADE)
2334
+ * @summary Place Order (PREDICTION_TRADE)
1654
2335
  * @param {PlaceOrderRequest} requestParameters Request parameters.
1655
2336
  *
1656
2337
  * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
@@ -1665,9 +2346,9 @@ var RestAPI = class {
1665
2346
  *
1666
2347
  * Weight(IP): 200
1667
2348
  *
1668
- * Security Type: USER_DATA
2349
+ * Security Type: PREDICTION_TRADE
1669
2350
  *
1670
- * @summary Query Active Orders (USER_DATA)
2351
+ * @summary Query Active Orders (PREDICTION_TRADE)
1671
2352
  * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
1672
2353
  *
1673
2354
  * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
@@ -1682,9 +2363,9 @@ var RestAPI = class {
1682
2363
  *
1683
2364
  * Weight(IP): 200
1684
2365
  *
1685
- * Security Type: USER_DATA
2366
+ * Security Type: PREDICTION_TRADE
1686
2367
  *
1687
- * @summary Query Order History (USER_DATA)
2368
+ * @summary Query Order History (PREDICTION_TRADE)
1688
2369
  * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
1689
2370
  *
1690
2371
  * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
@@ -1695,15 +2376,65 @@ var RestAPI = class {
1695
2376
  return this.tradeApi.queryOrderHistory(requestParameters);
1696
2377
  }
1697
2378
  /**
2379
+ * 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.
2380
+ *
2381
+ * Weight(IP): 200
2382
+ *
2383
+ * Security Type: PREDICTION_TRADE
2384
+ *
2385
+ * Notes:
2386
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2387
+ * - "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."
2388
+ *
2389
+ * @summary Apply MM Deposit (PREDICTION_TRADE)
2390
+ * @param {ApplyMmDepositRequest} requestParameters Request parameters.
2391
+ *
2392
+ * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}
2393
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2394
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}
2395
+ */
2396
+ applyMmDeposit(requestParameters) {
2397
+ return this.transferApi.applyMmDeposit(requestParameters);
2398
+ }
2399
+ /**
2400
+ * 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.
2401
+ *
2402
+ * Weight(IP): 200
2403
+ *
2404
+ * Security Type: PREDICTION_TRADE
2405
+ *
2406
+ * Notes:
2407
+ * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
2408
+ * - walletType Validation:
2409
+ *
2410
+ * | Value | Behavior |
2411
+ * | --------------- | ------------------------------- |
2412
+ * | `null` | Allowed — defaults to SPOT |
2413
+ * | `0` | Allowed — source = SPOT |
2414
+ * | `1` | Allowed — source = FUNDING |
2415
+ * | Other (e.g. `99`) | Rejected — returns validation error |
2416
+ * - "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."
2417
+ *
2418
+ * @summary Apply MM Withdraw (PREDICTION_TRADE)
2419
+ * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.
2420
+ *
2421
+ * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}
2422
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2423
+ * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}
2424
+ */
2425
+ applyMmWithdraw(requestParameters) {
2426
+ return this.transferApi.applyMmWithdraw(requestParameters);
2427
+ }
2428
+ /**
1698
2429
  * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1699
2430
  *
1700
2431
  * ⚠️ **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.
1701
2432
  *
1702
2433
  * Weight(IP): 200
1703
2434
  *
1704
- * Security Type: TRADE
2435
+ * Security Type: PREDICTION_TRADE
1705
2436
  *
1706
- * @summary Create Inbound Transfer (TRADE)
2437
+ * @summary Create Inbound Transfer (PREDICTION_TRADE)
1707
2438
  * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1708
2439
  *
1709
2440
  * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
@@ -1718,9 +2449,9 @@ var RestAPI = class {
1718
2449
  *
1719
2450
  * Weight(IP): 200
1720
2451
  *
1721
- * Security Type: TRADE
2452
+ * Security Type: PREDICTION_TRADE
1722
2453
  *
1723
- * @summary Create Outbound Transfer (TRADE)
2454
+ * @summary Create Outbound Transfer (PREDICTION_TRADE)
1724
2455
  * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1725
2456
  *
1726
2457
  * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
@@ -1735,9 +2466,9 @@ var RestAPI = class {
1735
2466
  *
1736
2467
  * Weight(IP): 200
1737
2468
  *
1738
- * Security Type: USER_DATA
2469
+ * Security Type: PREDICTION_TRADE
1739
2470
  *
1740
- * @summary Query Transfer List (USER_DATA)
2471
+ * @summary Query Transfer List (PREDICTION_TRADE)
1741
2472
  * @param {QueryTransferListRequest} requestParameters Request parameters.
1742
2473
  *
1743
2474
  * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
@@ -1754,9 +2485,9 @@ var RestAPI = class {
1754
2485
  *
1755
2486
  * Weight(IP): 200
1756
2487
  *
1757
- * Security Type: USER_DATA
2488
+ * Security Type: PREDICTION_TRADE
1758
2489
  *
1759
- * @summary Query Transfer Status (USER_DATA)
2490
+ * @summary Query Transfer Status (PREDICTION_TRADE)
1760
2491
  * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1761
2492
  *
1762
2493
  * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
@@ -1771,9 +2502,9 @@ var RestAPI = class {
1771
2502
  *
1772
2503
  * Weight(IP): 200
1773
2504
  *
1774
- * Security Type: USER_DATA
2505
+ * Security Type: PREDICTION_TRADE
1775
2506
  *
1776
- * @summary Get Portfolio (USER_DATA)
2507
+ * @summary Get Portfolio (PREDICTION_TRADE)
1777
2508
  * @param {GetPortfolioRequest} requestParameters Request parameters.
1778
2509
  *
1779
2510
  * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
@@ -1788,9 +2519,9 @@ var RestAPI = class {
1788
2519
  *
1789
2520
  * Weight(IP): 200
1790
2521
  *
1791
- * Security Type: USER_DATA
2522
+ * Security Type: PREDICTION_TRADE
1792
2523
  *
1793
- * @summary Get Quota Status (USER_DATA)
2524
+ * @summary Get Quota Status (PREDICTION_TRADE)
1794
2525
  * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1795
2526
  *
1796
2527
  * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
@@ -1805,9 +2536,9 @@ var RestAPI = class {
1805
2536
  *
1806
2537
  * Weight(IP): 200
1807
2538
  *
1808
- * Security Type: USER_DATA
2539
+ * Security Type: PREDICTION_TRADE
1809
2540
  *
1810
- * @summary List Prediction Wallets (USER_DATA)
2541
+ * @summary List Prediction Wallets (PREDICTION_TRADE)
1811
2542
  * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1812
2543
  *
1813
2544
  * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
@@ -1822,9 +2553,9 @@ var RestAPI = class {
1822
2553
  *
1823
2554
  * Weight(IP): 200
1824
2555
  *
1825
- * Security Type: USER_DATA
2556
+ * Security Type: PREDICTION_TRADE
1826
2557
  *
1827
- * @summary Query Payment Option Balances (USER_DATA)
2558
+ * @summary Query Payment Option Balances (PREDICTION_TRADE)
1828
2559
  * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1829
2560
  *
1830
2561
  * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
@@ -1839,15 +2570,21 @@ var RestAPI = class {
1839
2570
  //#endregion
1840
2571
  //#region src/rest-api/index.ts
1841
2572
  var rest_api_exports = /* @__PURE__ */ __export({
2573
+ ApplyMmDepositAccountTypeEnum: () => ApplyMmDepositAccountTypeEnum,
2574
+ ApplyMmWithdrawWalletTypeEnum: () => ApplyMmWithdrawWalletTypeEnum,
1842
2575
  CreateInboundTransferAccountTypeEnum: () => CreateInboundTransferAccountTypeEnum,
2576
+ CreateOtcBlocktradeSideEnum: () => CreateOtcBlocktradeSideEnum,
1843
2577
  CreateOutboundTransferAccountTypeEnum: () => CreateOutboundTransferAccountTypeEnum,
1844
2578
  CreateOutboundTransferSourceBizEnum: () => CreateOutboundTransferSourceBizEnum,
2579
+ GetOtcReservedBalancesAssetsParameterInnerTypeEnum: () => GetOtcReservedBalancesAssetsParameterInnerTypeEnum,
1845
2580
  GetQuoteFundingSourceEnum: () => GetQuoteFundingSourceEnum,
1846
2581
  GetQuoteOrderTypeEnum: () => GetQuoteOrderTypeEnum,
1847
2582
  GetQuoteSideEnum: () => GetQuoteSideEnum,
2583
+ ListOtcBlocktradesStatusEnum: () => ListOtcBlocktradesStatusEnum,
1848
2584
  ListPredictionMarketsOrderByEnum: () => ListPredictionMarketsOrderByEnum,
1849
2585
  ListPredictionMarketsSortByEnum: () => ListPredictionMarketsSortByEnum,
1850
2586
  MarketDataApi: () => MarketDataApi,
2587
+ OtcApi: () => OtcApi,
1851
2588
  PlaceOrderAccountTypeEnum: () => PlaceOrderAccountTypeEnum,
1852
2589
  PlaceOrderFundingSourceEnum: () => PlaceOrderFundingSourceEnum,
1853
2590
  PlaceOrderOrderTypeEnum: () => PlaceOrderOrderTypeEnum,