@binance/w3w-prediction 2.0.1 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","W3W_PREDICTION_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/position-api.ts","../src/rest-api/modules/redeem-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/modules/transfer-api.ts","../src/rest-api/modules/wallet-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/w3w-prediction.ts"],"sourcesContent":["{\n \"name\": \"@binance/w3w-prediction\",\n \"description\": \"Official Binance W3W Prediction Connector - A lightweight library that provides a convenient interface to Binance's W3W Prediction REST API.\",\n \"version\": \"2.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"W3W Prediction\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.5.8\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.5\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetMarketDetailResponse,\n ListPredictionCategoriesResponse,\n ListPredictionMarketsResponse,\n MarketSearchResponse,\n QueryLastTradePriceResponse,\n QueryOrderBookResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {number | bigint} marketTopicId Market topic ID. Must be > 0\n *\n * @throws {RequiredError}\n */\n getMarketDetail: async (marketTopicId: number | bigint): Promise<RequestArgs> => {\n // verify required parameter 'marketTopicId' is not null or undefined\n assertParamExists('getMarketDetail', 'marketTopicId', marketTopicId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @throws {RequiredError}\n */\n listPredictionCategories: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/category/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {string} [l1Category] Level-1 category filter\n * @param {string} [l2Category] Level-2 category filter\n * @param {ListPredictionMarketsSortByEnum} [sortBy] Sort field. Enum: `RECOMMENDED`, `VOLUME`, `PARTICIPANTS`, `CREATED_TIME`, `END_DATE`\n * @param {ListPredictionMarketsOrderByEnum} [orderBy] Sort direction. Enum: `ASC`, `DESC`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n *\n * @throws {RequiredError}\n */\n listPredictionMarkets: async (\n l1Category?: string,\n l2Category?: string,\n sortBy?: ListPredictionMarketsSortByEnum,\n orderBy?: ListPredictionMarketsOrderByEnum,\n offset?: number,\n limit?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (l2Category !== undefined && l2Category !== null) {\n localVarQueryParameter['l2Category'] = l2Category;\n }\n if (sortBy !== undefined && sortBy !== null) {\n localVarQueryParameter['sortBy'] = sortBy;\n }\n if (orderBy !== undefined && orderBy !== null) {\n localVarQueryParameter['orderBy'] = orderBy;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {string} query Search keyword. Not blank\n * @param {number} [topK] Max number of results to return. Default `20`, range 1–50\n *\n * @throws {RequiredError}\n */\n marketSearch: async (query: string, topK?: number): Promise<RequestArgs> => {\n // verify required parameter 'query' is not null or undefined\n assertParamExists('marketSearch', 'query', query);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (query !== undefined && query !== null) {\n localVarQueryParameter['query'] = query;\n }\n if (topK !== undefined && topK !== null) {\n localVarQueryParameter['topK'] = topK;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/search',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {number | bigint} marketId Market ID. Must be > 0\n *\n * @throws {RequiredError}\n */\n queryLastTradePrice: async (marketId: number | bigint): Promise<RequestArgs> => {\n // verify required parameter 'marketId' is not null or undefined\n assertParamExists('queryLastTradePrice', 'marketId', marketId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order-book/last-trade-price',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {string} vendor Vendor identifier (e.g. `predict_fun`)\n * @param {number | bigint} marketId Market ID. Must be > 0\n * @param {string} tokenId Prediction outcome token ID\n *\n * @throws {RequiredError}\n */\n queryOrderBook: async (\n vendor: string,\n marketId: number | bigint,\n tokenId: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'vendor' is not null or undefined\n assertParamExists('queryOrderBook', 'vendor', vendor);\n // verify required parameter 'marketId' is not null or undefined\n assertParamExists('queryOrderBook', 'marketId', marketId);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('queryOrderBook', 'tokenId', tokenId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (vendor !== undefined && vendor !== null) {\n localVarQueryParameter['vendor'] = vendor;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order-book',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>>;\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listPredictionCategories(): Promise<RestApiResponse<ListPredictionCategoriesResponse>>;\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listPredictionMarkets(\n requestParameters?: ListPredictionMarketsRequest\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>>;\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>>;\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>>;\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>>;\n}\n\n/**\n * Request parameters for getMarketDetail operation in MarketDataApi.\n * @interface GetMarketDetailRequest\n */\nexport interface GetMarketDetailRequest {\n /**\n * Market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiGetMarketDetail\n */\n readonly marketTopicId: number | bigint;\n}\n\n/**\n * Request parameters for listPredictionMarkets operation in MarketDataApi.\n * @interface ListPredictionMarketsRequest\n */\nexport interface ListPredictionMarketsRequest {\n /**\n * Level-1 category filter\n * @type {string}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly l1Category?: string;\n\n /**\n * Level-2 category filter\n * @type {string}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly l2Category?: string;\n\n /**\n * Sort field. Enum: `RECOMMENDED`, `VOLUME`, `PARTICIPANTS`, `CREATED_TIME`, `END_DATE`\n * @type {'RECOMMENDED' | 'VOLUME' | 'PARTICIPANTS' | 'CREATED_TIME' | 'END_DATE'}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly sortBy?: ListPredictionMarketsSortByEnum;\n\n /**\n * Sort direction. Enum: `ASC`, `DESC`\n * @type {'ASC' | 'DESC'}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly orderBy?: ListPredictionMarketsOrderByEnum;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly limit?: number;\n}\n\n/**\n * Request parameters for marketSearch operation in MarketDataApi.\n * @interface MarketSearchRequest\n */\nexport interface MarketSearchRequest {\n /**\n * Search keyword. Not blank\n * @type {string}\n * @memberof MarketDataApiMarketSearch\n */\n readonly query: string;\n\n /**\n * Max number of results to return. Default `20`, range 1–50\n * @type {number}\n * @memberof MarketDataApiMarketSearch\n */\n readonly topK?: number;\n}\n\n/**\n * Request parameters for queryLastTradePrice operation in MarketDataApi.\n * @interface QueryLastTradePriceRequest\n */\nexport interface QueryLastTradePriceRequest {\n /**\n * Market ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiQueryLastTradePrice\n */\n readonly marketId: number | bigint;\n}\n\n/**\n * Request parameters for queryOrderBook operation in MarketDataApi.\n * @interface QueryOrderBookRequest\n */\nexport interface QueryOrderBookRequest {\n /**\n * Vendor identifier (e.g. `predict_fun`)\n * @type {string}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly vendor: string;\n\n /**\n * Market ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly marketId: number | bigint;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly tokenId: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}\n */\n public async getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarketDetail(\n requestParameters?.marketTopicId\n );\n return sendRequest<GetMarketDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}\n */\n public async listPredictionCategories(): Promise<\n RestApiResponse<ListPredictionCategoriesResponse>\n > {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionCategories();\n return sendRequest<ListPredictionCategoriesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}\n */\n public async listPredictionMarkets(\n requestParameters: ListPredictionMarketsRequest = {}\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionMarkets(\n requestParameters?.l1Category,\n requestParameters?.l2Category,\n requestParameters?.sortBy,\n requestParameters?.orderBy,\n requestParameters?.offset,\n requestParameters?.limit\n );\n return sendRequest<ListPredictionMarketsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<MarketSearchResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}\n */\n public async marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.marketSearch(\n requestParameters?.query,\n requestParameters?.topK\n );\n return sendRequest<MarketSearchResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}\n */\n public async queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLastTradePrice(\n requestParameters?.marketId\n );\n return sendRequest<QueryLastTradePriceResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}\n */\n public async queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderBook(\n requestParameters?.vendor,\n requestParameters?.marketId,\n requestParameters?.tokenId\n );\n return sendRequest<QueryOrderBookResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ListPredictionMarketsSortByEnum {\n RECOMMENDED = 'RECOMMENDED',\n VOLUME = 'VOLUME',\n PARTICIPANTS = 'PARTICIPANTS',\n CREATED_TIME = 'CREATED_TIME',\n END_DATE = 'END_DATE',\n}\n\nexport enum ListPredictionMarketsOrderByEnum {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetPositionByTokenResponse,\n QueryPnLResponse,\n QueryPositionsByFilterResponse,\n QueryPositionsResponse,\n QuerySettledPositionHistoryResponse,\n} from '../types';\n\n/**\n * PositionApi - axios parameter creator\n */\nconst PositionApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Position by Token (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} tokenId Prediction outcome token ID\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getPositionByToken: async (\n walletAddress: string,\n tokenId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getPositionByToken', 'walletAddress', walletAddress);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('getPositionByToken', 'tokenId', tokenId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/token',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query PnL (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tokenId] Filter by prediction token ID\n * @param {number | bigint} [marketId] Filter by market ID. Must be > 0\n * @param {number | bigint} [marketTopicId] Filter by market topic ID. Must be > 0\n * @param {boolean} [activeOnly] If `true`, return only active (unresolved) positions\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPnL: async (\n walletAddress: string,\n tokenId?: string,\n marketId?: number | bigint,\n marketTopicId?: number | bigint,\n activeOnly?: boolean,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryPnL', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (activeOnly !== undefined && activeOnly !== null) {\n localVarQueryParameter['activeOnly'] = activeOnly;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/pnl/query',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tab] Position status tab. Values from `PositionQueryType`. Default `ONGOING`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPositions: async (\n walletAddress: string,\n tab?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryPositions', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tab !== undefined && tab !== null) {\n localVarQueryParameter['tab'] = tab;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions by Filter (USER_DATA)\n * @param {string} [walletAddress] User's prediction wallet address\n * @param {number | bigint} [marketTopicId] Filter by market topic ID\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPositionsByFilter: async (\n walletAddress?: string,\n marketTopicId?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/filter',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Settled Position History (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [l1Category] Filter by level-1 category\n * @param {number} [result] Settlement result filter\n * @param {string} [startDate] Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} [endDate] End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n querySettledPositionHistory: async (\n walletAddress: string,\n l1Category?: string,\n result?: number,\n startDate?: string,\n endDate?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('querySettledPositionHistory', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (result !== undefined && result !== null) {\n localVarQueryParameter['result'] = result;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/settled-history',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PositionApi - interface\n * @interface PositionApi\n */\nexport interface PositionApiInterface {\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Position by Token (USER_DATA)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>>;\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query PnL (USER_DATA)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPnL(requestParameters: QueryPnLRequest): Promise<RestApiResponse<QueryPnLResponse>>;\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions (USER_DATA)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>>;\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions by Filter (USER_DATA)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPositionsByFilter(\n requestParameters?: QueryPositionsByFilterRequest\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>>;\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Settled Position History (USER_DATA)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPositionByToken operation in PositionApi.\n * @interface GetPositionByTokenRequest\n */\nexport interface GetPositionByTokenRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiGetPositionByToken\n */\n readonly walletAddress: string;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof PositionApiGetPositionByToken\n */\n readonly tokenId: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiGetPositionByToken\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPnL operation in PositionApi.\n * @interface QueryPnLRequest\n */\nexport interface QueryPnLRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPnL\n */\n readonly walletAddress: string;\n\n /**\n * Filter by prediction token ID\n * @type {string}\n * @memberof PositionApiQueryPnL\n */\n readonly tokenId?: string;\n\n /**\n * Filter by market ID. Must be > 0\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly marketId?: number | bigint;\n\n /**\n * Filter by market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * If `true`, return only active (unresolved) positions\n * @type {boolean}\n * @memberof PositionApiQueryPnL\n */\n readonly activeOnly?: boolean;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPositions operation in PositionApi.\n * @interface QueryPositionsRequest\n */\nexport interface QueryPositionsRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPositions\n */\n readonly walletAddress: string;\n\n /**\n * Position status tab. Values from `PositionQueryType`. Default `ONGOING`\n * @type {string}\n * @memberof PositionApiQueryPositions\n */\n readonly tab?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof PositionApiQueryPositions\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof PositionApiQueryPositions\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPositionsByFilter operation in PositionApi.\n * @interface QueryPositionsByFilterRequest\n */\nexport interface QueryPositionsByFilterRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly walletAddress?: string;\n\n /**\n * Filter by market topic ID\n * @type {number | bigint}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for querySettledPositionHistory operation in PositionApi.\n * @interface QuerySettledPositionHistoryRequest\n */\nexport interface QuerySettledPositionHistoryRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly walletAddress: string;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly l1Category?: string;\n\n /**\n * Settlement result filter\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly result?: number;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly startDate?: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly endDate?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PositionApi - object-oriented interface\n * @class PositionApi\n */\nexport class PositionApi implements PositionApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PositionApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Position by Token (USER_DATA)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}\n */\n public async getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPositionByToken(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPositionByTokenResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query PnL (USER_DATA)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPnLResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}\n */\n public async queryPnL(\n requestParameters: QueryPnLRequest\n ): Promise<RestApiResponse<QueryPnLResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPnL(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.marketId,\n requestParameters?.marketTopicId,\n requestParameters?.activeOnly,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPnLResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions (USER_DATA)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}\n */\n public async queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositions(\n requestParameters?.walletAddress,\n requestParameters?.tab,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions by Filter (USER_DATA)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}\n */\n public async queryPositionsByFilter(\n requestParameters: QueryPositionsByFilterRequest = {}\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositionsByFilter(\n requestParameters?.walletAddress,\n requestParameters?.marketTopicId,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPositionsByFilterResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Settled Position History (USER_DATA)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}\n */\n public async querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySettledPositionHistory(\n requestParameters?.walletAddress,\n requestParameters?.l1Category,\n requestParameters?.result,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QuerySettledPositionHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { BatchRedeemResponse, GetRedeemStatusResponse } from '../types';\n\n/**\n * RedeemApi - axios parameter creator\n */\nconst RedeemApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Batch Redeem (TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {Array<string>} tokenIds List of prediction token IDs to redeem. Not empty. Example: `tokenIds=112233&tokenIds=112234`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n batchRedeem: async (\n walletAddress: string,\n walletId: string,\n tokenIds: Array<string>,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('batchRedeem', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('batchRedeem', 'walletId', walletId);\n // verify required parameter 'tokenIds' is not null or undefined\n assertParamExists('batchRedeem', 'tokenIds', tokenIds);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (tokenIds) {\n localVarQueryParameter['tokenIds'] = tokenIds;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/batch-redeem',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} txHash Redeem transaction hash\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getRedeemStatus: async (\n walletAddress: string,\n txHash: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getRedeemStatus', 'walletAddress', walletAddress);\n // verify required parameter 'txHash' is not null or undefined\n assertParamExists('getRedeemStatus', 'txHash', txHash);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (txHash !== undefined && txHash !== null) {\n localVarQueryParameter['txHash'] = txHash;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/redeem/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RedeemApi - interface\n * @interface RedeemApi\n */\nexport interface RedeemApiInterface {\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Batch Redeem (TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApiInterface\n */\n batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>>;\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (USER_DATA)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApiInterface\n */\n getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>>;\n}\n\n/**\n * Request parameters for batchRedeem operation in RedeemApi.\n * @interface BatchRedeemRequest\n */\nexport interface BatchRedeemRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly walletId: string;\n\n /**\n * List of prediction token IDs to redeem. Not empty. Example: `tokenIds=112233&tokenIds=112234`\n * @type {Array<string>}\n * @memberof RedeemApiBatchRedeem\n */\n readonly tokenIds: Array<string>;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for getRedeemStatus operation in RedeemApi.\n * @interface GetRedeemStatusRequest\n */\nexport interface GetRedeemStatusRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly walletAddress: string;\n\n /**\n * Redeem transaction hash\n * @type {string}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly txHash: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RedeemApi - object-oriented interface\n * @class RedeemApi\n */\nexport class RedeemApi implements RedeemApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RedeemApiAxiosParamCreator(configuration);\n }\n\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Batch Redeem (TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}\n */\n public async batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchRedeem(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.tokenIds,\n requestParameters?.chainId\n );\n return sendRequest<BatchRedeemResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (USER_DATA)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}\n */\n public async getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getRedeemStatus(\n requestParameters?.walletAddress,\n requestParameters?.txHash,\n requestParameters?.recvWindow\n );\n return sendRequest<GetRedeemStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n BatchCancelOrdersCancelInfoListParameterInner,\n BatchCancelOrdersResponse,\n GetQuoteResponse,\n PlaceOrderResponse,\n QueryActiveOrdersResponse,\n QueryOrderHistoryResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {Array<BatchCancelOrdersCancelInfoListParameterInner>} [cancelInfoList] List of orders to cancel (index `i` starts from 0)\n *\n * @throws {RequiredError}\n */\n batchCancelOrders: async (\n walletAddress: string,\n walletId: string,\n cancelInfoList?: Array<BatchCancelOrdersCancelInfoListParameterInner>\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('batchCancelOrders', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('batchCancelOrders', 'walletId', walletId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (cancelInfoList) {\n localVarQueryParameter['cancelInfoList'] = cancelInfoList;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/batch-cancel',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} tokenId Prediction outcome token ID\n * @param {GetQuoteSideEnum} side Trade direction. Enum: `BUY`, `SELL`\n * @param {string} amountIn Input amount in wei (18 decimals). Must be > 0. For `MARKET` orders, minimum is approximately 1.5 USDT (varies by market depth). Example: `1000000000000000000` = 1 USDT\n * @param {GetQuoteOrderTypeEnum} orderType Order type. Enum: `MARKET`, `LIMIT`\n * @param {number} slippageBps Slippage tolerance in basis points. Range 1–10000\n * @param {string} [priceLimit] Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n * @param {number} [feeRateBps] Fee rate in basis points. Default `200`, range 1–10000\n * @param {GetQuoteFundingSourceEnum} [fundingSource] Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @param {string} [fundTransferAmount] Auto-transfer amount before order (wei). Must be > 0 if provided\n *\n * @throws {RequiredError}\n */\n getQuote: async (\n walletAddress: string,\n tokenId: string,\n side: GetQuoteSideEnum,\n amountIn: string,\n orderType: GetQuoteOrderTypeEnum,\n slippageBps: number,\n priceLimit?: string,\n chainId?: string,\n feeRateBps?: number,\n fundingSource?: GetQuoteFundingSourceEnum,\n fundTransferAmount?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getQuote', 'walletAddress', walletAddress);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('getQuote', 'tokenId', tokenId);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('getQuote', 'side', side);\n // verify required parameter 'amountIn' is not null or undefined\n assertParamExists('getQuote', 'amountIn', amountIn);\n // verify required parameter 'orderType' is not null or undefined\n assertParamExists('getQuote', 'orderType', orderType);\n // verify required parameter 'slippageBps' is not null or undefined\n assertParamExists('getQuote', 'slippageBps', slippageBps);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (amountIn !== undefined && amountIn !== null) {\n localVarQueryParameter['amountIn'] = amountIn;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (slippageBps !== undefined && slippageBps !== null) {\n localVarQueryParameter['slippageBps'] = slippageBps;\n }\n if (priceLimit !== undefined && priceLimit !== null) {\n localVarQueryParameter['priceLimit'] = priceLimit;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n if (feeRateBps !== undefined && feeRateBps !== null) {\n localVarQueryParameter['feeRateBps'] = feeRateBps;\n }\n if (fundingSource !== undefined && fundingSource !== null) {\n localVarQueryParameter['fundingSource'] = fundingSource;\n }\n if (fundTransferAmount !== undefined && fundTransferAmount !== null) {\n localVarQueryParameter['fundTransferAmount'] = fundTransferAmount;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/get-quote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {string} quoteId Quote ID obtained from `Get Quote`\n * @param {string} timeInForce Must match `orderType`: `FOK` for `MARKET`, `GTC` for `LIMIT`\n * @param {PlaceOrderAccountTypeEnum} accountType Payment account type. Enum: `SPOT`, `FUNDING`\n * @param {PlaceOrderOrderTypeEnum} orderType Order type. Enum: `MARKET`, `LIMIT`\n * @param {number} slippageBps Slippage tolerance in basis points. Range 1–10000\n * @param {string} [priceLimit] Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @param {PlaceOrderFundingSourceEnum} [fundingSource] Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @param {string} [fundTransferAmount] Auto-transfer amount before order (wei). Must be > 0 if provided\n *\n * @throws {RequiredError}\n */\n placeOrder: async (\n walletAddress: string,\n walletId: string,\n quoteId: string,\n timeInForce: string,\n accountType: PlaceOrderAccountTypeEnum,\n orderType: PlaceOrderOrderTypeEnum,\n slippageBps: number,\n priceLimit?: string,\n fundingSource?: PlaceOrderFundingSourceEnum,\n fundTransferAmount?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('placeOrder', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('placeOrder', 'walletId', walletId);\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('placeOrder', 'quoteId', quoteId);\n // verify required parameter 'timeInForce' is not null or undefined\n assertParamExists('placeOrder', 'timeInForce', timeInForce);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('placeOrder', 'accountType', accountType);\n // verify required parameter 'orderType' is not null or undefined\n assertParamExists('placeOrder', 'orderType', orderType);\n // verify required parameter 'slippageBps' is not null or undefined\n assertParamExists('placeOrder', 'slippageBps', slippageBps);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n if (timeInForce !== undefined && timeInForce !== null) {\n localVarQueryParameter['timeInForce'] = timeInForce;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (slippageBps !== undefined && slippageBps !== null) {\n localVarQueryParameter['slippageBps'] = slippageBps;\n }\n if (priceLimit !== undefined && priceLimit !== null) {\n localVarQueryParameter['priceLimit'] = priceLimit;\n }\n if (fundingSource !== undefined && fundingSource !== null) {\n localVarQueryParameter['fundingSource'] = fundingSource;\n }\n if (fundTransferAmount !== undefined && fundTransferAmount !== null) {\n localVarQueryParameter['fundTransferAmount'] = fundTransferAmount;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/place-order-bundle',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Active Orders (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {QueryActiveOrdersTradeSideEnum} [tradeSide] Filter by trade side. Enum: `BUY`, `SELL`\n * @param {string} [l1Category] Filter by level-1 category\n * @param {number | bigint} [marketId] Filter by market ID\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryActiveOrders: async (\n walletAddress: string,\n tradeSide?: QueryActiveOrdersTradeSideEnum,\n l1Category?: string,\n marketId?: number | bigint,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryActiveOrders', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tradeSide !== undefined && tradeSide !== null) {\n localVarQueryParameter['tradeSide'] = tradeSide;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Order History (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [l1Category] Filter by level-1 category\n * @param {QueryOrderHistoryOrderTypeEnum} [orderType] Filter by order type. Enum: `MARKET`, `LIMIT`\n * @param {string} [status] Filter by order status\n * @param {string} [startDate] Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} [endDate] End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryOrderHistory: async (\n walletAddress: string,\n l1Category?: string,\n orderType?: QueryOrderHistoryOrderTypeEnum,\n status?: string,\n startDate?: string,\n endDate?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryOrderHistory', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order/history',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>>;\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getQuote(requestParameters: GetQuoteRequest): Promise<RestApiResponse<GetQuoteResponse>>;\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeOrder(requestParameters: PlaceOrderRequest): Promise<RestApiResponse<PlaceOrderResponse>>;\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Active Orders (USER_DATA)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>>;\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Order History (USER_DATA)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>>;\n}\n\n/**\n * Request parameters for batchCancelOrders operation in TradeApi.\n * @interface BatchCancelOrdersRequest\n */\nexport interface BatchCancelOrdersRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly walletId: string;\n\n /**\n * List of orders to cancel (index `i` starts from 0)\n * @type {Array<BatchCancelOrdersCancelInfoListParameterInner>}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly cancelInfoList?: Array<BatchCancelOrdersCancelInfoListParameterInner>;\n}\n\n/**\n * Request parameters for getQuote operation in TradeApi.\n * @interface GetQuoteRequest\n */\nexport interface GetQuoteRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly walletAddress: string;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly tokenId: string;\n\n /**\n * Trade direction. Enum: `BUY`, `SELL`\n * @type {'BUY' | 'SELL'}\n * @memberof TradeApiGetQuote\n */\n readonly side: GetQuoteSideEnum;\n\n /**\n * Input amount in wei (18 decimals). Must be > 0. For `MARKET` orders, minimum is approximately 1.5 USDT (varies by market depth). Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly amountIn: string;\n\n /**\n * Order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiGetQuote\n */\n readonly orderType: GetQuoteOrderTypeEnum;\n\n /**\n * Slippage tolerance in basis points. Range 1–10000\n * @type {number}\n * @memberof TradeApiGetQuote\n */\n readonly slippageBps: number;\n\n /**\n * Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly priceLimit?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly chainId?: string;\n\n /**\n * Fee rate in basis points. Default `200`, range 1–10000\n * @type {number}\n * @memberof TradeApiGetQuote\n */\n readonly feeRateBps?: number;\n\n /**\n * Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @type {'MPC' | 'CEX'}\n * @memberof TradeApiGetQuote\n */\n readonly fundingSource?: GetQuoteFundingSourceEnum;\n\n /**\n * Auto-transfer amount before order (wei). Must be > 0 if provided\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly fundTransferAmount?: string;\n}\n\n/**\n * Request parameters for placeOrder operation in TradeApi.\n * @interface PlaceOrderRequest\n */\nexport interface PlaceOrderRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly walletId: string;\n\n /**\n * Quote ID obtained from `Get Quote`\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly quoteId: string;\n\n /**\n * Must match `orderType`: `FOK` for `MARKET`, `GTC` for `LIMIT`\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly timeInForce: string;\n\n /**\n * Payment account type. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TradeApiPlaceOrder\n */\n readonly accountType: PlaceOrderAccountTypeEnum;\n\n /**\n * Order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiPlaceOrder\n */\n readonly orderType: PlaceOrderOrderTypeEnum;\n\n /**\n * Slippage tolerance in basis points. Range 1–10000\n * @type {number}\n * @memberof TradeApiPlaceOrder\n */\n readonly slippageBps: number;\n\n /**\n * Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly priceLimit?: string;\n\n /**\n * Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @type {'MPC' | 'CEX'}\n * @memberof TradeApiPlaceOrder\n */\n readonly fundingSource?: PlaceOrderFundingSourceEnum;\n\n /**\n * Auto-transfer amount before order (wei). Must be > 0 if provided\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly fundTransferAmount?: string;\n}\n\n/**\n * Request parameters for queryActiveOrders operation in TradeApi.\n * @interface QueryActiveOrdersRequest\n */\nexport interface QueryActiveOrdersRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly walletAddress: string;\n\n /**\n * Filter by trade side. Enum: `BUY`, `SELL`\n * @type {'BUY' | 'SELL'}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly tradeSide?: QueryActiveOrdersTradeSideEnum;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly l1Category?: string;\n\n /**\n * Filter by market ID\n * @type {number | bigint}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly marketId?: number | bigint;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryOrderHistory operation in TradeApi.\n * @interface QueryOrderHistoryRequest\n */\nexport interface QueryOrderHistoryRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly walletAddress: string;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly l1Category?: string;\n\n /**\n * Filter by order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly orderType?: QueryOrderHistoryOrderTypeEnum;\n\n /**\n * Filter by order status\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly status?: string;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly startDate?: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly endDate?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}\n */\n public async batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchCancelOrders(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.cancelInfoList\n );\n return sendRequest<BatchCancelOrdersResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}\n */\n public async getQuote(\n requestParameters: GetQuoteRequest\n ): Promise<RestApiResponse<GetQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuote(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.side,\n requestParameters?.amountIn,\n requestParameters?.orderType,\n requestParameters?.slippageBps,\n requestParameters?.priceLimit,\n requestParameters?.chainId,\n requestParameters?.feeRateBps,\n requestParameters?.fundingSource,\n requestParameters?.fundTransferAmount\n );\n return sendRequest<GetQuoteResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}\n */\n public async placeOrder(\n requestParameters: PlaceOrderRequest\n ): Promise<RestApiResponse<PlaceOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeOrder(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.quoteId,\n requestParameters?.timeInForce,\n requestParameters?.accountType,\n requestParameters?.orderType,\n requestParameters?.slippageBps,\n requestParameters?.priceLimit,\n requestParameters?.fundingSource,\n requestParameters?.fundTransferAmount\n );\n return sendRequest<PlaceOrderResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Active Orders (USER_DATA)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}\n */\n public async queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryActiveOrders(\n requestParameters?.walletAddress,\n requestParameters?.tradeSide,\n requestParameters?.l1Category,\n requestParameters?.marketId,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryActiveOrdersResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Order History (USER_DATA)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}\n */\n public async queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderHistory(\n requestParameters?.walletAddress,\n requestParameters?.l1Category,\n requestParameters?.orderType,\n requestParameters?.status,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum GetQuoteSideEnum {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum GetQuoteOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n\nexport enum GetQuoteFundingSourceEnum {\n MPC = 'MPC',\n CEX = 'CEX',\n}\n\nexport enum PlaceOrderAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum PlaceOrderOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n\nexport enum PlaceOrderFundingSourceEnum {\n MPC = 'MPC',\n CEX = 'CEX',\n}\n\nexport enum QueryActiveOrdersTradeSideEnum {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum QueryOrderHistoryOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateInboundTransferResponse,\n CreateOutboundTransferResponse,\n QueryTransferListResponse,\n QueryTransferStatusResponse,\n} from '../types';\n\n/**\n * TransferApi - axios parameter creator\n */\nconst TransferApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Inbound Transfer (TRADE)\n * @param {string} walletId Wallet ID\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} fromTokenAmount Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @param {CreateInboundTransferAccountTypeEnum} accountType Destination CEX account. Enum: `SPOT`, `FUNDING`\n * @param {string} [fromToken] Source token symbol. Default `USDT`\n * @param {string} [toToken] Destination token symbol. Default `USDT`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n createInboundTransfer: async (\n walletId: string,\n walletAddress: string,\n fromTokenAmount: string,\n accountType: CreateInboundTransferAccountTypeEnum,\n fromToken?: string,\n toToken?: string,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('createInboundTransfer', 'walletId', walletId);\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('createInboundTransfer', 'walletAddress', walletAddress);\n // verify required parameter 'fromTokenAmount' is not null or undefined\n assertParamExists('createInboundTransfer', 'fromTokenAmount', fromTokenAmount);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('createInboundTransfer', 'accountType', accountType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (fromTokenAmount !== undefined && fromTokenAmount !== null) {\n localVarQueryParameter['fromTokenAmount'] = fromTokenAmount;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (fromToken !== undefined && fromToken !== null) {\n localVarQueryParameter['fromToken'] = fromToken;\n }\n if (toToken !== undefined && toToken !== null) {\n localVarQueryParameter['toToken'] = toToken;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/inbound',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Outbound Transfer (TRADE)\n * @param {string} walletId Wallet ID\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} fromTokenAmount Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @param {CreateOutboundTransferAccountTypeEnum} accountType Source CEX account. Enum: `SPOT`, `FUNDING`\n * @param {CreateOutboundTransferSourceBizEnum} sourceBiz Business source. Enum: `USER_TRANSFER`, `PREDICTION_BUY`\n * @param {string} [fromToken] Source token symbol. Default `USDT`\n * @param {string} [toToken] Destination token symbol. Default `USDT`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n createOutboundTransfer: async (\n walletId: string,\n walletAddress: string,\n fromTokenAmount: string,\n accountType: CreateOutboundTransferAccountTypeEnum,\n sourceBiz: CreateOutboundTransferSourceBizEnum,\n fromToken?: string,\n toToken?: string,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('createOutboundTransfer', 'walletId', walletId);\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('createOutboundTransfer', 'walletAddress', walletAddress);\n // verify required parameter 'fromTokenAmount' is not null or undefined\n assertParamExists('createOutboundTransfer', 'fromTokenAmount', fromTokenAmount);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('createOutboundTransfer', 'accountType', accountType);\n // verify required parameter 'sourceBiz' is not null or undefined\n assertParamExists('createOutboundTransfer', 'sourceBiz', sourceBiz);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (fromTokenAmount !== undefined && fromTokenAmount !== null) {\n localVarQueryParameter['fromTokenAmount'] = fromTokenAmount;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (sourceBiz !== undefined && sourceBiz !== null) {\n localVarQueryParameter['sourceBiz'] = sourceBiz;\n }\n if (fromToken !== undefined && fromToken !== null) {\n localVarQueryParameter['fromToken'] = fromToken;\n }\n if (toToken !== undefined && toToken !== null) {\n localVarQueryParameter['toToken'] = toToken;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/outbound',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer List (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} endDate End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {string} [tokenSymbol] Filter by token symbol (e.g. `USDT`)\n * @param {QueryTransferListDirectionEnum} [direction] Filter by direction. Enum: `INBOUND`, `OUTBOUND`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryTransferList: async (\n walletAddress: string,\n startDate: string,\n endDate: string,\n tokenSymbol?: string,\n direction?: QueryTransferListDirectionEnum,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryTransferList', 'walletAddress', walletAddress);\n // verify required parameter 'startDate' is not null or undefined\n assertParamExists('queryTransferList', 'startDate', startDate);\n // verify required parameter 'endDate' is not null or undefined\n assertParamExists('queryTransferList', 'endDate', endDate);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (tokenSymbol !== undefined && tokenSymbol !== null) {\n localVarQueryParameter['tokenSymbol'] = tokenSymbol;\n }\n if (direction !== undefined && direction !== null) {\n localVarQueryParameter['direction'] = direction;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer Status (USER_DATA)\n * @param {string} transferId Transfer ID returned from outbound/inbound transfer\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryTransferStatus: async (\n transferId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transferId' is not null or undefined\n assertParamExists('queryTransferStatus', 'transferId', transferId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transferId !== undefined && transferId !== null) {\n localVarQueryParameter['transferId'] = transferId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TransferApi - interface\n * @interface TransferApi\n */\nexport interface TransferApiInterface {\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Inbound Transfer (TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>>;\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Outbound Transfer (TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>>;\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer List (USER_DATA)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>>;\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer Status (USER_DATA)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>>;\n}\n\n/**\n * Request parameters for createInboundTransfer operation in TransferApi.\n * @interface CreateInboundTransferRequest\n */\nexport interface CreateInboundTransferRequest {\n /**\n * Wallet ID\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly walletId: string;\n\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly walletAddress: string;\n\n /**\n * Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly fromTokenAmount: string;\n\n /**\n * Destination CEX account. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly accountType: CreateInboundTransferAccountTypeEnum;\n\n /**\n * Source token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly fromToken?: string;\n\n /**\n * Destination token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly toToken?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for createOutboundTransfer operation in TransferApi.\n * @interface CreateOutboundTransferRequest\n */\nexport interface CreateOutboundTransferRequest {\n /**\n * Wallet ID\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly walletId: string;\n\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly walletAddress: string;\n\n /**\n * Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly fromTokenAmount: string;\n\n /**\n * Source CEX account. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly accountType: CreateOutboundTransferAccountTypeEnum;\n\n /**\n * Business source. Enum: `USER_TRANSFER`, `PREDICTION_BUY`\n * @type {'USER_TRANSFER' | 'PREDICTION_BUY'}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly sourceBiz: CreateOutboundTransferSourceBizEnum;\n\n /**\n * Source token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly fromToken?: string;\n\n /**\n * Destination token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly toToken?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for queryTransferList operation in TransferApi.\n * @interface QueryTransferListRequest\n */\nexport interface QueryTransferListRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly walletAddress: string;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly startDate: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly endDate: string;\n\n /**\n * Filter by token symbol (e.g. `USDT`)\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly tokenSymbol?: string;\n\n /**\n * Filter by direction. Enum: `INBOUND`, `OUTBOUND`\n * @type {'INBOUND' | 'OUTBOUND'}\n * @memberof TransferApiQueryTransferList\n */\n readonly direction?: QueryTransferListDirectionEnum;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TransferApiQueryTransferList\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TransferApiQueryTransferList\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TransferApiQueryTransferList\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryTransferStatus operation in TransferApi.\n * @interface QueryTransferStatusRequest\n */\nexport interface QueryTransferStatusRequest {\n /**\n * Transfer ID returned from outbound/inbound transfer\n * @type {string}\n * @memberof TransferApiQueryTransferStatus\n */\n readonly transferId: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TransferApiQueryTransferStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TransferApi - object-oriented interface\n * @class TransferApi\n */\nexport class TransferApi implements TransferApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration);\n }\n\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Inbound Transfer (TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}\n */\n public async createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createInboundTransfer(\n requestParameters?.walletId,\n requestParameters?.walletAddress,\n requestParameters?.fromTokenAmount,\n requestParameters?.accountType,\n requestParameters?.fromToken,\n requestParameters?.toToken,\n requestParameters?.chainId\n );\n return sendRequest<CreateInboundTransferResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Outbound Transfer (TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}\n */\n public async createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOutboundTransfer(\n requestParameters?.walletId,\n requestParameters?.walletAddress,\n requestParameters?.fromTokenAmount,\n requestParameters?.accountType,\n requestParameters?.sourceBiz,\n requestParameters?.fromToken,\n requestParameters?.toToken,\n requestParameters?.chainId\n );\n return sendRequest<CreateOutboundTransferResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer List (USER_DATA)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}\n */\n public async queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferList(\n requestParameters?.walletAddress,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.tokenSymbol,\n requestParameters?.direction,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryTransferListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer Status (USER_DATA)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}\n */\n public async queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferStatus(\n requestParameters?.transferId,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryTransferStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum CreateInboundTransferAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum CreateOutboundTransferAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum CreateOutboundTransferSourceBizEnum {\n USER_TRANSFER = 'USER_TRANSFER',\n PREDICTION_BUY = 'PREDICTION_BUY',\n}\n\nexport enum QueryTransferListDirectionEnum {\n INBOUND = 'INBOUND',\n OUTBOUND = 'OUTBOUND',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetPortfolioResponse,\n GetQuotaStatusResponse,\n ListPredictionWalletsResponse,\n QueryPaymentOptionBalancesResponse,\n} from '../types';\n\n/**\n * WalletApi - axios parameter creator\n */\nconst WalletApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Portfolio (USER_DATA)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tokenId] Filter by prediction token ID\n * @param {number | bigint} [marketId] Filter by market ID. Must be > 0\n * @param {number | bigint} [marketTopicId] Filter by market topic ID. Must be > 0\n * @param {boolean} [activeOnly] If `true`, return only active (unresolved) positions\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getPortfolio: async (\n walletAddress: string,\n tokenId?: string,\n marketId?: number | bigint,\n marketTopicId?: number | bigint,\n activeOnly?: boolean,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getPortfolio', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (activeOnly !== undefined && activeOnly !== null) {\n localVarQueryParameter['activeOnly'] = activeOnly;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/pnl/portfolio',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Quota Status (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getQuotaStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/quota/limit/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary List Prediction Wallets (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n listPredictionWallets: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/wallet/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Payment Option Balances (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPaymentOptionBalances: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/balance/payment-options',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * WalletApi - interface\n * @interface WalletApi\n */\nexport interface WalletApiInterface {\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Portfolio (USER_DATA)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>>;\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Quota Status (USER_DATA)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n getQuotaStatus(\n requestParameters?: GetQuotaStatusRequest\n ): Promise<RestApiResponse<GetQuotaStatusResponse>>;\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary List Prediction Wallets (USER_DATA)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n listPredictionWallets(\n requestParameters?: ListPredictionWalletsRequest\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>>;\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Payment Option Balances (USER_DATA)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n queryPaymentOptionBalances(\n requestParameters?: QueryPaymentOptionBalancesRequest\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>;\n}\n\n/**\n * Request parameters for getPortfolio operation in WalletApi.\n * @interface GetPortfolioRequest\n */\nexport interface GetPortfolioRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof WalletApiGetPortfolio\n */\n readonly walletAddress: string;\n\n /**\n * Filter by prediction token ID\n * @type {string}\n * @memberof WalletApiGetPortfolio\n */\n readonly tokenId?: string;\n\n /**\n * Filter by market ID. Must be > 0\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly marketId?: number | bigint;\n\n /**\n * Filter by market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * If `true`, return only active (unresolved) positions\n * @type {boolean}\n * @memberof WalletApiGetPortfolio\n */\n readonly activeOnly?: boolean;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getQuotaStatus operation in WalletApi.\n * @interface GetQuotaStatusRequest\n */\nexport interface GetQuotaStatusRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiGetQuotaStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for listPredictionWallets operation in WalletApi.\n * @interface ListPredictionWalletsRequest\n */\nexport interface ListPredictionWalletsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiListPredictionWallets\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPaymentOptionBalances operation in WalletApi.\n * @interface QueryPaymentOptionBalancesRequest\n */\nexport interface QueryPaymentOptionBalancesRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiQueryPaymentOptionBalances\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * WalletApi - object-oriented interface\n * @class WalletApi\n */\nexport class WalletApi implements WalletApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Portfolio (USER_DATA)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}\n */\n public async getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPortfolio(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.marketId,\n requestParameters?.marketTopicId,\n requestParameters?.activeOnly,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPortfolioResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Quota Status (USER_DATA)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}\n */\n public async getQuotaStatus(\n requestParameters: GetQuotaStatusRequest = {}\n ): Promise<RestApiResponse<GetQuotaStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuotaStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetQuotaStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary List Prediction Wallets (USER_DATA)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}\n */\n public async listPredictionWallets(\n requestParameters: ListPredictionWalletsRequest = {}\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionWallets(\n requestParameters?.recvWindow\n );\n return sendRequest<ListPredictionWalletsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Payment Option Balances (USER_DATA)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}\n */\n public async queryPaymentOptionBalances(\n requestParameters: QueryPaymentOptionBalancesRequest = {}\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPaymentOptionBalances(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPaymentOptionBalancesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { PositionApi } from './modules/position-api';\nimport { RedeemApi } from './modules/redeem-api';\nimport { TradeApi } from './modules/trade-api';\nimport { TransferApi } from './modules/transfer-api';\nimport { WalletApi } from './modules/wallet-api';\n\nimport type {\n GetMarketDetailRequest,\n ListPredictionMarketsRequest,\n MarketSearchRequest,\n QueryLastTradePriceRequest,\n QueryOrderBookRequest,\n} from './modules/market-data-api';\nimport type {\n GetPositionByTokenRequest,\n QueryPnLRequest,\n QueryPositionsRequest,\n QueryPositionsByFilterRequest,\n QuerySettledPositionHistoryRequest,\n} from './modules/position-api';\nimport type { BatchRedeemRequest, GetRedeemStatusRequest } from './modules/redeem-api';\nimport type {\n BatchCancelOrdersRequest,\n GetQuoteRequest,\n PlaceOrderRequest,\n QueryActiveOrdersRequest,\n QueryOrderHistoryRequest,\n} from './modules/trade-api';\nimport type {\n CreateInboundTransferRequest,\n CreateOutboundTransferRequest,\n QueryTransferListRequest,\n QueryTransferStatusRequest,\n} from './modules/transfer-api';\nimport type {\n GetPortfolioRequest,\n GetQuotaStatusRequest,\n ListPredictionWalletsRequest,\n QueryPaymentOptionBalancesRequest,\n} from './modules/wallet-api';\n\nimport type {\n GetMarketDetailResponse,\n ListPredictionCategoriesResponse,\n ListPredictionMarketsResponse,\n MarketSearchResponse,\n QueryLastTradePriceResponse,\n QueryOrderBookResponse,\n} from './types';\nimport type {\n GetPositionByTokenResponse,\n QueryPnLResponse,\n QueryPositionsResponse,\n QueryPositionsByFilterResponse,\n QuerySettledPositionHistoryResponse,\n} from './types';\nimport type { BatchRedeemResponse, GetRedeemStatusResponse } from './types';\nimport type {\n BatchCancelOrdersResponse,\n GetQuoteResponse,\n PlaceOrderResponse,\n QueryActiveOrdersResponse,\n QueryOrderHistoryResponse,\n} from './types';\nimport type {\n CreateInboundTransferResponse,\n CreateOutboundTransferResponse,\n QueryTransferListResponse,\n QueryTransferStatusResponse,\n} from './types';\nimport type {\n GetPortfolioResponse,\n GetQuotaStatusResponse,\n ListPredictionWalletsResponse,\n QueryPaymentOptionBalancesResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private positionApi: PositionApi;\n private redeemApi: RedeemApi;\n private tradeApi: TradeApi;\n private transferApi: TransferApi;\n private walletApi: WalletApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.positionApi = new PositionApi(configuration);\n this.redeemApi = new RedeemApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n this.transferApi = new TransferApi(configuration);\n this.walletApi = new WalletApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}\n */\n getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>> {\n return this.marketDataApi.getMarketDetail(requestParameters);\n }\n\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}\n */\n listPredictionCategories(): Promise<RestApiResponse<ListPredictionCategoriesResponse>> {\n return this.marketDataApi.listPredictionCategories();\n }\n\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}\n */\n listPredictionMarkets(\n requestParameters: ListPredictionMarketsRequest = {}\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>> {\n return this.marketDataApi.listPredictionMarkets(requestParameters);\n }\n\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<MarketSearchResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}\n */\n marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>> {\n return this.marketDataApi.marketSearch(requestParameters);\n }\n\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}\n */\n queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>> {\n return this.marketDataApi.queryLastTradePrice(requestParameters);\n }\n\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}\n */\n queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>> {\n return this.marketDataApi.queryOrderBook(requestParameters);\n }\n\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Position by Token (USER_DATA)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}\n */\n getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>> {\n return this.positionApi.getPositionByToken(requestParameters);\n }\n\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query PnL (USER_DATA)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPnLResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}\n */\n queryPnL(requestParameters: QueryPnLRequest): Promise<RestApiResponse<QueryPnLResponse>> {\n return this.positionApi.queryPnL(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions (USER_DATA)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}\n */\n queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>> {\n return this.positionApi.queryPositions(requestParameters);\n }\n\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Positions by Filter (USER_DATA)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}\n */\n queryPositionsByFilter(\n requestParameters: QueryPositionsByFilterRequest = {}\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>> {\n return this.positionApi.queryPositionsByFilter(requestParameters);\n }\n\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Settled Position History (USER_DATA)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}\n */\n querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>> {\n return this.positionApi.querySettledPositionHistory(requestParameters);\n }\n\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Batch Redeem (TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}\n */\n batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>> {\n return this.redeemApi.batchRedeem(requestParameters);\n }\n\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (USER_DATA)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}\n */\n getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>> {\n return this.redeemApi.getRedeemStatus(requestParameters);\n }\n\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}\n */\n batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>> {\n return this.tradeApi.batchCancelOrders(requestParameters);\n }\n\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}\n */\n getQuote(requestParameters: GetQuoteRequest): Promise<RestApiResponse<GetQuoteResponse>> {\n return this.tradeApi.getQuote(requestParameters);\n }\n\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}\n */\n placeOrder(requestParameters: PlaceOrderRequest): Promise<RestApiResponse<PlaceOrderResponse>> {\n return this.tradeApi.placeOrder(requestParameters);\n }\n\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Active Orders (USER_DATA)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}\n */\n queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>> {\n return this.tradeApi.queryActiveOrders(requestParameters);\n }\n\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Order History (USER_DATA)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}\n */\n queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>> {\n return this.tradeApi.queryOrderHistory(requestParameters);\n }\n\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Inbound Transfer (TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}\n */\n createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>> {\n return this.transferApi.createInboundTransfer(requestParameters);\n }\n\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: TRADE\n *\n * @summary Create Outbound Transfer (TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}\n */\n createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>> {\n return this.transferApi.createOutboundTransfer(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer List (USER_DATA)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}\n */\n queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>> {\n return this.transferApi.queryTransferList(requestParameters);\n }\n\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Transfer Status (USER_DATA)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}\n */\n queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>> {\n return this.transferApi.queryTransferStatus(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Portfolio (USER_DATA)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}\n */\n getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>> {\n return this.walletApi.getPortfolio(requestParameters);\n }\n\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Get Quota Status (USER_DATA)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}\n */\n getQuotaStatus(\n requestParameters: GetQuotaStatusRequest = {}\n ): Promise<RestApiResponse<GetQuotaStatusResponse>> {\n return this.walletApi.getQuotaStatus(requestParameters);\n }\n\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary List Prediction Wallets (USER_DATA)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}\n */\n listPredictionWallets(\n requestParameters: ListPredictionWalletsRequest = {}\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>> {\n return this.walletApi.listPredictionWallets(requestParameters);\n }\n\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: USER_DATA\n *\n * @summary Query Payment Option Balances (USER_DATA)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}\n */\n queryPaymentOptionBalances(\n requestParameters: QueryPaymentOptionBalancesRequest = {}\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>> {\n return this.walletApi.queryPaymentOptionBalances(requestParameters);\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n W3W_PREDICTION_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationW3WPrediction {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class W3WPrediction {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationW3WPrediction) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || W3W_PREDICTION_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC6Bf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;;;;;CAiBlE,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,UAAU,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AE9qB3E,IAAa,gBAAb,MAA2B;CAGvB,YAAY,QAAoC;EAC5C,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","name","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","W3W_PREDICTION_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/types/get-otc-reserved-balances-assets-parameter-inner.ts","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/otc-api.ts","../src/rest-api/modules/position-api.ts","../src/rest-api/modules/redeem-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/modules/transfer-api.ts","../src/rest-api/modules/wallet-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/w3w-prediction.ts"],"sourcesContent":["{\n \"name\": \"@binance/w3w-prediction\",\n \"description\": \"Official Binance W3W Prediction Connector - A lightweight library that provides a convenient interface to Binance's W3W Prediction REST API.\",\n \"version\": \"2.1.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"W3W Prediction\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.5.8\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.6\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/* tslint:disable */\n\n/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n/**\n *\n * @export\n * @interface GetOtcReservedBalancesAssetsParameterInner\n */\nexport interface GetOtcReservedBalancesAssetsParameterInner {\n /**\n *\n * @type {string}\n * @memberof GetOtcReservedBalancesAssetsParameterInner\n */\n type?: GetOtcReservedBalancesAssetsParameterInnerTypeEnum;\n /**\n *\n * @type {string}\n * @memberof GetOtcReservedBalancesAssetsParameterInner\n */\n tokenId?: string;\n}\n\nexport const GetOtcReservedBalancesAssetsParameterInnerTypeEnum = {\n USDT: 'USDT',\n SHARE: 'SHARE',\n} as const;\n\nexport type GetOtcReservedBalancesAssetsParameterInnerTypeEnum =\n (typeof GetOtcReservedBalancesAssetsParameterInnerTypeEnum)[keyof typeof GetOtcReservedBalancesAssetsParameterInnerTypeEnum];\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetMarketDetailResponse,\n ListPredictionCategoriesResponse,\n ListPredictionMarketsResponse,\n MarketSearchResponse,\n QueryLastTradePriceResponse,\n QueryOrderBookResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {number | bigint} marketTopicId Market topic ID. Must be > 0\n *\n * @throws {RequiredError}\n */\n getMarketDetail: async (marketTopicId: number | bigint): Promise<RequestArgs> => {\n // verify required parameter 'marketTopicId' is not null or undefined\n assertParamExists('getMarketDetail', 'marketTopicId', marketTopicId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @throws {RequiredError}\n */\n listPredictionCategories: async (): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/category/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {string} [l1Category] Level-1 category filter\n * @param {string} [l2Category] Level-2 category filter\n * @param {ListPredictionMarketsSortByEnum} [sortBy] Sort field. Enum: `RECOMMENDED`, `VOLUME`, `PARTICIPANTS`, `CREATED_TIME`, `END_DATE`\n * @param {ListPredictionMarketsOrderByEnum} [orderBy] Sort direction. Enum: `ASC`, `DESC`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n *\n * @throws {RequiredError}\n */\n listPredictionMarkets: async (\n l1Category?: string,\n l2Category?: string,\n sortBy?: ListPredictionMarketsSortByEnum,\n orderBy?: ListPredictionMarketsOrderByEnum,\n offset?: number,\n limit?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (l2Category !== undefined && l2Category !== null) {\n localVarQueryParameter['l2Category'] = l2Category;\n }\n if (sortBy !== undefined && sortBy !== null) {\n localVarQueryParameter['sortBy'] = sortBy;\n }\n if (orderBy !== undefined && orderBy !== null) {\n localVarQueryParameter['orderBy'] = orderBy;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {string} query Search keyword. Not blank\n * @param {number} [topK] Max number of results to return. Default `20`, range 1–50\n *\n * @throws {RequiredError}\n */\n marketSearch: async (query: string, topK?: number): Promise<RequestArgs> => {\n // verify required parameter 'query' is not null or undefined\n assertParamExists('marketSearch', 'query', query);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (query !== undefined && query !== null) {\n localVarQueryParameter['query'] = query;\n }\n if (topK !== undefined && topK !== null) {\n localVarQueryParameter['topK'] = topK;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/market/search',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {number | bigint} marketId Market ID. Must be > 0\n *\n * @throws {RequiredError}\n */\n queryLastTradePrice: async (marketId: number | bigint): Promise<RequestArgs> => {\n // verify required parameter 'marketId' is not null or undefined\n assertParamExists('queryLastTradePrice', 'marketId', marketId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order-book/last-trade-price',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {string} vendor Vendor identifier (e.g. `predict_fun`)\n * @param {number | bigint} marketId Market ID. Must be > 0\n * @param {string} tokenId Prediction outcome token ID\n *\n * @throws {RequiredError}\n */\n queryOrderBook: async (\n vendor: string,\n marketId: number | bigint,\n tokenId: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'vendor' is not null or undefined\n assertParamExists('queryOrderBook', 'vendor', vendor);\n // verify required parameter 'marketId' is not null or undefined\n assertParamExists('queryOrderBook', 'marketId', marketId);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('queryOrderBook', 'tokenId', tokenId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (vendor !== undefined && vendor !== null) {\n localVarQueryParameter['vendor'] = vendor;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order-book',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>>;\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listPredictionCategories(): Promise<RestApiResponse<ListPredictionCategoriesResponse>>;\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listPredictionMarkets(\n requestParameters?: ListPredictionMarketsRequest\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>>;\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>>;\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>>;\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>>;\n}\n\n/**\n * Request parameters for getMarketDetail operation in MarketDataApi.\n * @interface GetMarketDetailRequest\n */\nexport interface GetMarketDetailRequest {\n /**\n * Market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiGetMarketDetail\n */\n readonly marketTopicId: number | bigint;\n}\n\n/**\n * Request parameters for listPredictionMarkets operation in MarketDataApi.\n * @interface ListPredictionMarketsRequest\n */\nexport interface ListPredictionMarketsRequest {\n /**\n * Level-1 category filter\n * @type {string}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly l1Category?: string;\n\n /**\n * Level-2 category filter\n * @type {string}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly l2Category?: string;\n\n /**\n * Sort field. Enum: `RECOMMENDED`, `VOLUME`, `PARTICIPANTS`, `CREATED_TIME`, `END_DATE`\n * @type {'RECOMMENDED' | 'VOLUME' | 'PARTICIPANTS' | 'CREATED_TIME' | 'END_DATE'}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly sortBy?: ListPredictionMarketsSortByEnum;\n\n /**\n * Sort direction. Enum: `ASC`, `DESC`\n * @type {'ASC' | 'DESC'}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly orderBy?: ListPredictionMarketsOrderByEnum;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof MarketDataApiListPredictionMarkets\n */\n readonly limit?: number;\n}\n\n/**\n * Request parameters for marketSearch operation in MarketDataApi.\n * @interface MarketSearchRequest\n */\nexport interface MarketSearchRequest {\n /**\n * Search keyword. Not blank\n * @type {string}\n * @memberof MarketDataApiMarketSearch\n */\n readonly query: string;\n\n /**\n * Max number of results to return. Default `20`, range 1–50\n * @type {number}\n * @memberof MarketDataApiMarketSearch\n */\n readonly topK?: number;\n}\n\n/**\n * Request parameters for queryLastTradePrice operation in MarketDataApi.\n * @interface QueryLastTradePriceRequest\n */\nexport interface QueryLastTradePriceRequest {\n /**\n * Market ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiQueryLastTradePrice\n */\n readonly marketId: number | bigint;\n}\n\n/**\n * Request parameters for queryOrderBook operation in MarketDataApi.\n * @interface QueryOrderBookRequest\n */\nexport interface QueryOrderBookRequest {\n /**\n * Vendor identifier (e.g. `predict_fun`)\n * @type {string}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly vendor: string;\n\n /**\n * Market ID. Must be > 0\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly marketId: number | bigint;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof MarketDataApiQueryOrderBook\n */\n readonly tokenId: string;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}\n */\n public async getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarketDetail(\n requestParameters?.marketTopicId\n );\n return sendRequest<GetMarketDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}\n */\n public async listPredictionCategories(): Promise<\n RestApiResponse<ListPredictionCategoriesResponse>\n > {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionCategories();\n return sendRequest<ListPredictionCategoriesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}\n */\n public async listPredictionMarkets(\n requestParameters: ListPredictionMarketsRequest = {}\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionMarkets(\n requestParameters?.l1Category,\n requestParameters?.l2Category,\n requestParameters?.sortBy,\n requestParameters?.orderBy,\n requestParameters?.offset,\n requestParameters?.limit\n );\n return sendRequest<ListPredictionMarketsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<MarketSearchResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}\n */\n public async marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.marketSearch(\n requestParameters?.query,\n requestParameters?.topK\n );\n return sendRequest<MarketSearchResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}\n */\n public async queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLastTradePrice(\n requestParameters?.marketId\n );\n return sendRequest<QueryLastTradePriceResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}\n */\n public async queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderBook(\n requestParameters?.vendor,\n requestParameters?.marketId,\n requestParameters?.tokenId\n );\n return sendRequest<QueryOrderBookResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ListPredictionMarketsSortByEnum {\n RECOMMENDED = 'RECOMMENDED',\n VOLUME = 'VOLUME',\n PARTICIPANTS = 'PARTICIPANTS',\n CREATED_TIME = 'CREATED_TIME',\n END_DATE = 'END_DATE',\n}\n\nexport enum ListPredictionMarketsOrderByEnum {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateOtcBlocktradeResponse,\n FulfilOtcBlocktradeResponse,\n GetOtcBlocktradeDetailResponse,\n GetOtcBlocktradeEventsResponse,\n GetOtcReservedBalancesAssetsParameterInner,\n GetOtcReservedBalancesResponse,\n ListOtcBlocktradesResponse,\n PreviewOtcBlocktradeResponse,\n RemoveOtcBlocktradesResponse,\n} from '../types';\n\n/**\n * OtcApi - axios parameter creator\n */\nconst OtcApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - Side & Amount Rules:\n *\n * | side | makerAmount | takerAmount |\n * | ------ | ------------- | ------------- |\n * | `BUY` | USDT (wei) | shares (wei) |\n * | `SELL` | shares (wei) | USDT (wei) |\n * - \"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.\"\n *\n * | Request `side` | Response `side` (Integer) | Response `quoteType` |\n * | --------------- | -------------------------- | ---------------------- |\n * | `BUY` | `0` | `\"Bid\"` |\n * | `SELL` | `1` | `\"Ask\"` |\n *\n * @summary Create OTC Blocktrade (PREDICTION_TRADE)\n * @param {string} marketId PredictFun market id\n * @param {string} tokenId ERC-1155 outcome token id\n * @param {CreateOtcBlocktradeSideEnum} side Trade side. Enum: `BUY` (BID), `SELL` (ASK)\n * @param {string} makerAmount Maker amount in wei. BID:USDT; ASK:shares\n * @param {string} takerAmount Taker amount in wei. BID:shares; ASK:USDT\n * @param {string} pricePerShare Price per share (decimal ether, e.g. `0.65`)\n * @param {number | bigint} expiration Expiration timestamp in seconds (GTD order)\n *\n * @throws {RequiredError}\n */\n createOtcBlocktrade: async (\n marketId: string,\n tokenId: string,\n side: CreateOtcBlocktradeSideEnum,\n makerAmount: string,\n takerAmount: string,\n pricePerShare: string,\n expiration: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'marketId' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'marketId', marketId);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'tokenId', tokenId);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'side', side);\n // verify required parameter 'makerAmount' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'makerAmount', makerAmount);\n // verify required parameter 'takerAmount' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'takerAmount', takerAmount);\n // verify required parameter 'pricePerShare' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'pricePerShare', pricePerShare);\n // verify required parameter 'expiration' is not null or undefined\n assertParamExists('createOtcBlocktrade', 'expiration', expiration);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (makerAmount !== undefined && makerAmount !== null) {\n localVarQueryParameter['makerAmount'] = makerAmount;\n }\n if (takerAmount !== undefined && takerAmount !== null) {\n localVarQueryParameter['takerAmount'] = takerAmount;\n }\n if (pricePerShare !== undefined && pricePerShare !== null) {\n localVarQueryParameter['pricePerShare'] = pricePerShare;\n }\n if (expiration !== undefined && expiration !== null) {\n localVarQueryParameter['expiration'] = expiration;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/create',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)\n * @param {string} orderId Maker order id (returned by maker create)\n * @param {string} secretToken One-time fulfilment token the maker shared out-of-band\n *\n * @throws {RequiredError}\n */\n fulfilOtcBlocktrade: async (orderId: string, secretToken: string): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('fulfilOtcBlocktrade', 'orderId', orderId);\n // verify required parameter 'secretToken' is not null or undefined\n assertParamExists('fulfilOtcBlocktrade', 'secretToken', secretToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (secretToken !== undefined && secretToken !== null) {\n localVarQueryParameter['secretToken'] = secretToken;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/fulfil',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)\n * @param {string} orderId Maker order id (returned by create)\n *\n * @throws {RequiredError}\n */\n getOtcBlocktradeDetail: async (orderId: string): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('getOtcBlocktradeDetail', 'orderId', orderId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/detail',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)\n * @param {number} [first] Page size\n * @param {string} [after] Pagination cursor\n * @param {Array<string>} [eventTypes] Filter by event types (e.g. `[\"MATCH_SUCCESS\",\"EXPIRE\"]`)\n * @param {number | bigint} [marketId] Filter by market id\n *\n * @throws {RequiredError}\n */\n getOtcBlocktradeEvents: async (\n first?: number,\n after?: string,\n eventTypes?: Array<string>,\n marketId?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (first !== undefined && first !== null) {\n localVarQueryParameter['first'] = first;\n }\n if (after !== undefined && after !== null) {\n localVarQueryParameter['after'] = after;\n }\n if (eventTypes) {\n localVarQueryParameter['eventTypes'] = eventTypes;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/events',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - AssetQuery:\n *\n * | Name | Type | Mandatory | Description |\n * | ------- | ------ | --------- | ----------- |\n * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |\n * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |\n *\n * @summary Get OTC Reserved Balances (PREDICTION_TRADE)\n * @param {Array<GetOtcReservedBalancesAssetsParameterInner>} assets Assets to query (max 50)\n *\n * @throws {RequiredError}\n */\n getOtcReservedBalances: async (\n assets: Array<GetOtcReservedBalancesAssetsParameterInner>\n ): Promise<RequestArgs> => {\n // verify required parameter 'assets' is not null or undefined\n assertParamExists('getOtcReservedBalances', 'assets', assets);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (assets) {\n localVarQueryParameter['assets'] = assets;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/reserved-balances',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * List the maker's own blocktrades with optional status filter and cursor pagination.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary List OTC Blocktrades (PREDICTION_TRADE)\n * @param {number} [first] Page size\n * @param {string} [after] Pagination cursor (from previous response)\n * @param {ListOtcBlocktradesStatusEnum} [status] Filter by status. Enum: `OPEN`, `FULFILLED`, `MATCHED`, `CANCELLED`, `EXPIRED`, `FAILED`\n *\n * @throws {RequiredError}\n */\n listOtcBlocktrades: async (\n first?: number,\n after?: string,\n status?: ListOtcBlocktradesStatusEnum\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (first !== undefined && first !== null) {\n localVarQueryParameter['first'] = first;\n }\n if (after !== undefined && after !== null) {\n localVarQueryParameter['after'] = after;\n }\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/list',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Preview OTC Blocktrade (PREDICTION_TRADE)\n * @param {string} secretToken One-time fulfilment token the maker shared out-of-band\n *\n * @throws {RequiredError}\n */\n previewOtcBlocktrade: async (secretToken: string): Promise<RequestArgs> => {\n // verify required parameter 'secretToken' is not null or undefined\n assertParamExists('previewOtcBlocktrade', 'secretToken', secretToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (secretToken !== undefined && secretToken !== null) {\n localVarQueryParameter['secretToken'] = secretToken;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/preview',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Remove OTC Blocktrades (PREDICTION_TRADE)\n * @param {Array<string>} orderIds Order ids to remove (max 100). Must be the `orderId` returned by Create OTC Blocktrade\n *\n * @throws {RequiredError}\n */\n removeOtcBlocktrades: async (orderIds: Array<string>): Promise<RequestArgs> => {\n // verify required parameter 'orderIds' is not null or undefined\n assertParamExists('removeOtcBlocktrades', 'orderIds', orderIds);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderIds) {\n localVarQueryParameter['orderIds'] = orderIds;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/otc/blocktrade/remove',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * OtcApi - interface\n * @interface OtcApi\n */\nexport interface OtcApiInterface {\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - Side & Amount Rules:\n *\n * | side | makerAmount | takerAmount |\n * | ------ | ------------- | ------------- |\n * | `BUY` | USDT (wei) | shares (wei) |\n * | `SELL` | shares (wei) | USDT (wei) |\n * - \"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.\"\n *\n * | Request `side` | Response `side` (Integer) | Response `quoteType` |\n * | --------------- | -------------------------- | ---------------------- |\n * | `BUY` | `0` | `\"Bid\"` |\n * | `SELL` | `1` | `\"Ask\"` |\n *\n * @summary Create OTC Blocktrade (PREDICTION_TRADE)\n * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n createOtcBlocktrade(\n requestParameters: CreateOtcBlocktradeRequest\n ): Promise<RestApiResponse<CreateOtcBlocktradeResponse>>;\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)\n * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n fulfilOtcBlocktrade(\n requestParameters: FulfilOtcBlocktradeRequest\n ): Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>;\n /**\n * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n getOtcBlocktradeDetail(\n requestParameters: GetOtcBlocktradeDetailRequest\n ): Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>;\n /**\n * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n getOtcBlocktradeEvents(\n requestParameters?: GetOtcBlocktradeEventsRequest\n ): Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>;\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - AssetQuery:\n *\n * | Name | Type | Mandatory | Description |\n * | ------- | ------ | --------- | ----------- |\n * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |\n * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |\n *\n * @summary Get OTC Reserved Balances (PREDICTION_TRADE)\n * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n getOtcReservedBalances(\n requestParameters: GetOtcReservedBalancesRequest\n ): Promise<RestApiResponse<GetOtcReservedBalancesResponse>>;\n /**\n * List the maker's own blocktrades with optional status filter and cursor pagination.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary List OTC Blocktrades (PREDICTION_TRADE)\n * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n listOtcBlocktrades(\n requestParameters?: ListOtcBlocktradesRequest\n ): Promise<RestApiResponse<ListOtcBlocktradesResponse>>;\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Preview OTC Blocktrade (PREDICTION_TRADE)\n * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n previewOtcBlocktrade(\n requestParameters: PreviewOtcBlocktradeRequest\n ): Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>;\n /**\n * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Remove OTC Blocktrades (PREDICTION_TRADE)\n * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApiInterface\n */\n removeOtcBlocktrades(\n requestParameters: RemoveOtcBlocktradesRequest\n ): Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>;\n}\n\n/**\n * Request parameters for createOtcBlocktrade operation in OtcApi.\n * @interface CreateOtcBlocktradeRequest\n */\nexport interface CreateOtcBlocktradeRequest {\n /**\n * PredictFun market id\n * @type {string}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly marketId: string;\n\n /**\n * ERC-1155 outcome token id\n * @type {string}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly tokenId: string;\n\n /**\n * Trade side. Enum: `BUY` (BID), `SELL` (ASK)\n * @type {'BUY' | 'SELL'}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly side: CreateOtcBlocktradeSideEnum;\n\n /**\n * Maker amount in wei. BID:USDT; ASK:shares\n * @type {string}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly makerAmount: string;\n\n /**\n * Taker amount in wei. BID:shares; ASK:USDT\n * @type {string}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly takerAmount: string;\n\n /**\n * Price per share (decimal ether, e.g. `0.65`)\n * @type {string}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly pricePerShare: string;\n\n /**\n * Expiration timestamp in seconds (GTD order)\n * @type {number | bigint}\n * @memberof OtcApiCreateOtcBlocktrade\n */\n readonly expiration: number | bigint;\n}\n\n/**\n * Request parameters for fulfilOtcBlocktrade operation in OtcApi.\n * @interface FulfilOtcBlocktradeRequest\n */\nexport interface FulfilOtcBlocktradeRequest {\n /**\n * Maker order id (returned by maker create)\n * @type {string}\n * @memberof OtcApiFulfilOtcBlocktrade\n */\n readonly orderId: string;\n\n /**\n * One-time fulfilment token the maker shared out-of-band\n * @type {string}\n * @memberof OtcApiFulfilOtcBlocktrade\n */\n readonly secretToken: string;\n}\n\n/**\n * Request parameters for getOtcBlocktradeDetail operation in OtcApi.\n * @interface GetOtcBlocktradeDetailRequest\n */\nexport interface GetOtcBlocktradeDetailRequest {\n /**\n * Maker order id (returned by create)\n * @type {string}\n * @memberof OtcApiGetOtcBlocktradeDetail\n */\n readonly orderId: string;\n}\n\n/**\n * Request parameters for getOtcBlocktradeEvents operation in OtcApi.\n * @interface GetOtcBlocktradeEventsRequest\n */\nexport interface GetOtcBlocktradeEventsRequest {\n /**\n * Page size\n * @type {number}\n * @memberof OtcApiGetOtcBlocktradeEvents\n */\n readonly first?: number;\n\n /**\n * Pagination cursor\n * @type {string}\n * @memberof OtcApiGetOtcBlocktradeEvents\n */\n readonly after?: string;\n\n /**\n * Filter by event types (e.g. `[\"MATCH_SUCCESS\",\"EXPIRE\"]`)\n * @type {Array<string>}\n * @memberof OtcApiGetOtcBlocktradeEvents\n */\n readonly eventTypes?: Array<string>;\n\n /**\n * Filter by market id\n * @type {number | bigint}\n * @memberof OtcApiGetOtcBlocktradeEvents\n */\n readonly marketId?: number | bigint;\n}\n\n/**\n * Request parameters for getOtcReservedBalances operation in OtcApi.\n * @interface GetOtcReservedBalancesRequest\n */\nexport interface GetOtcReservedBalancesRequest {\n /**\n * Assets to query (max 50)\n * @type {Array<GetOtcReservedBalancesAssetsParameterInner>}\n * @memberof OtcApiGetOtcReservedBalances\n */\n readonly assets: Array<GetOtcReservedBalancesAssetsParameterInner>;\n}\n\n/**\n * Request parameters for listOtcBlocktrades operation in OtcApi.\n * @interface ListOtcBlocktradesRequest\n */\nexport interface ListOtcBlocktradesRequest {\n /**\n * Page size\n * @type {number}\n * @memberof OtcApiListOtcBlocktrades\n */\n readonly first?: number;\n\n /**\n * Pagination cursor (from previous response)\n * @type {string}\n * @memberof OtcApiListOtcBlocktrades\n */\n readonly after?: string;\n\n /**\n * Filter by status. Enum: `OPEN`, `FULFILLED`, `MATCHED`, `CANCELLED`, `EXPIRED`, `FAILED`\n * @type {'OPEN' | 'FULFILLED' | 'MATCHED' | 'CANCELLED' | 'EXPIRED' | 'FAILED'}\n * @memberof OtcApiListOtcBlocktrades\n */\n readonly status?: ListOtcBlocktradesStatusEnum;\n}\n\n/**\n * Request parameters for previewOtcBlocktrade operation in OtcApi.\n * @interface PreviewOtcBlocktradeRequest\n */\nexport interface PreviewOtcBlocktradeRequest {\n /**\n * One-time fulfilment token the maker shared out-of-band\n * @type {string}\n * @memberof OtcApiPreviewOtcBlocktrade\n */\n readonly secretToken: string;\n}\n\n/**\n * Request parameters for removeOtcBlocktrades operation in OtcApi.\n * @interface RemoveOtcBlocktradesRequest\n */\nexport interface RemoveOtcBlocktradesRequest {\n /**\n * Order ids to remove (max 100). Must be the `orderId` returned by Create OTC Blocktrade\n * @type {Array<string>}\n * @memberof OtcApiRemoveOtcBlocktrades\n */\n readonly orderIds: Array<string>;\n}\n\n/**\n * OtcApi - object-oriented interface\n * @class OtcApi\n */\nexport class OtcApi implements OtcApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = OtcApiAxiosParamCreator(configuration);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - Side & Amount Rules:\n *\n * | side | makerAmount | takerAmount |\n * | ------ | ------------- | ------------- |\n * | `BUY` | USDT (wei) | shares (wei) |\n * | `SELL` | shares (wei) | USDT (wei) |\n * - \"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.\"\n *\n * | Request `side` | Response `side` (Integer) | Response `quoteType` |\n * | --------------- | -------------------------- | ---------------------- |\n * | `BUY` | `0` | `\"Bid\"` |\n * | `SELL` | `1` | `\"Ask\"` |\n *\n * @summary Create OTC Blocktrade (PREDICTION_TRADE)\n * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}\n */\n public async createOtcBlocktrade(\n requestParameters: CreateOtcBlocktradeRequest\n ): Promise<RestApiResponse<CreateOtcBlocktradeResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOtcBlocktrade(\n requestParameters?.marketId,\n requestParameters?.tokenId,\n requestParameters?.side,\n requestParameters?.makerAmount,\n requestParameters?.takerAmount,\n requestParameters?.pricePerShare,\n requestParameters?.expiration\n );\n return sendRequest<CreateOtcBlocktradeResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)\n * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}\n */\n public async fulfilOtcBlocktrade(\n requestParameters: FulfilOtcBlocktradeRequest\n ): Promise<RestApiResponse<FulfilOtcBlocktradeResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fulfilOtcBlocktrade(\n requestParameters?.orderId,\n requestParameters?.secretToken\n );\n return sendRequest<FulfilOtcBlocktradeResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}\n */\n public async getOtcBlocktradeDetail(\n requestParameters: GetOtcBlocktradeDetailRequest\n ): Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeDetail(\n requestParameters?.orderId\n );\n return sendRequest<GetOtcBlocktradeDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}\n */\n public async getOtcBlocktradeEvents(\n requestParameters: GetOtcBlocktradeEventsRequest = {}\n ): Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcBlocktradeEvents(\n requestParameters?.first,\n requestParameters?.after,\n requestParameters?.eventTypes,\n requestParameters?.marketId\n );\n return sendRequest<GetOtcBlocktradeEventsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - AssetQuery:\n *\n * | Name | Type | Mandatory | Description |\n * | ------- | ------ | --------- | ----------- |\n * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |\n * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |\n *\n * @summary Get OTC Reserved Balances (PREDICTION_TRADE)\n * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}\n */\n public async getOtcReservedBalances(\n requestParameters: GetOtcReservedBalancesRequest\n ): Promise<RestApiResponse<GetOtcReservedBalancesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOtcReservedBalances(\n requestParameters?.assets\n );\n return sendRequest<GetOtcReservedBalancesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * List the maker's own blocktrades with optional status filter and cursor pagination.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary List OTC Blocktrades (PREDICTION_TRADE)\n * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}\n */\n public async listOtcBlocktrades(\n requestParameters: ListOtcBlocktradesRequest = {}\n ): Promise<RestApiResponse<ListOtcBlocktradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listOtcBlocktrades(\n requestParameters?.first,\n requestParameters?.after,\n requestParameters?.status\n );\n return sendRequest<ListOtcBlocktradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Preview OTC Blocktrade (PREDICTION_TRADE)\n * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}\n */\n public async previewOtcBlocktrade(\n requestParameters: PreviewOtcBlocktradeRequest\n ): Promise<RestApiResponse<PreviewOtcBlocktradeResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.previewOtcBlocktrade(\n requestParameters?.secretToken\n );\n return sendRequest<PreviewOtcBlocktradeResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Remove OTC Blocktrades (PREDICTION_TRADE)\n * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof OtcApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}\n */\n public async removeOtcBlocktrades(\n requestParameters: RemoveOtcBlocktradesRequest\n ): Promise<RestApiResponse<RemoveOtcBlocktradesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.removeOtcBlocktrades(\n requestParameters?.orderIds\n );\n return sendRequest<RemoveOtcBlocktradesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum CreateOtcBlocktradeSideEnum {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum ListOtcBlocktradesStatusEnum {\n OPEN = 'OPEN',\n FULFILLED = 'FULFILLED',\n MATCHED = 'MATCHED',\n CANCELLED = 'CANCELLED',\n EXPIRED = 'EXPIRED',\n FAILED = 'FAILED',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetPositionByTokenResponse,\n QueryPnLResponse,\n QueryPositionsByFilterResponse,\n QueryPositionsResponse,\n QuerySettledPositionHistoryResponse,\n} from '../types';\n\n/**\n * PositionApi - axios parameter creator\n */\nconst PositionApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Position by Token (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} tokenId Prediction outcome token ID\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getPositionByToken: async (\n walletAddress: string,\n tokenId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getPositionByToken', 'walletAddress', walletAddress);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('getPositionByToken', 'tokenId', tokenId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/token',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query PnL (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tokenId] Filter by prediction token ID\n * @param {number | bigint} [marketId] Filter by market ID. Must be > 0\n * @param {number | bigint} [marketTopicId] Filter by market topic ID. Must be > 0\n * @param {boolean} [activeOnly] If `true`, return only active (unresolved) positions\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPnL: async (\n walletAddress: string,\n tokenId?: string,\n marketId?: number | bigint,\n marketTopicId?: number | bigint,\n activeOnly?: boolean,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryPnL', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (activeOnly !== undefined && activeOnly !== null) {\n localVarQueryParameter['activeOnly'] = activeOnly;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/pnl/query',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tab] Position status tab. Values from `PositionQueryType`. Default `ONGOING`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPositions: async (\n walletAddress: string,\n tab?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryPositions', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tab !== undefined && tab !== null) {\n localVarQueryParameter['tab'] = tab;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions by Filter (PREDICTION_TRADE)\n * @param {string} [walletAddress] User's prediction wallet address\n * @param {number | bigint} [marketTopicId] Filter by market topic ID\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPositionsByFilter: async (\n walletAddress?: string,\n marketTopicId?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/filter',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Settled Position History (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [l1Category] Filter by level-1 category\n * @param {number} [result] Settlement result filter\n * @param {string} [startDate] Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} [endDate] End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n querySettledPositionHistory: async (\n walletAddress: string,\n l1Category?: string,\n result?: number,\n startDate?: string,\n endDate?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('querySettledPositionHistory', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (result !== undefined && result !== null) {\n localVarQueryParameter['result'] = result;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/position/settled-history',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PositionApi - interface\n * @interface PositionApi\n */\nexport interface PositionApiInterface {\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Position by Token (PREDICTION_TRADE)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>>;\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query PnL (PREDICTION_TRADE)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPnL(requestParameters: QueryPnLRequest): Promise<RestApiResponse<QueryPnLResponse>>;\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions (PREDICTION_TRADE)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>>;\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions by Filter (PREDICTION_TRADE)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n queryPositionsByFilter(\n requestParameters?: QueryPositionsByFilterRequest\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>>;\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Settled Position History (PREDICTION_TRADE)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApiInterface\n */\n querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPositionByToken operation in PositionApi.\n * @interface GetPositionByTokenRequest\n */\nexport interface GetPositionByTokenRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiGetPositionByToken\n */\n readonly walletAddress: string;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof PositionApiGetPositionByToken\n */\n readonly tokenId: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiGetPositionByToken\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPnL operation in PositionApi.\n * @interface QueryPnLRequest\n */\nexport interface QueryPnLRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPnL\n */\n readonly walletAddress: string;\n\n /**\n * Filter by prediction token ID\n * @type {string}\n * @memberof PositionApiQueryPnL\n */\n readonly tokenId?: string;\n\n /**\n * Filter by market ID. Must be > 0\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly marketId?: number | bigint;\n\n /**\n * Filter by market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * If `true`, return only active (unresolved) positions\n * @type {boolean}\n * @memberof PositionApiQueryPnL\n */\n readonly activeOnly?: boolean;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPnL\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPositions operation in PositionApi.\n * @interface QueryPositionsRequest\n */\nexport interface QueryPositionsRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPositions\n */\n readonly walletAddress: string;\n\n /**\n * Position status tab. Values from `PositionQueryType`. Default `ONGOING`\n * @type {string}\n * @memberof PositionApiQueryPositions\n */\n readonly tab?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof PositionApiQueryPositions\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof PositionApiQueryPositions\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPositions\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPositionsByFilter operation in PositionApi.\n * @interface QueryPositionsByFilterRequest\n */\nexport interface QueryPositionsByFilterRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly walletAddress?: string;\n\n /**\n * Filter by market topic ID\n * @type {number | bigint}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQueryPositionsByFilter\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for querySettledPositionHistory operation in PositionApi.\n * @interface QuerySettledPositionHistoryRequest\n */\nexport interface QuerySettledPositionHistoryRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly walletAddress: string;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly l1Category?: string;\n\n /**\n * Settlement result filter\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly result?: number;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly startDate?: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly endDate?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof PositionApiQuerySettledPositionHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PositionApi - object-oriented interface\n * @class PositionApi\n */\nexport class PositionApi implements PositionApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PositionApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Position by Token (PREDICTION_TRADE)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}\n */\n public async getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPositionByToken(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPositionByTokenResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query PnL (PREDICTION_TRADE)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPnLResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}\n */\n public async queryPnL(\n requestParameters: QueryPnLRequest\n ): Promise<RestApiResponse<QueryPnLResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPnL(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.marketId,\n requestParameters?.marketTopicId,\n requestParameters?.activeOnly,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPnLResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions (PREDICTION_TRADE)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}\n */\n public async queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositions(\n requestParameters?.walletAddress,\n requestParameters?.tab,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions by Filter (PREDICTION_TRADE)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}\n */\n public async queryPositionsByFilter(\n requestParameters: QueryPositionsByFilterRequest = {}\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositionsByFilter(\n requestParameters?.walletAddress,\n requestParameters?.marketTopicId,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPositionsByFilterResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Settled Position History (PREDICTION_TRADE)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PositionApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}\n */\n public async querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySettledPositionHistory(\n requestParameters?.walletAddress,\n requestParameters?.l1Category,\n requestParameters?.result,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QuerySettledPositionHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { BatchRedeemResponse, GetRedeemStatusResponse } from '../types';\n\n/**\n * RedeemApi - axios parameter creator\n */\nconst RedeemApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Batch Redeem (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {Array<string>} tokenIds List of prediction token IDs to redeem. Not empty. Example: `tokenIds=112233&tokenIds=112234`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n batchRedeem: async (\n walletAddress: string,\n walletId: string,\n tokenIds: Array<string>,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('batchRedeem', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('batchRedeem', 'walletId', walletId);\n // verify required parameter 'tokenIds' is not null or undefined\n assertParamExists('batchRedeem', 'tokenIds', tokenIds);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (tokenIds) {\n localVarQueryParameter['tokenIds'] = tokenIds;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/batch-redeem',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} txHash Redeem transaction hash\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getRedeemStatus: async (\n walletAddress: string,\n txHash: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getRedeemStatus', 'walletAddress', walletAddress);\n // verify required parameter 'txHash' is not null or undefined\n assertParamExists('getRedeemStatus', 'txHash', txHash);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (txHash !== undefined && txHash !== null) {\n localVarQueryParameter['txHash'] = txHash;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/redeem/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RedeemApi - interface\n * @interface RedeemApi\n */\nexport interface RedeemApiInterface {\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Batch Redeem (PREDICTION_TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApiInterface\n */\n batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>>;\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (PREDICTION_TRADE)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApiInterface\n */\n getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>>;\n}\n\n/**\n * Request parameters for batchRedeem operation in RedeemApi.\n * @interface BatchRedeemRequest\n */\nexport interface BatchRedeemRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly walletId: string;\n\n /**\n * List of prediction token IDs to redeem. Not empty. Example: `tokenIds=112233&tokenIds=112234`\n * @type {Array<string>}\n * @memberof RedeemApiBatchRedeem\n */\n readonly tokenIds: Array<string>;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof RedeemApiBatchRedeem\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for getRedeemStatus operation in RedeemApi.\n * @interface GetRedeemStatusRequest\n */\nexport interface GetRedeemStatusRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly walletAddress: string;\n\n /**\n * Redeem transaction hash\n * @type {string}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly txHash: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof RedeemApiGetRedeemStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RedeemApi - object-oriented interface\n * @class RedeemApi\n */\nexport class RedeemApi implements RedeemApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RedeemApiAxiosParamCreator(configuration);\n }\n\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Batch Redeem (PREDICTION_TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}\n */\n public async batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchRedeem(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.tokenIds,\n requestParameters?.chainId\n );\n return sendRequest<BatchRedeemResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (PREDICTION_TRADE)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RedeemApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}\n */\n public async getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getRedeemStatus(\n requestParameters?.walletAddress,\n requestParameters?.txHash,\n requestParameters?.recvWindow\n );\n return sendRequest<GetRedeemStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n BatchCancelOrdersCancelInfoListParameterInner,\n BatchCancelOrdersResponse,\n GetQuoteResponse,\n PlaceOrderResponse,\n QueryActiveOrdersResponse,\n QueryOrderHistoryResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {Array<BatchCancelOrdersCancelInfoListParameterInner>} [cancelInfoList] List of orders to cancel (index `i` starts from 0)\n *\n * @throws {RequiredError}\n */\n batchCancelOrders: async (\n walletAddress: string,\n walletId: string,\n cancelInfoList?: Array<BatchCancelOrdersCancelInfoListParameterInner>\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('batchCancelOrders', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('batchCancelOrders', 'walletId', walletId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (cancelInfoList) {\n localVarQueryParameter['cancelInfoList'] = cancelInfoList;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/batch-cancel',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} tokenId Prediction outcome token ID\n * @param {GetQuoteSideEnum} side Trade direction. Enum: `BUY`, `SELL`\n * @param {string} amountIn Input amount in wei (18 decimals). Must be > 0. For `MARKET` orders, minimum is approximately 1.5 USDT (varies by market depth). Example: `1000000000000000000` = 1 USDT\n * @param {GetQuoteOrderTypeEnum} orderType Order type. Enum: `MARKET`, `LIMIT`\n * @param {number} slippageBps Slippage tolerance in basis points. Range 1–10000\n * @param {string} [priceLimit] Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n * @param {number} [feeRateBps] Fee rate in basis points. Default `200`, range 1–10000\n * @param {GetQuoteFundingSourceEnum} [fundingSource] Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @param {string} [fundTransferAmount] Auto-transfer amount before order (wei). Must be > 0 if provided\n *\n * @throws {RequiredError}\n */\n getQuote: async (\n walletAddress: string,\n tokenId: string,\n side: GetQuoteSideEnum,\n amountIn: string,\n orderType: GetQuoteOrderTypeEnum,\n slippageBps: number,\n priceLimit?: string,\n chainId?: string,\n feeRateBps?: number,\n fundingSource?: GetQuoteFundingSourceEnum,\n fundTransferAmount?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getQuote', 'walletAddress', walletAddress);\n // verify required parameter 'tokenId' is not null or undefined\n assertParamExists('getQuote', 'tokenId', tokenId);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('getQuote', 'side', side);\n // verify required parameter 'amountIn' is not null or undefined\n assertParamExists('getQuote', 'amountIn', amountIn);\n // verify required parameter 'orderType' is not null or undefined\n assertParamExists('getQuote', 'orderType', orderType);\n // verify required parameter 'slippageBps' is not null or undefined\n assertParamExists('getQuote', 'slippageBps', slippageBps);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (amountIn !== undefined && amountIn !== null) {\n localVarQueryParameter['amountIn'] = amountIn;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (slippageBps !== undefined && slippageBps !== null) {\n localVarQueryParameter['slippageBps'] = slippageBps;\n }\n if (priceLimit !== undefined && priceLimit !== null) {\n localVarQueryParameter['priceLimit'] = priceLimit;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n if (feeRateBps !== undefined && feeRateBps !== null) {\n localVarQueryParameter['feeRateBps'] = feeRateBps;\n }\n if (fundingSource !== undefined && fundingSource !== null) {\n localVarQueryParameter['fundingSource'] = fundingSource;\n }\n if (fundTransferAmount !== undefined && fundTransferAmount !== null) {\n localVarQueryParameter['fundTransferAmount'] = fundTransferAmount;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/get-quote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} walletId Wallet ID\n * @param {string} quoteId Quote ID obtained from `Get Quote`\n * @param {string} timeInForce Must match `orderType`: `FOK` for `MARKET`, `GTC` for `LIMIT`\n * @param {PlaceOrderAccountTypeEnum} accountType Payment account type. Enum: `SPOT`, `FUNDING`\n * @param {PlaceOrderOrderTypeEnum} orderType Order type. Enum: `MARKET`, `LIMIT`\n * @param {number} slippageBps Slippage tolerance in basis points. Range 1–10000\n * @param {string} [priceLimit] Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @param {PlaceOrderFundingSourceEnum} [fundingSource] Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @param {string} [fundTransferAmount] Auto-transfer amount before order (wei). Must be > 0 if provided\n *\n * @throws {RequiredError}\n */\n placeOrder: async (\n walletAddress: string,\n walletId: string,\n quoteId: string,\n timeInForce: string,\n accountType: PlaceOrderAccountTypeEnum,\n orderType: PlaceOrderOrderTypeEnum,\n slippageBps: number,\n priceLimit?: string,\n fundingSource?: PlaceOrderFundingSourceEnum,\n fundTransferAmount?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('placeOrder', 'walletAddress', walletAddress);\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('placeOrder', 'walletId', walletId);\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('placeOrder', 'quoteId', quoteId);\n // verify required parameter 'timeInForce' is not null or undefined\n assertParamExists('placeOrder', 'timeInForce', timeInForce);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('placeOrder', 'accountType', accountType);\n // verify required parameter 'orderType' is not null or undefined\n assertParamExists('placeOrder', 'orderType', orderType);\n // verify required parameter 'slippageBps' is not null or undefined\n assertParamExists('placeOrder', 'slippageBps', slippageBps);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n if (timeInForce !== undefined && timeInForce !== null) {\n localVarQueryParameter['timeInForce'] = timeInForce;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (slippageBps !== undefined && slippageBps !== null) {\n localVarQueryParameter['slippageBps'] = slippageBps;\n }\n if (priceLimit !== undefined && priceLimit !== null) {\n localVarQueryParameter['priceLimit'] = priceLimit;\n }\n if (fundingSource !== undefined && fundingSource !== null) {\n localVarQueryParameter['fundingSource'] = fundingSource;\n }\n if (fundTransferAmount !== undefined && fundTransferAmount !== null) {\n localVarQueryParameter['fundTransferAmount'] = fundTransferAmount;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/trade/place-order-bundle',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Active Orders (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {QueryActiveOrdersTradeSideEnum} [tradeSide] Filter by trade side. Enum: `BUY`, `SELL`\n * @param {string} [l1Category] Filter by level-1 category\n * @param {number | bigint} [marketId] Filter by market ID\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryActiveOrders: async (\n walletAddress: string,\n tradeSide?: QueryActiveOrdersTradeSideEnum,\n l1Category?: string,\n marketId?: number | bigint,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryActiveOrders', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tradeSide !== undefined && tradeSide !== null) {\n localVarQueryParameter['tradeSide'] = tradeSide;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Order History (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [l1Category] Filter by level-1 category\n * @param {QueryOrderHistoryOrderTypeEnum} [orderType] Filter by order type. Enum: `MARKET`, `LIMIT`\n * @param {string} [status] Filter by order status\n * @param {string} [startDate] Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} [endDate] End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryOrderHistory: async (\n walletAddress: string,\n l1Category?: string,\n orderType?: QueryOrderHistoryOrderTypeEnum,\n status?: string,\n startDate?: string,\n endDate?: string,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryOrderHistory', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (l1Category !== undefined && l1Category !== null) {\n localVarQueryParameter['l1Category'] = l1Category;\n }\n if (orderType !== undefined && orderType !== null) {\n localVarQueryParameter['orderType'] = orderType;\n }\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/order/history',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (PREDICTION_TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>>;\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (PREDICTION_TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getQuote(requestParameters: GetQuoteRequest): Promise<RestApiResponse<GetQuoteResponse>>;\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (PREDICTION_TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeOrder(requestParameters: PlaceOrderRequest): Promise<RestApiResponse<PlaceOrderResponse>>;\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Active Orders (PREDICTION_TRADE)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>>;\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Order History (PREDICTION_TRADE)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>>;\n}\n\n/**\n * Request parameters for batchCancelOrders operation in TradeApi.\n * @interface BatchCancelOrdersRequest\n */\nexport interface BatchCancelOrdersRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly walletId: string;\n\n /**\n * List of orders to cancel (index `i` starts from 0)\n * @type {Array<BatchCancelOrdersCancelInfoListParameterInner>}\n * @memberof TradeApiBatchCancelOrders\n */\n readonly cancelInfoList?: Array<BatchCancelOrdersCancelInfoListParameterInner>;\n}\n\n/**\n * Request parameters for getQuote operation in TradeApi.\n * @interface GetQuoteRequest\n */\nexport interface GetQuoteRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly walletAddress: string;\n\n /**\n * Prediction outcome token ID\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly tokenId: string;\n\n /**\n * Trade direction. Enum: `BUY`, `SELL`\n * @type {'BUY' | 'SELL'}\n * @memberof TradeApiGetQuote\n */\n readonly side: GetQuoteSideEnum;\n\n /**\n * Input amount in wei (18 decimals). Must be > 0. For `MARKET` orders, minimum is approximately 1.5 USDT (varies by market depth). Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly amountIn: string;\n\n /**\n * Order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiGetQuote\n */\n readonly orderType: GetQuoteOrderTypeEnum;\n\n /**\n * Slippage tolerance in basis points. Range 1–10000\n * @type {number}\n * @memberof TradeApiGetQuote\n */\n readonly slippageBps: number;\n\n /**\n * Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly priceLimit?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly chainId?: string;\n\n /**\n * Fee rate in basis points. Default `200`, range 1–10000\n * @type {number}\n * @memberof TradeApiGetQuote\n */\n readonly feeRateBps?: number;\n\n /**\n * Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @type {'MPC' | 'CEX'}\n * @memberof TradeApiGetQuote\n */\n readonly fundingSource?: GetQuoteFundingSourceEnum;\n\n /**\n * Auto-transfer amount before order (wei). Must be > 0 if provided\n * @type {string}\n * @memberof TradeApiGetQuote\n */\n readonly fundTransferAmount?: string;\n}\n\n/**\n * Request parameters for placeOrder operation in TradeApi.\n * @interface PlaceOrderRequest\n */\nexport interface PlaceOrderRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly walletAddress: string;\n\n /**\n * Wallet ID\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly walletId: string;\n\n /**\n * Quote ID obtained from `Get Quote`\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly quoteId: string;\n\n /**\n * Must match `orderType`: `FOK` for `MARKET`, `GTC` for `LIMIT`\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly timeInForce: string;\n\n /**\n * Payment account type. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TradeApiPlaceOrder\n */\n readonly accountType: PlaceOrderAccountTypeEnum;\n\n /**\n * Order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiPlaceOrder\n */\n readonly orderType: PlaceOrderOrderTypeEnum;\n\n /**\n * Slippage tolerance in basis points. Range 1–10000\n * @type {number}\n * @memberof TradeApiPlaceOrder\n */\n readonly slippageBps: number;\n\n /**\n * Limit price. Required when `orderType=LIMIT`. Must be > 0\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly priceLimit?: string;\n\n /**\n * Funding source. Enum: `MPC`, `CEX`. Default `MPC`\n * @type {'MPC' | 'CEX'}\n * @memberof TradeApiPlaceOrder\n */\n readonly fundingSource?: PlaceOrderFundingSourceEnum;\n\n /**\n * Auto-transfer amount before order (wei). Must be > 0 if provided\n * @type {string}\n * @memberof TradeApiPlaceOrder\n */\n readonly fundTransferAmount?: string;\n}\n\n/**\n * Request parameters for queryActiveOrders operation in TradeApi.\n * @interface QueryActiveOrdersRequest\n */\nexport interface QueryActiveOrdersRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly walletAddress: string;\n\n /**\n * Filter by trade side. Enum: `BUY`, `SELL`\n * @type {'BUY' | 'SELL'}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly tradeSide?: QueryActiveOrdersTradeSideEnum;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly l1Category?: string;\n\n /**\n * Filter by market ID\n * @type {number | bigint}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly marketId?: number | bigint;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiQueryActiveOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryOrderHistory operation in TradeApi.\n * @interface QueryOrderHistoryRequest\n */\nexport interface QueryOrderHistoryRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly walletAddress: string;\n\n /**\n * Filter by level-1 category\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly l1Category?: string;\n\n /**\n * Filter by order type. Enum: `MARKET`, `LIMIT`\n * @type {'MARKET' | 'LIMIT'}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly orderType?: QueryOrderHistoryOrderTypeEnum;\n\n /**\n * Filter by order status\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly status?: string;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly startDate?: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly endDate?: string;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TradeApiQueryOrderHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (PREDICTION_TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}\n */\n public async batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchCancelOrders(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.cancelInfoList\n );\n return sendRequest<BatchCancelOrdersResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (PREDICTION_TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}\n */\n public async getQuote(\n requestParameters: GetQuoteRequest\n ): Promise<RestApiResponse<GetQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuote(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.side,\n requestParameters?.amountIn,\n requestParameters?.orderType,\n requestParameters?.slippageBps,\n requestParameters?.priceLimit,\n requestParameters?.chainId,\n requestParameters?.feeRateBps,\n requestParameters?.fundingSource,\n requestParameters?.fundTransferAmount\n );\n return sendRequest<GetQuoteResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (PREDICTION_TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}\n */\n public async placeOrder(\n requestParameters: PlaceOrderRequest\n ): Promise<RestApiResponse<PlaceOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeOrder(\n requestParameters?.walletAddress,\n requestParameters?.walletId,\n requestParameters?.quoteId,\n requestParameters?.timeInForce,\n requestParameters?.accountType,\n requestParameters?.orderType,\n requestParameters?.slippageBps,\n requestParameters?.priceLimit,\n requestParameters?.fundingSource,\n requestParameters?.fundTransferAmount\n );\n return sendRequest<PlaceOrderResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Active Orders (PREDICTION_TRADE)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}\n */\n public async queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryActiveOrders(\n requestParameters?.walletAddress,\n requestParameters?.tradeSide,\n requestParameters?.l1Category,\n requestParameters?.marketId,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryActiveOrdersResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Order History (PREDICTION_TRADE)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}\n */\n public async queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderHistory(\n requestParameters?.walletAddress,\n requestParameters?.l1Category,\n requestParameters?.orderType,\n requestParameters?.status,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum GetQuoteSideEnum {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum GetQuoteOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n\nexport enum GetQuoteFundingSourceEnum {\n MPC = 'MPC',\n CEX = 'CEX',\n}\n\nexport enum PlaceOrderAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum PlaceOrderOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n\nexport enum PlaceOrderFundingSourceEnum {\n MPC = 'MPC',\n CEX = 'CEX',\n}\n\nexport enum QueryActiveOrdersTradeSideEnum {\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\nexport enum QueryOrderHistoryOrderTypeEnum {\n MARKET = 'MARKET',\n LIMIT = 'LIMIT',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ApplyMmDepositResponse,\n ApplyMmWithdrawResponse,\n CreateInboundTransferResponse,\n CreateOutboundTransferResponse,\n QueryTransferListResponse,\n QueryTransferStatusResponse,\n} from '../types';\n\n/**\n * TransferApi - axios parameter creator\n */\nconst TransferApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - \"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.\"\n *\n * @summary Apply MM Deposit (PREDICTION_TRADE)\n * @param {string} fromToken Source token symbol (e.g. `USDT`)\n * @param {string} fromTokenAmount Source token amount in WEI (18 decimals). Example: `1000000000000000000` = 1 USDT\n * @param {string} toToken Target token symbol (e.g. `USDT`)\n * @param {ApplyMmDepositAccountTypeEnum} accountType Target CEX account type. Enum: `SPOT`, `FUNDING`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n applyMmDeposit: async (\n fromToken: string,\n fromTokenAmount: string,\n toToken: string,\n accountType: ApplyMmDepositAccountTypeEnum,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'fromToken' is not null or undefined\n assertParamExists('applyMmDeposit', 'fromToken', fromToken);\n // verify required parameter 'fromTokenAmount' is not null or undefined\n assertParamExists('applyMmDeposit', 'fromTokenAmount', fromTokenAmount);\n // verify required parameter 'toToken' is not null or undefined\n assertParamExists('applyMmDeposit', 'toToken', toToken);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('applyMmDeposit', 'accountType', accountType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (fromToken !== undefined && fromToken !== null) {\n localVarQueryParameter['fromToken'] = fromToken;\n }\n if (fromTokenAmount !== undefined && fromTokenAmount !== null) {\n localVarQueryParameter['fromTokenAmount'] = fromTokenAmount;\n }\n if (toToken !== undefined && toToken !== null) {\n localVarQueryParameter['toToken'] = toToken;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/deposit/apply',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - walletType Validation:\n *\n * | Value | Behavior |\n * | --------------- | ------------------------------- |\n * | `null` | Allowed — defaults to SPOT |\n * | `0` | Allowed — source = SPOT |\n * | `1` | Allowed — source = FUNDING |\n * | Other (e.g. `99`) | Rejected — returns validation error |\n * - \"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.\"\n *\n * @summary Apply MM Withdraw (PREDICTION_TRADE)\n * @param {string} coin Coin to withdraw (e.g. `USDT`)\n * @param {string} network Network (e.g. `BEP20`)\n * @param {string} amount Amount to withdraw (must be > 0)\n * @param {string} [withdrawOrderId] Client withdraw order id (idempotency key)\n * @param {ApplyMmWithdrawWalletTypeEnum} [walletType] Source CEX account type. Enum: `0` (SPOT), `1` (FUNDING). Default `0`. Must be `0` or `1`; any other value is rejected\n * @param {string} [name] Remark for the withdraw\n *\n * @throws {RequiredError}\n */\n applyMmWithdraw: async (\n coin: string,\n network: string,\n amount: string,\n withdrawOrderId?: string,\n walletType?: ApplyMmWithdrawWalletTypeEnum,\n name?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'coin' is not null or undefined\n assertParamExists('applyMmWithdraw', 'coin', coin);\n // verify required parameter 'network' is not null or undefined\n assertParamExists('applyMmWithdraw', 'network', network);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('applyMmWithdraw', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (coin !== undefined && coin !== null) {\n localVarQueryParameter['coin'] = coin;\n }\n if (network !== undefined && network !== null) {\n localVarQueryParameter['network'] = network;\n }\n if (amount !== undefined && amount !== null) {\n localVarQueryParameter['amount'] = amount;\n }\n if (withdrawOrderId !== undefined && withdrawOrderId !== null) {\n localVarQueryParameter['withdrawOrderId'] = withdrawOrderId;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (name !== undefined && name !== null) {\n localVarQueryParameter['name'] = name;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/withdraw/apply',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Inbound Transfer (PREDICTION_TRADE)\n * @param {string} walletId Wallet ID\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} fromTokenAmount Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @param {CreateInboundTransferAccountTypeEnum} accountType Destination CEX account. Enum: `SPOT`, `FUNDING`\n * @param {string} [fromToken] Source token symbol. Default `USDT`\n * @param {string} [toToken] Destination token symbol. Default `USDT`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n createInboundTransfer: async (\n walletId: string,\n walletAddress: string,\n fromTokenAmount: string,\n accountType: CreateInboundTransferAccountTypeEnum,\n fromToken?: string,\n toToken?: string,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('createInboundTransfer', 'walletId', walletId);\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('createInboundTransfer', 'walletAddress', walletAddress);\n // verify required parameter 'fromTokenAmount' is not null or undefined\n assertParamExists('createInboundTransfer', 'fromTokenAmount', fromTokenAmount);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('createInboundTransfer', 'accountType', accountType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (fromTokenAmount !== undefined && fromTokenAmount !== null) {\n localVarQueryParameter['fromTokenAmount'] = fromTokenAmount;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (fromToken !== undefined && fromToken !== null) {\n localVarQueryParameter['fromToken'] = fromToken;\n }\n if (toToken !== undefined && toToken !== null) {\n localVarQueryParameter['toToken'] = toToken;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/inbound',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Outbound Transfer (PREDICTION_TRADE)\n * @param {string} walletId Wallet ID\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} fromTokenAmount Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @param {CreateOutboundTransferAccountTypeEnum} accountType Source CEX account. Enum: `SPOT`, `FUNDING`\n * @param {CreateOutboundTransferSourceBizEnum} sourceBiz Business source. Enum: `USER_TRANSFER`, `PREDICTION_BUY`\n * @param {string} [fromToken] Source token symbol. Default `USDT`\n * @param {string} [toToken] Destination token symbol. Default `USDT`\n * @param {string} [chainId] Chain ID. Default `56` (BSC)\n *\n * @throws {RequiredError}\n */\n createOutboundTransfer: async (\n walletId: string,\n walletAddress: string,\n fromTokenAmount: string,\n accountType: CreateOutboundTransferAccountTypeEnum,\n sourceBiz: CreateOutboundTransferSourceBizEnum,\n fromToken?: string,\n toToken?: string,\n chainId?: string\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletId' is not null or undefined\n assertParamExists('createOutboundTransfer', 'walletId', walletId);\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('createOutboundTransfer', 'walletAddress', walletAddress);\n // verify required parameter 'fromTokenAmount' is not null or undefined\n assertParamExists('createOutboundTransfer', 'fromTokenAmount', fromTokenAmount);\n // verify required parameter 'accountType' is not null or undefined\n assertParamExists('createOutboundTransfer', 'accountType', accountType);\n // verify required parameter 'sourceBiz' is not null or undefined\n assertParamExists('createOutboundTransfer', 'sourceBiz', sourceBiz);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletId !== undefined && walletId !== null) {\n localVarQueryParameter['walletId'] = walletId;\n }\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (fromTokenAmount !== undefined && fromTokenAmount !== null) {\n localVarQueryParameter['fromTokenAmount'] = fromTokenAmount;\n }\n if (accountType !== undefined && accountType !== null) {\n localVarQueryParameter['accountType'] = accountType;\n }\n if (sourceBiz !== undefined && sourceBiz !== null) {\n localVarQueryParameter['sourceBiz'] = sourceBiz;\n }\n if (fromToken !== undefined && fromToken !== null) {\n localVarQueryParameter['fromToken'] = fromToken;\n }\n if (toToken !== undefined && toToken !== null) {\n localVarQueryParameter['toToken'] = toToken;\n }\n if (chainId !== undefined && chainId !== null) {\n localVarQueryParameter['chainId'] = chainId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/outbound',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer List (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} startDate Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @param {string} endDate End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @param {string} [tokenSymbol] Filter by token symbol (e.g. `USDT`)\n * @param {QueryTransferListDirectionEnum} [direction] Filter by direction. Enum: `INBOUND`, `OUTBOUND`\n * @param {number} [offset] Pagination offset. Default `0`\n * @param {number} [limit] Page size. Default `20`, range 1–100\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryTransferList: async (\n walletAddress: string,\n startDate: string,\n endDate: string,\n tokenSymbol?: string,\n direction?: QueryTransferListDirectionEnum,\n offset?: number,\n limit?: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('queryTransferList', 'walletAddress', walletAddress);\n // verify required parameter 'startDate' is not null or undefined\n assertParamExists('queryTransferList', 'startDate', startDate);\n // verify required parameter 'endDate' is not null or undefined\n assertParamExists('queryTransferList', 'endDate', endDate);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (startDate !== undefined && startDate !== null) {\n localVarQueryParameter['startDate'] = startDate;\n }\n if (endDate !== undefined && endDate !== null) {\n localVarQueryParameter['endDate'] = endDate;\n }\n if (tokenSymbol !== undefined && tokenSymbol !== null) {\n localVarQueryParameter['tokenSymbol'] = tokenSymbol;\n }\n if (direction !== undefined && direction !== null) {\n localVarQueryParameter['direction'] = direction;\n }\n if (offset !== undefined && offset !== null) {\n localVarQueryParameter['offset'] = offset;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer Status (PREDICTION_TRADE)\n * @param {string} transferId Transfer ID returned from outbound/inbound transfer\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryTransferStatus: async (\n transferId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transferId' is not null or undefined\n assertParamExists('queryTransferStatus', 'transferId', transferId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transferId !== undefined && transferId !== null) {\n localVarQueryParameter['transferId'] = transferId;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/transfer/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TransferApi - interface\n * @interface TransferApi\n */\nexport interface TransferApiInterface {\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - \"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.\"\n *\n * @summary Apply MM Deposit (PREDICTION_TRADE)\n * @param {ApplyMmDepositRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n applyMmDeposit(\n requestParameters: ApplyMmDepositRequest\n ): Promise<RestApiResponse<ApplyMmDepositResponse>>;\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - walletType Validation:\n *\n * | Value | Behavior |\n * | --------------- | ------------------------------- |\n * | `null` | Allowed — defaults to SPOT |\n * | `0` | Allowed — source = SPOT |\n * | `1` | Allowed — source = FUNDING |\n * | Other (e.g. `99`) | Rejected — returns validation error |\n * - \"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.\"\n *\n * @summary Apply MM Withdraw (PREDICTION_TRADE)\n * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n applyMmWithdraw(\n requestParameters: ApplyMmWithdrawRequest\n ): Promise<RestApiResponse<ApplyMmWithdrawResponse>>;\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Inbound Transfer (PREDICTION_TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>>;\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Outbound Transfer (PREDICTION_TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>>;\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer List (PREDICTION_TRADE)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>>;\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer Status (PREDICTION_TRADE)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApiInterface\n */\n queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>>;\n}\n\n/**\n * Request parameters for applyMmDeposit operation in TransferApi.\n * @interface ApplyMmDepositRequest\n */\nexport interface ApplyMmDepositRequest {\n /**\n * Source token symbol (e.g. `USDT`)\n * @type {string}\n * @memberof TransferApiApplyMmDeposit\n */\n readonly fromToken: string;\n\n /**\n * Source token amount in WEI (18 decimals). Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TransferApiApplyMmDeposit\n */\n readonly fromTokenAmount: string;\n\n /**\n * Target token symbol (e.g. `USDT`)\n * @type {string}\n * @memberof TransferApiApplyMmDeposit\n */\n readonly toToken: string;\n\n /**\n * Target CEX account type. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TransferApiApplyMmDeposit\n */\n readonly accountType: ApplyMmDepositAccountTypeEnum;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TransferApiApplyMmDeposit\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for applyMmWithdraw operation in TransferApi.\n * @interface ApplyMmWithdrawRequest\n */\nexport interface ApplyMmWithdrawRequest {\n /**\n * Coin to withdraw (e.g. `USDT`)\n * @type {string}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly coin: string;\n\n /**\n * Network (e.g. `BEP20`)\n * @type {string}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly network: string;\n\n /**\n * Amount to withdraw (must be > 0)\n * @type {string}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly amount: string;\n\n /**\n * Client withdraw order id (idempotency key)\n * @type {string}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly withdrawOrderId?: string;\n\n /**\n * Source CEX account type. Enum: `0` (SPOT), `1` (FUNDING). Default `0`. Must be `0` or `1`; any other value is rejected\n * @type {0 | 1}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly walletType?: ApplyMmWithdrawWalletTypeEnum;\n\n /**\n * Remark for the withdraw\n * @type {string}\n * @memberof TransferApiApplyMmWithdraw\n */\n readonly name?: string;\n}\n\n/**\n * Request parameters for createInboundTransfer operation in TransferApi.\n * @interface CreateInboundTransferRequest\n */\nexport interface CreateInboundTransferRequest {\n /**\n * Wallet ID\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly walletId: string;\n\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly walletAddress: string;\n\n /**\n * Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly fromTokenAmount: string;\n\n /**\n * Destination CEX account. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly accountType: CreateInboundTransferAccountTypeEnum;\n\n /**\n * Source token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly fromToken?: string;\n\n /**\n * Destination token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly toToken?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TransferApiCreateInboundTransfer\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for createOutboundTransfer operation in TransferApi.\n * @interface CreateOutboundTransferRequest\n */\nexport interface CreateOutboundTransferRequest {\n /**\n * Wallet ID\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly walletId: string;\n\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly walletAddress: string;\n\n /**\n * Transfer amount in wei (18 decimals). Must be > 0. Example: `1000000000000000000` = 1 USDT\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly fromTokenAmount: string;\n\n /**\n * Source CEX account. Enum: `SPOT`, `FUNDING`\n * @type {'SPOT' | 'FUNDING'}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly accountType: CreateOutboundTransferAccountTypeEnum;\n\n /**\n * Business source. Enum: `USER_TRANSFER`, `PREDICTION_BUY`\n * @type {'USER_TRANSFER' | 'PREDICTION_BUY'}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly sourceBiz: CreateOutboundTransferSourceBizEnum;\n\n /**\n * Source token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly fromToken?: string;\n\n /**\n * Destination token symbol. Default `USDT`\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly toToken?: string;\n\n /**\n * Chain ID. Default `56` (BSC)\n * @type {string}\n * @memberof TransferApiCreateOutboundTransfer\n */\n readonly chainId?: string;\n}\n\n/**\n * Request parameters for queryTransferList operation in TransferApi.\n * @interface QueryTransferListRequest\n */\nexport interface QueryTransferListRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly walletAddress: string;\n\n /**\n * Start date. Format: `yyyy-MM-dd`. Must be ≤ `endDate`\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly startDate: string;\n\n /**\n * End date. Format: `yyyy-MM-dd`. Must be ≥ `startDate`\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly endDate: string;\n\n /**\n * Filter by token symbol (e.g. `USDT`)\n * @type {string}\n * @memberof TransferApiQueryTransferList\n */\n readonly tokenSymbol?: string;\n\n /**\n * Filter by direction. Enum: `INBOUND`, `OUTBOUND`\n * @type {'INBOUND' | 'OUTBOUND'}\n * @memberof TransferApiQueryTransferList\n */\n readonly direction?: QueryTransferListDirectionEnum;\n\n /**\n * Pagination offset. Default `0`\n * @type {number}\n * @memberof TransferApiQueryTransferList\n */\n readonly offset?: number;\n\n /**\n * Page size. Default `20`, range 1–100\n * @type {number}\n * @memberof TransferApiQueryTransferList\n */\n readonly limit?: number;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TransferApiQueryTransferList\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryTransferStatus operation in TransferApi.\n * @interface QueryTransferStatusRequest\n */\nexport interface QueryTransferStatusRequest {\n /**\n * Transfer ID returned from outbound/inbound transfer\n * @type {string}\n * @memberof TransferApiQueryTransferStatus\n */\n readonly transferId: string;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof TransferApiQueryTransferStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * TransferApi - object-oriented interface\n * @class TransferApi\n */\nexport class TransferApi implements TransferApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - \"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.\"\n *\n * @summary Apply MM Deposit (PREDICTION_TRADE)\n * @param {ApplyMmDepositRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}\n */\n public async applyMmDeposit(\n requestParameters: ApplyMmDepositRequest\n ): Promise<RestApiResponse<ApplyMmDepositResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmDeposit(\n requestParameters?.fromToken,\n requestParameters?.fromTokenAmount,\n requestParameters?.toToken,\n requestParameters?.accountType,\n requestParameters?.chainId\n );\n return sendRequest<ApplyMmDepositResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - walletType Validation:\n *\n * | Value | Behavior |\n * | --------------- | ------------------------------- |\n * | `null` | Allowed — defaults to SPOT |\n * | `0` | Allowed — source = SPOT |\n * | `1` | Allowed — source = FUNDING |\n * | Other (e.g. `99`) | Rejected — returns validation error |\n * - \"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.\"\n *\n * @summary Apply MM Withdraw (PREDICTION_TRADE)\n * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}\n */\n public async applyMmWithdraw(\n requestParameters: ApplyMmWithdrawRequest\n ): Promise<RestApiResponse<ApplyMmWithdrawResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.applyMmWithdraw(\n requestParameters?.coin,\n requestParameters?.network,\n requestParameters?.amount,\n requestParameters?.withdrawOrderId,\n requestParameters?.walletType,\n requestParameters?.name\n );\n return sendRequest<ApplyMmWithdrawResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Inbound Transfer (PREDICTION_TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}\n */\n public async createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createInboundTransfer(\n requestParameters?.walletId,\n requestParameters?.walletAddress,\n requestParameters?.fromTokenAmount,\n requestParameters?.accountType,\n requestParameters?.fromToken,\n requestParameters?.toToken,\n requestParameters?.chainId\n );\n return sendRequest<CreateInboundTransferResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Outbound Transfer (PREDICTION_TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}\n */\n public async createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOutboundTransfer(\n requestParameters?.walletId,\n requestParameters?.walletAddress,\n requestParameters?.fromTokenAmount,\n requestParameters?.accountType,\n requestParameters?.sourceBiz,\n requestParameters?.fromToken,\n requestParameters?.toToken,\n requestParameters?.chainId\n );\n return sendRequest<CreateOutboundTransferResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer List (PREDICTION_TRADE)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}\n */\n public async queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferList(\n requestParameters?.walletAddress,\n requestParameters?.startDate,\n requestParameters?.endDate,\n requestParameters?.tokenSymbol,\n requestParameters?.direction,\n requestParameters?.offset,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryTransferListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer Status (PREDICTION_TRADE)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TransferApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}\n */\n public async queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferStatus(\n requestParameters?.transferId,\n requestParameters?.recvWindow\n );\n return sendRequest<QueryTransferStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n\nexport enum ApplyMmDepositAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum ApplyMmWithdrawWalletTypeEnum {\n WALLET_TYPE_0 = 0,\n WALLET_TYPE_1 = 1,\n}\n\nexport enum CreateInboundTransferAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum CreateOutboundTransferAccountTypeEnum {\n SPOT = 'SPOT',\n FUNDING = 'FUNDING',\n}\n\nexport enum CreateOutboundTransferSourceBizEnum {\n USER_TRANSFER = 'USER_TRANSFER',\n PREDICTION_BUY = 'PREDICTION_BUY',\n}\n\nexport enum QueryTransferListDirectionEnum {\n INBOUND = 'INBOUND',\n OUTBOUND = 'OUTBOUND',\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetPortfolioResponse,\n GetQuotaStatusResponse,\n ListPredictionWalletsResponse,\n QueryPaymentOptionBalancesResponse,\n} from '../types';\n\n/**\n * WalletApi - axios parameter creator\n */\nconst WalletApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Portfolio (PREDICTION_TRADE)\n * @param {string} walletAddress User's prediction wallet address\n * @param {string} [tokenId] Filter by prediction token ID\n * @param {number | bigint} [marketId] Filter by market ID. Must be > 0\n * @param {number | bigint} [marketTopicId] Filter by market topic ID. Must be > 0\n * @param {boolean} [activeOnly] If `true`, return only active (unresolved) positions\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getPortfolio: async (\n walletAddress: string,\n tokenId?: string,\n marketId?: number | bigint,\n marketTopicId?: number | bigint,\n activeOnly?: boolean,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'walletAddress' is not null or undefined\n assertParamExists('getPortfolio', 'walletAddress', walletAddress);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (walletAddress !== undefined && walletAddress !== null) {\n localVarQueryParameter['walletAddress'] = walletAddress;\n }\n if (tokenId !== undefined && tokenId !== null) {\n localVarQueryParameter['tokenId'] = tokenId;\n }\n if (marketId !== undefined && marketId !== null) {\n localVarQueryParameter['marketId'] = marketId;\n }\n if (marketTopicId !== undefined && marketTopicId !== null) {\n localVarQueryParameter['marketTopicId'] = marketTopicId;\n }\n if (activeOnly !== undefined && activeOnly !== null) {\n localVarQueryParameter['activeOnly'] = activeOnly;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/pnl/portfolio',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Quota Status (PREDICTION_TRADE)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getQuotaStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/quota/limit/status',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary List Prediction Wallets (PREDICTION_TRADE)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n listPredictionWallets: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/wallet/list',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Payment Option Balances (PREDICTION_TRADE)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n queryPaymentOptionBalances: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/w3w/wallet/prediction/balance/payment-options',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * WalletApi - interface\n * @interface WalletApi\n */\nexport interface WalletApiInterface {\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Portfolio (PREDICTION_TRADE)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>>;\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Quota Status (PREDICTION_TRADE)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n getQuotaStatus(\n requestParameters?: GetQuotaStatusRequest\n ): Promise<RestApiResponse<GetQuotaStatusResponse>>;\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary List Prediction Wallets (PREDICTION_TRADE)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n listPredictionWallets(\n requestParameters?: ListPredictionWalletsRequest\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>>;\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Payment Option Balances (PREDICTION_TRADE)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApiInterface\n */\n queryPaymentOptionBalances(\n requestParameters?: QueryPaymentOptionBalancesRequest\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>;\n}\n\n/**\n * Request parameters for getPortfolio operation in WalletApi.\n * @interface GetPortfolioRequest\n */\nexport interface GetPortfolioRequest {\n /**\n * User's prediction wallet address\n * @type {string}\n * @memberof WalletApiGetPortfolio\n */\n readonly walletAddress: string;\n\n /**\n * Filter by prediction token ID\n * @type {string}\n * @memberof WalletApiGetPortfolio\n */\n readonly tokenId?: string;\n\n /**\n * Filter by market ID. Must be > 0\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly marketId?: number | bigint;\n\n /**\n * Filter by market topic ID. Must be > 0\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly marketTopicId?: number | bigint;\n\n /**\n * If `true`, return only active (unresolved) positions\n * @type {boolean}\n * @memberof WalletApiGetPortfolio\n */\n readonly activeOnly?: boolean;\n\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiGetPortfolio\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getQuotaStatus operation in WalletApi.\n * @interface GetQuotaStatusRequest\n */\nexport interface GetQuotaStatusRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiGetQuotaStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for listPredictionWallets operation in WalletApi.\n * @interface ListPredictionWalletsRequest\n */\nexport interface ListPredictionWalletsRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiListPredictionWallets\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryPaymentOptionBalances operation in WalletApi.\n * @interface QueryPaymentOptionBalancesRequest\n */\nexport interface QueryPaymentOptionBalancesRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof WalletApiQueryPaymentOptionBalances\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * WalletApi - object-oriented interface\n * @class WalletApi\n */\nexport class WalletApi implements WalletApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Portfolio (PREDICTION_TRADE)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}\n */\n public async getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPortfolio(\n requestParameters?.walletAddress,\n requestParameters?.tokenId,\n requestParameters?.marketId,\n requestParameters?.marketTopicId,\n requestParameters?.activeOnly,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPortfolioResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Quota Status (PREDICTION_TRADE)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}\n */\n public async getQuotaStatus(\n requestParameters: GetQuotaStatusRequest = {}\n ): Promise<RestApiResponse<GetQuotaStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuotaStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetQuotaStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary List Prediction Wallets (PREDICTION_TRADE)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}\n */\n public async listPredictionWallets(\n requestParameters: ListPredictionWalletsRequest = {}\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionWallets(\n requestParameters?.recvWindow\n );\n return sendRequest<ListPredictionWalletsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Payment Option Balances (PREDICTION_TRADE)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof WalletApi\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}\n */\n public async queryPaymentOptionBalances(\n requestParameters: QueryPaymentOptionBalancesRequest = {}\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPaymentOptionBalances(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryPaymentOptionBalancesResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { OtcApi } from './modules/otc-api';\nimport { PositionApi } from './modules/position-api';\nimport { RedeemApi } from './modules/redeem-api';\nimport { TradeApi } from './modules/trade-api';\nimport { TransferApi } from './modules/transfer-api';\nimport { WalletApi } from './modules/wallet-api';\n\nimport type {\n GetMarketDetailRequest,\n ListPredictionMarketsRequest,\n MarketSearchRequest,\n QueryLastTradePriceRequest,\n QueryOrderBookRequest,\n} from './modules/market-data-api';\nimport type {\n CreateOtcBlocktradeRequest,\n FulfilOtcBlocktradeRequest,\n GetOtcBlocktradeDetailRequest,\n GetOtcBlocktradeEventsRequest,\n GetOtcReservedBalancesRequest,\n ListOtcBlocktradesRequest,\n PreviewOtcBlocktradeRequest,\n RemoveOtcBlocktradesRequest,\n} from './modules/otc-api';\nimport type {\n GetPositionByTokenRequest,\n QueryPnLRequest,\n QueryPositionsRequest,\n QueryPositionsByFilterRequest,\n QuerySettledPositionHistoryRequest,\n} from './modules/position-api';\nimport type { BatchRedeemRequest, GetRedeemStatusRequest } from './modules/redeem-api';\nimport type {\n BatchCancelOrdersRequest,\n GetQuoteRequest,\n PlaceOrderRequest,\n QueryActiveOrdersRequest,\n QueryOrderHistoryRequest,\n} from './modules/trade-api';\nimport type {\n ApplyMmDepositRequest,\n ApplyMmWithdrawRequest,\n CreateInboundTransferRequest,\n CreateOutboundTransferRequest,\n QueryTransferListRequest,\n QueryTransferStatusRequest,\n} from './modules/transfer-api';\nimport type {\n GetPortfolioRequest,\n GetQuotaStatusRequest,\n ListPredictionWalletsRequest,\n QueryPaymentOptionBalancesRequest,\n} from './modules/wallet-api';\n\nimport type {\n GetMarketDetailResponse,\n ListPredictionCategoriesResponse,\n ListPredictionMarketsResponse,\n MarketSearchResponse,\n QueryLastTradePriceResponse,\n QueryOrderBookResponse,\n} from './types';\nimport type {\n CreateOtcBlocktradeResponse,\n FulfilOtcBlocktradeResponse,\n GetOtcBlocktradeDetailResponse,\n GetOtcBlocktradeEventsResponse,\n GetOtcReservedBalancesResponse,\n ListOtcBlocktradesResponse,\n PreviewOtcBlocktradeResponse,\n RemoveOtcBlocktradesResponse,\n} from './types';\nimport type {\n GetPositionByTokenResponse,\n QueryPnLResponse,\n QueryPositionsResponse,\n QueryPositionsByFilterResponse,\n QuerySettledPositionHistoryResponse,\n} from './types';\nimport type { BatchRedeemResponse, GetRedeemStatusResponse } from './types';\nimport type {\n BatchCancelOrdersResponse,\n GetQuoteResponse,\n PlaceOrderResponse,\n QueryActiveOrdersResponse,\n QueryOrderHistoryResponse,\n} from './types';\nimport type {\n ApplyMmDepositResponse,\n ApplyMmWithdrawResponse,\n CreateInboundTransferResponse,\n CreateOutboundTransferResponse,\n QueryTransferListResponse,\n QueryTransferStatusResponse,\n} from './types';\nimport type {\n GetPortfolioResponse,\n GetQuotaStatusResponse,\n ListPredictionWalletsResponse,\n QueryPaymentOptionBalancesResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private otcApi: OtcApi;\n private positionApi: PositionApi;\n private redeemApi: RedeemApi;\n private tradeApi: TradeApi;\n private transferApi: TransferApi;\n private walletApi: WalletApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.otcApi = new OtcApi(configuration);\n this.positionApi = new PositionApi(configuration);\n this.redeemApi = new RedeemApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n this.transferApi = new TransferApi(configuration);\n this.walletApi = new WalletApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get full details for a specific prediction market topic, including variant data and timeline.\n *\n * Weight(IP): 200\n *\n * @summary Get Market Detail\n * @param {GetMarketDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}\n */\n getMarketDetail(\n requestParameters: GetMarketDetailRequest\n ): Promise<RestApiResponse<GetMarketDetailResponse>> {\n return this.marketDataApi.getMarketDetail(requestParameters);\n }\n\n /**\n * Get all available prediction market categories (L1 and L2).\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Categories\n *\n * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}\n */\n listPredictionCategories(): Promise<RestApiResponse<ListPredictionCategoriesResponse>> {\n return this.marketDataApi.listPredictionCategories();\n }\n\n /**\n * Get a paginated list of prediction market topics, with optional category and sort filters.\n *\n * Weight(IP): 200\n *\n * @summary List Prediction Markets\n * @param {ListPredictionMarketsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}\n */\n listPredictionMarkets(\n requestParameters: ListPredictionMarketsRequest = {}\n ): Promise<RestApiResponse<ListPredictionMarketsResponse>> {\n return this.marketDataApi.listPredictionMarkets(requestParameters);\n }\n\n /**\n * Semantic search for prediction market topics by keyword.\n *\n * Weight(IP): 200\n *\n * @summary Market Search\n * @param {MarketSearchRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<MarketSearchResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}\n */\n marketSearch(\n requestParameters: MarketSearchRequest\n ): Promise<RestApiResponse<MarketSearchResponse>> {\n return this.marketDataApi.marketSearch(requestParameters);\n }\n\n /**\n * Get the most recent trade price for a prediction market.\n *\n * Weight(IP): 200\n *\n * @summary Query Last Trade Price\n * @param {QueryLastTradePriceRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}\n */\n queryLastTradePrice(\n requestParameters: QueryLastTradePriceRequest\n ): Promise<RestApiResponse<QueryLastTradePriceResponse>> {\n return this.marketDataApi.queryLastTradePrice(requestParameters);\n }\n\n /**\n * Get the current order book (bids and asks) for a specific prediction market outcome token.\n *\n * Weight(IP): 200\n *\n * @summary Query Order Book\n * @param {QueryOrderBookRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}\n */\n queryOrderBook(\n requestParameters: QueryOrderBookRequest\n ): Promise<RestApiResponse<QueryOrderBookResponse>> {\n return this.marketDataApi.queryOrderBook(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - Side & Amount Rules:\n *\n * | side | makerAmount | takerAmount |\n * | ------ | ------------- | ------------- |\n * | `BUY` | USDT (wei) | shares (wei) |\n * | `SELL` | shares (wei) | USDT (wei) |\n * - \"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.\"\n *\n * | Request `side` | Response `side` (Integer) | Response `quoteType` |\n * | --------------- | -------------------------- | ---------------------- |\n * | `BUY` | `0` | `\"Bid\"` |\n * | `SELL` | `1` | `\"Ask\"` |\n *\n * @summary Create OTC Blocktrade (PREDICTION_TRADE)\n * @param {CreateOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#create-otc-blocktrade Binance API Documentation}\n */\n createOtcBlocktrade(\n requestParameters: CreateOtcBlocktradeRequest\n ): Promise<RestApiResponse<CreateOtcBlocktradeResponse>> {\n return this.otcApi.createOtcBlocktrade(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Fulfil OTC Blocktrade (PREDICTION_TRADE)\n * @param {FulfilOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FulfilOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#fulfil-otc-blocktrade Binance API Documentation}\n */\n fulfilOtcBlocktrade(\n requestParameters: FulfilOtcBlocktradeRequest\n ): Promise<RestApiResponse<FulfilOtcBlocktradeResponse>> {\n return this.otcApi.fulfilOtcBlocktrade(requestParameters);\n }\n\n /**\n * Query the maker's own blocktrade by `orderId`. Returns full order data including status and `secretToken`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Detail (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-detail Binance API Documentation}\n */\n getOtcBlocktradeDetail(\n requestParameters: GetOtcBlocktradeDetailRequest\n ): Promise<RestApiResponse<GetOtcBlocktradeDetailResponse>> {\n return this.otcApi.getOtcBlocktradeDetail(requestParameters);\n }\n\n /**\n * Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Get OTC Blocktrade Events (PREDICTION_TRADE)\n * @param {GetOtcBlocktradeEventsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-blocktrade-events Binance API Documentation}\n */\n getOtcBlocktradeEvents(\n requestParameters: GetOtcBlocktradeEventsRequest = {}\n ): Promise<RestApiResponse<GetOtcBlocktradeEventsResponse>> {\n return this.otcApi.getOtcBlocktradeEvents(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - AssetQuery:\n *\n * | Name | Type | Mandatory | Description |\n * | ------- | ------ | --------- | ----------- |\n * | type | STRING | YES | Asset type. Enum: `USDT`, `SHARE` |\n * | tokenId | STRING | NO | Outcome token id (present for `SHARE` entries only) |\n *\n * @summary Get OTC Reserved Balances (PREDICTION_TRADE)\n * @param {GetOtcReservedBalancesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOtcReservedBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#get-otc-reserved-balances Binance API Documentation}\n */\n getOtcReservedBalances(\n requestParameters: GetOtcReservedBalancesRequest\n ): Promise<RestApiResponse<GetOtcReservedBalancesResponse>> {\n return this.otcApi.getOtcReservedBalances(requestParameters);\n }\n\n /**\n * List the maker's own blocktrades with optional status filter and cursor pagination.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary List OTC Blocktrades (PREDICTION_TRADE)\n * @param {ListOtcBlocktradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListOtcBlocktradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#list-otc-blocktrades Binance API Documentation}\n */\n listOtcBlocktrades(\n requestParameters: ListOtcBlocktradesRequest = {}\n ): Promise<RestApiResponse<ListOtcBlocktradesResponse>> {\n return this.otcApi.listOtcBlocktrades(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Preview OTC Blocktrade (PREDICTION_TRADE)\n * @param {PreviewOtcBlocktradeRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PreviewOtcBlocktradeResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#preview-otc-blocktrade Binance API Documentation}\n */\n previewOtcBlocktrade(\n requestParameters: PreviewOtcBlocktradeRequest\n ): Promise<RestApiResponse<PreviewOtcBlocktradeResponse>> {\n return this.otcApi.previewOtcBlocktrade(requestParameters);\n }\n\n /**\n * Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already `MATCHED`/`CANCELLED`/`EXPIRED`/`FAILED`) are returned in `noop` instead of `removed`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n *\n * @summary Remove OTC Blocktrades (PREDICTION_TRADE)\n * @param {RemoveOtcBlocktradesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<RemoveOtcBlocktradesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/otc#remove-otc-blocktrades Binance API Documentation}\n */\n removeOtcBlocktrades(\n requestParameters: RemoveOtcBlocktradesRequest\n ): Promise<RestApiResponse<RemoveOtcBlocktradesResponse>> {\n return this.otcApi.removeOtcBlocktrades(requestParameters);\n }\n\n /**\n * Get the authenticated user's position detail for a specific prediction token.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Position by Token (PREDICTION_TRADE)\n * @param {GetPositionByTokenRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}\n */\n getPositionByToken(\n requestParameters: GetPositionByTokenRequest\n ): Promise<RestApiResponse<GetPositionByTokenResponse>> {\n return this.positionApi.getPositionByToken(requestParameters);\n }\n\n /**\n * Query profit and loss records for the authenticated user's prediction positions. When `tokenId` is provided, returns a single record in `pnl`; otherwise returns a list in `pnlList`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query PnL (PREDICTION_TRADE)\n * @param {QueryPnLRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPnLResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}\n */\n queryPnL(requestParameters: QueryPnLRequest): Promise<RestApiResponse<QueryPnLResponse>> {\n return this.positionApi.queryPnL(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions (PREDICTION_TRADE)\n * @param {QueryPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}\n */\n queryPositions(\n requestParameters: QueryPositionsRequest\n ): Promise<RestApiResponse<QueryPositionsResponse>> {\n return this.positionApi.queryPositions(requestParameters);\n }\n\n /**\n * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Positions by Filter (PREDICTION_TRADE)\n * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}\n */\n queryPositionsByFilter(\n requestParameters: QueryPositionsByFilterRequest = {}\n ): Promise<RestApiResponse<QueryPositionsByFilterResponse>> {\n return this.positionApi.queryPositionsByFilter(requestParameters);\n }\n\n /**\n * Get the authenticated user's settled (resolved) prediction position history with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Settled Position History (PREDICTION_TRADE)\n * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}\n */\n querySettledPositionHistory(\n requestParameters: QuerySettledPositionHistoryRequest\n ): Promise<RestApiResponse<QuerySettledPositionHistoryResponse>> {\n return this.positionApi.querySettledPositionHistory(requestParameters);\n }\n\n /**\n * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Batch Redeem (PREDICTION_TRADE)\n * @param {BatchRedeemRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}\n */\n batchRedeem(\n requestParameters: BatchRedeemRequest\n ): Promise<RestApiResponse<BatchRedeemResponse>> {\n return this.redeemApi.batchRedeem(requestParameters);\n }\n\n /**\n * Query the on-chain transaction status of a previously submitted redeem request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - Status values:\n *\n * | Value | Description |\n * | ----------- | -------------------------------------------- |\n * | `PENDING` | Transaction submitted, awaiting confirmation |\n * | `CONFIRMED` | Transaction confirmed on-chain |\n * | `FAILED` | Transaction failed |\n * | `NOT_FOUND` | Transaction hash not found |\n *\n * @summary Get Redeem Status (PREDICTION_TRADE)\n * @param {GetRedeemStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}\n */\n getRedeemStatus(\n requestParameters: GetRedeemStatusRequest\n ): Promise<RestApiResponse<GetRedeemStatusResponse>> {\n return this.redeemApi.getRedeemStatus(requestParameters);\n }\n\n /**\n * Cancel one or more active prediction orders in a single request. Requires SAS authorization.\n *\n **Known Issue — Bracket Encoding Incompatibility:**\n * This endpoint uses indexed bracket notation (`cancelInfoList[0].orderId`). Binance SAPI signature verification runs over the **raw, unencoded** canonical string. However, mainstream HTTP libraries (Python `requests`, Java `HttpURLConnection`/`URI`, Go `net/url`, Node.js `url`) automatically percent-encode `[` → `%5B` and `]` → `%5D`, producing a signature mismatch with error `-1022 Signature for this request is not valid`. Postman is unaffected because it does not encode keys.\n *\n **Workarounds** (use low-level HTTP APIs that do not normalize URLs):\n * - **Python:** use `http.client` (stdlib) and hand-build the body string.\n * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.\n * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.\n * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.\n *\n * @summary Batch Cancel Orders (PREDICTION_TRADE)\n * @param {BatchCancelOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}\n */\n batchCancelOrders(\n requestParameters: BatchCancelOrdersRequest\n ): Promise<RestApiResponse<BatchCancelOrdersResponse>> {\n return this.tradeApi.batchCancelOrders(requestParameters);\n }\n\n /**\n * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Response Notes:\n * - `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.\n * - **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.\n *\n * @summary Get Quote (PREDICTION_TRADE)\n * @param {GetQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}\n */\n getQuote(requestParameters: GetQuoteRequest): Promise<RestApiResponse<GetQuoteResponse>> {\n return this.tradeApi.getQuote(requestParameters);\n }\n\n /**\n * Place a prediction order using a previously obtained quote. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Validation rules:\n *\n * | orderType | timeInForce | priceLimit |\n * | --------- | ------------- | --------------------- |\n * | `MARKET` | Must be `FOK` | Not required |\n * | `LIMIT` | Must be `GTC` | Required, must be > 0 |\n *\n * @summary Place Order (PREDICTION_TRADE)\n * @param {PlaceOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}\n */\n placeOrder(requestParameters: PlaceOrderRequest): Promise<RestApiResponse<PlaceOrderResponse>> {\n return this.tradeApi.placeOrder(requestParameters);\n }\n\n /**\n * Get active (open) prediction orders for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Active Orders (PREDICTION_TRADE)\n * @param {QueryActiveOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}\n */\n queryActiveOrders(\n requestParameters: QueryActiveOrdersRequest\n ): Promise<RestApiResponse<QueryActiveOrdersResponse>> {\n return this.tradeApi.queryActiveOrders(requestParameters);\n }\n\n /**\n * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Order History (PREDICTION_TRADE)\n * @param {QueryOrderHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}\n */\n queryOrderHistory(\n requestParameters: QueryOrderHistoryRequest\n ): Promise<RestApiResponse<QueryOrderHistoryResponse>> {\n return this.tradeApi.queryOrderHistory(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - \"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.\"\n *\n * @summary Apply MM Deposit (PREDICTION_TRADE)\n * @param {ApplyMmDepositRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ApplyMmDepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-deposit Binance API Documentation}\n */\n applyMmDeposit(\n requestParameters: ApplyMmDepositRequest\n ): Promise<RestApiResponse<ApplyMmDepositResponse>> {\n return this.transferApi.applyMmDeposit(requestParameters);\n }\n\n /**\n * 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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * Notes:\n * - Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.\n * - walletType Validation:\n *\n * | Value | Behavior |\n * | --------------- | ------------------------------- |\n * | `null` | Allowed — defaults to SPOT |\n * | `0` | Allowed — source = SPOT |\n * | `1` | Allowed — source = FUNDING |\n * | Other (e.g. `99`) | Rejected — returns validation error |\n * - \"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.\"\n *\n * @summary Apply MM Withdraw (PREDICTION_TRADE)\n * @param {ApplyMmWithdrawRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ApplyMmWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#apply-mm-withdraw Binance API Documentation}\n */\n applyMmWithdraw(\n requestParameters: ApplyMmWithdrawRequest\n ): Promise<RestApiResponse<ApplyMmWithdrawResponse>> {\n return this.transferApi.applyMmWithdraw(requestParameters);\n }\n\n /**\n * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.\n *\n * ⚠️ **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.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Inbound Transfer (PREDICTION_TRADE)\n * @param {CreateInboundTransferRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}\n */\n createInboundTransfer(\n requestParameters: CreateInboundTransferRequest\n ): Promise<RestApiResponse<CreateInboundTransferResponse>> {\n return this.transferApi.createInboundTransfer(requestParameters);\n }\n\n /**\n * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Create Outbound Transfer (PREDICTION_TRADE)\n * @param {CreateOutboundTransferRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}\n */\n createOutboundTransfer(\n requestParameters: CreateOutboundTransferRequest\n ): Promise<RestApiResponse<CreateOutboundTransferResponse>> {\n return this.transferApi.createOutboundTransfer(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction wallet transfer history within a date range.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer List (PREDICTION_TRADE)\n * @param {QueryTransferListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}\n */\n queryTransferList(\n requestParameters: QueryTransferListRequest\n ): Promise<RestApiResponse<QueryTransferListResponse>> {\n return this.transferApi.queryTransferList(requestParameters);\n }\n\n /**\n * Query the current status of a prediction wallet transfer by transfer ID.\n *\n **`status` values:** Terminal states are `COMPLETED` and `FAILED`. Intermediate states are `PROCESSING` and `PENDING`. **Do not** poll for `SUCCESS` — it is not a valid terminal state.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Transfer Status (PREDICTION_TRADE)\n * @param {QueryTransferStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}\n */\n queryTransferStatus(\n requestParameters: QueryTransferStatusRequest\n ): Promise<RestApiResponse<QueryTransferStatusResponse>> {\n return this.transferApi.queryTransferStatus(requestParameters);\n }\n\n /**\n * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Portfolio (PREDICTION_TRADE)\n * @param {GetPortfolioRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}\n */\n getPortfolio(\n requestParameters: GetPortfolioRequest\n ): Promise<RestApiResponse<GetPortfolioResponse>> {\n return this.walletApi.getPortfolio(requestParameters);\n }\n\n /**\n * Query the current user's daily trading quota limit and remaining allowance for prediction markets.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Get Quota Status (PREDICTION_TRADE)\n * @param {GetQuotaStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}\n */\n getQuotaStatus(\n requestParameters: GetQuotaStatusRequest = {}\n ): Promise<RestApiResponse<GetQuotaStatusResponse>> {\n return this.walletApi.getQuotaStatus(requestParameters);\n }\n\n /**\n * Get all prediction wallets registered for the authenticated user.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary List Prediction Wallets (PREDICTION_TRADE)\n * @param {ListPredictionWalletsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}\n */\n listPredictionWallets(\n requestParameters: ListPredictionWalletsRequest = {}\n ): Promise<RestApiResponse<ListPredictionWalletsResponse>> {\n return this.walletApi.listPredictionWallets(requestParameters);\n }\n\n /**\n * Get available balances for each payment option that can be used for prediction trading.\n *\n * Weight(IP): 200\n *\n * Security Type: PREDICTION_TRADE\n *\n * @summary Query Payment Option Balances (PREDICTION_TRADE)\n * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}\n */\n queryPaymentOptionBalances(\n requestParameters: QueryPaymentOptionBalancesRequest = {}\n ): Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>> {\n return this.walletApi.queryPaymentOptionBalances(requestParameters);\n }\n}\n","/**\n * Prediction Trading REST API\n *\n * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n W3W_PREDICTION_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationW3WPrediction {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class W3WPrediction {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationW3WPrediction) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || W3W_PREDICTION_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;ACgCf,MAAa,qDAAq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