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