@polymarket/client 0.1.0-beta.1 → 0.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as _polymarket_bindings from '@polymarket/bindings';
2
- import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, TransactionId } from '@polymarket/bindings';
2
+ import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, PositionId, TransactionId } from '@polymarket/bindings';
3
3
  import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, TxHash } from '@polymarket/types';
4
4
  import { WalletType, Event, TagReference, Market, Series, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, Profile, SearchTag } from '@polymarket/bindings/gamma';
5
5
  import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
@@ -7,7 +7,8 @@ import { ZodError, z } from 'zod';
7
7
  import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
8
8
  import { ClobTrade, NotificationsResponse, BuilderTrade, Prices, OrderBook, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
9
9
  import * as _polymarket_bindings_data from '@polymarket/bindings/data';
10
- import { MetaMarketPosition, Position, ClosedPosition, Value, Traded, Activity, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder, Trade } from '@polymarket/bindings/data';
10
+ import { Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, Activity, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder, Trade } from '@polymarket/bindings/data';
11
+ import { RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId } from '@polymarket/bindings/rfq';
11
12
  import { CommentsEvent, CryptoPricesTopic, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, CryptoPricesEvent } from '@polymarket/bindings/subscriptions';
12
13
  import { Hex } from 'ox';
13
14
 
@@ -157,7 +158,7 @@ declare const FetchExecuteParamsError: {
157
158
  * Fetches the parameters needed to prepare a low-level transaction submission.
158
159
  *
159
160
  * @remarks
160
- * This is a low-level action that most SDK consumers will not need.
161
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
161
162
  *
162
163
  * @throws {@link FetchExecuteParamsError}
163
164
  * Thrown on failure.
@@ -167,32 +168,35 @@ declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
167
168
  transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.TransactionId, string>>;
168
169
  }, z.core.$strip>;
169
170
  type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
170
- declare const IsGaslessReadyRequestSchema: z.ZodObject<{
171
+ declare const IsWalletDeployedRequestSchema: z.ZodObject<{
171
172
  wallet: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
172
173
  type: z.ZodEnum<typeof WalletType>;
173
174
  }, z.core.$strip>;
174
- type IsGaslessReadyRequest = z.input<typeof IsGaslessReadyRequestSchema>;
175
- type IsGaslessReadyError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
176
- declare const IsGaslessReadyError: {
175
+ type IsWalletDeployedRequest = z.input<typeof IsWalletDeployedRequestSchema>;
176
+ type IsWalletDeployedError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
177
+ declare const IsWalletDeployedError: {
177
178
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
178
179
  };
179
180
  /**
180
- * Checks whether a wallet is ready for gasless transactions.
181
+ * Checks whether a wallet is deployed for relayer-backed transactions.
182
+ *
183
+ * It only checks deployment status; it does not check trading approvals or complete
184
+ * order-readiness.
181
185
  *
182
186
  * @remarks
183
- * This is a low-level action that most SDK consumers will not need.
187
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
184
188
  *
185
- * @throws {@link IsGaslessReadyError}
189
+ * @throws {@link IsWalletDeployedError}
186
190
  * Thrown on failure.
187
191
  *
188
192
  * @example
189
193
  * ```ts
190
- * const ready = await isGaslessReady(client, {
194
+ * const deployed = await isWalletDeployed(client, {
191
195
  * wallet: '0x1234...',
192
196
  * });
193
197
  * ```
194
198
  */
195
- declare function isGaslessReady(client: BaseClient, request?: IsGaslessReadyRequest): Promise<boolean>;
199
+ declare function isWalletDeployed(client: BaseClient, request?: IsWalletDeployedRequest): Promise<boolean>;
196
200
  declare const GaslessTransactionMetadataSchema: z.ZodString;
197
201
  type DeployDepositWalletError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
198
202
  declare const DeployDepositWalletError: {
@@ -202,7 +206,7 @@ declare const DeployDepositWalletError: {
202
206
  * Deploys a Deposit Wallet for the authenticated signer.
203
207
  *
204
208
  * @remarks
205
- * This is a low-level action that most SDK consumers will not need.
209
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
206
210
  *
207
211
  * @throws {@link DeployDepositWalletError}
208
212
  * Thrown on failure.
@@ -212,7 +216,7 @@ declare function deployDepositWallet(client: BaseSecureClient): Promise<Transact
212
216
  * Fetches a submitted transaction.
213
217
  *
214
218
  * @remarks
215
- * This is a low-level action that most SDK consumers will not need.
219
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
216
220
  *
217
221
  * @throws {@link FetchGaslessTransactionError}
218
222
  * Thrown on failure.
@@ -245,7 +249,7 @@ declare const PrepareGaslessTransactionError: {
245
249
  * Starts preparing a low-level transaction workflow from one or more calls.
246
250
  *
247
251
  * @remarks
248
- * This is a low-level action that most SDK consumers will not need.
252
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
249
253
  *
250
254
  * @throws {@link PrepareGaslessTransactionError}
251
255
  * Thrown on failure.
@@ -269,6 +273,270 @@ type Paginated<T> = AsyncIterable<Page<T>> & {
269
273
  from(cursor?: PaginationCursor): Paginated<T>;
270
274
  };
271
275
 
276
+ declare const ListPositionsRequestSchema: z.ZodObject<{
277
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
278
+ user: z.ZodString;
279
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
281
+ sizeThreshold: z.ZodOptional<z.ZodNumber>;
282
+ redeemable: z.ZodOptional<z.ZodBoolean>;
283
+ mergeable: z.ZodOptional<z.ZodBoolean>;
284
+ pageSize: z.ZodDefault<z.ZodNumber>;
285
+ sortBy: z.ZodOptional<z.ZodEnum<{
286
+ CURRENT: "CURRENT";
287
+ INITIAL: "INITIAL";
288
+ TOKENS: "TOKENS";
289
+ CASHPNL: "CASHPNL";
290
+ PERCENTPNL: "PERCENTPNL";
291
+ TITLE: "TITLE";
292
+ RESOLVING: "RESOLVING";
293
+ PRICE: "PRICE";
294
+ AVGPRICE: "AVGPRICE";
295
+ }>>;
296
+ sortDirection: z.ZodOptional<z.ZodEnum<{
297
+ ASC: "ASC";
298
+ DESC: "DESC";
299
+ }>>;
300
+ title: z.ZodOptional<z.ZodString>;
301
+ }, z.core.$strip>;
302
+ declare const ListClosedPositionsRequestSchema: z.ZodObject<{
303
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
304
+ user: z.ZodString;
305
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
306
+ title: z.ZodOptional<z.ZodString>;
307
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
308
+ pageSize: z.ZodDefault<z.ZodNumber>;
309
+ sortBy: z.ZodOptional<z.ZodEnum<{
310
+ TITLE: "TITLE";
311
+ PRICE: "PRICE";
312
+ AVGPRICE: "AVGPRICE";
313
+ REALIZEDPNL: "REALIZEDPNL";
314
+ TIMESTAMP: "TIMESTAMP";
315
+ }>>;
316
+ sortDirection: z.ZodOptional<z.ZodEnum<{
317
+ ASC: "ASC";
318
+ DESC: "DESC";
319
+ }>>;
320
+ }, z.core.$strip>;
321
+ declare const ListComboPositionsRequestSchema: z.ZodObject<{
322
+ cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
323
+ user: z.ZodString;
324
+ pageSize: z.ZodDefault<z.ZodNumber>;
325
+ status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
326
+ conditionId: z.ZodOptional<z.ZodString>;
327
+ positionId: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strip>;
329
+ declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
330
+ user: z.ZodString;
331
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
+ }, z.core.$strip>;
333
+ declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
334
+ user: z.ZodString;
335
+ }, z.core.$strip>;
336
+ declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
337
+ user: z.ZodString;
338
+ }, z.core.$strip>;
339
+ type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
340
+ type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
341
+ type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
342
+ type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
343
+ type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
344
+ type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
345
+ type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
346
+ declare const ListPositionsError: {
347
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
348
+ };
349
+ /**
350
+ * Lists current positions for a wallet.
351
+ *
352
+ * @remarks
353
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
354
+ *
355
+ * @throws {@link ListPositionsError}
356
+ * Thrown on failure.
357
+ *
358
+ * @example
359
+ * Fetch the first page of results:
360
+ * ```ts
361
+ * const result = listPositions(client, {
362
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
363
+ * pageSize: 10,
364
+ * });
365
+ *
366
+ * const firstPage = await result.firstPage();
367
+ *
368
+ * // Optionally, fetch additional pages:
369
+ * for await (const page of result.from(firstPage.nextCursor)) {
370
+ * // page.items: Position[]
371
+ * }
372
+ * ```
373
+ *
374
+ * @example
375
+ * Loop through all pages with `for await`:
376
+ * ```ts
377
+ * const result = listPositions(client, {
378
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
379
+ * pageSize: 10,
380
+ * });
381
+ *
382
+ * for await (const page of result) {
383
+ * // page.items: Position[]
384
+ * }
385
+ * ```
386
+ */
387
+ declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
388
+ type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
389
+ declare const ListClosedPositionsError: {
390
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
391
+ };
392
+ type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
393
+ declare const ListComboPositionsError: {
394
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
395
+ };
396
+ /**
397
+ * Lists closed positions for a wallet.
398
+ *
399
+ * @remarks
400
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
401
+ *
402
+ * @throws {@link ListClosedPositionsError}
403
+ * Thrown on failure.
404
+ *
405
+ * @example
406
+ * Fetch the first page of results:
407
+ * ```ts
408
+ * const result = listClosedPositions(client, {
409
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
410
+ * pageSize: 10,
411
+ * });
412
+ *
413
+ * const firstPage = await result.firstPage();
414
+ *
415
+ * // Optionally, fetch additional pages:
416
+ * for await (const page of result.from(firstPage.nextCursor)) {
417
+ * // page.items: ClosedPosition[]
418
+ * }
419
+ * ```
420
+ *
421
+ * @example
422
+ * Loop through all pages with `for await`:
423
+ * ```ts
424
+ * const result = listClosedPositions(client, {
425
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
426
+ * pageSize: 10,
427
+ * });
428
+ *
429
+ * for await (const page of result) {
430
+ * // page.items: ClosedPosition[]
431
+ * }
432
+ * ```
433
+ */
434
+ declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
435
+ /**
436
+ * Lists combo positions for a wallet.
437
+ *
438
+ * @remarks
439
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
440
+ *
441
+ * @throws {@link ListComboPositionsError}
442
+ * Thrown on failure.
443
+ *
444
+ * @example
445
+ * Fetch the first page of results:
446
+ * ```ts
447
+ * const result = listComboPositions(client, {
448
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
449
+ * pageSize: 10,
450
+ * });
451
+ *
452
+ * const firstPage = await result.firstPage();
453
+ *
454
+ * // Optionally, fetch additional pages:
455
+ * for await (const page of result.from(firstPage.nextCursor)) {
456
+ * // page.items: ComboPosition[]
457
+ * }
458
+ * ```
459
+ *
460
+ * @example
461
+ * Filter to open combo positions:
462
+ * ```ts
463
+ * const result = listComboPositions(client, {
464
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
465
+ * status: ComboPositionStatus.Open,
466
+ * });
467
+ * ```
468
+ */
469
+ declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
470
+ type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
471
+ declare const FetchPortfolioValueError: {
472
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
473
+ };
474
+ /**
475
+ * Fetches the total value for a wallet's positions.
476
+ *
477
+ * @remarks
478
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
479
+ *
480
+ * @throws {@link FetchPortfolioValueError}
481
+ * Thrown on failure.
482
+ *
483
+ * @example
484
+ * ```ts
485
+ * const value = await fetchPortfolioValue(client, {
486
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
487
+ * });
488
+ *
489
+ * // value: Value[]
490
+ * ```
491
+ */
492
+ declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
493
+ type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
494
+ declare const FetchTradedMarketCountError: {
495
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
496
+ };
497
+ /**
498
+ * Fetches the total number of markets a wallet has traded.
499
+ *
500
+ * @remarks
501
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
502
+ *
503
+ * @throws {@link FetchTradedMarketCountError}
504
+ * Thrown on failure.
505
+ *
506
+ * @example
507
+ * ```ts
508
+ * const traded = await fetchTradedMarketCount(client, {
509
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
510
+ * });
511
+ *
512
+ * // traded === Traded
513
+ * ```
514
+ */
515
+ declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
516
+ type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
517
+ declare const DownloadAccountingSnapshotError: {
518
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
519
+ };
520
+ /**
521
+ * Downloads an accounting snapshot archive for a wallet.
522
+ *
523
+ * @remarks
524
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
525
+ *
526
+ * @throws {@link DownloadAccountingSnapshotError}
527
+ * Thrown on failure.
528
+ *
529
+ * @example
530
+ * ```ts
531
+ * const snapshot = await downloadAccountingSnapshot(client, {
532
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
533
+ * });
534
+ *
535
+ * // snapshot === Blob
536
+ * ```
537
+ */
538
+ declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
539
+
272
540
  type DefaultAccountWallet<TRequest extends {
273
541
  user: string;
274
542
  }> = Prettify<Omit<TRequest, 'user'> & {
@@ -281,6 +549,7 @@ type DefaultAccountWallet<TRequest extends {
281
549
  }>;
282
550
  type SecureListPositionsRequest = DefaultAccountWallet<ListPositionsRequest>;
283
551
  type SecureListClosedPositionsRequest = DefaultAccountWallet<ListClosedPositionsRequest>;
552
+ type SecureListComboPositionsRequest = DefaultAccountWallet<ListComboPositionsRequest>;
284
553
  type SecureFetchPortfolioValueRequest = DefaultAccountWallet<FetchPortfolioValueRequest>;
285
554
  type SecureFetchTradedMarketCountRequest = DefaultAccountWallet<FetchTradedMarketCountRequest>;
286
555
  type SecureDownloadAccountingSnapshotRequest = DefaultAccountWallet<DownloadAccountingSnapshotRequest>;
@@ -396,6 +665,24 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
396
665
  * ```
397
666
  */
398
667
  listClosedPositions(request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
668
+ /**
669
+ * Lists combo positions for a wallet.
670
+ *
671
+ * @throws {@link ListComboPositionsError}
672
+ * Thrown on failure.
673
+ *
674
+ * @example
675
+ * Fetch the first page of results:
676
+ * ```ts
677
+ * const paginator = client.listComboPositions({
678
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
679
+ * pageSize: 10,
680
+ * });
681
+ *
682
+ * const firstPage = await paginator.firstPage();
683
+ * ```
684
+ */
685
+ listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
399
686
  /**
400
687
  * Fetches the total value for a wallet's positions.
401
688
  *
@@ -504,6 +791,15 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
504
791
  * Thrown on failure.
505
792
  */
506
793
  listClosedPositions(request?: SecureListClosedPositionsRequest): Paginated<ClosedPosition[]>;
794
+ /**
795
+ * Lists combo positions for a wallet.
796
+ *
797
+ * Defaults to the authenticated account's wallet when `user` is omitted.
798
+ *
799
+ * @throws {@link ListComboPositionsError}
800
+ * Thrown on failure.
801
+ */
802
+ listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
507
803
  /**
508
804
  * Fetches the total value for a wallet's positions.
509
805
  *
@@ -980,6 +1276,8 @@ type DiscoveryActions = {
980
1276
  /**
981
1277
  * Lists events.
982
1278
  *
1279
+ * Defaults to open events. Pass `closed: true` to list settled events.
1280
+ *
983
1281
  * @throws {@link ListEventsError}
984
1282
  * Thrown on failure.
985
1283
  *
@@ -1100,7 +1398,7 @@ type DiscoveryActions = {
1100
1398
  * });
1101
1399
  *
1102
1400
  * const marketByUrl = await client.fetchMarket({
1103
- * url: 'https://polymarket.com/market/some-market-slug',
1401
+ * url: 'https://polymarket.com/event/some-market-slug',
1104
1402
  * });
1105
1403
  * ```
1106
1404
  */
@@ -1630,6 +1928,353 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
1630
1928
  declare function rewardsActions(client: BasePublicClient): PublicRewardsActions;
1631
1929
  declare function rewardsActions(client: BaseSecureClient): SecureRewardsActions;
1632
1930
 
1931
+ /**
1932
+ * Plain-data reference identifying a submitted RFQ quote.
1933
+ *
1934
+ * @remarks
1935
+ * This identifies the quote; it does not imply execution or guarantee that a
1936
+ * later cancellation request can withdraw it.
1937
+ */
1938
+ type RfqQuoteReference = Omit<RfqQuoteAck, 'type'>;
1939
+ /** Acknowledgement that a quote cancellation request was processed. */
1940
+ type RfqCancelQuoteAck = Omit<RfqQuoteCancelAck, 'type'>;
1941
+ type RfqConfirmationAck = Omit<RfqConfirmationAck$1, 'decision' | 'type'>;
1942
+ type RfqQuoteSource = 'collateral' | 'inventory';
1943
+ type RfqQuoteResponse = {
1944
+ /** Quote price in pUSD per outcome token, for example `0.45` or `"0.45"`. */
1945
+ price: number | string;
1946
+ /**
1947
+ * How the maker wants to fund the quote.
1948
+ *
1949
+ * @remarks
1950
+ * For a BUY request (BUY YES):
1951
+ * - `inventory` sells YES tokens from the maker's inventory at `price`.
1952
+ * - `collateral` buys NO tokens with collateral at `1 - price`.
1953
+ *
1954
+ * For a SELL request (SELL YES):
1955
+ * - `inventory` sells NO tokens from the maker's inventory at `1 - price`.
1956
+ * - `collateral` buys YES tokens with collateral at `price`.
1957
+ *
1958
+ * When omitted, the SDK uses `collateral`.
1959
+ *
1960
+ * @defaultValue `'collateral'`
1961
+ */
1962
+ source?: RfqQuoteSource;
1963
+ /**
1964
+ * Optional quote size in outcome tokens.
1965
+ *
1966
+ * This is the human-readable token amount: `1` means one full share, not one
1967
+ * 6-decimal base unit. When omitted, the quote uses the full RFQ request size.
1968
+ */
1969
+ size?: number | string;
1970
+ };
1971
+ type RfqQuoteRejectedErrorOptions = {
1972
+ /** RFQ error code for the rejected quote. */
1973
+ code?: RfqErrorCode;
1974
+ /** RFQ identifier for the rejected quote. */
1975
+ rfqId: RfqId;
1976
+ };
1977
+ /**
1978
+ * Error thrown when the RFQ server rejects a quote response.
1979
+ */
1980
+ declare class RfqQuoteRejectedError extends PolymarketError {
1981
+ name: "RfqQuoteRejectedError";
1982
+ readonly code: RfqErrorCode | undefined;
1983
+ readonly rfqId: RfqId;
1984
+ constructor(message: string, options: ErrorOptions & RfqQuoteRejectedErrorOptions);
1985
+ }
1986
+ type RfqQuoteError = RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
1987
+ declare const RfqQuoteError: {
1988
+ isError(error: unknown): error is SigningError | TransportError | UserInputError | TimeoutError | RfqQuoteRejectedError;
1989
+ };
1990
+ type RfqCancelQuoteRejectedErrorOptions = {
1991
+ /** RFQ error code for the rejected cancellation request. */
1992
+ code?: RfqErrorCode;
1993
+ /** RFQ identifier for the cancellation request. */
1994
+ rfqId: RfqId;
1995
+ /** Quote identifier for the cancellation request. */
1996
+ quoteId: RfqQuoteId;
1997
+ };
1998
+ /**
1999
+ * Error thrown when the RFQ server rejects a quote cancellation request.
2000
+ */
2001
+ declare class RfqCancelQuoteRejectedError extends PolymarketError {
2002
+ name: "RfqCancelQuoteRejectedError";
2003
+ readonly code: RfqErrorCode | undefined;
2004
+ readonly rfqId: RfqId;
2005
+ readonly quoteId: RfqQuoteId;
2006
+ constructor(message: string, options: ErrorOptions & RfqCancelQuoteRejectedErrorOptions);
2007
+ }
2008
+ type RfqCancelQuoteError = RfqCancelQuoteRejectedError | TimeoutError | TransportError;
2009
+ declare const RfqCancelQuoteError: {
2010
+ isError(error: unknown): error is TransportError | TimeoutError | RfqCancelQuoteRejectedError;
2011
+ };
2012
+ type RfqConfirmationRejectedErrorOptions = {
2013
+ /** RFQ error code for the rejected confirmation decision. */
2014
+ code?: RfqErrorCode;
2015
+ /** RFQ identifier for the rejected confirmation decision. */
2016
+ rfqId: RfqId;
2017
+ /** Quote identifier for the rejected confirmation decision. */
2018
+ quoteId: RfqQuoteId;
2019
+ };
2020
+ /**
2021
+ * Error thrown when the RFQ server rejects a confirmation decision.
2022
+ */
2023
+ declare class RfqConfirmationRejectedError extends PolymarketError {
2024
+ name: "RfqConfirmationRejectedError";
2025
+ readonly code: RfqErrorCode | undefined;
2026
+ readonly rfqId: RfqId;
2027
+ readonly quoteId: RfqQuoteId;
2028
+ constructor(message: string, options: ErrorOptions & RfqConfirmationRejectedErrorOptions);
2029
+ }
2030
+ type RfqConfirmationError = RfqConfirmationRejectedError | TimeoutError | TransportError;
2031
+ declare const RfqConfirmationError: {
2032
+ isError(error: unknown): error is TransportError | TimeoutError | RfqConfirmationRejectedError;
2033
+ };
2034
+ /**
2035
+ * Server request asking the market maker to provide a quote for an RFQ.
2036
+ */
2037
+ interface RfqQuoteRequestEvent extends RfqQuoteRequest {
2038
+ /** Requested RFQ size and unit. Share values are human-readable outcome-token amounts. */
2039
+ requestedSize: RfqRequestedSize;
2040
+ /**
2041
+ * Requested RFQ position side.
2042
+ *
2043
+ * @remarks
2044
+ * The current RFQ system only supports YES-side requests, so this is always
2045
+ * {@link RfqSide.Yes}. Use {@link RfqQuoteRequestEvent.direction} to determine
2046
+ * whether the requester wants to buy or sell that YES-side position.
2047
+ */
2048
+ side: RfqSide.Yes;
2049
+ /**
2050
+ * Sends a quote response for this RFQ request.
2051
+ *
2052
+ * @remarks
2053
+ * If this resolves, the server accepted the quote and assigned `quoteId`.
2054
+ *
2055
+ * @throws {@link RfqQuoteError}
2056
+ * Thrown when validation fails, signing fails, the websocket fails, the quote
2057
+ * acknowledgement times out, or the server rejects the quote.
2058
+ */
2059
+ quote(response: RfqQuoteResponse): Promise<RfqQuoteReference>;
2060
+ }
2061
+ /**
2062
+ * Server request asking the market maker to confirm or decline a selected quote.
2063
+ */
2064
+ interface RfqConfirmationRequestEvent extends RfqConfirmationRequest {
2065
+ /**
2066
+ * Requested RFQ position side.
2067
+ *
2068
+ * @remarks
2069
+ * The current RFQ system only supports YES-side requests, so this is always
2070
+ * {@link RfqSide.Yes}. Use {@link RfqConfirmationRequestEvent.direction} to
2071
+ * determine whether the requester wants to buy or sell that YES-side position.
2072
+ */
2073
+ side: RfqSide.Yes;
2074
+ /**
2075
+ * Confirms that the maker wants to proceed with the selected quote.
2076
+ *
2077
+ * @remarks
2078
+ * If this resolves, the server accepted the confirmation decision.
2079
+ *
2080
+ * @throws {@link RfqConfirmationError}
2081
+ * Thrown when the websocket fails, the acknowledgement times out, or the
2082
+ * server rejects the confirmation decision.
2083
+ */
2084
+ confirm(): Promise<RfqConfirmationAck>;
2085
+ /**
2086
+ * Declines the selected quote during the confirmation window.
2087
+ *
2088
+ * @remarks
2089
+ * If this resolves, the server accepted the decline decision.
2090
+ *
2091
+ * @throws {@link RfqConfirmationError}
2092
+ * Thrown when the websocket fails, the acknowledgement times out, or the
2093
+ * server rejects the decline decision.
2094
+ */
2095
+ decline(): Promise<RfqConfirmationAck>;
2096
+ }
2097
+ /**
2098
+ * Execution status update for an RFQ after acceptance and handoff.
2099
+ */
2100
+ interface RfqExecutionUpdateEvent extends RfqExecutionUpdate {
2101
+ }
2102
+ /**
2103
+ * Event emitted by an RFQ session.
2104
+ */
2105
+ type RfqEvent = RfqQuoteRequestEvent | RfqConfirmationRequestEvent | RfqExecutionUpdateEvent;
2106
+ interface RfqSession extends AsyncIterable<RfqEvent> {
2107
+ /**
2108
+ * Requests cancellation of a submitted RFQ quote.
2109
+ *
2110
+ * @remarks
2111
+ * The returned ack means the backend processed the cancellation request; it
2112
+ * does not guarantee the quote was withdrawn from an already-selected RFQ.
2113
+ *
2114
+ * @throws {@link RfqCancelQuoteError}
2115
+ * Thrown when the websocket fails, the acknowledgement times out, or the
2116
+ * server rejects the cancellation request.
2117
+ */
2118
+ cancelQuote(reference: RfqQuoteReference): Promise<RfqCancelQuoteAck>;
2119
+ /**
2120
+ * Closes the RFQ quoter stream.
2121
+ */
2122
+ close(): Promise<void>;
2123
+ }
2124
+ type OpenRfqSessionError = TransportError;
2125
+ declare const OpenRfqSessionError: {
2126
+ isError(error: unknown): error is TransportError;
2127
+ };
2128
+ /**
2129
+ * Opens an RFQ event session.
2130
+ *
2131
+ * @remarks
2132
+ * The returned async iterator is a stream, not a worker queue. Await inside the
2133
+ * loop to process RFQ events sequentially, or dispatch handlers without awaiting
2134
+ * them to fan out handling when quote windows are tight.
2135
+ *
2136
+ * @throws {@link OpenRfqSessionError}
2137
+ * Thrown on failure.
2138
+ */
2139
+ declare function openRfqSession(client: BaseSecureClient): Promise<RfqSession>;
2140
+
2141
+ type SecureRfqActions = {
2142
+ /**
2143
+ * Opens an RFQ event session.
2144
+ *
2145
+ * @remarks
2146
+ * The returned async iterator is a stream, not a worker queue. Await inside the
2147
+ * loop to process RFQ events sequentially, or dispatch handlers without awaiting
2148
+ * them to fan out handling when quote windows are tight.
2149
+ *
2150
+ * @example
2151
+ * Quote the full requested size:
2152
+ * ```ts
2153
+ * const session = await client.openRfqSession();
2154
+ *
2155
+ * for await (const event of session) {
2156
+ * switch (event.type) {
2157
+ * case 'quote_request':
2158
+ * await event.quote({ price: 0.45 });
2159
+ * break;
2160
+ *
2161
+ * case 'execution_update':
2162
+ * // event.rfqId: RfqId
2163
+ * // event.status: RfqExecutionStatus
2164
+ * // event.txHash: TxHash | undefined
2165
+ * break;
2166
+ * }
2167
+ * }
2168
+ * ```
2169
+ *
2170
+ * @example
2171
+ * Quote a specific outcome-token size. `0.5` means half of one share, not
2172
+ * half of one 6-decimal base unit:
2173
+ * ```ts
2174
+ * const session = await client.openRfqSession();
2175
+ *
2176
+ * for await (const event of session) {
2177
+ * switch (event.type) {
2178
+ * case 'quote_request':
2179
+ * await event.quote({ price: 0.45, size: 0.5 });
2180
+ * break;
2181
+ *
2182
+ * // …
2183
+ * }
2184
+ * }
2185
+ * ```
2186
+ *
2187
+ * @example
2188
+ * Cancel a submitted quote using the live session:
2189
+ * ```ts
2190
+ * const session = await client.openRfqSession();
2191
+ *
2192
+ * for await (const event of session) {
2193
+ * switch (event.type) {
2194
+ * case 'quote_request': {
2195
+ * const ref = await event.quote({ price: 0.45 });
2196
+ *
2197
+ * if (shouldCancel(ref)) {
2198
+ * await session.cancelQuote(ref);
2199
+ * }
2200
+ * break;
2201
+ * }
2202
+ *
2203
+ * // …
2204
+ * }
2205
+ * }
2206
+ * ```
2207
+ * The cancellation ack means the backend processed the request; it does not
2208
+ * guarantee the quote was withdrawn from an already-selected RFQ.
2209
+ *
2210
+ * @example
2211
+ * Handle Last Look confirmation requests:
2212
+ * ```ts
2213
+ * const session = await client.openRfqSession();
2214
+ *
2215
+ * for await (const event of session) {
2216
+ * switch (event.type) {
2217
+ * case 'quote_request':
2218
+ * await event.quote({ price: 0.45 });
2219
+ * break;
2220
+ *
2221
+ * case 'confirmation_request':
2222
+ * await event.confirm();
2223
+ * break;
2224
+ *
2225
+ * // …
2226
+ * }
2227
+ * }
2228
+ * ```
2229
+ * Any maker can quote permissionlessly. Last Look confirmation requests are
2230
+ * only sent to makers with Last Look enabled.
2231
+ *
2232
+ * @example
2233
+ * Choose collateral or inventory per request:
2234
+ * ```ts
2235
+ * const session = await client.openRfqSession();
2236
+ *
2237
+ * for await (const event of session) {
2238
+ * switch (event.type) {
2239
+ * case 'quote_request': {
2240
+ * switch (event.direction) {
2241
+ * case RfqDirection.Buy:
2242
+ * await event.quote({
2243
+ * price: 0.45,
2244
+ * source: chooseSource(event.yesPositionId, event.requestedSize),
2245
+ * });
2246
+ * break;
2247
+ *
2248
+ * case RfqDirection.Sell:
2249
+ * await event.quote({
2250
+ * price: 0.45,
2251
+ * source: chooseSource(event.noPositionId, event.requestedSize),
2252
+ * });
2253
+ * break;
2254
+ * }
2255
+ * break;
2256
+ * }
2257
+ *
2258
+ * case 'confirmation_request':
2259
+ * await event.confirm();
2260
+ * break;
2261
+ *
2262
+ * // …
2263
+ * }
2264
+ * }
2265
+ *
2266
+ * function chooseSource(positionId: PositionId, requestedSize: RfqRequestedSize): RfqQuoteSource {
2267
+ * return hasInventory(positionId, requestedSize) ? 'inventory' : 'collateral';
2268
+ * }
2269
+ * ```
2270
+ *
2271
+ * @throws {@link OpenRfqSessionError}
2272
+ * Thrown on failure.
2273
+ */
2274
+ openRfqSession(): Promise<RfqSession>;
2275
+ };
2276
+ declare function rfqActions(client: BaseSecureClient): SecureRfqActions;
2277
+
1633
2278
  type PublicSubscriptionsActions = {
1634
2279
  /**
1635
2280
  * Starts one or more realtime subscriptions on this client.
@@ -1692,6 +2337,9 @@ declare const CancelOrderError: {
1692
2337
  /**
1693
2338
  * Cancels a single open order for the authenticated account.
1694
2339
  *
2340
+ * @remarks
2341
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2342
+ *
1695
2343
  * @throws {@link CancelOrderError}
1696
2344
  * Thrown on failure.
1697
2345
  *
@@ -1713,6 +2361,9 @@ declare const CancelOrdersError: {
1713
2361
  /**
1714
2362
  * Cancels multiple open orders for the authenticated account.
1715
2363
  *
2364
+ * @remarks
2365
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2366
+ *
1716
2367
  * @throws {@link CancelOrdersError}
1717
2368
  * Thrown on failure.
1718
2369
  *
@@ -1733,6 +2384,9 @@ declare const CancelAllError: {
1733
2384
  /**
1734
2385
  * Cancels all open orders for the authenticated account.
1735
2386
  *
2387
+ * @remarks
2388
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2389
+ *
1736
2390
  * @throws {@link CancelAllError}
1737
2391
  * Thrown on failure.
1738
2392
  *
@@ -1753,6 +2407,9 @@ declare const CancelMarketOrdersError: {
1753
2407
  * Cancels all open orders for the authenticated account that match the market
1754
2408
  * or token filter.
1755
2409
  *
2410
+ * @remarks
2411
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2412
+ *
1756
2413
  * @throws {@link CancelMarketOrdersError}
1757
2414
  * Thrown on failure.
1758
2415
  *
@@ -1813,6 +2470,9 @@ declare const EstimateMarketPriceError: {
1813
2470
  * should be treated as a partial-fill execution estimate rather than a full-fill
1814
2471
  * guarantee.
1815
2472
  *
2473
+ * @remarks
2474
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2475
+ *
1816
2476
  * @example
1817
2477
  * ```ts
1818
2478
  * const price = await estimateMarketPrice(client, {
@@ -1873,7 +2533,10 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
1873
2533
  /** Sell side of the order. */
1874
2534
  side: OrderSide.SELL;
1875
2535
  /**
1876
- * Number of conditional-token shares to sell.
2536
+ * Number of outcome tokens to sell.
2537
+ *
2538
+ * This is the human-readable token amount: `1` means one full share, not one
2539
+ * 6-decimal base unit.
1877
2540
  */
1878
2541
  shares: number | string;
1879
2542
  };
@@ -1883,7 +2546,12 @@ type PrepareLimitOrderRequest = {
1883
2546
  tokenId: string;
1884
2547
  /** Price used to create the order */
1885
2548
  price: number | string;
1886
- /** Size in terms of the conditional token */
2549
+ /**
2550
+ * Order size in outcome tokens.
2551
+ *
2552
+ * This is the human-readable token amount: `1` means one full share, not one
2553
+ * 6-decimal base unit.
2554
+ */
1887
2555
  size: number | string;
1888
2556
  /** Side of the order */
1889
2557
  side: OrderSide;
@@ -1901,6 +2569,10 @@ type PrepareLimitOrderRequest = {
1901
2569
  * When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
1902
2570
  * expires at the given timestamp.
1903
2571
  *
2572
+ * The timestamp must be at least 60 seconds in the future. Add your own
2573
+ * buffer for network latency and clock skew when deriving it from the
2574
+ * current time.
2575
+ *
1904
2576
  * When omitted, the SDK prepares a Good-Til-Cancelled (GTC) limit order.
1905
2577
  */
1906
2578
  expiration?: number;
@@ -1952,6 +2624,9 @@ declare const PostOrdersError: {
1952
2624
  /**
1953
2625
  * Posts a signed order for the authenticated account.
1954
2626
  *
2627
+ * @remarks
2628
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2629
+ *
1955
2630
  * @example
1956
2631
  * ```ts
1957
2632
  * const order = await client.createMarketOrder({
@@ -1970,6 +2645,8 @@ declare function postOrder(client: BaseSecureClient): (order: SignedOrder) => Pr
1970
2645
  * Posts multiple signed orders for the authenticated account.
1971
2646
  *
1972
2647
  * @remarks
2648
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2649
+ *
1973
2650
  * Accepts between 1 and 15 orders, matching the current service limit.
1974
2651
  *
1975
2652
  * @example
@@ -2020,6 +2697,11 @@ type SecureTradingActions = {
2020
2697
  /**
2021
2698
  * Creates a signed limit order for the authenticated account.
2022
2699
  *
2700
+ * @remarks
2701
+ * GTD expirations must be at least 60 seconds in the future. Add your own
2702
+ * buffer for network latency and clock skew when deriving an expiration from
2703
+ * the current time.
2704
+ *
2023
2705
  * @throws {@link CreateLimitOrderError}
2024
2706
  * Thrown on failure.
2025
2707
  *
@@ -2038,6 +2720,11 @@ type SecureTradingActions = {
2038
2720
  /**
2039
2721
  * Creates and posts a limit order for the authenticated account.
2040
2722
  *
2723
+ * @remarks
2724
+ * GTD expirations must be at least 60 seconds in the future. Add your own
2725
+ * buffer for network latency and clock skew when deriving an expiration from
2726
+ * the current time.
2727
+ *
2041
2728
  * @throws {@link PlaceLimitOrderError}
2042
2729
  * Thrown on failure.
2043
2730
  *
@@ -2191,15 +2878,9 @@ declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
2191
2878
 
2192
2879
  type SecureWalletActions = {
2193
2880
  /**
2194
- * Checks whether the authenticated account wallet is ready for gasless transactions.
2195
- *
2196
- * @throws {@link IsGaslessReadyError}
2197
- * Thrown on failure.
2198
- *
2199
- * @example
2200
- * ```ts
2201
- * const ready = await client.isGaslessReady();
2202
- * ```
2881
+ * @deprecated You no longer need to call this. `createSecureClient` ensures
2882
+ * the account wallet is set up for its trading flow, so this always resolves
2883
+ * to `true` and is retained only for backward compatibility.
2203
2884
  */
2204
2885
  isGaslessReady(): Promise<boolean>;
2205
2886
  /**
@@ -2210,14 +2891,10 @@ type SecureWalletActions = {
2210
2891
  *
2211
2892
  * @example
2212
2893
  * ```ts
2213
- * const handle = await client.setupTradingApprovals();
2214
- *
2215
- * const outcome = await handle.wait();
2216
- *
2217
- * // outcome.transactionHash: TxHash
2894
+ * await client.setupTradingApprovals();
2218
2895
  * ```
2219
2896
  */
2220
- setupTradingApprovals(): Promise<TransactionHandle>;
2897
+ setupTradingApprovals(): Promise<DeprecatedTransactionHandle>;
2221
2898
  /**
2222
2899
  * Approves ERC-20 token spending for the authenticated account.
2223
2900
  *
@@ -2278,12 +2955,12 @@ type SecureWalletActions = {
2278
2955
  */
2279
2956
  transferErc20(request: PrepareErc20TransferRequest): Promise<TransactionHandle>;
2280
2957
  /**
2281
- * Splits collateral into market positions.
2958
+ * Splits collateral into market or combo positions.
2282
2959
  *
2283
2960
  * @throws {@link SplitPositionError}
2284
2961
  * Thrown on failure.
2285
2962
  *
2286
- * @example
2963
+ * @example Split a market by condition ID.
2287
2964
  * ```ts
2288
2965
  * const handle = await client.splitPosition({
2289
2966
  * amount: 1n,
@@ -2295,15 +2972,27 @@ type SecureWalletActions = {
2295
2972
  *
2296
2973
  * // outcome.transactionHash: TxHash
2297
2974
  * ```
2975
+ *
2976
+ * @example Split a combo by legs.
2977
+ * ```ts
2978
+ * const handle = await client.splitPosition({
2979
+ * amount: 1n,
2980
+ * legs: ['123', '456'],
2981
+ * });
2982
+ *
2983
+ * const outcome = await handle.wait();
2984
+ *
2985
+ * // outcome.transactionHash: TxHash
2986
+ * ```
2298
2987
  */
2299
2988
  splitPosition(request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
2300
2989
  /**
2301
- * Merges complementary market positions back into collateral.
2990
+ * Merges complementary market or combo positions back into collateral.
2302
2991
  *
2303
2992
  * @throws {@link MergePositionsError}
2304
2993
  * Thrown on failure.
2305
2994
  *
2306
- * @example
2995
+ * @example Merge a market by condition ID.
2307
2996
  * ```ts
2308
2997
  * const handle = await client.mergePositions({
2309
2998
  * amount: 'max',
@@ -2315,23 +3004,54 @@ type SecureWalletActions = {
2315
3004
  *
2316
3005
  * // outcome.transactionHash: TxHash
2317
3006
  * ```
3007
+ *
3008
+ * @example Merge a combo by legs.
3009
+ * ```ts
3010
+ * const handle = await client.mergePositions({
3011
+ * amount: 'max',
3012
+ * legs: ['123', '456'],
3013
+ * });
3014
+ *
3015
+ * const outcome = await handle.wait();
3016
+ *
3017
+ * // outcome.transactionHash: TxHash
3018
+ * ```
2318
3019
  */
2319
3020
  mergePositions(request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
2320
3021
  /**
2321
- * Redeems resolved market positions.
3022
+ * Redeems resolved market or combo positions.
2322
3023
  *
2323
3024
  * @throws {@link RedeemPositionsError}
2324
3025
  * Thrown on failure.
2325
3026
  *
2326
3027
  * @example
2327
3028
  * ```ts
3029
+ * // Redeem a market by condition ID.
2328
3030
  * const handle = await client.redeemPositions({
2329
3031
  * conditionId:
2330
3032
  * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
2331
3033
  * });
2332
3034
  *
3035
+ * const outcome = await handle.wait();
3036
+ *
3037
+ * // outcome.transactionHash: TxHash
3038
+ * ```
3039
+ *
3040
+ * @example Redeem a market by market ID.
3041
+ * ```ts
3042
+ * const handle = await client.redeemPositions({
3043
+ * marketId: '12345',
3044
+ * });
3045
+ *
3046
+ * const outcome = await handle.wait();
3047
+ *
3048
+ * // outcome.transactionHash: TxHash
3049
+ * ```
3050
+ *
3051
+ * @example Redeem a combo by position ID.
3052
+ * ```ts
2333
3053
  * const handle = await client.redeemPositions({
2334
- * marketId: '12345',
3054
+ * positionId: '123',
2335
3055
  * });
2336
3056
  *
2337
3057
  * const outcome = await handle.wait();
@@ -2344,7 +3064,7 @@ type SecureWalletActions = {
2344
3064
  declare function walletActions(client: BaseSecureClient): SecureWalletActions;
2345
3065
 
2346
3066
  type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
2347
- type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecureAccountActions & SecureRewardsActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
3067
+ type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
2348
3068
  declare function allActions(client: BasePublicClient): PublicActions;
2349
3069
  declare function allActions(client: BaseSecureClient): SecureActions;
2350
3070
 
@@ -2494,15 +3214,9 @@ declare class BaseSecureClient<TPublicActions extends ClientActions = ClientActi
2494
3214
  */
2495
3215
  get account(): AccountIdentity;
2496
3216
  /**
2497
- * Sets up a gasless wallet and returns a secure client bound to it.
2498
- *
2499
- * @remarks
2500
- * If this client is already bound to a gasless wallet, this returns a secure
2501
- * client for the current wallet. For EOA clients, this deploys or reuses the
2502
- * authenticated signer's deterministic Deposit Wallet.
2503
- *
2504
- * @throws {@link SetupGaslessWalletError}
2505
- * Thrown on failure.
3217
+ * @deprecated `createSecureClient` now sets up the account wallet for its
3218
+ * trading flow, so this is a no-op retained only for backward compatibility
3219
+ * and returns the current secure client.
2506
3220
  */
2507
3221
  setupGaslessWallet(): Promise<SecureClient<TPublicActions, TSecureActions>>;
2508
3222
  /**
@@ -2563,7 +3277,7 @@ type SecureContext = PublicContext & {};
2563
3277
  type SecureClientConfig = PublicClientConfig & {
2564
3278
  account: AccountIdentity;
2565
3279
  credentials: ApiKeyCreds;
2566
- signer?: Signer;
3280
+ signer: Signer;
2567
3281
  };
2568
3282
  type PublicClient<TPublicActions extends ClientActions = PublicActions, TSecureActions extends ClientActions = SecureActions> = BasePublicClient<TPublicActions, TSecureActions> & TPublicActions;
2569
3283
  type SecureClient<TPublicActions extends ClientActions = PublicActions, TSecureActions extends ClientActions = SecureActions> = BaseSecureClient<TPublicActions, TSecureActions> & TSecureActions;
@@ -2586,13 +3300,10 @@ type SecureClientOptions = PublicClientOptions & {
2586
3300
  /**
2587
3301
  * Wallet address to use as the account wallet.
2588
3302
  *
2589
- * If omitted, the client uses the signer address as the account wallet and
2590
- * operates as an EOA account. EOA clients do not use gasless relayer flows:
2591
- * approvals, transfers, and other wallet operations are submitted directly by
2592
- * the signer and require the signer wallet to hold gas. Pass a supported Poly
2593
- * Deposit Wallet, Poly Safe, or Poly Proxy wallet address to use that wallet
2594
- * as the account/funder and enable gasless wallet operations when an API key
2595
- * strategy supports them.
3303
+ * If omitted, the client uses the signer's deterministic Deposit Wallet as
3304
+ * the account wallet. Pass the signer address itself to explicitly trade as
3305
+ * an EOA account, or pass a supported Poly Deposit Wallet, Poly Safe, or Poly
3306
+ * Proxy wallet address to use that wallet as the account/funder.
2596
3307
  */
2597
3308
  wallet?: string;
2598
3309
  /**
@@ -2623,13 +3334,13 @@ type SecureClientOptions = PublicClientOptions & {
2623
3334
  * ```
2624
3335
  */
2625
3336
  declare function createPublicClient(options?: PublicClientOptions): PublicClient<PublicActions, SecureActions>;
2626
- type CreateSecureClientError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
3337
+ type CreateSecureClientError = CancelledSigningError | DeployDepositWalletError | IsWalletDeployedError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError | WaitForGaslessTransactionError;
2627
3338
  declare const CreateSecureClientError: {
2628
- isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
3339
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
2629
3340
  };
2630
- type SetupGaslessWalletError = DeployDepositWalletError | IsGaslessReadyError | SigningError | WaitForGaslessTransactionError | UserInputError;
3341
+ type SetupGaslessWalletError = UserInputError;
2631
3342
  declare const SetupGaslessWalletError: {
2632
- isError(error: unknown): error is SigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
3343
+ isError(error: unknown): error is UserInputError;
2633
3344
  };
2634
3345
  /**
2635
3346
  * Creates a new authenticated `SecureClient` instance.
@@ -2653,6 +3364,9 @@ declare const FetchClosedOnlyModeError: {
2653
3364
  /**
2654
3365
  * Fetches whether the account is restricted to closed-only trading.
2655
3366
  *
3367
+ * @remarks
3368
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3369
+ *
2656
3370
  * @throws {@link FetchClosedOnlyModeError}
2657
3371
  *
2658
3372
  * @example
@@ -2675,6 +3389,9 @@ declare const ListOpenOrdersError: {
2675
3389
  /**
2676
3390
  * Lists open orders for the authenticated account across all pages.
2677
3391
  *
3392
+ * @remarks
3393
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3394
+ *
2678
3395
  * @throws {@link ListOpenOrdersError}
2679
3396
  *
2680
3397
  * @example
@@ -2716,6 +3433,9 @@ declare const FetchOrderError: {
2716
3433
  /**
2717
3434
  * Fetches a single order for the authenticated account.
2718
3435
  *
3436
+ * @remarks
3437
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3438
+ *
2719
3439
  * @throws {@link FetchOrderError}
2720
3440
  *
2721
3441
  * @example
@@ -2743,6 +3463,9 @@ declare const ListAccountTradesError: {
2743
3463
  /**
2744
3464
  * Lists trades for the authenticated account across all pages.
2745
3465
  *
3466
+ * @remarks
3467
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3468
+ *
2746
3469
  * @throws {@link ListAccountTradesError}
2747
3470
  *
2748
3471
  * @example
@@ -2784,6 +3507,9 @@ type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
2784
3507
  /**
2785
3508
  * Fetches notifications for the authenticated account.
2786
3509
  *
3510
+ * @remarks
3511
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3512
+ *
2787
3513
  * @throws {@link FetchNotificationsError}
2788
3514
  *
2789
3515
  * @example
@@ -2799,6 +3525,9 @@ declare const DropNotificationsError: {
2799
3525
  /**
2800
3526
  * Drops notifications for the authenticated account.
2801
3527
  *
3528
+ * @remarks
3529
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3530
+ *
2802
3531
  * @throws {@link DropNotificationsError}
2803
3532
  * Thrown on failure.
2804
3533
  *
@@ -2823,7 +3552,7 @@ declare const FetchBalanceAllowanceError: {
2823
3552
  * Fetches balance and allowance for the authenticated account.
2824
3553
  *
2825
3554
  * @remarks
2826
- * This is a low-level action that most SDK consumers will not need.
3555
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2827
3556
  *
2828
3557
  * @throws {@link FetchBalanceAllowanceError}
2829
3558
  * Thrown on failure.
@@ -2849,7 +3578,7 @@ declare const UpdateBalanceAllowanceError: {
2849
3578
  * Refreshes balance and allowance for the authenticated account.
2850
3579
  *
2851
3580
  * @remarks
2852
- * This is a low-level action that most SDK consumers will not need.
3581
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
2853
3582
  *
2854
3583
  * @throws {@link UpdateBalanceAllowanceError}
2855
3584
  * Thrown on failure.
@@ -2873,6 +3602,9 @@ declare const FetchOrderScoringError: {
2873
3602
  /**
2874
3603
  * Fetches whether a single order is currently scoring.
2875
3604
  *
3605
+ * @remarks
3606
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3607
+ *
2876
3608
  * @throws {@link FetchOrderScoringError}
2877
3609
  *
2878
3610
  * @example
@@ -2894,6 +3626,9 @@ declare const FetchOrdersScoringError: {
2894
3626
  /**
2895
3627
  * Fetches scoring state for multiple orders.
2896
3628
  *
3629
+ * @remarks
3630
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3631
+ *
2897
3632
  * @throws {@link FetchOrdersScoringError}
2898
3633
  *
2899
3634
  * @example
@@ -2916,6 +3651,9 @@ declare const ListUserEarningsForDayError: {
2916
3651
  /**
2917
3652
  * Lists per-market earnings for the authenticated account on a given day.
2918
3653
  *
3654
+ * @remarks
3655
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3656
+ *
2919
3657
  * @throws {@link ListUserEarningsForDayError}
2920
3658
  *
2921
3659
  * @example
@@ -2954,6 +3692,9 @@ declare const FetchTotalEarningsForUserForDayError: {
2954
3692
  /**
2955
3693
  * Fetches total earnings for the authenticated account on a given day.
2956
3694
  *
3695
+ * @remarks
3696
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3697
+ *
2957
3698
  * @throws {@link FetchTotalEarningsForUserForDayError}
2958
3699
  *
2959
3700
  * @example
@@ -2980,6 +3721,9 @@ declare const ListUserEarningsAndMarketsConfigError: {
2980
3721
  /**
2981
3722
  * Lists market reward configuration and earnings for the authenticated account on a given day.
2982
3723
  *
3724
+ * @remarks
3725
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3726
+ *
2983
3727
  * @throws {@link ListUserEarningsAndMarketsConfigError}
2984
3728
  *
2985
3729
  * @example
@@ -3017,6 +3761,9 @@ declare const FetchRewardPercentagesError: {
3017
3761
  /**
3018
3762
  * Fetches reward percentages for the authenticated account.
3019
3763
  *
3764
+ * @remarks
3765
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3766
+ *
3020
3767
  * @throws {@link FetchRewardPercentagesError}
3021
3768
  *
3022
3769
  * @example
@@ -3075,6 +3822,9 @@ declare const ListTradesError: {
3075
3822
  /**
3076
3823
  * Lists trades for a wallet, market, or event.
3077
3824
  *
3825
+ * @remarks
3826
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3827
+ *
3078
3828
  * @throws {@link ListTradesError}
3079
3829
  * Thrown on failure.
3080
3830
  *
@@ -3115,6 +3865,9 @@ declare const ListActivityError: {
3115
3865
  /**
3116
3866
  * Lists wallet activity.
3117
3867
  *
3868
+ * @remarks
3869
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3870
+ *
3118
3871
  * @throws {@link ListActivityError}
3119
3872
  * Thrown on failure.
3120
3873
  *
@@ -3166,7 +3919,7 @@ declare const PrepareErc20ApprovalError: {
3166
3919
  * Starts an ERC-20 approval workflow.
3167
3920
  *
3168
3921
  * @remarks
3169
- * This is a low-level action that most SDK consumers will not need.
3922
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3170
3923
  *
3171
3924
  * @example
3172
3925
  * ```ts
@@ -3181,13 +3934,16 @@ declare const PrepareErc20ApprovalError: {
3181
3934
  * Thrown on failure.
3182
3935
  */
3183
3936
  declare function prepareErc20Approval(client: BaseSecureClient, request: PrepareErc20ApprovalRequest): Promise<Erc20ApprovalWorkflow>;
3184
- type ApproveErc20Error = PrepareErc20ApprovalError | CancelledSigningError | SigningError;
3937
+ type ApproveErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
3185
3938
  declare const ApproveErc20Error: {
3186
- isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
3939
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
3187
3940
  };
3188
3941
  /**
3189
3942
  * Approves ERC-20 token spending for the authenticated account.
3190
3943
  *
3944
+ * @remarks
3945
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3946
+ *
3191
3947
  * @throws {@link ApproveErc20Error}
3192
3948
  * Thrown on failure.
3193
3949
  */
@@ -3209,7 +3965,7 @@ declare const PrepareErc1155ApprovalForAllError: {
3209
3965
  * Starts an ERC-1155 approval-for-all workflow.
3210
3966
  *
3211
3967
  * @remarks
3212
- * This is a low-level action that most SDK consumers will not need.
3968
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3213
3969
  *
3214
3970
  * @example
3215
3971
  * ```ts
@@ -3223,34 +3979,31 @@ declare const PrepareErc1155ApprovalForAllError: {
3223
3979
  * Thrown on failure.
3224
3980
  */
3225
3981
  declare function prepareErc1155ApprovalForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<Erc1155ApprovalForAllWorkflow>;
3226
- type ApproveErc1155ForAllError = PrepareErc1155ApprovalForAllError | CancelledSigningError | SigningError;
3982
+ type ApproveErc1155ForAllError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
3227
3983
  declare const ApproveErc1155ForAllError: {
3228
- isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
3984
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
3229
3985
  };
3230
3986
  /**
3231
3987
  * Approves or revokes ERC-1155 operator access for the authenticated account.
3232
3988
  *
3989
+ * @remarks
3990
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3991
+ *
3233
3992
  * @throws {@link ApproveErc1155ForAllError}
3234
3993
  * Thrown on failure.
3235
3994
  */
3236
3995
  declare function approveErc1155ForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<TransactionHandle>;
3237
3996
  type TradingApprovalsWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest | SendErc1155ApprovalForAllTransactionRequest;
3238
- type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
3239
- type PrepareTradingApprovalsError = UserInputError;
3997
+ type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest, void, EvmAddress$1 | EvmSignature | TransactionHandle>;
3998
+ type PrepareTradingApprovalsError = RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3240
3999
  declare const PrepareTradingApprovalsError: {
3241
- isError(error: unknown): error is UserInputError;
4000
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
3242
4001
  };
3243
4002
  /**
3244
4003
  * Starts a trading-setup approval workflow.
3245
4004
  *
3246
4005
  * @remarks
3247
- * This is a low-level action that most SDK consumers will not need.
3248
- *
3249
- * Prepares all approvals required for trading, including collateral and
3250
- * position token approvals for both standard and neg-risk market flows.
3251
- * The collateral adapter approvals cover split, merge, and redemption workflows.
3252
- * Auto-redeem approval is included so accounts are ready for supported position
3253
- * lifecycle workflows.
4006
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3254
4007
  *
3255
4008
  * @example
3256
4009
  * ```ts
@@ -3261,17 +4014,27 @@ declare const PrepareTradingApprovalsError: {
3261
4014
  * Thrown on failure.
3262
4015
  */
3263
4016
  declare function prepareTradingApprovals(client: BaseSecureClient): Promise<TradingApprovalsWorkflow>;
3264
- type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSigningError | SigningError;
4017
+ type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSigningError | SigningError | WaitForGaslessTransactionError;
3265
4018
  declare const SetupTradingApprovalsError: {
3266
- isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
4019
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
4020
+ };
4021
+ type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
4022
+ /**
4023
+ * @deprecated `setupTradingApprovals` now waits internally. You do not need
4024
+ * to call this method, and it will be removed in a later version.
4025
+ */
4026
+ wait(): Promise<void>;
3267
4027
  };
3268
4028
  /**
3269
4029
  * Sets up the approvals required for trading.
3270
4030
  *
4031
+ * @remarks
4032
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4033
+ *
3271
4034
  * @throws {@link SetupTradingApprovalsError}
3272
4035
  * Thrown on failure.
3273
4036
  */
3274
- declare function setupTradingApprovals(client: BaseSecureClient): Promise<TransactionHandle>;
4037
+ declare function setupTradingApprovals(client: BaseSecureClient): Promise<DeprecatedTransactionHandle>;
3275
4038
 
3276
4039
  declare const ListBuilderTradesRequestSchema: z.ZodObject<{
3277
4040
  after: z.ZodOptional<z.ZodString>;
@@ -3290,6 +4053,9 @@ declare const ListBuilderTradesError: {
3290
4053
  /**
3291
4054
  * Lists builder-attributed trades.
3292
4055
  *
4056
+ * @remarks
4057
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4058
+ *
3293
4059
  * @throws {@link ListBuilderTradesError}
3294
4060
  * Thrown on failure.
3295
4061
  *
@@ -3329,6 +4095,9 @@ declare const FetchMidpointError: {
3329
4095
  /**
3330
4096
  * Fetches the midpoint price for a token.
3331
4097
  *
4098
+ * @remarks
4099
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4100
+ *
3332
4101
  * @throws {@link FetchMidpointError}
3333
4102
  * Thrown on failure.
3334
4103
  *
@@ -3355,6 +4124,9 @@ declare const FetchMidpointsError: {
3355
4124
  /**
3356
4125
  * Fetches midpoint prices for multiple tokens.
3357
4126
  *
4127
+ * @remarks
4128
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4129
+ *
3358
4130
  * @throws {@link FetchMidpointsError}
3359
4131
  * Thrown on failure.
3360
4132
  *
@@ -3384,7 +4156,7 @@ declare const FetchTickSizeError: {
3384
4156
  * Fetches the minimum price tick size for a token's order book.
3385
4157
  *
3386
4158
  * @remarks
3387
- * This is a low-level market action that most SDK consumers will not need.
4159
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3388
4160
  *
3389
4161
  * @throws {@link FetchTickSizeError}
3390
4162
  * Thrown on failure.
@@ -3412,7 +4184,7 @@ declare const FetchNegRiskError: {
3412
4184
  * Fetches whether a token is in a negative-risk market.
3413
4185
  *
3414
4186
  * @remarks
3415
- * This is a low-level market action that most SDK consumers will not need.
4187
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3416
4188
  *
3417
4189
  * @throws {@link FetchNegRiskError}
3418
4190
  * Thrown on failure.
@@ -3440,7 +4212,7 @@ declare const ResolveConditionByTokenError: {
3440
4212
  * Resolves the condition ID for a token.
3441
4213
  *
3442
4214
  * @remarks
3443
- * This is a low-level market action that most SDK consumers will not need.
4215
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3444
4216
  *
3445
4217
  * @throws {@link ResolveConditionByTokenError}
3446
4218
  * Thrown on failure.
@@ -3458,7 +4230,7 @@ declare const FetchMarketInfoError: {
3458
4230
  * Fetches market-level metadata for a condition.
3459
4231
  *
3460
4232
  * @remarks
3461
- * This is a low-level market action that most SDK consumers will not need.
4233
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3462
4234
  *
3463
4235
  * @throws {@link FetchMarketInfoError}
3464
4236
  * Thrown on failure.
@@ -3476,7 +4248,7 @@ declare const FetchBuilderFeeRatesError: {
3476
4248
  * Fetches builder maker and taker fee rates.
3477
4249
  *
3478
4250
  * @remarks
3479
- * This is a low-level market action that most SDK consumers will not need.
4251
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3480
4252
  *
3481
4253
  * @throws {@link FetchBuilderFeeRatesError}
3482
4254
  * Thrown on failure.
@@ -3494,6 +4266,9 @@ declare const FetchPriceError: {
3494
4266
  /**
3495
4267
  * Fetches the current quoted price for a token and side.
3496
4268
  *
4269
+ * @remarks
4270
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4271
+ *
3497
4272
  * @throws {@link FetchPriceError}
3498
4273
  * Thrown on failure.
3499
4274
  *
@@ -3522,6 +4297,9 @@ declare const FetchPricesError: {
3522
4297
  /**
3523
4298
  * Fetches quoted prices for multiple tokens.
3524
4299
  *
4300
+ * @remarks
4301
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4302
+ *
3525
4303
  * @throws {@link FetchPricesError}
3526
4304
  * Thrown on failure.
3527
4305
  *
@@ -3551,6 +4329,9 @@ declare const FetchOrderBookError: {
3551
4329
  /**
3552
4330
  * Fetches the current order book for a token.
3553
4331
  *
4332
+ * @remarks
4333
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4334
+ *
3554
4335
  * @throws {@link FetchOrderBookError}
3555
4336
  * Thrown on failure.
3556
4337
  *
@@ -3576,6 +4357,9 @@ declare const FetchOrderBooksError: {
3576
4357
  /**
3577
4358
  * Fetches order books for multiple tokens.
3578
4359
  *
4360
+ * @remarks
4361
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4362
+ *
3579
4363
  * @throws {@link FetchOrderBooksError}
3580
4364
  * Thrown on failure.
3581
4365
  *
@@ -3603,6 +4387,9 @@ declare const FetchSpreadError: {
3603
4387
  /**
3604
4388
  * Fetches the spread for a token.
3605
4389
  *
4390
+ * @remarks
4391
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4392
+ *
3606
4393
  * @throws {@link FetchSpreadError}
3607
4394
  * Thrown on failure.
3608
4395
  *
@@ -3629,6 +4416,9 @@ declare const FetchSpreadsError: {
3629
4416
  /**
3630
4417
  * Fetches spreads for multiple tokens.
3631
4418
  *
4419
+ * @remarks
4420
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4421
+ *
3632
4422
  * @throws {@link FetchSpreadsError}
3633
4423
  * Thrown on failure.
3634
4424
  *
@@ -3657,6 +4447,9 @@ declare const FetchLastTradePriceError: {
3657
4447
  /**
3658
4448
  * Fetches the last traded price for a token.
3659
4449
  *
4450
+ * @remarks
4451
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4452
+ *
3660
4453
  * @throws {@link FetchLastTradePriceError}
3661
4454
  * Thrown on failure.
3662
4455
  *
@@ -3683,6 +4476,9 @@ declare const FetchLastTradePricesError: {
3683
4476
  /**
3684
4477
  * Fetches last traded prices for multiple tokens.
3685
4478
  *
4479
+ * @remarks
4480
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4481
+ *
3686
4482
  * @throws {@link FetchLastTradePricesError}
3687
4483
  * Thrown on failure.
3688
4484
  *
@@ -3715,6 +4511,9 @@ declare const FetchPriceHistoryError: {
3715
4511
  /**
3716
4512
  * Fetches historical price points for a token.
3717
4513
  *
4514
+ * @remarks
4515
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4516
+ *
3718
4517
  * @throws {@link FetchPriceHistoryError}
3719
4518
  * Thrown on failure.
3720
4519
  *
@@ -3744,6 +4543,9 @@ declare const ListCurrentRewardsError: {
3744
4543
  /**
3745
4544
  * Lists current active market rewards.
3746
4545
  *
4546
+ * @remarks
4547
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4548
+ *
3747
4549
  * @throws {@link ListCurrentRewardsError}
3748
4550
  * Thrown on failure.
3749
4551
  *
@@ -3784,6 +4586,9 @@ declare const ListMarketRewardsError: {
3784
4586
  /**
3785
4587
  * Lists reward configurations for a market.
3786
4588
  *
4589
+ * @remarks
4590
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4591
+ *
3787
4592
  * @throws {@link ListMarketRewardsError}
3788
4593
  * Thrown on failure.
3789
4594
  *
@@ -3849,6 +4654,9 @@ declare const ListCommentsError: {
3849
4654
  /**
3850
4655
  * Lists comments for an event or series.
3851
4656
  *
4657
+ * @remarks
4658
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4659
+ *
3852
4660
  * @throws {@link ListCommentsError}
3853
4661
  * Thrown on failure.
3854
4662
  *
@@ -3891,6 +4699,9 @@ declare const FetchCommentsByIdError: {
3891
4699
  /**
3892
4700
  * Fetches a comment thread by comment id.
3893
4701
  *
4702
+ * @remarks
4703
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4704
+ *
3894
4705
  * @throws {@link FetchCommentsByIdError}
3895
4706
  * Thrown on failure.
3896
4707
  *
@@ -3912,6 +4723,9 @@ declare const ListCommentsByUserAddressError: {
3912
4723
  /**
3913
4724
  * Lists comments written by a wallet address.
3914
4725
  *
4726
+ * @remarks
4727
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4728
+ *
3915
4729
  * @throws {@link ListCommentsByUserAddressError}
3916
4730
  * Thrown on failure.
3917
4731
  *
@@ -3950,7 +4764,7 @@ declare function listCommentsByUserAddress(client: BaseClient, request: ListComm
3950
4764
 
3951
4765
  declare const ListEventsRequestSchema: z.ZodObject<{
3952
4766
  ascending: z.ZodOptional<z.ZodBoolean>;
3953
- closed: z.ZodOptional<z.ZodBoolean>;
4767
+ closed: z.ZodDefault<z.ZodBoolean>;
3954
4768
  cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
3955
4769
  pageSize: z.ZodOptional<z.ZodNumber>;
3956
4770
  cyom: z.ZodOptional<z.ZodBoolean>;
@@ -4033,6 +4847,11 @@ declare const ListEventsError: {
4033
4847
  /**
4034
4848
  * Lists events.
4035
4849
  *
4850
+ * Defaults to open events. Pass `closed: true` to list settled events.
4851
+ *
4852
+ * @remarks
4853
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4854
+ *
4036
4855
  * @throws {@link ListEventsError}
4037
4856
  * Thrown on failure.
4038
4857
  *
@@ -4073,6 +4892,9 @@ declare const FetchEventError: {
4073
4892
  /**
4074
4893
  * Fetches an event.
4075
4894
  *
4895
+ * @remarks
4896
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4897
+ *
4076
4898
  * @throws {@link FetchEventError}
4077
4899
  * Thrown on failure.
4078
4900
  *
@@ -4101,6 +4923,9 @@ declare const FetchEventTagsError: {
4101
4923
  /**
4102
4924
  * Fetches an event's tags.
4103
4925
  *
4926
+ * @remarks
4927
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4928
+ *
4104
4929
  * @throws {@link FetchEventTagsError}
4105
4930
  * Thrown on failure.
4106
4931
  *
@@ -4121,6 +4946,9 @@ declare const FetchEventLiveVolumeError: {
4121
4946
  /**
4122
4947
  * Fetches live volume for an event.
4123
4948
  *
4949
+ * @remarks
4950
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4951
+ *
4124
4952
  * @throws {@link FetchEventLiveVolumeError}
4125
4953
  * Thrown on failure.
4126
4954
  *
@@ -4191,6 +5019,9 @@ declare const ListBuilderLeaderboardError: {
4191
5019
  /**
4192
5020
  * Lists builder leaderboard rankings.
4193
5021
  *
5022
+ * @remarks
5023
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5024
+ *
4194
5025
  * @throws {@link ListBuilderLeaderboardError}
4195
5026
  * Thrown on failure.
4196
5027
  *
@@ -4231,6 +5062,9 @@ declare const ListBuilderVolumeError: {
4231
5062
  /**
4232
5063
  * Lists daily builder volume entries.
4233
5064
  *
5065
+ * @remarks
5066
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5067
+ *
4234
5068
  * @throws {@link ListBuilderVolumeError}
4235
5069
  * Thrown on failure.
4236
5070
  *
@@ -4251,6 +5085,9 @@ declare const ListTraderLeaderboardError: {
4251
5085
  /**
4252
5086
  * Lists trader leaderboard rankings.
4253
5087
  *
5088
+ * @remarks
5089
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5090
+ *
4254
5091
  * @throws {@link ListTraderLeaderboardError}
4255
5092
  * Thrown on failure.
4256
5093
  *
@@ -4306,6 +5143,7 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
4306
5143
  locale: z.ZodOptional<z.ZodString>;
4307
5144
  marketMakerAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
4308
5145
  order: z.ZodOptional<z.ZodString>;
5146
+ positionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>>;
4309
5147
  questionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4310
5148
  relatedTags: z.ZodOptional<z.ZodBoolean>;
4311
5149
  rfqEnabled: z.ZodOptional<z.ZodBoolean>;
@@ -4381,6 +5219,9 @@ declare const ListMarketsError: {
4381
5219
  /**
4382
5220
  * Lists markets.
4383
5221
  *
5222
+ * @remarks
5223
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5224
+ *
4384
5225
  * @throws {@link ListMarketsError}
4385
5226
  * Thrown on failure.
4386
5227
  *
@@ -4421,6 +5262,9 @@ declare const FetchMarketError: {
4421
5262
  /**
4422
5263
  * Fetches a market.
4423
5264
  *
5265
+ * @remarks
5266
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5267
+ *
4424
5268
  * @throws {@link FetchMarketError}
4425
5269
  * Thrown on failure.
4426
5270
  *
@@ -4435,7 +5279,7 @@ declare const FetchMarketError: {
4435
5279
  * });
4436
5280
  *
4437
5281
  * const marketByUrl = await fetchMarket(client, {
4438
- * url: 'https://polymarket.com/market/some-market-slug',
5282
+ * url: 'https://polymarket.com/event/some-market-slug',
4439
5283
  * });
4440
5284
  *
4441
5285
  * // market === Market
@@ -4449,6 +5293,9 @@ declare const FetchMarketTagsError: {
4449
5293
  /**
4450
5294
  * Fetches a market's tags.
4451
5295
  *
5296
+ * @remarks
5297
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5298
+ *
4452
5299
  * @throws {@link FetchMarketTagsError}
4453
5300
  * Thrown on failure.
4454
5301
  *
@@ -4469,6 +5316,9 @@ declare const ListMarketHoldersError: {
4469
5316
  /**
4470
5317
  * Lists the top holders for one or more markets.
4471
5318
  *
5319
+ * @remarks
5320
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5321
+ *
4472
5322
  * @throws {@link ListMarketHoldersError}
4473
5323
  * Thrown on failure.
4474
5324
  *
@@ -4488,177 +5338,42 @@ declare const ListOpenInterestError: {
4488
5338
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4489
5339
  };
4490
5340
  /**
4491
- * Lists open interest for one or more markets.
4492
- *
4493
- * @throws {@link ListOpenInterestError}
4494
- * Thrown on failure.
4495
- *
4496
- * @example
4497
- * ```ts
4498
- * const openInterest = await listOpenInterest(client, {
4499
- * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
4500
- * });
4501
- *
4502
- * // openInterest: OpenInterest[]
4503
- * ```
4504
- */
4505
- declare function listOpenInterest(client: BaseClient, request?: ListOpenInterestRequest): Promise<OpenInterest[]>;
4506
- type ListMarketPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4507
- declare const ListMarketPositionsError: {
4508
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4509
- };
4510
- /**
4511
- * Lists positions for a market.
4512
- *
4513
- * @throws {@link ListMarketPositionsError}
4514
- * Thrown on failure.
4515
- *
4516
- * @example
4517
- * Fetch the first page of results:
4518
- * ```ts
4519
- * const result = listMarketPositions(client, {
4520
- * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4521
- * pageSize: 10,
4522
- * });
4523
- *
4524
- * const firstPage = await result.firstPage();
4525
- *
4526
- * // Optionally, fetch additional pages:
4527
- * for await (const page of result.from(firstPage.nextCursor)) {
4528
- * // page.items: MetaMarketPosition[]
4529
- * }
4530
- * ```
4531
- *
4532
- * @example
4533
- * Loop through all pages with `for await`:
4534
- * ```ts
4535
- * const result = listMarketPositions(client, {
4536
- * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4537
- * pageSize: 10,
4538
- * });
4539
- *
4540
- * for await (const page of result) {
4541
- * // page.items: MetaMarketPosition[]
4542
- * }
4543
- * ```
4544
- */
4545
- declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPosition[]>;
4546
-
4547
- declare const ListPositionsRequestSchema: z.ZodObject<{
4548
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4549
- user: z.ZodString;
4550
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4551
- eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4552
- sizeThreshold: z.ZodOptional<z.ZodNumber>;
4553
- redeemable: z.ZodOptional<z.ZodBoolean>;
4554
- mergeable: z.ZodOptional<z.ZodBoolean>;
4555
- pageSize: z.ZodDefault<z.ZodNumber>;
4556
- sortBy: z.ZodOptional<z.ZodEnum<{
4557
- CURRENT: "CURRENT";
4558
- INITIAL: "INITIAL";
4559
- TOKENS: "TOKENS";
4560
- CASHPNL: "CASHPNL";
4561
- PERCENTPNL: "PERCENTPNL";
4562
- TITLE: "TITLE";
4563
- RESOLVING: "RESOLVING";
4564
- PRICE: "PRICE";
4565
- AVGPRICE: "AVGPRICE";
4566
- }>>;
4567
- sortDirection: z.ZodOptional<z.ZodEnum<{
4568
- ASC: "ASC";
4569
- DESC: "DESC";
4570
- }>>;
4571
- title: z.ZodOptional<z.ZodString>;
4572
- }, z.core.$strip>;
4573
- declare const ListClosedPositionsRequestSchema: z.ZodObject<{
4574
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4575
- user: z.ZodString;
4576
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4577
- title: z.ZodOptional<z.ZodString>;
4578
- eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4579
- pageSize: z.ZodDefault<z.ZodNumber>;
4580
- sortBy: z.ZodOptional<z.ZodEnum<{
4581
- TITLE: "TITLE";
4582
- PRICE: "PRICE";
4583
- AVGPRICE: "AVGPRICE";
4584
- REALIZEDPNL: "REALIZEDPNL";
4585
- TIMESTAMP: "TIMESTAMP";
4586
- }>>;
4587
- sortDirection: z.ZodOptional<z.ZodEnum<{
4588
- ASC: "ASC";
4589
- DESC: "DESC";
4590
- }>>;
4591
- }, z.core.$strip>;
4592
- declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
4593
- user: z.ZodString;
4594
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4595
- }, z.core.$strip>;
4596
- declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
4597
- user: z.ZodString;
4598
- }, z.core.$strip>;
4599
- declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
4600
- user: z.ZodString;
4601
- }, z.core.$strip>;
4602
- type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
4603
- type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
4604
- type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
4605
- type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
4606
- type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
4607
- type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4608
- declare const ListPositionsError: {
4609
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4610
- };
4611
- /**
4612
- * Lists current positions for a wallet.
4613
- *
4614
- * @throws {@link ListPositionsError}
4615
- * Thrown on failure.
4616
- *
4617
- * @example
4618
- * Fetch the first page of results:
4619
- * ```ts
4620
- * const result = listPositions(client, {
4621
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4622
- * pageSize: 10,
4623
- * });
4624
- *
4625
- * const firstPage = await result.firstPage();
4626
- *
4627
- * // Optionally, fetch additional pages:
4628
- * for await (const page of result.from(firstPage.nextCursor)) {
4629
- * // page.items: Position[]
4630
- * }
4631
- * ```
5341
+ * Lists open interest for one or more markets.
5342
+ *
5343
+ * @remarks
5344
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5345
+ *
5346
+ * @throws {@link ListOpenInterestError}
5347
+ * Thrown on failure.
4632
5348
  *
4633
5349
  * @example
4634
- * Loop through all pages with `for await`:
4635
5350
  * ```ts
4636
- * const result = listPositions(client, {
4637
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4638
- * pageSize: 10,
5351
+ * const openInterest = await listOpenInterest(client, {
5352
+ * market: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
4639
5353
  * });
4640
5354
  *
4641
- * for await (const page of result) {
4642
- * // page.items: Position[]
4643
- * }
5355
+ * // openInterest: OpenInterest[]
4644
5356
  * ```
4645
5357
  */
4646
- declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
4647
- type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4648
- declare const ListClosedPositionsError: {
5358
+ declare function listOpenInterest(client: BaseClient, request?: ListOpenInterestRequest): Promise<OpenInterest[]>;
5359
+ type ListMarketPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
5360
+ declare const ListMarketPositionsError: {
4649
5361
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4650
5362
  };
4651
5363
  /**
4652
- * Lists closed positions for a wallet.
5364
+ * Lists positions for a market.
4653
5365
  *
4654
- * @throws {@link ListClosedPositionsError}
5366
+ * @remarks
5367
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5368
+ *
5369
+ * @throws {@link ListMarketPositionsError}
4655
5370
  * Thrown on failure.
4656
5371
  *
4657
5372
  * @example
4658
5373
  * Fetch the first page of results:
4659
5374
  * ```ts
4660
- * const result = listClosedPositions(client, {
4661
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
5375
+ * const result = listMarketPositions(client, {
5376
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4662
5377
  * pageSize: 10,
4663
5378
  * });
4664
5379
  *
@@ -4666,194 +5381,343 @@ declare const ListClosedPositionsError: {
4666
5381
  *
4667
5382
  * // Optionally, fetch additional pages:
4668
5383
  * for await (const page of result.from(firstPage.nextCursor)) {
4669
- * // page.items: ClosedPosition[]
5384
+ * // page.items: MetaMarketPosition[]
4670
5385
  * }
4671
5386
  * ```
4672
5387
  *
4673
5388
  * @example
4674
5389
  * Loop through all pages with `for await`:
4675
5390
  * ```ts
4676
- * const result = listClosedPositions(client, {
4677
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
5391
+ * const result = listMarketPositions(client, {
5392
+ * market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
4678
5393
  * pageSize: 10,
4679
5394
  * });
4680
5395
  *
4681
5396
  * for await (const page of result) {
4682
- * // page.items: ClosedPosition[]
5397
+ * // page.items: MetaMarketPosition[]
4683
5398
  * }
4684
5399
  * ```
4685
5400
  */
4686
- declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
4687
- type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4688
- declare const FetchPortfolioValueError: {
4689
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4690
- };
5401
+ declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPosition[]>;
5402
+
4691
5403
  /**
4692
- * Fetches the total value for a wallet's positions.
4693
- *
4694
- * @throws {@link FetchPortfolioValueError}
4695
- * Thrown on failure.
4696
- *
4697
- * @example
4698
- * ```ts
4699
- * const value = await fetchPortfolioValue(client, {
4700
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4701
- * });
4702
- *
4703
- * // value: Value[]
4704
- * ```
5404
+ * Parameters for preparing a market position split.
4705
5405
  */
4706
- declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
4707
- type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4708
- declare const FetchTradedMarketCountError: {
4709
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5406
+ type PrepareSplitMarketPositionRequest = {
5407
+ /** Amount of collateral to convert into market positions. */
5408
+ amount: bigint;
5409
+ /** Existing market condition ID that identifies the positions to mint. */
5410
+ conditionId: string | ConditionId;
5411
+ /** Optional transaction metadata for workflows that support metadata. */
5412
+ metadata?: string;
4710
5413
  };
4711
5414
  /**
4712
- * Fetches the total number of markets a wallet has traded.
4713
- *
4714
- * @throws {@link FetchTradedMarketCountError}
4715
- * Thrown on failure.
4716
- *
4717
- * @example
4718
- * ```ts
4719
- * const traded = await fetchTradedMarketCount(client, {
4720
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4721
- * });
4722
- *
4723
- * // traded === Traded
4724
- * ```
5415
+ * Parameters for preparing a combo position split.
4725
5416
  */
4726
- declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
4727
- type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4728
- declare const DownloadAccountingSnapshotError: {
4729
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5417
+ type PrepareSplitComboPositionRequest = {
5418
+ /** Amount of collateral to convert into combo positions. */
5419
+ amount: bigint;
5420
+ /** Protocol v2 leg position IDs that define the combo condition. */
5421
+ legs: string[] | PositionId[];
5422
+ /** Optional transaction metadata for workflows that support metadata. */
5423
+ metadata?: string;
4730
5424
  };
4731
5425
  /**
4732
- * Downloads an accounting snapshot archive for a wallet.
4733
- *
4734
- * @throws {@link DownloadAccountingSnapshotError}
4735
- * Thrown on failure.
4736
- *
4737
- * @example
4738
- * ```ts
4739
- * const snapshot = await downloadAccountingSnapshot(client, {
4740
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4741
- * });
5426
+ * Parameters for preparing either supported position split workflow.
4742
5427
  *
4743
- * // snapshot === Blob
4744
- * ```
5428
+ * @remarks
5429
+ * Provide either a market `conditionId` or combo `legs`.
4745
5430
  */
4746
- declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
4747
-
4748
- declare const PrepareSplitPositionRequestSchema: z.ZodObject<{
4749
- amount: z.ZodBigInt;
4750
- conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4751
- metadata: z.ZodOptional<z.ZodString>;
4752
- }, z.core.$strip>;
4753
- declare const PrepareMergePositionsRequestSchema: z.ZodObject<{
4754
- amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodLiteral<"max">]>;
4755
- conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4756
- metadata: z.ZodOptional<z.ZodString>;
4757
- }, z.core.$strip>;
4758
- declare const PrepareRedeemPositionsRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
4759
- conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4760
- marketId: z.ZodOptional<z.ZodNever>;
4761
- metadata: z.ZodOptional<z.ZodString>;
4762
- }, z.core.$strip>, z.ZodObject<{
4763
- conditionId: z.ZodOptional<z.ZodNever>;
4764
- marketId: z.ZodString;
4765
- metadata: z.ZodOptional<z.ZodString>;
4766
- }, z.core.$strip>]>;
5431
+ type PrepareSplitPositionRequest = PrepareSplitMarketPositionRequest | PrepareSplitComboPositionRequest;
4767
5432
  type SplitPositionWorkflowRequest = GaslessWorkflowRequest | SendSplitPositionTransactionRequest;
4768
5433
  type MergePositionsWorkflowRequest = GaslessWorkflowRequest | SendMergePositionsTransactionRequest;
4769
5434
  type RedeemPositionsWorkflowRequest = GaslessWorkflowRequest | SendRedeemPositionsTransactionRequest;
4770
5435
  type SplitPositionWorkflow = AsyncGenerator<SplitPositionWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4771
5436
  type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4772
5437
  type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
4773
- type PrepareSplitPositionRequest = z.input<typeof PrepareSplitPositionRequestSchema>;
4774
- type PrepareMergePositionsRequest = z.input<typeof PrepareMergePositionsRequestSchema>;
4775
- type PrepareRedeemPositionsRequest = z.input<typeof PrepareRedeemPositionsRequestSchema>;
4776
- type PrepareSplitPositionError = UserInputError;
5438
+ type PrepareSplitPositionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4777
5439
  declare const PrepareSplitPositionError: {
4778
- isError(error: unknown): error is UserInputError;
5440
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5441
+ };
5442
+ type PrepareSplitMarketPositionError = PrepareSplitPositionError;
5443
+ declare const PrepareSplitMarketPositionError: {
5444
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5445
+ };
5446
+ type PrepareSplitComboPositionError = PrepareSplitPositionError;
5447
+ declare const PrepareSplitComboPositionError: {
5448
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4779
5449
  };
4780
5450
  type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4781
5451
  declare const PrepareMergePositionsError: {
4782
5452
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4783
5453
  };
5454
+ type PrepareMergeMarketPositionError = PrepareMergePositionsError;
5455
+ declare const PrepareMergeMarketPositionError: {
5456
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5457
+ };
5458
+ type PrepareMergeComboPositionError = PrepareMergePositionsError;
5459
+ declare const PrepareMergeComboPositionError: {
5460
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5461
+ };
4784
5462
  type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4785
5463
  declare const PrepareRedeemPositionsError: {
4786
5464
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4787
5465
  };
5466
+ type PrepareRedeemMarketPositionsError = PrepareRedeemPositionsError;
5467
+ declare const PrepareRedeemMarketPositionsError: {
5468
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5469
+ };
5470
+ type PrepareRedeemComboPositionError = PrepareRedeemPositionsError;
5471
+ declare const PrepareRedeemComboPositionError: {
5472
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5473
+ };
4788
5474
  /**
4789
5475
  * Starts a split workflow for a market condition.
4790
5476
  *
4791
5477
  * @remarks
4792
- * This is a low-level action that most SDK consumers will not need.
5478
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4793
5479
  *
4794
5480
  * @example
4795
5481
  * ```ts
4796
- * const workflow = await prepareSplitPosition(client, {
5482
+ * const workflow = await prepareSplitMarketPosition(client, {
4797
5483
  * amount: 1n,
4798
5484
  * conditionId:
4799
5485
  * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4800
5486
  * });
4801
5487
  * ```
4802
5488
  *
5489
+ * @throws {@link PrepareSplitMarketPositionError}
5490
+ * Thrown on failure.
5491
+ */
5492
+ declare function prepareSplitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<SplitPositionWorkflow>;
5493
+ /**
5494
+ * Starts a split workflow for a combo position from leg position IDs.
5495
+ *
5496
+ * @remarks
5497
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5498
+ *
5499
+ * @example
5500
+ * ```ts
5501
+ * const workflow = await prepareSplitComboPosition(client, {
5502
+ * amount: 1n,
5503
+ * legs: ['123', '456'],
5504
+ * });
5505
+ * ```
5506
+ *
5507
+ * @throws {@link PrepareSplitComboPositionError}
5508
+ * Thrown on failure.
5509
+ */
5510
+ declare function prepareSplitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<SplitPositionWorkflow>;
5511
+ /**
5512
+ * Starts a split workflow for market or combo positions.
5513
+ *
4803
5514
  * @throws {@link PrepareSplitPositionError}
4804
5515
  * Thrown on failure.
4805
5516
  */
4806
5517
  declare function prepareSplitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<SplitPositionWorkflow>;
4807
- type SplitPositionError = PrepareSplitPositionError | CancelledSigningError | SigningError;
5518
+ type SplitPositionError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
4808
5519
  declare const SplitPositionError: {
4809
- isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
5520
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
5521
+ };
5522
+ type SplitMarketPositionError = SplitPositionError;
5523
+ declare const SplitMarketPositionError: {
5524
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
5525
+ };
5526
+ type SplitComboPositionError = SplitPositionError;
5527
+ declare const SplitComboPositionError: {
5528
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
4810
5529
  };
4811
5530
  /**
4812
5531
  * Splits collateral into market positions.
4813
5532
  *
5533
+ * @remarks
5534
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5535
+ *
5536
+ * @throws {@link SplitMarketPositionError}
5537
+ * Thrown on failure.
5538
+ */
5539
+ declare function splitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<TransactionHandle>;
5540
+ /**
5541
+ * Splits collateral into combo positions from leg position IDs.
5542
+ *
5543
+ * @remarks
5544
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5545
+ *
5546
+ * @throws {@link SplitComboPositionError}
5547
+ * Thrown on failure.
5548
+ */
5549
+ declare function splitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<TransactionHandle>;
5550
+ /**
5551
+ * Splits collateral into market or combo positions.
5552
+ *
4814
5553
  * @throws {@link SplitPositionError}
4815
5554
  * Thrown on failure.
4816
5555
  */
4817
5556
  declare function splitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
5557
+ /**
5558
+ * Parameters for preparing a market position merge.
5559
+ */
5560
+ type PrepareMergeMarketPositionRequest = {
5561
+ /** Amount per complementary market position to merge. */
5562
+ amount: bigint | 'max';
5563
+ /** Existing market condition ID that identifies the positions to merge. */
5564
+ conditionId: string | ConditionId;
5565
+ /** Optional transaction metadata for workflows that support metadata. */
5566
+ metadata?: string;
5567
+ };
5568
+ /**
5569
+ * Parameters for preparing a combo position merge.
5570
+ */
5571
+ type PrepareMergeComboPositionRequest = {
5572
+ /** Amount per complementary combo position to merge. */
5573
+ amount: bigint | 'max';
5574
+ /** Protocol v2 leg position IDs that define the combo condition. */
5575
+ legs: string[] | PositionId[];
5576
+ /** Optional transaction metadata for workflows that support metadata. */
5577
+ metadata?: string;
5578
+ };
5579
+ /**
5580
+ * Parameters for preparing either supported position merge workflow.
5581
+ *
5582
+ * @remarks
5583
+ * Provide either a market `conditionId` or combo `legs`.
5584
+ */
5585
+ type PrepareMergePositionsRequest = PrepareMergeMarketPositionRequest | PrepareMergeComboPositionRequest;
4818
5586
  /**
4819
5587
  * Starts a workflow to merge complementary positions in a market back into collateral.
4820
5588
  *
4821
5589
  * @remarks
4822
- * This is a low-level action that most SDK consumers will not need.
5590
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4823
5591
  *
4824
5592
  * @example
4825
5593
  * ```ts
4826
- * const workflow = await prepareMergePositions(client, {
5594
+ * const workflow = await prepareMergeMarketPosition(client, {
4827
5595
  * amount: 'max',
4828
5596
  * conditionId:
4829
5597
  * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4830
5598
  * });
4831
5599
  * ```
4832
5600
  *
5601
+ * @throws {@link PrepareMergeMarketPositionError}
5602
+ * Thrown on failure.
5603
+ */
5604
+ declare function prepareMergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<MergePositionsWorkflow>;
5605
+ /**
5606
+ * Starts a workflow to merge complementary combo positions back into collateral.
5607
+ *
5608
+ * @remarks
5609
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5610
+ *
5611
+ * @example
5612
+ * ```ts
5613
+ * const workflow = await prepareMergeComboPosition(client, {
5614
+ * amount: 'max',
5615
+ * legs: ['123', '456'],
5616
+ * });
5617
+ * ```
5618
+ *
5619
+ * @throws {@link PrepareMergeComboPositionError}
5620
+ * Thrown on failure.
5621
+ */
5622
+ declare function prepareMergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<MergePositionsWorkflow>;
5623
+ /**
5624
+ * Starts a merge workflow for market or combo positions.
5625
+ *
4833
5626
  * @throws {@link PrepareMergePositionsError}
4834
5627
  * Thrown on failure.
4835
5628
  */
4836
5629
  declare function prepareMergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<MergePositionsWorkflow>;
4837
- type MergePositionsError = PrepareMergePositionsError | CancelledSigningError | SigningError;
5630
+ type MergePositionsError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
4838
5631
  declare const MergePositionsError: {
4839
- isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5632
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
5633
+ };
5634
+ type MergeMarketPositionError = MergePositionsError;
5635
+ declare const MergeMarketPositionError: {
5636
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
5637
+ };
5638
+ type MergeComboPositionError = MergePositionsError;
5639
+ declare const MergeComboPositionError: {
5640
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
4840
5641
  };
4841
5642
  /**
4842
5643
  * Merges complementary market positions back into collateral.
4843
5644
  *
5645
+ * @remarks
5646
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5647
+ *
5648
+ * @throws {@link MergeMarketPositionError}
5649
+ * Thrown on failure.
5650
+ */
5651
+ declare function mergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<TransactionHandle>;
5652
+ /**
5653
+ * Merges complementary combo positions back into collateral.
5654
+ *
5655
+ * @remarks
5656
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5657
+ *
5658
+ * @throws {@link MergeComboPositionError}
5659
+ * Thrown on failure.
5660
+ */
5661
+ declare function mergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<TransactionHandle>;
5662
+ /**
5663
+ * Merges complementary market or combo positions back into collateral.
5664
+ *
4844
5665
  * @throws {@link MergePositionsError}
4845
5666
  * Thrown on failure.
4846
5667
  */
4847
5668
  declare function mergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
4848
5669
  /**
4849
- * Starts a redemption workflow for resolved positions.
5670
+ * Parameters for preparing a market position redemption by condition ID.
5671
+ */
5672
+ type PrepareRedeemMarketPositionsByConditionIdRequest = {
5673
+ /** Existing market condition ID that identifies the positions to redeem. */
5674
+ conditionId: string | ConditionId;
5675
+ marketId?: never;
5676
+ amount?: never;
5677
+ positionId?: never;
5678
+ /** Optional transaction metadata for workflows that support metadata. */
5679
+ metadata?: string;
5680
+ };
5681
+ /**
5682
+ * Parameters for preparing a market position redemption by market ID.
5683
+ */
5684
+ type PrepareRedeemMarketPositionsByMarketIdRequest = {
5685
+ conditionId?: never;
5686
+ /** Existing market ID that identifies the positions to redeem. */
5687
+ marketId: string;
5688
+ amount?: never;
5689
+ positionId?: never;
5690
+ /** Optional transaction metadata for workflows that support metadata. */
5691
+ metadata?: string;
5692
+ };
5693
+ /**
5694
+ * Parameters for preparing a combo position redemption.
5695
+ */
5696
+ type PrepareRedeemComboPositionRequest = {
5697
+ /** Protocol v2 combo YES/NO position ID to redeem. */
5698
+ positionId: string | PositionId;
5699
+ conditionId?: never;
5700
+ marketId?: never;
5701
+ /** Optional transaction metadata for workflows that support metadata. */
5702
+ metadata?: string;
5703
+ };
5704
+ /**
5705
+ * Parameters for preparing either supported position redemption workflow.
5706
+ *
5707
+ * @remarks
5708
+ * Provide either a market `conditionId` or `marketId`, or a combo `positionId`.
5709
+ */
5710
+ type PrepareRedeemPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest | PrepareRedeemComboPositionRequest;
5711
+ type PrepareRedeemMarketPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest;
5712
+ /**
5713
+ * Starts a redemption workflow for resolved market positions.
4850
5714
  *
4851
5715
  * @remarks
4852
- * This is a low-level action that most SDK consumers will not need.
5716
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4853
5717
  *
4854
5718
  * @example
4855
5719
  * ```ts
4856
- * const workflow = await prepareRedeemPositions(client, {
5720
+ * const workflow = await prepareRedeemMarketPositions(client, {
4857
5721
  * conditionId:
4858
5722
  * '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
4859
5723
  * });
@@ -4861,21 +5725,51 @@ declare function mergePositions(client: BaseSecureClient, request: PrepareMergeP
4861
5725
  *
4862
5726
  * @example
4863
5727
  * ```ts
4864
- * const workflow = await prepareRedeemPositions(client, {
5728
+ * const workflow = await prepareRedeemMarketPositions(client, {
4865
5729
  * marketId: '12345',
4866
5730
  * });
4867
5731
  * ```
4868
5732
  *
5733
+ * @throws {@link PrepareRedeemMarketPositionsError}
5734
+ * Thrown on failure.
5735
+ */
5736
+ declare function prepareRedeemMarketPositions(client: BaseSecureClient, request: PrepareRedeemMarketPositionsRequest): Promise<RedeemPositionsWorkflow>;
5737
+ /**
5738
+ * Starts a redemption workflow for a resolved combo position.
5739
+ *
5740
+ * @remarks
5741
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5742
+ *
5743
+ * @example
5744
+ * ```ts
5745
+ * const workflow = await prepareRedeemComboPosition(client, {
5746
+ * positionId: '123',
5747
+ * });
5748
+ * ```
5749
+ *
5750
+ * @throws {@link PrepareRedeemComboPositionError}
5751
+ * Thrown on failure.
5752
+ */
5753
+ declare function prepareRedeemComboPosition(client: BaseSecureClient, request: PrepareRedeemComboPositionRequest): Promise<RedeemPositionsWorkflow>;
5754
+ /**
5755
+ * Starts a redemption workflow for resolved market or combo positions.
5756
+ *
5757
+ * @remarks
5758
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5759
+ *
4869
5760
  * @throws {@link PrepareRedeemPositionsError}
4870
5761
  * Thrown on failure.
4871
5762
  */
4872
5763
  declare function prepareRedeemPositions(client: BaseSecureClient, request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
4873
- type RedeemPositionsError = PrepareRedeemPositionsError | CancelledSigningError | SigningError;
5764
+ type RedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
4874
5765
  declare const RedeemPositionsError: {
4875
5766
  isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4876
5767
  };
4877
5768
  /**
4878
- * Redeems resolved market positions.
5769
+ * Redeems resolved market or combo positions.
5770
+ *
5771
+ * @remarks
5772
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
4879
5773
  *
4880
5774
  * @throws {@link RedeemPositionsError}
4881
5775
  * Thrown on failure.
@@ -4893,6 +5787,9 @@ declare const FetchPublicProfileError: {
4893
5787
  /**
4894
5788
  * Fetches a public profile by wallet address.
4895
5789
  *
5790
+ * @remarks
5791
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5792
+ *
4896
5793
  * @throws {@link FetchPublicProfileError}
4897
5794
  * Thrown on failure.
4898
5795
  *
@@ -4941,6 +5838,9 @@ declare const SearchError: {
4941
5838
  /**
4942
5839
  * Runs a public full-text search.
4943
5840
  *
5841
+ * @remarks
5842
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5843
+ *
4944
5844
  * @throws {@link SearchError}
4945
5845
  * Thrown on failure.
4946
5846
  *
@@ -4966,12 +5866,9 @@ declare function search(client: BaseClient, request: SearchRequest): Paginated<S
4966
5866
 
4967
5867
  declare const ListSeriesRequestSchema: z.ZodObject<{
4968
5868
  ascending: z.ZodOptional<z.ZodBoolean>;
4969
- categoriesIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4970
- categoriesLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
4971
5869
  closed: z.ZodOptional<z.ZodBoolean>;
4972
5870
  cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4973
5871
  excludeEvents: z.ZodOptional<z.ZodBoolean>;
4974
- includeChat: z.ZodOptional<z.ZodBoolean>;
4975
5872
  locale: z.ZodOptional<z.ZodString>;
4976
5873
  order: z.ZodOptional<z.ZodString>;
4977
5874
  pageSize: z.ZodDefault<z.ZodNumber>;
@@ -4984,7 +5881,6 @@ declare const ListSeriesRequestSchema: z.ZodObject<{
4984
5881
  }, z.core.$strip>;
4985
5882
  declare const FetchSeriesRequestSchema: z.ZodObject<{
4986
5883
  id: z.ZodString;
4987
- includeChat: z.ZodOptional<z.ZodBoolean>;
4988
5884
  locale: z.ZodOptional<z.ZodString>;
4989
5885
  }, z.core.$strip>;
4990
5886
  type ListSeriesRequest = z.input<typeof ListSeriesRequestSchema>;
@@ -4996,6 +5892,9 @@ declare const ListSeriesError: {
4996
5892
  /**
4997
5893
  * Lists series.
4998
5894
  *
5895
+ * @remarks
5896
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5897
+ *
4999
5898
  * @throws {@link ListSeriesError}
5000
5899
  * Thrown on failure.
5001
5900
  *
@@ -5036,6 +5935,9 @@ declare const FetchSeriesError: {
5036
5935
  /**
5037
5936
  * Fetches a series.
5038
5937
  *
5938
+ * @remarks
5939
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5940
+ *
5039
5941
  * @throws {@link FetchSeriesError}
5040
5942
  * Thrown on failure.
5041
5943
  *
@@ -5043,7 +5945,7 @@ declare const FetchSeriesError: {
5043
5945
  * ```ts
5044
5946
  * const series = await fetchSeries(client, {
5045
5947
  * id: 'fed-daily-series',
5046
- * includeChat: true,
5948
+ * locale: 'en',
5047
5949
  * });
5048
5950
  *
5049
5951
  * // series === Series
@@ -5059,7 +5961,12 @@ type CryptoPricesEventType = CryptoPricesEvent['type'];
5059
5961
  type EquityPricesEventType = EquityPricesEvent['type'];
5060
5962
  type MarketSubscription = {
5061
5963
  topic: 'market';
5964
+ /** Token IDs whose market events should be delivered. */
5062
5965
  tokenIds: readonly string[];
5966
+ /**
5967
+ * When `true`, the server additionally emits `MarketBestBidAskEvent`,
5968
+ * `NewMarketEvent`, and `MarketResolvedEvent`.
5969
+ */
5063
5970
  customFeatureEnabled?: boolean;
5064
5971
  };
5065
5972
  type UserSubscription = {
@@ -5115,6 +6022,9 @@ type SubscribeError = TransportError;
5115
6022
  /**
5116
6023
  * Starts one or more realtime subscriptions on this client.
5117
6024
  *
6025
+ * @remarks
6026
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6027
+ *
5118
6028
  * @throws {@link SubscribeError}
5119
6029
  * Thrown when the realtime subscription cannot be established or fails.
5120
6030
  *
@@ -5135,7 +6045,6 @@ declare function subscribe<const TSubscriptions extends readonly SecureSubscript
5135
6045
  declare const ListTagsRequestSchema: z.ZodObject<{
5136
6046
  ascending: z.ZodOptional<z.ZodBoolean>;
5137
6047
  cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5138
- includeChat: z.ZodOptional<z.ZodBoolean>;
5139
6048
  includeTemplate: z.ZodOptional<z.ZodBoolean>;
5140
6049
  isCarousel: z.ZodOptional<z.ZodBoolean>;
5141
6050
  locale: z.ZodOptional<z.ZodString>;
@@ -5144,7 +6053,6 @@ declare const ListTagsRequestSchema: z.ZodObject<{
5144
6053
  }, z.core.$strip>;
5145
6054
  declare const FetchTagRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
5146
6055
  id: z.ZodString;
5147
- includeChat: z.ZodOptional<z.ZodBoolean>;
5148
6056
  includeTemplate: z.ZodOptional<z.ZodBoolean>;
5149
6057
  locale: z.ZodOptional<z.ZodString>;
5150
6058
  }, z.core.$strip>, z.ZodObject<{
@@ -5194,6 +6102,9 @@ declare const ListTagsError: {
5194
6102
  /**
5195
6103
  * Lists tags.
5196
6104
  *
6105
+ * @remarks
6106
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6107
+ *
5197
6108
  * @throws {@link ListTagsError}
5198
6109
  * Thrown on failure.
5199
6110
  *
@@ -5234,6 +6145,9 @@ declare const FetchTagError: {
5234
6145
  /**
5235
6146
  * Fetches a tag by id or slug.
5236
6147
  *
6148
+ * @remarks
6149
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6150
+ *
5237
6151
  * @throws {@link FetchTagError}
5238
6152
  * Thrown on failure.
5239
6153
  *
@@ -5255,6 +6169,9 @@ declare const FetchRelatedTagsError: {
5255
6169
  /**
5256
6170
  * Fetches related tag relationships by id or slug.
5257
6171
  *
6172
+ * @remarks
6173
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6174
+ *
5258
6175
  * @throws {@link FetchRelatedTagsError}
5259
6176
  * Thrown on failure.
5260
6177
  *
@@ -5277,6 +6194,9 @@ declare const FetchRelatedTagResourcesError: {
5277
6194
  /**
5278
6195
  * Fetches resources linked from related tag relationships by id or slug.
5279
6196
  *
6197
+ * @remarks
6198
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6199
+ *
5280
6200
  * @throws {@link FetchRelatedTagResourcesError}
5281
6201
  * Thrown on failure.
5282
6202
  *
@@ -5311,6 +6231,9 @@ declare const ListTeamsError: {
5311
6231
  /**
5312
6232
  * Lists teams.
5313
6233
  *
6234
+ * @remarks
6235
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6236
+ *
5314
6237
  * @throws {@link ListTeamsError}
5315
6238
  * Thrown on failure.
5316
6239
  *
@@ -5362,7 +6285,7 @@ declare const PrepareErc20TransferError: {
5362
6285
  * Starts an ERC-20 transfer workflow.
5363
6286
  *
5364
6287
  * @remarks
5365
- * This is a low-level action that most SDK consumers will not need.
6288
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5366
6289
  *
5367
6290
  * @example
5368
6291
  * ```ts
@@ -5377,13 +6300,16 @@ declare const PrepareErc20TransferError: {
5377
6300
  * Thrown on failure.
5378
6301
  */
5379
6302
  declare function prepareErc20Transfer(client: BaseSecureClient, request: PrepareErc20TransferRequest): Promise<Erc20TransferWorkflow>;
5380
- type TransferErc20Error = PrepareErc20TransferError | CancelledSigningError | SigningError;
6303
+ type TransferErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
5381
6304
  declare const TransferErc20Error: {
5382
- isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
6305
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5383
6306
  };
5384
6307
  /**
5385
6308
  * Transfers ERC-20 tokens from the authenticated account.
5386
6309
  *
6310
+ * @remarks
6311
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
6312
+ *
5387
6313
  * @throws {@link TransferErc20Error}
5388
6314
  * Thrown on failure.
5389
6315
  */
@@ -5460,4 +6386,4 @@ type Signer = {
5460
6386
  sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
5461
6387
  };
5462
6388
 
5463
- export { FetchRewardPercentagesError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type EnvironmentConfig as E, FetchClosedOnlyModeError as F, FetchLastTradePricesError as G, FetchMarketError as H, FetchMarketTagsError as I, FetchMidpointError as J, FetchMidpointsError as K, FetchNotificationsError as L, FetchOrderBookError as M, FetchOrderBooksError as N, FetchOrderError as O, FetchOrderScoringError as P, FetchOrdersScoringError as Q, FetchPortfolioValueError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchPriceError as V, FetchPriceHistoryError as W, FetchPricesError as X, FetchPublicProfileError as Y, FetchRelatedTagResourcesError as Z, FetchRelatedTagsError as _, type TypedData as a, SetupGaslessWalletError as a$, FetchSeriesError as a0, FetchSpreadError as a1, FetchSpreadsError as a2, FetchTagError as a3, FetchTotalEarningsForUserForDayError as a4, FetchTradedMarketCountError as a5, InsufficientLiquidityError as a6, IsGaslessReadyError as a7, ListAccountTradesError as a8, ListActivityError as a9, PostOrderError as aA, PostOrdersError as aB, type PublicAccountActions as aC, type PublicActions as aD, type PublicClient as aE, type PublicClientOptions as aF, type PublicRewardsActions as aG, type PublicSubscriptionsActions as aH, RateLimitError as aI, RedeemPositionsError as aJ, RequestRejectedError as aK, type RequestRejectedErrorOptions as aL, SearchError as aM, type SecureAccountActions as aN, type SecureActions as aO, type SecureClient as aP, type SecureClientOptions as aQ, type SecureDownloadAccountingSnapshotRequest as aR, type SecureFetchPortfolioValueRequest as aS, type SecureFetchTradedMarketCountRequest as aT, type SecureListActivityRequest as aU, type SecureListClosedPositionsRequest as aV, type SecureListPositionsRequest as aW, type SecureRewardsActions as aX, type SecureSubscriptionsActions as aY, type SecureTradingActions as aZ, type SecureWalletActions as a_, ListBuilderLeaderboardError as aa, ListBuilderTradesError as ab, ListBuilderVolumeError as ac, ListClosedPositionsError as ad, ListCommentsByUserAddressError as ae, ListCommentsError as af, ListCurrentRewardsError as ag, ListEventsError as ah, ListMarketHoldersError as ai, ListMarketPositionsError as aj, ListMarketRewardsError as ak, ListMarketsError as al, ListOpenInterestError as am, ListOpenOrdersError as an, ListPositionsError as ao, ListSeriesError as ap, ListTagsError as aq, ListTeamsError as ar, ListTraderLeaderboardError as as, ListTradesError as at, ListUserEarningsAndMarketsConfigError as au, ListUserEarningsForDayError as av, MergePositionsError as aw, type Page as ax, PageSizeSchema as ay, type Paginated as az, type TransactionCall as b, type FetchLastTradePricesRequest as b$, SetupTradingApprovalsError as b0, type SignerTransactionRequest as b1, SigningError as b2, SplitPositionError as b3, TimeoutError as b4, TransactionFailedError as b5, type TransactionHandle as b6, type TransactionOutcome as b7, TransferErc20Error as b8, TransportError as b9, type DownloadAccountingSnapshotRequest as bA, type DropNotificationsRequest as bB, type EquityPricesEventType as bC, type EquityPricesSubscription as bD, type Erc1155ApprovalForAllWorkflow as bE, type Erc1155ApprovalForAllWorkflowRequest as bF, type Erc20ApprovalWorkflow as bG, type Erc20ApprovalWorkflowRequest as bH, type Erc20TransferWorkflow as bI, type Erc20TransferWorkflowRequest as bJ, type EstimateMarketBuyPriceRequest as bK, type EstimateMarketPriceRequest as bL, type EstimateMarketSellPriceRequest as bM, type EventForSubscriptionSpec as bN, type EventForSubscriptionSpecs as bO, FetchBalanceAllowanceError as bP, type FetchBalanceAllowanceRequest as bQ, FetchBuilderFeeRatesError as bR, type FetchBuilderFeeRatesRequest as bS, type FetchCommentsByIdRequest as bT, type FetchEventLiveVolumeRequest as bU, type FetchEventRequest as bV, type FetchEventTagsRequest as bW, FetchExecuteParamsError as bX, type FetchExecuteParamsRequest as bY, type FetchGaslessTransactionRequest as bZ, type FetchLastTradePriceRequest as b_, type TypedDataDomain as ba, type TypedDataField as bb, UnexpectedResponseError as bc, WaitForTransactionError as bd, type WalletDerivationConfig as be, accountActions as bf, allActions as bg, analyticsActions as bh, createPublicClient as bi, createSecureClient as bj, dataActions as bk, discoveryActions as bl, makeErrorGuard as bm, production as bn, rewardsActions as bo, subscriptionsActions as bp, tradingActions as bq, walletActions as br, type CancelMarketOrdersRequest as bs, type CancelOrderRequest as bt, type CancelOrdersRequest as bu, type CommentsEventType as bv, type CommentsSubscription as bw, type CryptoPricesEventType as bx, type CryptoPricesSubscription as by, DeployDepositWalletError as bz, type AccountIdentity as c, type OrderWorkflowRequest as c$, FetchMarketInfoError as c0, type FetchMarketInfoRequest as c1, type FetchMarketRequest as c2, type FetchMarketTagsRequest as c3, type FetchMidpointRequest as c4, type FetchMidpointsRequest as c5, FetchNegRiskError as c6, type FetchNegRiskRequest as c7, type FetchOrderBookRequest as c8, type FetchOrderBooksRequest as c9, type ListBuilderVolumeRequest as cA, type ListClosedPositionsRequest as cB, type ListCommentsByUserAddressRequest as cC, type ListCommentsRequest as cD, type ListCurrentRewardsRequest as cE, type ListEventsRequest as cF, type ListMarketHoldersRequest as cG, type ListMarketPositionsRequest as cH, type ListMarketRewardsRequest as cI, type ListMarketsRequest as cJ, type ListOpenInterestRequest as cK, type ListOpenOrdersRequest as cL, type ListPositionsRequest as cM, type ListSeriesRequest as cN, type ListTagsRequest as cO, type ListTeamsRequest as cP, type ListTraderLeaderboardRequest as cQ, type ListTradesRequest as cR, type ListUserEarningsAndMarketsConfigRequest as cS, type ListUserEarningsForDayRequest as cT, type MarketEventType as cU, type MarketSubscription as cV, type MergePositionsWorkflow as cW, type MergePositionsWorkflowRequest as cX, type OrderDraft as cY, type OrderPostingWorkflow as cZ, type OrderWorkflow as c_, type FetchOrderRequest as ca, type FetchOrderScoringRequest as cb, type FetchOrdersScoringRequest as cc, type FetchPortfolioValueRequest as cd, type FetchPriceHistoryRequest as ce, type FetchPriceRequest as cf, type FetchPricesRequest as cg, type FetchPublicProfileRequest as ch, type FetchRelatedTagResourcesRequest as ci, type FetchRelatedTagsRequest as cj, type FetchSeriesRequest as ck, type FetchSpreadRequest as cl, type FetchSpreadsRequest as cm, type FetchTagRequest as cn, FetchTickSizeError as co, type FetchTickSizeRequest as cp, type FetchTotalEarningsForUserForDayRequest as cq, type FetchTradedMarketCountRequest as cr, GaslessTransactionMetadataSchema as cs, type GaslessWorkflow as ct, type GaslessWorkflowRequest as cu, type IsGaslessReadyRequest as cv, type ListAccountTradesRequest as cw, type ListActivityRequest as cx, type ListBuilderLeaderboardRequest as cy, type ListBuilderTradesRequest as cz, type AnalyticsActions as d, fetchEventLiveVolume as d$, type PostOrdersRequest as d0, PrepareErc1155ApprovalForAllError as d1, type PrepareErc1155ApprovalForAllRequest as d2, PrepareErc20ApprovalError as d3, type PrepareErc20ApprovalRequest as d4, PrepareErc20TransferError as d5, type PrepareErc20TransferRequest as d6, PrepareGaslessTransactionError as d7, type PrepareGaslessTransactionRequest as d8, type PrepareLimitOrderRequest as d9, type SportsEventType as dA, type SportsSubscription as dB, type SubscribeError as dC, type SubscriptionHandle as dD, type TradingApprovalsWorkflow as dE, type TradingApprovalsWorkflowRequest as dF, UpdateBalanceAllowanceError as dG, type UpdateBalanceAllowanceRequest as dH, type UserEventType as dI, type UserSubscription as dJ, WaitForGaslessTransactionError as dK, approveErc1155ForAll as dL, approveErc20 as dM, cancelAll as dN, cancelMarketOrders as dO, cancelOrder as dP, cancelOrders as dQ, deployDepositWallet as dR, downloadAccountingSnapshot as dS, dropNotifications as dT, estimateMarketPrice as dU, fetchBalanceAllowance as dV, fetchBuilderFeeRates as dW, fetchBuilderVolume as dX, fetchClosedOnlyMode as dY, fetchCommentsById as dZ, fetchEvent as d_, type PrepareMarketBuyOrderRequest as da, type PrepareMarketOrderRequest as db, type PrepareMarketSellOrderRequest as dc, PrepareMergePositionsError as dd, type PrepareMergePositionsRequest as de, PrepareRedeemPositionsError as df, type PrepareRedeemPositionsRequest as dg, PrepareSplitPositionError as dh, type PrepareSplitPositionRequest as di, PrepareTradingApprovalsError as dj, type PublicRealtimeEvent as dk, type PublicRealtimeTopic as dl, type PublicSubscriptionSpec as dm, type RedeemPositionsWorkflow as dn, type RedeemPositionsWorkflowRequest as dp, ResolveConditionByTokenError as dq, type ResolveConditionByTokenRequest as dr, type SearchRequest as ds, type SearchResults as dt, type SecureRealtimeEvent as du, type SecureRealtimeTopic as dv, type SecureSubscriptionSpec as dw, type SignedOrder as dx, type SplitPositionWorkflow as dy, type SplitPositionWorkflowRequest as dz, ApproveErc1155ForAllError as e, prepareMergePositions as e$, fetchEventTags as e0, fetchExecuteParams as e1, fetchLastTradePrice as e2, fetchLastTradePrices as e3, fetchMarket as e4, fetchMarketInfo as e5, fetchMarketTags as e6, fetchMidpoint as e7, fetchMidpoints as e8, fetchNegRisk as e9, listBuilderTrades as eA, listClosedPositions as eB, listComments as eC, listCommentsByUserAddress as eD, listCurrentRewards as eE, listEvents as eF, listMarketHolders as eG, listMarketPositions as eH, listMarketRewards as eI, listMarkets as eJ, listOpenInterest as eK, listOpenOrders as eL, listPositions as eM, listSeries as eN, listTags as eO, listTeams as eP, listTraderLeaderboard as eQ, listTrades as eR, listUserEarningsAndMarketsConfig as eS, listUserEarningsForDay as eT, mergePositions as eU, postOrder as eV, postOrders as eW, prepareErc1155ApprovalForAll as eX, prepareErc20Approval as eY, prepareErc20Transfer as eZ, prepareGaslessTransaction as e_, fetchNotifications as ea, fetchOrder as eb, fetchOrderBook as ec, fetchOrderBooks as ed, fetchOrderScoring as ee, fetchOrdersScoring as ef, fetchPortfolioValue as eg, fetchPrice as eh, fetchPriceHistory as ei, fetchPrices as ej, fetchPublicProfile as ek, fetchRelatedTagResources as el, fetchRelatedTags as em, fetchRewardPercentages as en, fetchSeries as eo, fetchSpread as ep, fetchSpreads as eq, fetchTag as er, fetchTickSize as es, fetchTotalEarningsForUserForDay as et, fetchTradedMarketCount as eu, fetchTransaction as ev, isGaslessReady as ew, listAccountTrades as ex, listActivity as ey, listBuilderLeaderboard as ez, ApproveErc20Error as f, prepareRedeemPositions as f0, prepareSplitPosition as f1, prepareTradingApprovals as f2, redeemPositions as f3, resolveConditionByToken as f4, search as f5, setupTradingApprovals as f6, splitPosition as f7, subscribe as f8, transferErc20 as f9, updateBalanceAllowance as fa, BasePublicClient as g, BaseSecureClient as h, type BeginAuthenticationRequest as i, CancelMarketOrdersError as j, CancelOrderError as k, CancelOrdersError as l, CancelledSigningError as m, type Client as n, type ClientActions as o, type ClientDecorator as p, CreateSecureClientError as q, type DiscoveryActions as r, DownloadAccountingSnapshotError as s, DropNotificationsError as t, EstimateMarketPriceError as u, FetchCommentsByIdError as v, FetchEventError as w, FetchEventLiveVolumeError as x, FetchEventTagsError as y, FetchLastTradePriceError as z };
6389
+ export { FetchRewardPercentagesError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type EnvironmentConfig as E, FetchClosedOnlyModeError as F, FetchLastTradePricesError as G, FetchMarketError as H, FetchMarketTagsError as I, FetchMidpointError as J, FetchMidpointsError as K, FetchNotificationsError as L, FetchOrderBookError as M, FetchOrderBooksError as N, FetchOrderError as O, FetchOrderScoringError as P, FetchOrdersScoringError as Q, FetchPortfolioValueError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchPriceError as V, FetchPriceHistoryError as W, FetchPricesError as X, FetchPublicProfileError as Y, FetchRelatedTagResourcesError as Z, FetchRelatedTagsError as _, type TypedData as a, type RfqQuoteResponse as a$, FetchSeriesError as a0, FetchSpreadError as a1, FetchSpreadsError as a2, FetchTagError as a3, FetchTotalEarningsForUserForDayError as a4, FetchTradedMarketCountError as a5, InsufficientLiquidityError as a6, ListAccountTradesError as a7, ListActivityError as a8, ListBuilderLeaderboardError as a9, type Paginated as aA, PostOrderError as aB, PostOrdersError as aC, type PublicAccountActions as aD, type PublicActions as aE, type PublicClient as aF, type PublicClientOptions as aG, type PublicRewardsActions as aH, type PublicSubscriptionsActions as aI, RateLimitError as aJ, RedeemPositionsError as aK, RequestRejectedError as aL, type RequestRejectedErrorOptions as aM, type RfqCancelQuoteAck as aN, RfqCancelQuoteError as aO, RfqCancelQuoteRejectedError as aP, type RfqCancelQuoteRejectedErrorOptions as aQ, type RfqConfirmationAck as aR, RfqConfirmationError as aS, RfqConfirmationRejectedError as aT, type RfqConfirmationRequestEvent as aU, type RfqEvent as aV, RfqQuoteError as aW, type RfqQuoteReference as aX, RfqQuoteRejectedError as aY, type RfqQuoteRejectedErrorOptions as aZ, type RfqQuoteRequestEvent as a_, ListBuilderTradesError as aa, ListBuilderVolumeError as ab, ListClosedPositionsError as ac, ListComboPositionsError as ad, ListCommentsByUserAddressError as ae, ListCommentsError as af, ListCurrentRewardsError as ag, ListEventsError as ah, ListMarketHoldersError as ai, ListMarketPositionsError as aj, ListMarketRewardsError as ak, ListMarketsError as al, ListOpenInterestError as am, ListOpenOrdersError as an, ListPositionsError as ao, ListSeriesError as ap, ListTagsError as aq, ListTeamsError as ar, ListTraderLeaderboardError as as, ListTradesError as at, ListUserEarningsAndMarketsConfigError as au, ListUserEarningsForDayError as av, MergePositionsError as aw, OpenRfqSessionError as ax, type Page as ay, PageSizeSchema as az, type TransactionCall as b, type Erc1155ApprovalForAllWorkflowRequest as b$, type RfqQuoteSource as b0, type RfqSession as b1, SearchError as b2, type SecureAccountActions as b3, type SecureActions as b4, type SecureClient as b5, type SecureClientOptions as b6, type SecureDownloadAccountingSnapshotRequest as b7, type SecureFetchPortfolioValueRequest as b8, type SecureFetchTradedMarketCountRequest as b9, allActions as bA, analyticsActions as bB, createPublicClient as bC, createSecureClient as bD, dataActions as bE, discoveryActions as bF, makeErrorGuard as bG, production as bH, rewardsActions as bI, rfqActions as bJ, subscriptionsActions as bK, tradingActions as bL, walletActions as bM, type CancelMarketOrdersRequest as bN, type CancelOrderRequest as bO, type CancelOrdersRequest as bP, type CommentsEventType as bQ, type CommentsSubscription as bR, type CryptoPricesEventType as bS, type CryptoPricesSubscription as bT, DeployDepositWalletError as bU, type DeprecatedTransactionHandle as bV, type DownloadAccountingSnapshotRequest as bW, type DropNotificationsRequest as bX, type EquityPricesEventType as bY, type EquityPricesSubscription as bZ, type Erc1155ApprovalForAllWorkflow as b_, type SecureListActivityRequest as ba, type SecureListClosedPositionsRequest as bb, type SecureListComboPositionsRequest as bc, type SecureListPositionsRequest as bd, type SecureRewardsActions as be, type SecureRfqActions as bf, type SecureSubscriptionsActions as bg, type SecureTradingActions as bh, type SecureWalletActions as bi, SetupGaslessWalletError as bj, SetupTradingApprovalsError as bk, type SignerTransactionRequest as bl, SigningError as bm, SplitPositionError as bn, TimeoutError as bo, TransactionFailedError as bp, type TransactionHandle as bq, type TransactionOutcome as br, TransferErc20Error as bs, TransportError as bt, type TypedDataDomain as bu, type TypedDataField as bv, UnexpectedResponseError as bw, WaitForTransactionError as bx, type WalletDerivationConfig as by, accountActions as bz, type AccountIdentity as c, type ListCommentsRequest as c$, type Erc20ApprovalWorkflow as c0, type Erc20ApprovalWorkflowRequest as c1, type Erc20TransferWorkflow as c2, type Erc20TransferWorkflowRequest as c3, type EstimateMarketBuyPriceRequest as c4, type EstimateMarketPriceRequest as c5, type EstimateMarketSellPriceRequest as c6, type EventForSubscriptionSpec as c7, type EventForSubscriptionSpecs as c8, FetchBalanceAllowanceError as c9, type FetchPriceHistoryRequest as cA, type FetchPriceRequest as cB, type FetchPricesRequest as cC, type FetchPublicProfileRequest as cD, type FetchRelatedTagResourcesRequest as cE, type FetchRelatedTagsRequest as cF, type FetchSeriesRequest as cG, type FetchSpreadRequest as cH, type FetchSpreadsRequest as cI, type FetchTagRequest as cJ, FetchTickSizeError as cK, type FetchTickSizeRequest as cL, type FetchTotalEarningsForUserForDayRequest as cM, type FetchTradedMarketCountRequest as cN, GaslessTransactionMetadataSchema as cO, type GaslessWorkflow as cP, type GaslessWorkflowRequest as cQ, IsWalletDeployedError as cR, type IsWalletDeployedRequest as cS, type ListAccountTradesRequest as cT, type ListActivityRequest as cU, type ListBuilderLeaderboardRequest as cV, type ListBuilderTradesRequest as cW, type ListBuilderVolumeRequest as cX, type ListClosedPositionsRequest as cY, type ListComboPositionsRequest as cZ, type ListCommentsByUserAddressRequest as c_, type FetchBalanceAllowanceRequest as ca, FetchBuilderFeeRatesError as cb, type FetchBuilderFeeRatesRequest as cc, type FetchCommentsByIdRequest as cd, type FetchEventLiveVolumeRequest as ce, type FetchEventRequest as cf, type FetchEventTagsRequest as cg, FetchExecuteParamsError as ch, type FetchExecuteParamsRequest as ci, type FetchGaslessTransactionRequest as cj, type FetchLastTradePriceRequest as ck, type FetchLastTradePricesRequest as cl, FetchMarketInfoError as cm, type FetchMarketInfoRequest as cn, type FetchMarketRequest as co, type FetchMarketTagsRequest as cp, type FetchMidpointRequest as cq, type FetchMidpointsRequest as cr, FetchNegRiskError as cs, type FetchNegRiskRequest as ct, type FetchOrderBookRequest as cu, type FetchOrderBooksRequest as cv, type FetchOrderRequest as cw, type FetchOrderScoringRequest as cx, type FetchOrdersScoringRequest as cy, type FetchPortfolioValueRequest as cz, type AnalyticsActions as d, type PublicSubscriptionSpec as d$, type ListCurrentRewardsRequest as d0, type ListEventsRequest as d1, type ListMarketHoldersRequest as d2, type ListMarketPositionsRequest as d3, type ListMarketRewardsRequest as d4, type ListMarketsRequest as d5, type ListOpenInterestRequest as d6, type ListOpenOrdersRequest as d7, type ListPositionsRequest as d8, type ListSeriesRequest as d9, type PrepareLimitOrderRequest as dA, type PrepareMarketBuyOrderRequest as dB, type PrepareMarketOrderRequest as dC, type PrepareMarketSellOrderRequest as dD, PrepareMergeComboPositionError as dE, type PrepareMergeComboPositionRequest as dF, PrepareMergeMarketPositionError as dG, type PrepareMergeMarketPositionRequest as dH, PrepareMergePositionsError as dI, type PrepareMergePositionsRequest as dJ, PrepareRedeemComboPositionError as dK, type PrepareRedeemComboPositionRequest as dL, type PrepareRedeemMarketPositionsByConditionIdRequest as dM, type PrepareRedeemMarketPositionsByMarketIdRequest as dN, PrepareRedeemMarketPositionsError as dO, type PrepareRedeemMarketPositionsRequest as dP, PrepareRedeemPositionsError as dQ, type PrepareRedeemPositionsRequest as dR, PrepareSplitComboPositionError as dS, type PrepareSplitComboPositionRequest as dT, PrepareSplitMarketPositionError as dU, type PrepareSplitMarketPositionRequest as dV, PrepareSplitPositionError as dW, type PrepareSplitPositionRequest as dX, PrepareTradingApprovalsError as dY, type PublicRealtimeEvent as dZ, type PublicRealtimeTopic as d_, type ListTagsRequest as da, type ListTeamsRequest as db, type ListTraderLeaderboardRequest as dc, type ListTradesRequest as dd, type ListUserEarningsAndMarketsConfigRequest as de, type ListUserEarningsForDayRequest as df, type MarketEventType as dg, type MarketSubscription as dh, MergeComboPositionError as di, MergeMarketPositionError as dj, type MergePositionsWorkflow as dk, type MergePositionsWorkflowRequest as dl, type OrderDraft as dm, type OrderPostingWorkflow as dn, type OrderWorkflow as dp, type OrderWorkflowRequest as dq, type PostOrdersRequest as dr, PrepareErc1155ApprovalForAllError as ds, type PrepareErc1155ApprovalForAllRequest as dt, PrepareErc20ApprovalError as du, type PrepareErc20ApprovalRequest as dv, PrepareErc20TransferError as dw, type PrepareErc20TransferRequest as dx, PrepareGaslessTransactionError as dy, type PrepareGaslessTransactionRequest as dz, ApproveErc1155ForAllError as e, fetchPrices as e$, type RedeemPositionsWorkflow as e0, type RedeemPositionsWorkflowRequest as e1, ResolveConditionByTokenError as e2, type ResolveConditionByTokenRequest as e3, type RfqConfirmationRejectedErrorOptions as e4, type RfqExecutionUpdateEvent as e5, type SearchRequest as e6, type SearchResults as e7, type SecureRealtimeEvent as e8, type SecureRealtimeTopic as e9, estimateMarketPrice as eA, fetchBalanceAllowance as eB, fetchBuilderFeeRates as eC, fetchBuilderVolume as eD, fetchClosedOnlyMode as eE, fetchCommentsById as eF, fetchEvent as eG, fetchEventLiveVolume as eH, fetchEventTags as eI, fetchExecuteParams as eJ, fetchLastTradePrice as eK, fetchLastTradePrices as eL, fetchMarket as eM, fetchMarketInfo as eN, fetchMarketTags as eO, fetchMidpoint as eP, fetchMidpoints as eQ, fetchNegRisk as eR, fetchNotifications as eS, fetchOrder as eT, fetchOrderBook as eU, fetchOrderBooks as eV, fetchOrderScoring as eW, fetchOrdersScoring as eX, fetchPortfolioValue as eY, fetchPrice as eZ, fetchPriceHistory as e_, type SecureSubscriptionSpec as ea, type SignedOrder as eb, SplitComboPositionError as ec, SplitMarketPositionError as ed, type SplitPositionWorkflow as ee, type SplitPositionWorkflowRequest as ef, type SportsEventType as eg, type SportsSubscription as eh, type SubscribeError as ei, type SubscriptionHandle as ej, type TradingApprovalsWorkflow as ek, type TradingApprovalsWorkflowRequest as el, UpdateBalanceAllowanceError as em, type UpdateBalanceAllowanceRequest as en, type UserEventType as eo, type UserSubscription as ep, WaitForGaslessTransactionError as eq, approveErc1155ForAll as er, approveErc20 as es, cancelAll as et, cancelMarketOrders as eu, cancelOrder as ev, cancelOrders as ew, deployDepositWallet as ex, downloadAccountingSnapshot as ey, dropNotifications as ez, ApproveErc20Error as f, splitPosition as f$, fetchPublicProfile as f0, fetchRelatedTagResources as f1, fetchRelatedTags as f2, fetchRewardPercentages as f3, fetchSeries as f4, fetchSpread as f5, fetchSpreads as f6, fetchTag as f7, fetchTickSize as f8, fetchTotalEarningsForUserForDay as f9, listUserEarningsForDay as fA, mergeComboPosition as fB, mergeMarketPosition as fC, mergePositions as fD, openRfqSession as fE, postOrder as fF, postOrders as fG, prepareErc1155ApprovalForAll as fH, prepareErc20Approval as fI, prepareErc20Transfer as fJ, prepareGaslessTransaction as fK, prepareMergeComboPosition as fL, prepareMergeMarketPosition as fM, prepareMergePositions as fN, prepareRedeemComboPosition as fO, prepareRedeemMarketPositions as fP, prepareRedeemPositions as fQ, prepareSplitComboPosition as fR, prepareSplitMarketPosition as fS, prepareSplitPosition as fT, prepareTradingApprovals as fU, redeemPositions as fV, resolveConditionByToken as fW, search as fX, setupTradingApprovals as fY, splitComboPosition as fZ, splitMarketPosition as f_, fetchTradedMarketCount as fa, fetchTransaction as fb, isWalletDeployed as fc, listAccountTrades as fd, listActivity as fe, listBuilderLeaderboard as ff, listBuilderTrades as fg, listClosedPositions as fh, listComboPositions as fi, listComments as fj, listCommentsByUserAddress as fk, listCurrentRewards as fl, listEvents as fm, listMarketHolders as fn, listMarketPositions as fo, listMarketRewards as fp, listMarkets as fq, listOpenInterest as fr, listOpenOrders as fs, listPositions as ft, listSeries as fu, listTags as fv, listTeams as fw, listTraderLeaderboard as fx, listTrades as fy, listUserEarningsAndMarketsConfig as fz, BasePublicClient as g, subscribe as g0, transferErc20 as g1, updateBalanceAllowance as g2, BaseSecureClient as h, type BeginAuthenticationRequest as i, CancelMarketOrdersError as j, CancelOrderError as k, CancelOrdersError as l, CancelledSigningError as m, type Client as n, type ClientActions as o, type ClientDecorator as p, CreateSecureClientError as q, type DiscoveryActions as r, DownloadAccountingSnapshotError as s, DropNotificationsError as t, EstimateMarketPriceError as u, FetchCommentsByIdError as v, FetchEventError as w, FetchEventLiveVolumeError as x, FetchEventTagsError as y, FetchLastTradePriceError as z };