@binance/w3w-prediction 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1973 @@
1
+ //#region rolldown:runtime
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (all, symbols) => {
4
+ let target = {};
5
+ for (var name$1 in all) {
6
+ __defProp(target, name$1, {
7
+ get: all[name$1],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ let __binance_common = require("@binance/common");
19
+
20
+ //#region package.json
21
+ var name = "@binance/w3w-prediction";
22
+ var version = "1.0.0";
23
+
24
+ //#endregion
25
+ //#region src/rest-api/modules/market-data-api.ts
26
+ /**
27
+ * Prediction Trading REST API
28
+ *
29
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
30
+ *
31
+ * The version of the OpenAPI document: 1.0.0
32
+ *
33
+ *
34
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
35
+ * https://openapi-generator.tech
36
+ * Do not edit the class manually.
37
+ */
38
+ /**
39
+ * MarketDataApi - axios parameter creator
40
+ */
41
+ const MarketDataApiAxiosParamCreator = function(configuration) {
42
+ return {
43
+ getMarketDetail: async (marketTopicId) => {
44
+ (0, __binance_common.assertParamExists)("getMarketDetail", "marketTopicId", marketTopicId);
45
+ const localVarQueryParameter = {};
46
+ const localVarBodyParameter = {};
47
+ const localVarHeaderParameter = {};
48
+ if (marketTopicId !== void 0 && marketTopicId !== null) localVarQueryParameter["marketTopicId"] = marketTopicId;
49
+ let _timeUnit;
50
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
51
+ return {
52
+ endpoint: "/sapi/v1/w3w/wallet/prediction/market/detail",
53
+ method: "GET",
54
+ queryParams: localVarQueryParameter,
55
+ bodyParams: localVarBodyParameter,
56
+ headerParams: localVarHeaderParameter,
57
+ timeUnit: _timeUnit
58
+ };
59
+ },
60
+ listPredictionCategories: async () => {
61
+ const localVarQueryParameter = {};
62
+ const localVarBodyParameter = {};
63
+ const localVarHeaderParameter = {};
64
+ let _timeUnit;
65
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
66
+ return {
67
+ endpoint: "/sapi/v1/w3w/wallet/prediction/category/list",
68
+ method: "GET",
69
+ queryParams: localVarQueryParameter,
70
+ bodyParams: localVarBodyParameter,
71
+ headerParams: localVarHeaderParameter,
72
+ timeUnit: _timeUnit
73
+ };
74
+ },
75
+ listPredictionMarkets: async (l1Category, l2Category, sortBy, orderBy, offset, limit) => {
76
+ const localVarQueryParameter = {};
77
+ const localVarBodyParameter = {};
78
+ const localVarHeaderParameter = {};
79
+ if (l1Category !== void 0 && l1Category !== null) localVarQueryParameter["l1Category"] = l1Category;
80
+ if (l2Category !== void 0 && l2Category !== null) localVarQueryParameter["l2Category"] = l2Category;
81
+ if (sortBy !== void 0 && sortBy !== null) localVarQueryParameter["sortBy"] = sortBy;
82
+ if (orderBy !== void 0 && orderBy !== null) localVarQueryParameter["orderBy"] = orderBy;
83
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
84
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
85
+ let _timeUnit;
86
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
87
+ return {
88
+ endpoint: "/sapi/v1/w3w/wallet/prediction/market/list",
89
+ method: "GET",
90
+ queryParams: localVarQueryParameter,
91
+ bodyParams: localVarBodyParameter,
92
+ headerParams: localVarHeaderParameter,
93
+ timeUnit: _timeUnit
94
+ };
95
+ },
96
+ marketSearch: async (query, topK) => {
97
+ (0, __binance_common.assertParamExists)("marketSearch", "query", query);
98
+ const localVarQueryParameter = {};
99
+ const localVarBodyParameter = {};
100
+ const localVarHeaderParameter = {};
101
+ if (query !== void 0 && query !== null) localVarQueryParameter["query"] = query;
102
+ if (topK !== void 0 && topK !== null) localVarQueryParameter["topK"] = topK;
103
+ let _timeUnit;
104
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
105
+ return {
106
+ endpoint: "/sapi/v1/w3w/wallet/prediction/market/search",
107
+ method: "GET",
108
+ queryParams: localVarQueryParameter,
109
+ bodyParams: localVarBodyParameter,
110
+ headerParams: localVarHeaderParameter,
111
+ timeUnit: _timeUnit
112
+ };
113
+ },
114
+ queryLastTradePrice: async (marketId) => {
115
+ (0, __binance_common.assertParamExists)("queryLastTradePrice", "marketId", marketId);
116
+ const localVarQueryParameter = {};
117
+ const localVarBodyParameter = {};
118
+ const localVarHeaderParameter = {};
119
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
120
+ let _timeUnit;
121
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
122
+ return {
123
+ endpoint: "/sapi/v1/w3w/wallet/prediction/order-book/last-trade-price",
124
+ method: "GET",
125
+ queryParams: localVarQueryParameter,
126
+ bodyParams: localVarBodyParameter,
127
+ headerParams: localVarHeaderParameter,
128
+ timeUnit: _timeUnit
129
+ };
130
+ },
131
+ queryOrderBook: async (vendor, marketId, tokenId) => {
132
+ (0, __binance_common.assertParamExists)("queryOrderBook", "vendor", vendor);
133
+ (0, __binance_common.assertParamExists)("queryOrderBook", "marketId", marketId);
134
+ (0, __binance_common.assertParamExists)("queryOrderBook", "tokenId", tokenId);
135
+ const localVarQueryParameter = {};
136
+ const localVarBodyParameter = {};
137
+ const localVarHeaderParameter = {};
138
+ if (vendor !== void 0 && vendor !== null) localVarQueryParameter["vendor"] = vendor;
139
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
140
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
141
+ let _timeUnit;
142
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
143
+ return {
144
+ endpoint: "/sapi/v1/w3w/wallet/prediction/order-book",
145
+ method: "GET",
146
+ queryParams: localVarQueryParameter,
147
+ bodyParams: localVarBodyParameter,
148
+ headerParams: localVarHeaderParameter,
149
+ timeUnit: _timeUnit
150
+ };
151
+ }
152
+ };
153
+ };
154
+ /**
155
+ * MarketDataApi - object-oriented interface
156
+ * @class MarketDataApi
157
+ */
158
+ var MarketDataApi = class {
159
+ constructor(configuration) {
160
+ this.configuration = configuration;
161
+ this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);
162
+ }
163
+ /**
164
+ * Get full details for a specific prediction market topic, including variant data and timeline.
165
+ *
166
+ * Weight(IP): 200
167
+ *
168
+ * @summary Get Market Detail
169
+ * @param {GetMarketDetailRequest} requestParameters Request parameters.
170
+ * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}
171
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
172
+ * @memberof MarketDataApi
173
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}
174
+ */
175
+ async getMarketDetail(requestParameters) {
176
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getMarketDetail(requestParameters?.marketTopicId);
177
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
178
+ }
179
+ /**
180
+ * Get all available prediction market categories (L1 and L2).
181
+ *
182
+ * Weight(IP): 200
183
+ *
184
+ * @summary List Prediction Categories
185
+ * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}
186
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
187
+ * @memberof MarketDataApi
188
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}
189
+ */
190
+ async listPredictionCategories() {
191
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionCategories();
192
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
193
+ }
194
+ /**
195
+ * Get a paginated list of prediction market topics, with optional category and sort filters.
196
+ *
197
+ * Weight(IP): 200
198
+ *
199
+ * @summary List Prediction Markets
200
+ * @param {ListPredictionMarketsRequest} requestParameters Request parameters.
201
+ * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}
202
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
203
+ * @memberof MarketDataApi
204
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}
205
+ */
206
+ async listPredictionMarkets(requestParameters = {}) {
207
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionMarkets(requestParameters?.l1Category, requestParameters?.l2Category, requestParameters?.sortBy, requestParameters?.orderBy, requestParameters?.offset, requestParameters?.limit);
208
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
209
+ }
210
+ /**
211
+ * Semantic search for prediction market topics by keyword.
212
+ *
213
+ * Weight(IP): 200
214
+ *
215
+ * @summary Market Search
216
+ * @param {MarketSearchRequest} requestParameters Request parameters.
217
+ * @returns {Promise<RestApiResponse<MarketSearchResponse>>}
218
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
219
+ * @memberof MarketDataApi
220
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}
221
+ */
222
+ async marketSearch(requestParameters) {
223
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.marketSearch(requestParameters?.query, requestParameters?.topK);
224
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
225
+ }
226
+ /**
227
+ * Get the most recent trade price for a prediction market.
228
+ *
229
+ * Weight(IP): 200
230
+ *
231
+ * @summary Query Last Trade Price
232
+ * @param {QueryLastTradePriceRequest} requestParameters Request parameters.
233
+ * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}
234
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
235
+ * @memberof MarketDataApi
236
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}
237
+ */
238
+ async queryLastTradePrice(requestParameters) {
239
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLastTradePrice(requestParameters?.marketId);
240
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
241
+ }
242
+ /**
243
+ * Get the current order book (bids and asks) for a specific prediction market outcome token.
244
+ *
245
+ * Weight(IP): 200
246
+ *
247
+ * @summary Query Order Book
248
+ * @param {QueryOrderBookRequest} requestParameters Request parameters.
249
+ * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}
250
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
251
+ * @memberof MarketDataApi
252
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}
253
+ */
254
+ async queryOrderBook(requestParameters) {
255
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderBook(requestParameters?.vendor, requestParameters?.marketId, requestParameters?.tokenId);
256
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
257
+ }
258
+ };
259
+ let ListPredictionMarketsSortByEnum = /* @__PURE__ */ function(ListPredictionMarketsSortByEnum$1) {
260
+ ListPredictionMarketsSortByEnum$1["RECOMMENDED"] = "RECOMMENDED";
261
+ ListPredictionMarketsSortByEnum$1["VOLUME"] = "VOLUME";
262
+ ListPredictionMarketsSortByEnum$1["PARTICIPANTS"] = "PARTICIPANTS";
263
+ ListPredictionMarketsSortByEnum$1["CREATED_TIME"] = "CREATED_TIME";
264
+ ListPredictionMarketsSortByEnum$1["END_DATE"] = "END_DATE";
265
+ return ListPredictionMarketsSortByEnum$1;
266
+ }({});
267
+ let ListPredictionMarketsOrderByEnum = /* @__PURE__ */ function(ListPredictionMarketsOrderByEnum$1) {
268
+ ListPredictionMarketsOrderByEnum$1["ASC"] = "ASC";
269
+ ListPredictionMarketsOrderByEnum$1["DESC"] = "DESC";
270
+ return ListPredictionMarketsOrderByEnum$1;
271
+ }({});
272
+
273
+ //#endregion
274
+ //#region src/rest-api/modules/position-api.ts
275
+ /**
276
+ * Prediction Trading REST API
277
+ *
278
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
279
+ *
280
+ * The version of the OpenAPI document: 1.0.0
281
+ *
282
+ *
283
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
284
+ * https://openapi-generator.tech
285
+ * Do not edit the class manually.
286
+ */
287
+ /**
288
+ * PositionApi - axios parameter creator
289
+ */
290
+ const PositionApiAxiosParamCreator = function(configuration) {
291
+ return {
292
+ getPositionByToken: async (walletAddress, tokenId, recvWindow) => {
293
+ (0, __binance_common.assertParamExists)("getPositionByToken", "walletAddress", walletAddress);
294
+ (0, __binance_common.assertParamExists)("getPositionByToken", "tokenId", tokenId);
295
+ const localVarQueryParameter = {};
296
+ const localVarBodyParameter = {};
297
+ const localVarHeaderParameter = {};
298
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
299
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
300
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
301
+ let _timeUnit;
302
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
303
+ return {
304
+ endpoint: "/sapi/v1/w3w/wallet/prediction/position/token",
305
+ method: "GET",
306
+ queryParams: localVarQueryParameter,
307
+ bodyParams: localVarBodyParameter,
308
+ headerParams: localVarHeaderParameter,
309
+ timeUnit: _timeUnit
310
+ };
311
+ },
312
+ queryPnL: async (walletAddress, tokenId, marketId, marketTopicId, activeOnly, recvWindow) => {
313
+ (0, __binance_common.assertParamExists)("queryPnL", "walletAddress", walletAddress);
314
+ const localVarQueryParameter = {};
315
+ const localVarBodyParameter = {};
316
+ const localVarHeaderParameter = {};
317
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
318
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
319
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
320
+ if (marketTopicId !== void 0 && marketTopicId !== null) localVarQueryParameter["marketTopicId"] = marketTopicId;
321
+ if (activeOnly !== void 0 && activeOnly !== null) localVarQueryParameter["activeOnly"] = activeOnly;
322
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
323
+ let _timeUnit;
324
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
325
+ return {
326
+ endpoint: "/sapi/v1/w3w/wallet/prediction/pnl/query",
327
+ method: "GET",
328
+ queryParams: localVarQueryParameter,
329
+ bodyParams: localVarBodyParameter,
330
+ headerParams: localVarHeaderParameter,
331
+ timeUnit: _timeUnit
332
+ };
333
+ },
334
+ queryPositions: async (walletAddress, tab, offset, limit, recvWindow) => {
335
+ (0, __binance_common.assertParamExists)("queryPositions", "walletAddress", walletAddress);
336
+ const localVarQueryParameter = {};
337
+ const localVarBodyParameter = {};
338
+ const localVarHeaderParameter = {};
339
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
340
+ if (tab !== void 0 && tab !== null) localVarQueryParameter["tab"] = tab;
341
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
342
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
343
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
344
+ let _timeUnit;
345
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
346
+ return {
347
+ endpoint: "/sapi/v1/w3w/wallet/prediction/position/list",
348
+ method: "GET",
349
+ queryParams: localVarQueryParameter,
350
+ bodyParams: localVarBodyParameter,
351
+ headerParams: localVarHeaderParameter,
352
+ timeUnit: _timeUnit
353
+ };
354
+ },
355
+ queryPositionsByFilter: async (walletAddress, marketTopicId, recvWindow) => {
356
+ const localVarQueryParameter = {};
357
+ const localVarBodyParameter = {};
358
+ const localVarHeaderParameter = {};
359
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
360
+ if (marketTopicId !== void 0 && marketTopicId !== null) localVarQueryParameter["marketTopicId"] = marketTopicId;
361
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
362
+ let _timeUnit;
363
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
364
+ return {
365
+ endpoint: "/sapi/v1/w3w/wallet/prediction/position/filter",
366
+ method: "GET",
367
+ queryParams: localVarQueryParameter,
368
+ bodyParams: localVarBodyParameter,
369
+ headerParams: localVarHeaderParameter,
370
+ timeUnit: _timeUnit
371
+ };
372
+ },
373
+ querySettledPositionHistory: async (walletAddress, l1Category, result, startDate, endDate, offset, limit, recvWindow) => {
374
+ (0, __binance_common.assertParamExists)("querySettledPositionHistory", "walletAddress", walletAddress);
375
+ const localVarQueryParameter = {};
376
+ const localVarBodyParameter = {};
377
+ const localVarHeaderParameter = {};
378
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
379
+ if (l1Category !== void 0 && l1Category !== null) localVarQueryParameter["l1Category"] = l1Category;
380
+ if (result !== void 0 && result !== null) localVarQueryParameter["result"] = result;
381
+ if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
382
+ if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
383
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
384
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
385
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
386
+ let _timeUnit;
387
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
388
+ return {
389
+ endpoint: "/sapi/v1/w3w/wallet/prediction/position/settled-history",
390
+ method: "GET",
391
+ queryParams: localVarQueryParameter,
392
+ bodyParams: localVarBodyParameter,
393
+ headerParams: localVarHeaderParameter,
394
+ timeUnit: _timeUnit
395
+ };
396
+ }
397
+ };
398
+ };
399
+ /**
400
+ * PositionApi - object-oriented interface
401
+ * @class PositionApi
402
+ */
403
+ var PositionApi = class {
404
+ constructor(configuration) {
405
+ this.configuration = configuration;
406
+ this.localVarAxiosParamCreator = PositionApiAxiosParamCreator(configuration);
407
+ }
408
+ /**
409
+ * Get the authenticated user's position detail for a specific prediction token.
410
+ *
411
+ * Weight(IP): 200
412
+ *
413
+ * Security Type: USER_DATA
414
+ *
415
+ * @summary Get Position by Token
416
+ * @param {GetPositionByTokenRequest} requestParameters Request parameters.
417
+ * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
418
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
419
+ * @memberof PositionApi
420
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}
421
+ */
422
+ async getPositionByToken(requestParameters) {
423
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPositionByToken(requestParameters?.walletAddress, requestParameters?.tokenId, requestParameters?.recvWindow);
424
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
425
+ }
426
+ /**
427
+ * 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`.
428
+ *
429
+ * Weight(IP): 200
430
+ *
431
+ * Security Type: USER_DATA
432
+ *
433
+ * @summary Query PnL
434
+ * @param {QueryPnLRequest} requestParameters Request parameters.
435
+ * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
436
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
437
+ * @memberof PositionApi
438
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}
439
+ */
440
+ async queryPnL(requestParameters) {
441
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPnL(requestParameters?.walletAddress, requestParameters?.tokenId, requestParameters?.marketId, requestParameters?.marketTopicId, requestParameters?.activeOnly, requestParameters?.recvWindow);
442
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
443
+ }
444
+ /**
445
+ * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.
446
+ *
447
+ * Weight(IP): 200
448
+ *
449
+ * Security Type: USER_DATA
450
+ *
451
+ * @summary Query Positions
452
+ * @param {QueryPositionsRequest} requestParameters Request parameters.
453
+ * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
454
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
455
+ * @memberof PositionApi
456
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}
457
+ */
458
+ async queryPositions(requestParameters) {
459
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositions(requestParameters?.walletAddress, requestParameters?.tab, requestParameters?.offset, requestParameters?.limit, requestParameters?.recvWindow);
460
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
461
+ }
462
+ /**
463
+ * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.
464
+ *
465
+ * Weight(IP): 200
466
+ *
467
+ * Security Type: USER_DATA
468
+ *
469
+ * @summary Query Positions by Filter
470
+ * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
471
+ * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
472
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
473
+ * @memberof PositionApi
474
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}
475
+ */
476
+ async queryPositionsByFilter(requestParameters = {}) {
477
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPositionsByFilter(requestParameters?.walletAddress, requestParameters?.marketTopicId, requestParameters?.recvWindow);
478
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
479
+ }
480
+ /**
481
+ * Get the authenticated user's settled (resolved) prediction position history with optional filters.
482
+ *
483
+ * Weight(IP): 200
484
+ *
485
+ * Security Type: USER_DATA
486
+ *
487
+ * @summary Query Settled Position History
488
+ * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
489
+ * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
490
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
491
+ * @memberof PositionApi
492
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}
493
+ */
494
+ async querySettledPositionHistory(requestParameters) {
495
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.querySettledPositionHistory(requestParameters?.walletAddress, requestParameters?.l1Category, requestParameters?.result, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.offset, requestParameters?.limit, requestParameters?.recvWindow);
496
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
497
+ }
498
+ };
499
+
500
+ //#endregion
501
+ //#region src/rest-api/modules/redeem-api.ts
502
+ /**
503
+ * Prediction Trading REST API
504
+ *
505
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
506
+ *
507
+ * The version of the OpenAPI document: 1.0.0
508
+ *
509
+ *
510
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
511
+ * https://openapi-generator.tech
512
+ * Do not edit the class manually.
513
+ */
514
+ /**
515
+ * RedeemApi - axios parameter creator
516
+ */
517
+ const RedeemApiAxiosParamCreator = function(configuration) {
518
+ return {
519
+ batchRedeem: async (walletAddress, walletId, tokenIds, chainId) => {
520
+ (0, __binance_common.assertParamExists)("batchRedeem", "walletAddress", walletAddress);
521
+ (0, __binance_common.assertParamExists)("batchRedeem", "walletId", walletId);
522
+ (0, __binance_common.assertParamExists)("batchRedeem", "tokenIds", tokenIds);
523
+ const localVarQueryParameter = {};
524
+ const localVarBodyParameter = {};
525
+ const localVarHeaderParameter = {};
526
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
527
+ if (walletId !== void 0 && walletId !== null) localVarQueryParameter["walletId"] = walletId;
528
+ if (tokenIds) localVarQueryParameter["tokenIds"] = tokenIds;
529
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
530
+ let _timeUnit;
531
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
532
+ return {
533
+ endpoint: "/sapi/v1/w3w/wallet/prediction/batch-redeem",
534
+ method: "POST",
535
+ queryParams: localVarQueryParameter,
536
+ bodyParams: localVarBodyParameter,
537
+ headerParams: localVarHeaderParameter,
538
+ timeUnit: _timeUnit
539
+ };
540
+ },
541
+ getRedeemStatus: async (walletAddress, txHash, recvWindow) => {
542
+ (0, __binance_common.assertParamExists)("getRedeemStatus", "walletAddress", walletAddress);
543
+ (0, __binance_common.assertParamExists)("getRedeemStatus", "txHash", txHash);
544
+ const localVarQueryParameter = {};
545
+ const localVarBodyParameter = {};
546
+ const localVarHeaderParameter = {};
547
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
548
+ if (txHash !== void 0 && txHash !== null) localVarQueryParameter["txHash"] = txHash;
549
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
550
+ let _timeUnit;
551
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
552
+ return {
553
+ endpoint: "/sapi/v1/w3w/wallet/prediction/redeem/status",
554
+ method: "GET",
555
+ queryParams: localVarQueryParameter,
556
+ bodyParams: localVarBodyParameter,
557
+ headerParams: localVarHeaderParameter,
558
+ timeUnit: _timeUnit
559
+ };
560
+ }
561
+ };
562
+ };
563
+ /**
564
+ * RedeemApi - object-oriented interface
565
+ * @class RedeemApi
566
+ */
567
+ var RedeemApi = class {
568
+ constructor(configuration) {
569
+ this.configuration = configuration;
570
+ this.localVarAxiosParamCreator = RedeemApiAxiosParamCreator(configuration);
571
+ }
572
+ /**
573
+ * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.
574
+ *
575
+ * Weight(IP): 200
576
+ *
577
+ * Security Type: TRADE
578
+ *
579
+ * @summary Batch Redeem
580
+ * @param {BatchRedeemRequest} requestParameters Request parameters.
581
+ * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
582
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
583
+ * @memberof RedeemApi
584
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}
585
+ */
586
+ async batchRedeem(requestParameters) {
587
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchRedeem(requestParameters?.walletAddress, requestParameters?.walletId, requestParameters?.tokenIds, requestParameters?.chainId);
588
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
589
+ }
590
+ /**
591
+ * Query the on-chain transaction status of a previously submitted redeem request.
592
+ *
593
+ * Weight(IP): 200
594
+ *
595
+ * Security Type: USER_DATA
596
+ *
597
+ * Response Notes:
598
+ * - Status values:
599
+ *
600
+ * | Value | Description |
601
+ * | ----------- | -------------------------------------------- |
602
+ * | `PENDING` | Transaction submitted, awaiting confirmation |
603
+ * | `CONFIRMED` | Transaction confirmed on-chain |
604
+ * | `FAILED` | Transaction failed |
605
+ * | `NOT_FOUND` | Transaction hash not found |
606
+ *
607
+ * @summary Get Redeem Status
608
+ * @param {GetRedeemStatusRequest} requestParameters Request parameters.
609
+ * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
610
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
611
+ * @memberof RedeemApi
612
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}
613
+ */
614
+ async getRedeemStatus(requestParameters) {
615
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getRedeemStatus(requestParameters?.walletAddress, requestParameters?.txHash, requestParameters?.recvWindow);
616
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
617
+ }
618
+ };
619
+
620
+ //#endregion
621
+ //#region src/rest-api/modules/trade-api.ts
622
+ /**
623
+ * Prediction Trading REST API
624
+ *
625
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
626
+ *
627
+ * The version of the OpenAPI document: 1.0.0
628
+ *
629
+ *
630
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
631
+ * https://openapi-generator.tech
632
+ * Do not edit the class manually.
633
+ */
634
+ /**
635
+ * TradeApi - axios parameter creator
636
+ */
637
+ const TradeApiAxiosParamCreator = function(configuration) {
638
+ return {
639
+ batchCancelOrders: async (walletAddress, walletId, cancelInfoList) => {
640
+ (0, __binance_common.assertParamExists)("batchCancelOrders", "walletAddress", walletAddress);
641
+ (0, __binance_common.assertParamExists)("batchCancelOrders", "walletId", walletId);
642
+ const localVarQueryParameter = {};
643
+ const localVarBodyParameter = {};
644
+ const localVarHeaderParameter = {};
645
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
646
+ if (walletId !== void 0 && walletId !== null) localVarQueryParameter["walletId"] = walletId;
647
+ if (cancelInfoList) localVarQueryParameter["cancelInfoList"] = cancelInfoList;
648
+ let _timeUnit;
649
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
650
+ return {
651
+ endpoint: "/sapi/v1/w3w/wallet/prediction/trade/batch-cancel",
652
+ method: "POST",
653
+ queryParams: localVarQueryParameter,
654
+ bodyParams: localVarBodyParameter,
655
+ headerParams: localVarHeaderParameter,
656
+ timeUnit: _timeUnit
657
+ };
658
+ },
659
+ getQuote: async (walletAddress, tokenId, side, amountIn, orderType, slippageBps, priceLimit, chainId, feeRateBps, fundingSource, fundTransferAmount) => {
660
+ (0, __binance_common.assertParamExists)("getQuote", "walletAddress", walletAddress);
661
+ (0, __binance_common.assertParamExists)("getQuote", "tokenId", tokenId);
662
+ (0, __binance_common.assertParamExists)("getQuote", "side", side);
663
+ (0, __binance_common.assertParamExists)("getQuote", "amountIn", amountIn);
664
+ (0, __binance_common.assertParamExists)("getQuote", "orderType", orderType);
665
+ (0, __binance_common.assertParamExists)("getQuote", "slippageBps", slippageBps);
666
+ const localVarQueryParameter = {};
667
+ const localVarBodyParameter = {};
668
+ const localVarHeaderParameter = {};
669
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
670
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
671
+ if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
672
+ if (amountIn !== void 0 && amountIn !== null) localVarQueryParameter["amountIn"] = amountIn;
673
+ if (orderType !== void 0 && orderType !== null) localVarQueryParameter["orderType"] = orderType;
674
+ if (slippageBps !== void 0 && slippageBps !== null) localVarQueryParameter["slippageBps"] = slippageBps;
675
+ if (priceLimit !== void 0 && priceLimit !== null) localVarQueryParameter["priceLimit"] = priceLimit;
676
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
677
+ if (feeRateBps !== void 0 && feeRateBps !== null) localVarQueryParameter["feeRateBps"] = feeRateBps;
678
+ if (fundingSource !== void 0 && fundingSource !== null) localVarQueryParameter["fundingSource"] = fundingSource;
679
+ if (fundTransferAmount !== void 0 && fundTransferAmount !== null) localVarQueryParameter["fundTransferAmount"] = fundTransferAmount;
680
+ let _timeUnit;
681
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
682
+ return {
683
+ endpoint: "/sapi/v1/w3w/wallet/prediction/trade/get-quote",
684
+ method: "POST",
685
+ queryParams: localVarQueryParameter,
686
+ bodyParams: localVarBodyParameter,
687
+ headerParams: localVarHeaderParameter,
688
+ timeUnit: _timeUnit
689
+ };
690
+ },
691
+ placeOrder: async (walletAddress, walletId, quoteId, timeInForce, accountType, orderType, slippageBps, priceLimit, fundingSource, fundTransferAmount) => {
692
+ (0, __binance_common.assertParamExists)("placeOrder", "walletAddress", walletAddress);
693
+ (0, __binance_common.assertParamExists)("placeOrder", "walletId", walletId);
694
+ (0, __binance_common.assertParamExists)("placeOrder", "quoteId", quoteId);
695
+ (0, __binance_common.assertParamExists)("placeOrder", "timeInForce", timeInForce);
696
+ (0, __binance_common.assertParamExists)("placeOrder", "accountType", accountType);
697
+ (0, __binance_common.assertParamExists)("placeOrder", "orderType", orderType);
698
+ (0, __binance_common.assertParamExists)("placeOrder", "slippageBps", slippageBps);
699
+ const localVarQueryParameter = {};
700
+ const localVarBodyParameter = {};
701
+ const localVarHeaderParameter = {};
702
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
703
+ if (walletId !== void 0 && walletId !== null) localVarQueryParameter["walletId"] = walletId;
704
+ if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
705
+ if (timeInForce !== void 0 && timeInForce !== null) localVarQueryParameter["timeInForce"] = timeInForce;
706
+ if (accountType !== void 0 && accountType !== null) localVarQueryParameter["accountType"] = accountType;
707
+ if (orderType !== void 0 && orderType !== null) localVarQueryParameter["orderType"] = orderType;
708
+ if (slippageBps !== void 0 && slippageBps !== null) localVarQueryParameter["slippageBps"] = slippageBps;
709
+ if (priceLimit !== void 0 && priceLimit !== null) localVarQueryParameter["priceLimit"] = priceLimit;
710
+ if (fundingSource !== void 0 && fundingSource !== null) localVarQueryParameter["fundingSource"] = fundingSource;
711
+ if (fundTransferAmount !== void 0 && fundTransferAmount !== null) localVarQueryParameter["fundTransferAmount"] = fundTransferAmount;
712
+ let _timeUnit;
713
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
714
+ return {
715
+ endpoint: "/sapi/v1/w3w/wallet/prediction/trade/place-order-bundle",
716
+ method: "POST",
717
+ queryParams: localVarQueryParameter,
718
+ bodyParams: localVarBodyParameter,
719
+ headerParams: localVarHeaderParameter,
720
+ timeUnit: _timeUnit
721
+ };
722
+ },
723
+ queryActiveOrders: async (walletAddress, tradeSide, l1Category, marketId, offset, limit, recvWindow) => {
724
+ (0, __binance_common.assertParamExists)("queryActiveOrders", "walletAddress", walletAddress);
725
+ const localVarQueryParameter = {};
726
+ const localVarBodyParameter = {};
727
+ const localVarHeaderParameter = {};
728
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
729
+ if (tradeSide !== void 0 && tradeSide !== null) localVarQueryParameter["tradeSide"] = tradeSide;
730
+ if (l1Category !== void 0 && l1Category !== null) localVarQueryParameter["l1Category"] = l1Category;
731
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
732
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
733
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
734
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
735
+ let _timeUnit;
736
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
737
+ return {
738
+ endpoint: "/sapi/v1/w3w/wallet/prediction/order/list",
739
+ method: "GET",
740
+ queryParams: localVarQueryParameter,
741
+ bodyParams: localVarBodyParameter,
742
+ headerParams: localVarHeaderParameter,
743
+ timeUnit: _timeUnit
744
+ };
745
+ },
746
+ queryOrderHistory: async (walletAddress, l1Category, orderType, status, startDate, endDate, offset, limit, recvWindow) => {
747
+ (0, __binance_common.assertParamExists)("queryOrderHistory", "walletAddress", walletAddress);
748
+ const localVarQueryParameter = {};
749
+ const localVarBodyParameter = {};
750
+ const localVarHeaderParameter = {};
751
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
752
+ if (l1Category !== void 0 && l1Category !== null) localVarQueryParameter["l1Category"] = l1Category;
753
+ if (orderType !== void 0 && orderType !== null) localVarQueryParameter["orderType"] = orderType;
754
+ if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
755
+ if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
756
+ if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
757
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
758
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
759
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
760
+ let _timeUnit;
761
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
762
+ return {
763
+ endpoint: "/sapi/v1/w3w/wallet/prediction/order/history",
764
+ method: "GET",
765
+ queryParams: localVarQueryParameter,
766
+ bodyParams: localVarBodyParameter,
767
+ headerParams: localVarHeaderParameter,
768
+ timeUnit: _timeUnit
769
+ };
770
+ }
771
+ };
772
+ };
773
+ /**
774
+ * TradeApi - object-oriented interface
775
+ * @class TradeApi
776
+ */
777
+ var TradeApi = class {
778
+ constructor(configuration) {
779
+ this.configuration = configuration;
780
+ this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
781
+ }
782
+ /**
783
+ * Cancel one or more active prediction orders in a single request. Requires SAS authorization.
784
+ *
785
+ **Known Issue — Bracket Encoding Incompatibility:**
786
+ * 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.
787
+ *
788
+ **Workarounds** (use low-level HTTP APIs that do not normalize URLs):
789
+ * - **Python:** use `http.client` (stdlib) and hand-build the body string.
790
+ * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.
791
+ * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.
792
+ *
793
+ * Weight(IP): 200
794
+ *
795
+ * Security Type: TRADE
796
+ *
797
+ * Notes:
798
+ * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
799
+ * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
800
+ *
801
+ * @summary Batch Cancel Orders
802
+ * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
803
+ * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
804
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
805
+ * @memberof TradeApi
806
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}
807
+ */
808
+ async batchCancelOrders(requestParameters) {
809
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.batchCancelOrders(requestParameters?.walletAddress, requestParameters?.walletId, requestParameters?.cancelInfoList);
810
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
811
+ }
812
+ /**
813
+ * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.
814
+ *
815
+ * Weight(IP): 200
816
+ *
817
+ * Security Type: TRADE
818
+ *
819
+ * Response Notes:
820
+ * - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds.
821
+ * - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders.
822
+ *
823
+ * @summary Get Quote
824
+ * @param {GetQuoteRequest} requestParameters Request parameters.
825
+ * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
826
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
827
+ * @memberof TradeApi
828
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}
829
+ */
830
+ async getQuote(requestParameters) {
831
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuote(requestParameters?.walletAddress, requestParameters?.tokenId, requestParameters?.side, requestParameters?.amountIn, requestParameters?.orderType, requestParameters?.slippageBps, requestParameters?.priceLimit, requestParameters?.chainId, requestParameters?.feeRateBps, requestParameters?.fundingSource, requestParameters?.fundTransferAmount);
832
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
833
+ }
834
+ /**
835
+ * Place a prediction order using a previously obtained quote. Requires SAS authorization.
836
+ *
837
+ * Weight(IP): 200
838
+ *
839
+ * Security Type: TRADE
840
+ *
841
+ * Notes:
842
+ * - Validation rules:
843
+ *
844
+ * | orderType | timeInForce | priceLimit |
845
+ * | --------- | ------------- | --------------------- |
846
+ * | `MARKET` | Must be `FOK` | Not required |
847
+ * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
848
+ *
849
+ * @summary Place Order
850
+ * @param {PlaceOrderRequest} requestParameters Request parameters.
851
+ * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
852
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
853
+ * @memberof TradeApi
854
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}
855
+ */
856
+ async placeOrder(requestParameters) {
857
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeOrder(requestParameters?.walletAddress, requestParameters?.walletId, requestParameters?.quoteId, requestParameters?.timeInForce, requestParameters?.accountType, requestParameters?.orderType, requestParameters?.slippageBps, requestParameters?.priceLimit, requestParameters?.fundingSource, requestParameters?.fundTransferAmount);
858
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
859
+ }
860
+ /**
861
+ * Get active (open) prediction orders for the authenticated user.
862
+ *
863
+ * Weight(IP): 200
864
+ *
865
+ * Security Type: USER_DATA
866
+ *
867
+ * @summary Query Active Orders
868
+ * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
869
+ * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
870
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
871
+ * @memberof TradeApi
872
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}
873
+ */
874
+ async queryActiveOrders(requestParameters) {
875
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryActiveOrders(requestParameters?.walletAddress, requestParameters?.tradeSide, requestParameters?.l1Category, requestParameters?.marketId, requestParameters?.offset, requestParameters?.limit, requestParameters?.recvWindow);
876
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
877
+ }
878
+ /**
879
+ * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.
880
+ *
881
+ * Weight(IP): 200
882
+ *
883
+ * Security Type: USER_DATA
884
+ *
885
+ * @summary Query Order History
886
+ * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
887
+ * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
888
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
889
+ * @memberof TradeApi
890
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}
891
+ */
892
+ async queryOrderHistory(requestParameters) {
893
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderHistory(requestParameters?.walletAddress, requestParameters?.l1Category, requestParameters?.orderType, requestParameters?.status, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.offset, requestParameters?.limit, requestParameters?.recvWindow);
894
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
895
+ }
896
+ };
897
+ let GetQuoteSideEnum = /* @__PURE__ */ function(GetQuoteSideEnum$1) {
898
+ GetQuoteSideEnum$1["BUY"] = "BUY";
899
+ GetQuoteSideEnum$1["SELL"] = "SELL";
900
+ return GetQuoteSideEnum$1;
901
+ }({});
902
+ let GetQuoteOrderTypeEnum = /* @__PURE__ */ function(GetQuoteOrderTypeEnum$1) {
903
+ GetQuoteOrderTypeEnum$1["MARKET"] = "MARKET";
904
+ GetQuoteOrderTypeEnum$1["LIMIT"] = "LIMIT";
905
+ return GetQuoteOrderTypeEnum$1;
906
+ }({});
907
+ let GetQuoteFundingSourceEnum = /* @__PURE__ */ function(GetQuoteFundingSourceEnum$1) {
908
+ GetQuoteFundingSourceEnum$1["MPC"] = "MPC";
909
+ GetQuoteFundingSourceEnum$1["CEX"] = "CEX";
910
+ return GetQuoteFundingSourceEnum$1;
911
+ }({});
912
+ let PlaceOrderAccountTypeEnum = /* @__PURE__ */ function(PlaceOrderAccountTypeEnum$1) {
913
+ PlaceOrderAccountTypeEnum$1["SPOT"] = "SPOT";
914
+ PlaceOrderAccountTypeEnum$1["FUNDING"] = "FUNDING";
915
+ return PlaceOrderAccountTypeEnum$1;
916
+ }({});
917
+ let PlaceOrderOrderTypeEnum = /* @__PURE__ */ function(PlaceOrderOrderTypeEnum$1) {
918
+ PlaceOrderOrderTypeEnum$1["MARKET"] = "MARKET";
919
+ PlaceOrderOrderTypeEnum$1["LIMIT"] = "LIMIT";
920
+ return PlaceOrderOrderTypeEnum$1;
921
+ }({});
922
+ let PlaceOrderFundingSourceEnum = /* @__PURE__ */ function(PlaceOrderFundingSourceEnum$1) {
923
+ PlaceOrderFundingSourceEnum$1["MPC"] = "MPC";
924
+ PlaceOrderFundingSourceEnum$1["CEX"] = "CEX";
925
+ return PlaceOrderFundingSourceEnum$1;
926
+ }({});
927
+ let QueryActiveOrdersTradeSideEnum = /* @__PURE__ */ function(QueryActiveOrdersTradeSideEnum$1) {
928
+ QueryActiveOrdersTradeSideEnum$1["BUY"] = "BUY";
929
+ QueryActiveOrdersTradeSideEnum$1["SELL"] = "SELL";
930
+ return QueryActiveOrdersTradeSideEnum$1;
931
+ }({});
932
+ let QueryOrderHistoryOrderTypeEnum = /* @__PURE__ */ function(QueryOrderHistoryOrderTypeEnum$1) {
933
+ QueryOrderHistoryOrderTypeEnum$1["MARKET"] = "MARKET";
934
+ QueryOrderHistoryOrderTypeEnum$1["LIMIT"] = "LIMIT";
935
+ return QueryOrderHistoryOrderTypeEnum$1;
936
+ }({});
937
+
938
+ //#endregion
939
+ //#region src/rest-api/modules/transfer-api.ts
940
+ /**
941
+ * Prediction Trading REST API
942
+ *
943
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
944
+ *
945
+ * The version of the OpenAPI document: 1.0.0
946
+ *
947
+ *
948
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
949
+ * https://openapi-generator.tech
950
+ * Do not edit the class manually.
951
+ */
952
+ /**
953
+ * TransferApi - axios parameter creator
954
+ */
955
+ const TransferApiAxiosParamCreator = function(configuration) {
956
+ return {
957
+ createInboundTransfer: async (walletId, walletAddress, fromTokenAmount, accountType, fromToken, toToken, chainId) => {
958
+ (0, __binance_common.assertParamExists)("createInboundTransfer", "walletId", walletId);
959
+ (0, __binance_common.assertParamExists)("createInboundTransfer", "walletAddress", walletAddress);
960
+ (0, __binance_common.assertParamExists)("createInboundTransfer", "fromTokenAmount", fromTokenAmount);
961
+ (0, __binance_common.assertParamExists)("createInboundTransfer", "accountType", accountType);
962
+ const localVarQueryParameter = {};
963
+ const localVarBodyParameter = {};
964
+ const localVarHeaderParameter = {};
965
+ if (walletId !== void 0 && walletId !== null) localVarQueryParameter["walletId"] = walletId;
966
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
967
+ if (fromTokenAmount !== void 0 && fromTokenAmount !== null) localVarQueryParameter["fromTokenAmount"] = fromTokenAmount;
968
+ if (accountType !== void 0 && accountType !== null) localVarQueryParameter["accountType"] = accountType;
969
+ if (fromToken !== void 0 && fromToken !== null) localVarQueryParameter["fromToken"] = fromToken;
970
+ if (toToken !== void 0 && toToken !== null) localVarQueryParameter["toToken"] = toToken;
971
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
972
+ let _timeUnit;
973
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
974
+ return {
975
+ endpoint: "/sapi/v1/w3w/wallet/prediction/transfer/inbound",
976
+ method: "POST",
977
+ queryParams: localVarQueryParameter,
978
+ bodyParams: localVarBodyParameter,
979
+ headerParams: localVarHeaderParameter,
980
+ timeUnit: _timeUnit
981
+ };
982
+ },
983
+ createOutboundTransfer: async (walletId, walletAddress, fromTokenAmount, accountType, sourceBiz, fromToken, toToken, chainId) => {
984
+ (0, __binance_common.assertParamExists)("createOutboundTransfer", "walletId", walletId);
985
+ (0, __binance_common.assertParamExists)("createOutboundTransfer", "walletAddress", walletAddress);
986
+ (0, __binance_common.assertParamExists)("createOutboundTransfer", "fromTokenAmount", fromTokenAmount);
987
+ (0, __binance_common.assertParamExists)("createOutboundTransfer", "accountType", accountType);
988
+ (0, __binance_common.assertParamExists)("createOutboundTransfer", "sourceBiz", sourceBiz);
989
+ const localVarQueryParameter = {};
990
+ const localVarBodyParameter = {};
991
+ const localVarHeaderParameter = {};
992
+ if (walletId !== void 0 && walletId !== null) localVarQueryParameter["walletId"] = walletId;
993
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
994
+ if (fromTokenAmount !== void 0 && fromTokenAmount !== null) localVarQueryParameter["fromTokenAmount"] = fromTokenAmount;
995
+ if (accountType !== void 0 && accountType !== null) localVarQueryParameter["accountType"] = accountType;
996
+ if (sourceBiz !== void 0 && sourceBiz !== null) localVarQueryParameter["sourceBiz"] = sourceBiz;
997
+ if (fromToken !== void 0 && fromToken !== null) localVarQueryParameter["fromToken"] = fromToken;
998
+ if (toToken !== void 0 && toToken !== null) localVarQueryParameter["toToken"] = toToken;
999
+ if (chainId !== void 0 && chainId !== null) localVarQueryParameter["chainId"] = chainId;
1000
+ let _timeUnit;
1001
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1002
+ return {
1003
+ endpoint: "/sapi/v1/w3w/wallet/prediction/transfer/outbound",
1004
+ method: "POST",
1005
+ queryParams: localVarQueryParameter,
1006
+ bodyParams: localVarBodyParameter,
1007
+ headerParams: localVarHeaderParameter,
1008
+ timeUnit: _timeUnit
1009
+ };
1010
+ },
1011
+ queryTransferList: async (walletAddress, startDate, endDate, tokenSymbol, direction, offset, limit, recvWindow) => {
1012
+ (0, __binance_common.assertParamExists)("queryTransferList", "walletAddress", walletAddress);
1013
+ (0, __binance_common.assertParamExists)("queryTransferList", "startDate", startDate);
1014
+ (0, __binance_common.assertParamExists)("queryTransferList", "endDate", endDate);
1015
+ const localVarQueryParameter = {};
1016
+ const localVarBodyParameter = {};
1017
+ const localVarHeaderParameter = {};
1018
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
1019
+ if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
1020
+ if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
1021
+ if (tokenSymbol !== void 0 && tokenSymbol !== null) localVarQueryParameter["tokenSymbol"] = tokenSymbol;
1022
+ if (direction !== void 0 && direction !== null) localVarQueryParameter["direction"] = direction;
1023
+ if (offset !== void 0 && offset !== null) localVarQueryParameter["offset"] = offset;
1024
+ if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
1025
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1026
+ let _timeUnit;
1027
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1028
+ return {
1029
+ endpoint: "/sapi/v1/w3w/wallet/prediction/transfer/list",
1030
+ method: "GET",
1031
+ queryParams: localVarQueryParameter,
1032
+ bodyParams: localVarBodyParameter,
1033
+ headerParams: localVarHeaderParameter,
1034
+ timeUnit: _timeUnit
1035
+ };
1036
+ },
1037
+ queryTransferStatus: async (transferId, recvWindow) => {
1038
+ (0, __binance_common.assertParamExists)("queryTransferStatus", "transferId", transferId);
1039
+ const localVarQueryParameter = {};
1040
+ const localVarBodyParameter = {};
1041
+ const localVarHeaderParameter = {};
1042
+ if (transferId !== void 0 && transferId !== null) localVarQueryParameter["transferId"] = transferId;
1043
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1044
+ let _timeUnit;
1045
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1046
+ return {
1047
+ endpoint: "/sapi/v1/w3w/wallet/prediction/transfer/status",
1048
+ method: "GET",
1049
+ queryParams: localVarQueryParameter,
1050
+ bodyParams: localVarBodyParameter,
1051
+ headerParams: localVarHeaderParameter,
1052
+ timeUnit: _timeUnit
1053
+ };
1054
+ }
1055
+ };
1056
+ };
1057
+ /**
1058
+ * TransferApi - object-oriented interface
1059
+ * @class TransferApi
1060
+ */
1061
+ var TransferApi = class {
1062
+ constructor(configuration) {
1063
+ this.configuration = configuration;
1064
+ this.localVarAxiosParamCreator = TransferApiAxiosParamCreator(configuration);
1065
+ }
1066
+ /**
1067
+ * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1068
+ *
1069
+ * ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint.
1070
+ *
1071
+ * Weight(IP): 200
1072
+ *
1073
+ * Security Type: TRADE
1074
+ *
1075
+ * @summary Create Inbound Transfer
1076
+ * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1077
+ * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
1078
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1079
+ * @memberof TransferApi
1080
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}
1081
+ */
1082
+ async createInboundTransfer(requestParameters) {
1083
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.createInboundTransfer(requestParameters?.walletId, requestParameters?.walletAddress, requestParameters?.fromTokenAmount, requestParameters?.accountType, requestParameters?.fromToken, requestParameters?.toToken, requestParameters?.chainId);
1084
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1085
+ }
1086
+ /**
1087
+ * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.
1088
+ *
1089
+ * Weight(IP): 200
1090
+ *
1091
+ * Security Type: TRADE
1092
+ *
1093
+ * @summary Create Outbound Transfer
1094
+ * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1095
+ * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
1096
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1097
+ * @memberof TransferApi
1098
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}
1099
+ */
1100
+ async createOutboundTransfer(requestParameters) {
1101
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.createOutboundTransfer(requestParameters?.walletId, requestParameters?.walletAddress, requestParameters?.fromTokenAmount, requestParameters?.accountType, requestParameters?.sourceBiz, requestParameters?.fromToken, requestParameters?.toToken, requestParameters?.chainId);
1102
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1103
+ }
1104
+ /**
1105
+ * Get the authenticated user's prediction wallet transfer history within a date range.
1106
+ *
1107
+ * Weight(IP): 200
1108
+ *
1109
+ * Security Type: USER_DATA
1110
+ *
1111
+ * @summary Query Transfer List
1112
+ * @param {QueryTransferListRequest} requestParameters Request parameters.
1113
+ * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
1114
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1115
+ * @memberof TransferApi
1116
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}
1117
+ */
1118
+ async queryTransferList(requestParameters) {
1119
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferList(requestParameters?.walletAddress, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.tokenSymbol, requestParameters?.direction, requestParameters?.offset, requestParameters?.limit, requestParameters?.recvWindow);
1120
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1121
+ }
1122
+ /**
1123
+ * Query the current status of a prediction wallet transfer by transfer ID.
1124
+ *
1125
+ **`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.
1126
+ *
1127
+ * Weight(IP): 200
1128
+ *
1129
+ * Security Type: USER_DATA
1130
+ *
1131
+ * @summary Query Transfer Status
1132
+ * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1133
+ * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
1134
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1135
+ * @memberof TransferApi
1136
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}
1137
+ */
1138
+ async queryTransferStatus(requestParameters) {
1139
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryTransferStatus(requestParameters?.transferId, requestParameters?.recvWindow);
1140
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1141
+ }
1142
+ };
1143
+ let CreateInboundTransferAccountTypeEnum = /* @__PURE__ */ function(CreateInboundTransferAccountTypeEnum$1) {
1144
+ CreateInboundTransferAccountTypeEnum$1["SPOT"] = "SPOT";
1145
+ CreateInboundTransferAccountTypeEnum$1["FUNDING"] = "FUNDING";
1146
+ return CreateInboundTransferAccountTypeEnum$1;
1147
+ }({});
1148
+ let CreateOutboundTransferAccountTypeEnum = /* @__PURE__ */ function(CreateOutboundTransferAccountTypeEnum$1) {
1149
+ CreateOutboundTransferAccountTypeEnum$1["SPOT"] = "SPOT";
1150
+ CreateOutboundTransferAccountTypeEnum$1["FUNDING"] = "FUNDING";
1151
+ return CreateOutboundTransferAccountTypeEnum$1;
1152
+ }({});
1153
+ let CreateOutboundTransferSourceBizEnum = /* @__PURE__ */ function(CreateOutboundTransferSourceBizEnum$1) {
1154
+ CreateOutboundTransferSourceBizEnum$1["USER_TRANSFER"] = "USER_TRANSFER";
1155
+ CreateOutboundTransferSourceBizEnum$1["PREDICTION_BUY"] = "PREDICTION_BUY";
1156
+ return CreateOutboundTransferSourceBizEnum$1;
1157
+ }({});
1158
+ let QueryTransferListDirectionEnum = /* @__PURE__ */ function(QueryTransferListDirectionEnum$1) {
1159
+ QueryTransferListDirectionEnum$1["INBOUND"] = "INBOUND";
1160
+ QueryTransferListDirectionEnum$1["OUTBOUND"] = "OUTBOUND";
1161
+ return QueryTransferListDirectionEnum$1;
1162
+ }({});
1163
+
1164
+ //#endregion
1165
+ //#region src/rest-api/modules/wallet-api.ts
1166
+ /**
1167
+ * Prediction Trading REST API
1168
+ *
1169
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
1170
+ *
1171
+ * The version of the OpenAPI document: 1.0.0
1172
+ *
1173
+ *
1174
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1175
+ * https://openapi-generator.tech
1176
+ * Do not edit the class manually.
1177
+ */
1178
+ /**
1179
+ * WalletApi - axios parameter creator
1180
+ */
1181
+ const WalletApiAxiosParamCreator = function(configuration) {
1182
+ return {
1183
+ getPortfolio: async (walletAddress, tokenId, marketId, marketTopicId, activeOnly, recvWindow) => {
1184
+ (0, __binance_common.assertParamExists)("getPortfolio", "walletAddress", walletAddress);
1185
+ const localVarQueryParameter = {};
1186
+ const localVarBodyParameter = {};
1187
+ const localVarHeaderParameter = {};
1188
+ if (walletAddress !== void 0 && walletAddress !== null) localVarQueryParameter["walletAddress"] = walletAddress;
1189
+ if (tokenId !== void 0 && tokenId !== null) localVarQueryParameter["tokenId"] = tokenId;
1190
+ if (marketId !== void 0 && marketId !== null) localVarQueryParameter["marketId"] = marketId;
1191
+ if (marketTopicId !== void 0 && marketTopicId !== null) localVarQueryParameter["marketTopicId"] = marketTopicId;
1192
+ if (activeOnly !== void 0 && activeOnly !== null) localVarQueryParameter["activeOnly"] = activeOnly;
1193
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1194
+ let _timeUnit;
1195
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1196
+ return {
1197
+ endpoint: "/sapi/v1/w3w/wallet/prediction/pnl/portfolio",
1198
+ method: "GET",
1199
+ queryParams: localVarQueryParameter,
1200
+ bodyParams: localVarBodyParameter,
1201
+ headerParams: localVarHeaderParameter,
1202
+ timeUnit: _timeUnit
1203
+ };
1204
+ },
1205
+ getQuotaStatus: async (recvWindow) => {
1206
+ const localVarQueryParameter = {};
1207
+ const localVarBodyParameter = {};
1208
+ const localVarHeaderParameter = {};
1209
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1210
+ let _timeUnit;
1211
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1212
+ return {
1213
+ endpoint: "/sapi/v1/w3w/wallet/prediction/quota/limit/status",
1214
+ method: "GET",
1215
+ queryParams: localVarQueryParameter,
1216
+ bodyParams: localVarBodyParameter,
1217
+ headerParams: localVarHeaderParameter,
1218
+ timeUnit: _timeUnit
1219
+ };
1220
+ },
1221
+ listPredictionWallets: async (recvWindow) => {
1222
+ const localVarQueryParameter = {};
1223
+ const localVarBodyParameter = {};
1224
+ const localVarHeaderParameter = {};
1225
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1226
+ let _timeUnit;
1227
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1228
+ return {
1229
+ endpoint: "/sapi/v1/w3w/wallet/prediction/wallet/list",
1230
+ method: "GET",
1231
+ queryParams: localVarQueryParameter,
1232
+ bodyParams: localVarBodyParameter,
1233
+ headerParams: localVarHeaderParameter,
1234
+ timeUnit: _timeUnit
1235
+ };
1236
+ },
1237
+ queryPaymentOptionBalances: async (recvWindow) => {
1238
+ const localVarQueryParameter = {};
1239
+ const localVarBodyParameter = {};
1240
+ const localVarHeaderParameter = {};
1241
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
1242
+ let _timeUnit;
1243
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1244
+ return {
1245
+ endpoint: "/sapi/v1/w3w/wallet/prediction/balance/payment-options",
1246
+ method: "GET",
1247
+ queryParams: localVarQueryParameter,
1248
+ bodyParams: localVarBodyParameter,
1249
+ headerParams: localVarHeaderParameter,
1250
+ timeUnit: _timeUnit
1251
+ };
1252
+ }
1253
+ };
1254
+ };
1255
+ /**
1256
+ * WalletApi - object-oriented interface
1257
+ * @class WalletApi
1258
+ */
1259
+ var WalletApi = class {
1260
+ constructor(configuration) {
1261
+ this.configuration = configuration;
1262
+ this.localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration);
1263
+ }
1264
+ /**
1265
+ * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.
1266
+ *
1267
+ * Weight(IP): 200
1268
+ *
1269
+ * Security Type: USER_DATA
1270
+ *
1271
+ * @summary Get Portfolio
1272
+ * @param {GetPortfolioRequest} requestParameters Request parameters.
1273
+ * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
1274
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1275
+ * @memberof WalletApi
1276
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}
1277
+ */
1278
+ async getPortfolio(requestParameters) {
1279
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPortfolio(requestParameters?.walletAddress, requestParameters?.tokenId, requestParameters?.marketId, requestParameters?.marketTopicId, requestParameters?.activeOnly, requestParameters?.recvWindow);
1280
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1281
+ }
1282
+ /**
1283
+ * Query the current user's daily trading quota limit and remaining allowance for prediction markets.
1284
+ *
1285
+ * Weight(IP): 200
1286
+ *
1287
+ * Security Type: USER_DATA
1288
+ *
1289
+ * @summary Get Quota Status
1290
+ * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1291
+ * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
1292
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1293
+ * @memberof WalletApi
1294
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}
1295
+ */
1296
+ async getQuotaStatus(requestParameters = {}) {
1297
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getQuotaStatus(requestParameters?.recvWindow);
1298
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1299
+ }
1300
+ /**
1301
+ * Get all prediction wallets registered for the authenticated user.
1302
+ *
1303
+ * Weight(IP): 200
1304
+ *
1305
+ * Security Type: USER_DATA
1306
+ *
1307
+ * @summary List Prediction Wallets
1308
+ * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1309
+ * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
1310
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1311
+ * @memberof WalletApi
1312
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}
1313
+ */
1314
+ async listPredictionWallets(requestParameters = {}) {
1315
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.listPredictionWallets(requestParameters?.recvWindow);
1316
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1317
+ }
1318
+ /**
1319
+ * Get available balances for each payment option that can be used for prediction trading.
1320
+ *
1321
+ * Weight(IP): 200
1322
+ *
1323
+ * Security Type: USER_DATA
1324
+ *
1325
+ * @summary Query Payment Option Balances
1326
+ * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1327
+ * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
1328
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1329
+ * @memberof WalletApi
1330
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}
1331
+ */
1332
+ async queryPaymentOptionBalances(requestParameters = {}) {
1333
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryPaymentOptionBalances(requestParameters?.recvWindow);
1334
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1335
+ }
1336
+ };
1337
+
1338
+ //#endregion
1339
+ //#region src/rest-api/rest-api.ts
1340
+ /**
1341
+ * Prediction Trading REST API
1342
+ *
1343
+ * Place and manage prediction market orders, query positions, and transfer funds via the Prediction Trading REST API.
1344
+ *
1345
+ * The version of the OpenAPI document: 1.0.0
1346
+ *
1347
+ *
1348
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1349
+ * https://openapi-generator.tech
1350
+ * Do not edit the class manually.
1351
+ */
1352
+ var RestAPI = class {
1353
+ constructor(configuration) {
1354
+ this.configuration = configuration;
1355
+ this.marketDataApi = new MarketDataApi(configuration);
1356
+ this.positionApi = new PositionApi(configuration);
1357
+ this.redeemApi = new RedeemApi(configuration);
1358
+ this.tradeApi = new TradeApi(configuration);
1359
+ this.transferApi = new TransferApi(configuration);
1360
+ this.walletApi = new WalletApi(configuration);
1361
+ }
1362
+ /**
1363
+ * Generic function to send a request.
1364
+ * @param endpoint - The API endpoint to call.
1365
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
1366
+ * @param queryParams - Query parameters for the request.
1367
+ * @param bodyParams - Body parameters for the request.
1368
+ *
1369
+ * @returns A promise resolving to the response data object.
1370
+ */
1371
+ sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
1372
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
1373
+ }
1374
+ /**
1375
+ * Generic function to send a signed request.
1376
+ * @param endpoint - The API endpoint to call.
1377
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
1378
+ * @param queryParams - Query parameters for the request.
1379
+ * @param bodyParams - Body parameters for the request.
1380
+ *
1381
+ * @returns A promise resolving to the response data object.
1382
+ */
1383
+ sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
1384
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
1385
+ }
1386
+ /**
1387
+ * Get full details for a specific prediction market topic, including variant data and timeline.
1388
+ *
1389
+ * Weight(IP): 200
1390
+ *
1391
+ * @summary Get Market Detail
1392
+ * @param {GetMarketDetailRequest} requestParameters Request parameters.
1393
+ *
1394
+ * @returns {Promise<RestApiResponse<GetMarketDetailResponse>>}
1395
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1396
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail Binance API Documentation}
1397
+ */
1398
+ getMarketDetail(requestParameters) {
1399
+ return this.marketDataApi.getMarketDetail(requestParameters);
1400
+ }
1401
+ /**
1402
+ * Get all available prediction market categories (L1 and L2).
1403
+ *
1404
+ * Weight(IP): 200
1405
+ *
1406
+ * @summary List Prediction Categories
1407
+ *
1408
+ * @returns {Promise<RestApiResponse<ListPredictionCategoriesResponse>>}
1409
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1410
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories Binance API Documentation}
1411
+ */
1412
+ listPredictionCategories() {
1413
+ return this.marketDataApi.listPredictionCategories();
1414
+ }
1415
+ /**
1416
+ * Get a paginated list of prediction market topics, with optional category and sort filters.
1417
+ *
1418
+ * Weight(IP): 200
1419
+ *
1420
+ * @summary List Prediction Markets
1421
+ * @param {ListPredictionMarketsRequest} requestParameters Request parameters.
1422
+ *
1423
+ * @returns {Promise<RestApiResponse<ListPredictionMarketsResponse>>}
1424
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1425
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets Binance API Documentation}
1426
+ */
1427
+ listPredictionMarkets(requestParameters = {}) {
1428
+ return this.marketDataApi.listPredictionMarkets(requestParameters);
1429
+ }
1430
+ /**
1431
+ * Semantic search for prediction market topics by keyword.
1432
+ *
1433
+ * Weight(IP): 200
1434
+ *
1435
+ * @summary Market Search
1436
+ * @param {MarketSearchRequest} requestParameters Request parameters.
1437
+ *
1438
+ * @returns {Promise<RestApiResponse<MarketSearchResponse>>}
1439
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1440
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search Binance API Documentation}
1441
+ */
1442
+ marketSearch(requestParameters) {
1443
+ return this.marketDataApi.marketSearch(requestParameters);
1444
+ }
1445
+ /**
1446
+ * Get the most recent trade price for a prediction market.
1447
+ *
1448
+ * Weight(IP): 200
1449
+ *
1450
+ * @summary Query Last Trade Price
1451
+ * @param {QueryLastTradePriceRequest} requestParameters Request parameters.
1452
+ *
1453
+ * @returns {Promise<RestApiResponse<QueryLastTradePriceResponse>>}
1454
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1455
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price Binance API Documentation}
1456
+ */
1457
+ queryLastTradePrice(requestParameters) {
1458
+ return this.marketDataApi.queryLastTradePrice(requestParameters);
1459
+ }
1460
+ /**
1461
+ * Get the current order book (bids and asks) for a specific prediction market outcome token.
1462
+ *
1463
+ * Weight(IP): 200
1464
+ *
1465
+ * @summary Query Order Book
1466
+ * @param {QueryOrderBookRequest} requestParameters Request parameters.
1467
+ *
1468
+ * @returns {Promise<RestApiResponse<QueryOrderBookResponse>>}
1469
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1470
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book Binance API Documentation}
1471
+ */
1472
+ queryOrderBook(requestParameters) {
1473
+ return this.marketDataApi.queryOrderBook(requestParameters);
1474
+ }
1475
+ /**
1476
+ * Get the authenticated user's position detail for a specific prediction token.
1477
+ *
1478
+ * Weight(IP): 200
1479
+ *
1480
+ * Security Type: USER_DATA
1481
+ *
1482
+ * @summary Get Position by Token
1483
+ * @param {GetPositionByTokenRequest} requestParameters Request parameters.
1484
+ *
1485
+ * @returns {Promise<RestApiResponse<GetPositionByTokenResponse>>}
1486
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1487
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#get-position-by-token Binance API Documentation}
1488
+ */
1489
+ getPositionByToken(requestParameters) {
1490
+ return this.positionApi.getPositionByToken(requestParameters);
1491
+ }
1492
+ /**
1493
+ * 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`.
1494
+ *
1495
+ * Weight(IP): 200
1496
+ *
1497
+ * Security Type: USER_DATA
1498
+ *
1499
+ * @summary Query PnL
1500
+ * @param {QueryPnLRequest} requestParameters Request parameters.
1501
+ *
1502
+ * @returns {Promise<RestApiResponse<QueryPnLResponse>>}
1503
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1504
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-pn-l Binance API Documentation}
1505
+ */
1506
+ queryPnL(requestParameters) {
1507
+ return this.positionApi.queryPnL(requestParameters);
1508
+ }
1509
+ /**
1510
+ * Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.
1511
+ *
1512
+ * Weight(IP): 200
1513
+ *
1514
+ * Security Type: USER_DATA
1515
+ *
1516
+ * @summary Query Positions
1517
+ * @param {QueryPositionsRequest} requestParameters Request parameters.
1518
+ *
1519
+ * @returns {Promise<RestApiResponse<QueryPositionsResponse>>}
1520
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1521
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions Binance API Documentation}
1522
+ */
1523
+ queryPositions(requestParameters) {
1524
+ return this.positionApi.queryPositions(requestParameters);
1525
+ }
1526
+ /**
1527
+ * Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.
1528
+ *
1529
+ * Weight(IP): 200
1530
+ *
1531
+ * Security Type: USER_DATA
1532
+ *
1533
+ * @summary Query Positions by Filter
1534
+ * @param {QueryPositionsByFilterRequest} requestParameters Request parameters.
1535
+ *
1536
+ * @returns {Promise<RestApiResponse<QueryPositionsByFilterResponse>>}
1537
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1538
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-positions-by-filter Binance API Documentation}
1539
+ */
1540
+ queryPositionsByFilter(requestParameters = {}) {
1541
+ return this.positionApi.queryPositionsByFilter(requestParameters);
1542
+ }
1543
+ /**
1544
+ * Get the authenticated user's settled (resolved) prediction position history with optional filters.
1545
+ *
1546
+ * Weight(IP): 200
1547
+ *
1548
+ * Security Type: USER_DATA
1549
+ *
1550
+ * @summary Query Settled Position History
1551
+ * @param {QuerySettledPositionHistoryRequest} requestParameters Request parameters.
1552
+ *
1553
+ * @returns {Promise<RestApiResponse<QuerySettledPositionHistoryResponse>>}
1554
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1555
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/position#query-settled-position-history Binance API Documentation}
1556
+ */
1557
+ querySettledPositionHistory(requestParameters) {
1558
+ return this.positionApi.querySettledPositionHistory(requestParameters);
1559
+ }
1560
+ /**
1561
+ * Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.
1562
+ *
1563
+ * Weight(IP): 200
1564
+ *
1565
+ * Security Type: TRADE
1566
+ *
1567
+ * @summary Batch Redeem
1568
+ * @param {BatchRedeemRequest} requestParameters Request parameters.
1569
+ *
1570
+ * @returns {Promise<RestApiResponse<BatchRedeemResponse>>}
1571
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1572
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#batch-redeem Binance API Documentation}
1573
+ */
1574
+ batchRedeem(requestParameters) {
1575
+ return this.redeemApi.batchRedeem(requestParameters);
1576
+ }
1577
+ /**
1578
+ * Query the on-chain transaction status of a previously submitted redeem request.
1579
+ *
1580
+ * Weight(IP): 200
1581
+ *
1582
+ * Security Type: USER_DATA
1583
+ *
1584
+ * Response Notes:
1585
+ * - Status values:
1586
+ *
1587
+ * | Value | Description |
1588
+ * | ----------- | -------------------------------------------- |
1589
+ * | `PENDING` | Transaction submitted, awaiting confirmation |
1590
+ * | `CONFIRMED` | Transaction confirmed on-chain |
1591
+ * | `FAILED` | Transaction failed |
1592
+ * | `NOT_FOUND` | Transaction hash not found |
1593
+ *
1594
+ * @summary Get Redeem Status
1595
+ * @param {GetRedeemStatusRequest} requestParameters Request parameters.
1596
+ *
1597
+ * @returns {Promise<RestApiResponse<GetRedeemStatusResponse>>}
1598
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1599
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/redeem#get-redeem-status Binance API Documentation}
1600
+ */
1601
+ getRedeemStatus(requestParameters) {
1602
+ return this.redeemApi.getRedeemStatus(requestParameters);
1603
+ }
1604
+ /**
1605
+ * Cancel one or more active prediction orders in a single request. Requires SAS authorization.
1606
+ *
1607
+ **Known Issue — Bracket Encoding Incompatibility:**
1608
+ * 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.
1609
+ *
1610
+ **Workarounds** (use low-level HTTP APIs that do not normalize URLs):
1611
+ * - **Python:** use `http.client` (stdlib) and hand-build the body string.
1612
+ * - **Java:** use `HttpURLConnection` and write the raw body bytes directly.
1613
+ * - **Go:** use `strings.NewReader` with a hand-built body instead of `url.Values.Encode()`.
1614
+ *
1615
+ * Weight(IP): 200
1616
+ *
1617
+ * Security Type: TRADE
1618
+ *
1619
+ * Notes:
1620
+ * - Use dot notation for nested list fields: `cancelInfoList[0].orderId`, `cancelInfoList[1].orderId`, etc.
1621
+ * - `vendor` does not need to be supplied. The server automatically sets the correct vendor (`predict_fun`) for every item in the batch.
1622
+ *
1623
+ * @summary Batch Cancel Orders
1624
+ * @param {BatchCancelOrdersRequest} requestParameters Request parameters.
1625
+ *
1626
+ * @returns {Promise<RestApiResponse<BatchCancelOrdersResponse>>}
1627
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1628
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#batch-cancel-orders Binance API Documentation}
1629
+ */
1630
+ batchCancelOrders(requestParameters) {
1631
+ return this.tradeApi.batchCancelOrders(requestParameters);
1632
+ }
1633
+ /**
1634
+ * Get a price quote for a prediction order. The returned `quoteId` must be used in the subsequent Place Order request.
1635
+ *
1636
+ * Weight(IP): 200
1637
+ *
1638
+ * Security Type: TRADE
1639
+ *
1640
+ * Response Notes:
1641
+ * - `feeAmount` is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. `feeDiscountBps` is also a string to allow fractional basis-point values in the future. `feeRateBps` and `slippageBps` are integers and will never exceed safe integer bounds.
1642
+ * - **MARKET order minimum amount:** For `MARKET` orders, `amountIn` must be at least approximately **1.5 USDT** (in wei: `1500000000000000000`). The exact minimum varies by market liquidity. If the amount is too small, the server returns `-9000 Your order amount is too small`. This limit does **not** apply to `LIMIT` orders.
1643
+ *
1644
+ * @summary Get Quote
1645
+ * @param {GetQuoteRequest} requestParameters Request parameters.
1646
+ *
1647
+ * @returns {Promise<RestApiResponse<GetQuoteResponse>>}
1648
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1649
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#get-quote Binance API Documentation}
1650
+ */
1651
+ getQuote(requestParameters) {
1652
+ return this.tradeApi.getQuote(requestParameters);
1653
+ }
1654
+ /**
1655
+ * Place a prediction order using a previously obtained quote. Requires SAS authorization.
1656
+ *
1657
+ * Weight(IP): 200
1658
+ *
1659
+ * Security Type: TRADE
1660
+ *
1661
+ * Notes:
1662
+ * - Validation rules:
1663
+ *
1664
+ * | orderType | timeInForce | priceLimit |
1665
+ * | --------- | ------------- | --------------------- |
1666
+ * | `MARKET` | Must be `FOK` | Not required |
1667
+ * | `LIMIT` | Must be `GTC` | Required, must be > 0 |
1668
+ *
1669
+ * @summary Place Order
1670
+ * @param {PlaceOrderRequest} requestParameters Request parameters.
1671
+ *
1672
+ * @returns {Promise<RestApiResponse<PlaceOrderResponse>>}
1673
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1674
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#place-order Binance API Documentation}
1675
+ */
1676
+ placeOrder(requestParameters) {
1677
+ return this.tradeApi.placeOrder(requestParameters);
1678
+ }
1679
+ /**
1680
+ * Get active (open) prediction orders for the authenticated user.
1681
+ *
1682
+ * Weight(IP): 200
1683
+ *
1684
+ * Security Type: USER_DATA
1685
+ *
1686
+ * @summary Query Active Orders
1687
+ * @param {QueryActiveOrdersRequest} requestParameters Request parameters.
1688
+ *
1689
+ * @returns {Promise<RestApiResponse<QueryActiveOrdersResponse>>}
1690
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1691
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-active-orders Binance API Documentation}
1692
+ */
1693
+ queryActiveOrders(requestParameters) {
1694
+ return this.tradeApi.queryActiveOrders(requestParameters);
1695
+ }
1696
+ /**
1697
+ * Get historical prediction orders (all statuses) for the authenticated user, with optional filters.
1698
+ *
1699
+ * Weight(IP): 200
1700
+ *
1701
+ * Security Type: USER_DATA
1702
+ *
1703
+ * @summary Query Order History
1704
+ * @param {QueryOrderHistoryRequest} requestParameters Request parameters.
1705
+ *
1706
+ * @returns {Promise<RestApiResponse<QueryOrderHistoryResponse>>}
1707
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1708
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/trade#query-order-history Binance API Documentation}
1709
+ */
1710
+ queryOrderHistory(requestParameters) {
1711
+ return this.tradeApi.queryOrderHistory(requestParameters);
1712
+ }
1713
+ /**
1714
+ * Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
1715
+ *
1716
+ * ⚠️ **SAS Authorization Required:** This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with `-31003 SAS authorization required`. Enable SAS for your wallet before calling this endpoint.
1717
+ *
1718
+ * Weight(IP): 200
1719
+ *
1720
+ * Security Type: TRADE
1721
+ *
1722
+ * @summary Create Inbound Transfer
1723
+ * @param {CreateInboundTransferRequest} requestParameters Request parameters.
1724
+ *
1725
+ * @returns {Promise<RestApiResponse<CreateInboundTransferResponse>>}
1726
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1727
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-inbound-transfer Binance API Documentation}
1728
+ */
1729
+ createInboundTransfer(requestParameters) {
1730
+ return this.transferApi.createInboundTransfer(requestParameters);
1731
+ }
1732
+ /**
1733
+ * Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.
1734
+ *
1735
+ * Weight(IP): 200
1736
+ *
1737
+ * Security Type: TRADE
1738
+ *
1739
+ * @summary Create Outbound Transfer
1740
+ * @param {CreateOutboundTransferRequest} requestParameters Request parameters.
1741
+ *
1742
+ * @returns {Promise<RestApiResponse<CreateOutboundTransferResponse>>}
1743
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1744
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#create-outbound-transfer Binance API Documentation}
1745
+ */
1746
+ createOutboundTransfer(requestParameters) {
1747
+ return this.transferApi.createOutboundTransfer(requestParameters);
1748
+ }
1749
+ /**
1750
+ * Get the authenticated user's prediction wallet transfer history within a date range.
1751
+ *
1752
+ * Weight(IP): 200
1753
+ *
1754
+ * Security Type: USER_DATA
1755
+ *
1756
+ * @summary Query Transfer List
1757
+ * @param {QueryTransferListRequest} requestParameters Request parameters.
1758
+ *
1759
+ * @returns {Promise<RestApiResponse<QueryTransferListResponse>>}
1760
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1761
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-list Binance API Documentation}
1762
+ */
1763
+ queryTransferList(requestParameters) {
1764
+ return this.transferApi.queryTransferList(requestParameters);
1765
+ }
1766
+ /**
1767
+ * Query the current status of a prediction wallet transfer by transfer ID.
1768
+ *
1769
+ **`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.
1770
+ *
1771
+ * Weight(IP): 200
1772
+ *
1773
+ * Security Type: USER_DATA
1774
+ *
1775
+ * @summary Query Transfer Status
1776
+ * @param {QueryTransferStatusRequest} requestParameters Request parameters.
1777
+ *
1778
+ * @returns {Promise<RestApiResponse<QueryTransferStatusResponse>>}
1779
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1780
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/transfer#query-transfer-status Binance API Documentation}
1781
+ */
1782
+ queryTransferStatus(requestParameters) {
1783
+ return this.transferApi.queryTransferStatus(requestParameters);
1784
+ }
1785
+ /**
1786
+ * Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.
1787
+ *
1788
+ * Weight(IP): 200
1789
+ *
1790
+ * Security Type: USER_DATA
1791
+ *
1792
+ * @summary Get Portfolio
1793
+ * @param {GetPortfolioRequest} requestParameters Request parameters.
1794
+ *
1795
+ * @returns {Promise<RestApiResponse<GetPortfolioResponse>>}
1796
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1797
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-portfolio Binance API Documentation}
1798
+ */
1799
+ getPortfolio(requestParameters) {
1800
+ return this.walletApi.getPortfolio(requestParameters);
1801
+ }
1802
+ /**
1803
+ * Query the current user's daily trading quota limit and remaining allowance for prediction markets.
1804
+ *
1805
+ * Weight(IP): 200
1806
+ *
1807
+ * Security Type: USER_DATA
1808
+ *
1809
+ * @summary Get Quota Status
1810
+ * @param {GetQuotaStatusRequest} requestParameters Request parameters.
1811
+ *
1812
+ * @returns {Promise<RestApiResponse<GetQuotaStatusResponse>>}
1813
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1814
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#get-quota-status Binance API Documentation}
1815
+ */
1816
+ getQuotaStatus(requestParameters = {}) {
1817
+ return this.walletApi.getQuotaStatus(requestParameters);
1818
+ }
1819
+ /**
1820
+ * Get all prediction wallets registered for the authenticated user.
1821
+ *
1822
+ * Weight(IP): 200
1823
+ *
1824
+ * Security Type: USER_DATA
1825
+ *
1826
+ * @summary List Prediction Wallets
1827
+ * @param {ListPredictionWalletsRequest} requestParameters Request parameters.
1828
+ *
1829
+ * @returns {Promise<RestApiResponse<ListPredictionWalletsResponse>>}
1830
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1831
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#list-prediction-wallets Binance API Documentation}
1832
+ */
1833
+ listPredictionWallets(requestParameters = {}) {
1834
+ return this.walletApi.listPredictionWallets(requestParameters);
1835
+ }
1836
+ /**
1837
+ * Get available balances for each payment option that can be used for prediction trading.
1838
+ *
1839
+ * Weight(IP): 200
1840
+ *
1841
+ * Security Type: USER_DATA
1842
+ *
1843
+ * @summary Query Payment Option Balances
1844
+ * @param {QueryPaymentOptionBalancesRequest} requestParameters Request parameters.
1845
+ *
1846
+ * @returns {Promise<RestApiResponse<QueryPaymentOptionBalancesResponse>>}
1847
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1848
+ * @see {@link https://developers.binance.com/en/dev-docs/catalog/web3-wallet-prediction-trading/api/rest-api/wallet#query-payment-option-balances Binance API Documentation}
1849
+ */
1850
+ queryPaymentOptionBalances(requestParameters = {}) {
1851
+ return this.walletApi.queryPaymentOptionBalances(requestParameters);
1852
+ }
1853
+ };
1854
+
1855
+ //#endregion
1856
+ //#region src/rest-api/index.ts
1857
+ var rest_api_exports = /* @__PURE__ */ __export({
1858
+ CreateInboundTransferAccountTypeEnum: () => CreateInboundTransferAccountTypeEnum,
1859
+ CreateOutboundTransferAccountTypeEnum: () => CreateOutboundTransferAccountTypeEnum,
1860
+ CreateOutboundTransferSourceBizEnum: () => CreateOutboundTransferSourceBizEnum,
1861
+ GetQuoteFundingSourceEnum: () => GetQuoteFundingSourceEnum,
1862
+ GetQuoteOrderTypeEnum: () => GetQuoteOrderTypeEnum,
1863
+ GetQuoteSideEnum: () => GetQuoteSideEnum,
1864
+ ListPredictionMarketsOrderByEnum: () => ListPredictionMarketsOrderByEnum,
1865
+ ListPredictionMarketsSortByEnum: () => ListPredictionMarketsSortByEnum,
1866
+ MarketDataApi: () => MarketDataApi,
1867
+ PlaceOrderAccountTypeEnum: () => PlaceOrderAccountTypeEnum,
1868
+ PlaceOrderFundingSourceEnum: () => PlaceOrderFundingSourceEnum,
1869
+ PlaceOrderOrderTypeEnum: () => PlaceOrderOrderTypeEnum,
1870
+ PositionApi: () => PositionApi,
1871
+ QueryActiveOrdersTradeSideEnum: () => QueryActiveOrdersTradeSideEnum,
1872
+ QueryOrderHistoryOrderTypeEnum: () => QueryOrderHistoryOrderTypeEnum,
1873
+ QueryTransferListDirectionEnum: () => QueryTransferListDirectionEnum,
1874
+ RedeemApi: () => RedeemApi,
1875
+ RestAPI: () => RestAPI,
1876
+ TradeApi: () => TradeApi,
1877
+ TransferApi: () => TransferApi,
1878
+ WalletApi: () => WalletApi
1879
+ });
1880
+
1881
+ //#endregion
1882
+ //#region src/w3w-prediction.ts
1883
+ var W3WPrediction = class {
1884
+ constructor(config) {
1885
+ const userAgent = (0, __binance_common.buildUserAgent)(name, version);
1886
+ if (config?.configurationRestAPI) {
1887
+ const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
1888
+ configRestAPI.basePath = configRestAPI.basePath || __binance_common.W3W_PREDICTION_REST_API_PROD_URL;
1889
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
1890
+ configRestAPI.baseOptions.headers = {
1891
+ ...configRestAPI.baseOptions.headers || {},
1892
+ "User-Agent": userAgent
1893
+ };
1894
+ this.restAPI = new RestAPI(configRestAPI);
1895
+ }
1896
+ }
1897
+ };
1898
+
1899
+ //#endregion
1900
+ Object.defineProperty(exports, 'BadRequestError', {
1901
+ enumerable: true,
1902
+ get: function () {
1903
+ return __binance_common.BadRequestError;
1904
+ }
1905
+ });
1906
+ Object.defineProperty(exports, 'ConnectorClientError', {
1907
+ enumerable: true,
1908
+ get: function () {
1909
+ return __binance_common.ConnectorClientError;
1910
+ }
1911
+ });
1912
+ Object.defineProperty(exports, 'ForbiddenError', {
1913
+ enumerable: true,
1914
+ get: function () {
1915
+ return __binance_common.ForbiddenError;
1916
+ }
1917
+ });
1918
+ Object.defineProperty(exports, 'NetworkError', {
1919
+ enumerable: true,
1920
+ get: function () {
1921
+ return __binance_common.NetworkError;
1922
+ }
1923
+ });
1924
+ Object.defineProperty(exports, 'NotFoundError', {
1925
+ enumerable: true,
1926
+ get: function () {
1927
+ return __binance_common.NotFoundError;
1928
+ }
1929
+ });
1930
+ Object.defineProperty(exports, 'RateLimitBanError', {
1931
+ enumerable: true,
1932
+ get: function () {
1933
+ return __binance_common.RateLimitBanError;
1934
+ }
1935
+ });
1936
+ Object.defineProperty(exports, 'RequiredError', {
1937
+ enumerable: true,
1938
+ get: function () {
1939
+ return __binance_common.RequiredError;
1940
+ }
1941
+ });
1942
+ Object.defineProperty(exports, 'ServerError', {
1943
+ enumerable: true,
1944
+ get: function () {
1945
+ return __binance_common.ServerError;
1946
+ }
1947
+ });
1948
+ Object.defineProperty(exports, 'TooManyRequestsError', {
1949
+ enumerable: true,
1950
+ get: function () {
1951
+ return __binance_common.TooManyRequestsError;
1952
+ }
1953
+ });
1954
+ Object.defineProperty(exports, 'UnauthorizedError', {
1955
+ enumerable: true,
1956
+ get: function () {
1957
+ return __binance_common.UnauthorizedError;
1958
+ }
1959
+ });
1960
+ exports.W3WPrediction = W3WPrediction;
1961
+ Object.defineProperty(exports, 'W3WPredictionRestAPI', {
1962
+ enumerable: true,
1963
+ get: function () {
1964
+ return rest_api_exports;
1965
+ }
1966
+ });
1967
+ Object.defineProperty(exports, 'W3W_PREDICTION_REST_API_PROD_URL', {
1968
+ enumerable: true,
1969
+ get: function () {
1970
+ return __binance_common.W3W_PREDICTION_REST_API_PROD_URL;
1971
+ }
1972
+ });
1973
+ //# sourceMappingURL=index.js.map