@polymarket/client 0.1.0-beta.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,15 @@
1
1
  import * as _polymarket_bindings from '@polymarket/bindings';
2
- import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue, TxHashSchema, PositionId, TransactionId } from '@polymarket/bindings';
3
- import * as _polymarket_types from '@polymarket/types';
4
- import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, PrivateKey, TxHash } from '@polymarket/types';
5
- import { WalletType, Event, TagReference, Market, Series, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, Profile, SearchTag } from '@polymarket/bindings/gamma';
2
+ import { PaginationCursor, DecimalString, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue, PositionId, TransactionId } from '@polymarket/bindings';
3
+ import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, TxHash } from '@polymarket/types';
4
+ import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
6
5
  import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
7
6
  import { ZodError, z } from 'zod';
8
7
  import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
9
- 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';
8
+ import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
10
9
  import * as _polymarket_bindings_data from '@polymarket/bindings/data';
11
- import { Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, Activity, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder, Trade } from '@polymarket/bindings/data';
10
+ import { Activity, ComboActivity, Trade, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
12
11
  import { ComboMarket, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId } from '@polymarket/bindings/rfq';
13
- import * as _polymarket_bindings_perps from '@polymarket/bindings/perps';
14
- import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsInstrumentId, PerpsDepositStatusSchema, PerpsWithdrawalStatusSchema, PerpsPnlIntervalSchema, PerpsDecimalInput, PerpsTimeInForce, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsKlineInterval, PerpsInstrumentIdSchema } from '@polymarket/bindings/perps';
12
+ import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsOrderId, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
15
13
  import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
16
14
  import { Hex } from 'ox';
17
15
 
@@ -46,6 +44,48 @@ declare class TransportError extends PolymarketError {
46
44
  constructor(message: string, options?: ErrorOptions);
47
45
  static fromError(error: unknown): TransportError;
48
46
  }
47
+ /**
48
+ * WebSocket close codes defined by RFC 6455 and the IANA WebSocket Close Code
49
+ * Number registry. Codes 4000-4999 are reserved for application use and are
50
+ * intentionally not modeled here.
51
+ */
52
+ declare enum WebSocketKnownCloseCode {
53
+ NormalClosure = 1000,
54
+ GoingAway = 1001,
55
+ ProtocolError = 1002,
56
+ UnsupportedData = 1003,
57
+ /** Synthesized locally when the peer closed without a status code. */
58
+ NoStatusReceived = 1005,
59
+ /** Synthesized locally when the connection dropped without a close frame. */
60
+ AbnormalClosure = 1006,
61
+ InvalidFramePayload = 1007,
62
+ PolicyViolation = 1008,
63
+ MessageTooBig = 1009,
64
+ InternalError = 1011,
65
+ ServiceRestart = 1012,
66
+ TryAgainLater = 1013
67
+ }
68
+ /**
69
+ * A WebSocket close code. Codes enumerated in
70
+ * {@link WebSocketKnownCloseCode} are defined by RFC 6455; other values, such
71
+ * as application-defined 4000-4999 codes, flow through as plain numbers.
72
+ */
73
+ type WebSocketCloseCode = WebSocketKnownCloseCode | (number & {});
74
+ type ConnectionLostErrorOptions = {
75
+ /** WebSocket close code reported for the lost connection. */
76
+ code: WebSocketCloseCode;
77
+ /** Close reason provided by the peer. Empty when none was sent. */
78
+ reason: string;
79
+ };
80
+ /**
81
+ * Error thrown when a live connection ends without the SDK requesting it.
82
+ */
83
+ declare class ConnectionLostError extends PolymarketError {
84
+ name: "ConnectionLostError";
85
+ readonly code: WebSocketCloseCode;
86
+ readonly reason: string;
87
+ constructor(message: string, options: ErrorOptions & ConnectionLostErrorOptions);
88
+ }
49
89
  type RequestRejectedErrorOptions = {
50
90
  status: number;
51
91
  };
@@ -123,6 +163,9 @@ type SendErc20TransferTransactionRequest = {
123
163
  kind: 'sendErc20TransferTransaction';
124
164
  request: SignerTransactionRequest;
125
165
  };
166
+ /**
167
+ * @experimental This API may change in a breaking way in any release, including patch releases.
168
+ */
126
169
  type SendPerpsDepositTransactionRequest = {
127
170
  kind: 'sendPerpsDepositTransaction';
128
171
  request: SignerTransactionRequest;
@@ -280,75 +323,208 @@ type Paginated<T> = AsyncIterable<Page<T>> & {
280
323
  from(cursor?: PaginationCursor): Paginated<T>;
281
324
  };
282
325
 
283
- declare const ListPositionsRequestSchema: z.ZodObject<{
284
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
285
- user: z.ZodString;
326
+ declare const ListTradesRequestSchema: z.ZodObject<{
327
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
328
+ pageSize: z.ZodDefault<z.ZodNumber>;
329
+ takerOnly: z.ZodOptional<z.ZodBoolean>;
330
+ filterType: z.ZodOptional<z.ZodEnum<{
331
+ CASH: "CASH";
332
+ TOKENS: "TOKENS";
333
+ }>>;
334
+ filterAmount: z.ZodOptional<z.ZodNumber>;
286
335
  market: z.ZodOptional<z.ZodArray<z.ZodString>>;
287
336
  eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
288
- sizeThreshold: z.ZodOptional<z.ZodNumber>;
289
- redeemable: z.ZodOptional<z.ZodBoolean>;
290
- mergeable: z.ZodOptional<z.ZodBoolean>;
337
+ user: z.ZodOptional<z.ZodString>;
338
+ side: z.ZodOptional<z.ZodEnum<{
339
+ BUY: "BUY";
340
+ SELL: "SELL";
341
+ }>>;
342
+ start: z.ZodOptional<z.ZodNumber>;
343
+ end: z.ZodOptional<z.ZodNumber>;
344
+ }, z.core.$strip>;
345
+ type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
346
+ type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
347
+ declare const ListTradesError: {
348
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
349
+ };
350
+ /**
351
+ * Lists trades for a wallet, market, or event.
352
+ *
353
+ * @remarks
354
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
355
+ *
356
+ * @throws {@link ListTradesError}
357
+ * Thrown on failure.
358
+ *
359
+ * @example
360
+ * Fetch the first page of results:
361
+ * ```ts
362
+ * const result = listTrades(client, {
363
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
364
+ * pageSize: 10,
365
+ * });
366
+ *
367
+ * const firstPage = await result.firstPage();
368
+ *
369
+ * // Optionally, fetch additional pages:
370
+ * for await (const page of result.from(firstPage.nextCursor)) {
371
+ * // page.items: Trade[]
372
+ * }
373
+ * ```
374
+ *
375
+ * @example
376
+ * Loop through all pages with `for await`:
377
+ * ```ts
378
+ * const result = listTrades(client, {
379
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
380
+ * pageSize: 10,
381
+ * });
382
+ *
383
+ * for await (const page of result) {
384
+ * // page.items: Trade[]
385
+ * }
386
+ * ```
387
+ */
388
+ declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade[]>;
389
+ declare const ListActivityRequestSchema: z.ZodObject<{
390
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
291
391
  pageSize: z.ZodDefault<z.ZodNumber>;
392
+ user: z.ZodString;
393
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
394
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
395
+ type: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof _polymarket_bindings_data.ActivityType>>>;
396
+ start: z.ZodOptional<z.ZodNumber>;
397
+ end: z.ZodOptional<z.ZodNumber>;
292
398
  sortBy: z.ZodOptional<z.ZodEnum<{
293
- CURRENT: "CURRENT";
294
- INITIAL: "INITIAL";
399
+ CASH: "CASH";
295
400
  TOKENS: "TOKENS";
296
- CASHPNL: "CASHPNL";
297
- PERCENTPNL: "PERCENTPNL";
298
- TITLE: "TITLE";
299
- RESOLVING: "RESOLVING";
300
- PRICE: "PRICE";
301
- AVGPRICE: "AVGPRICE";
401
+ TIMESTAMP: "TIMESTAMP";
302
402
  }>>;
303
403
  sortDirection: z.ZodOptional<z.ZodEnum<{
304
404
  ASC: "ASC";
305
405
  DESC: "DESC";
306
406
  }>>;
307
- title: z.ZodOptional<z.ZodString>;
407
+ side: z.ZodOptional<z.ZodEnum<{
408
+ BUY: "BUY";
409
+ SELL: "SELL";
410
+ }>>;
308
411
  }, z.core.$strip>;
309
- declare const ListClosedPositionsRequestSchema: z.ZodObject<{
310
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
412
+ type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
413
+ type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
414
+ declare const ListActivityError: {
415
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
416
+ };
417
+ /**
418
+ * Lists wallet activity.
419
+ *
420
+ * @remarks
421
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
422
+ *
423
+ * @throws {@link ListActivityError}
424
+ * Thrown on failure.
425
+ *
426
+ * @example
427
+ * Fetch the first page of results:
428
+ * ```ts
429
+ * const result = listActivity(client, {
430
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
431
+ * pageSize: 10,
432
+ * });
433
+ *
434
+ * const firstPage = await result.firstPage();
435
+ *
436
+ * // Optionally, fetch additional pages:
437
+ * for await (const page of result.from(firstPage.nextCursor)) {
438
+ * // page.items: Activity[]
439
+ * }
440
+ * ```
441
+ *
442
+ * @example
443
+ * Loop through all pages with `for await`:
444
+ * ```ts
445
+ * const result = listActivity(client, {
446
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
447
+ * pageSize: 10,
448
+ * });
449
+ *
450
+ * for await (const page of result) {
451
+ * // page.items: Activity[]
452
+ * }
453
+ * ```
454
+ */
455
+ declare function listActivity(client: BaseClient, request: ListActivityRequest): Paginated<Activity[]>;
456
+ declare const ListComboActivityRequestSchema: z.ZodObject<{
457
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
458
+ pageSize: z.ZodDefault<z.ZodNumber>;
459
+ user: z.ZodString;
460
+ conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>]>>;
461
+ }, z.core.$strip>;
462
+ type ListComboActivityRequest = z.input<typeof ListComboActivityRequestSchema>;
463
+ type ListComboActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
464
+ declare const ListComboActivityError: {
465
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
466
+ };
467
+ /**
468
+ * Lists combo lifecycle activity for a wallet.
469
+ *
470
+ * @remarks
471
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
472
+ *
473
+ * @throws {@link ListComboActivityError}
474
+ * Thrown on failure.
475
+ *
476
+ * @example
477
+ * Fetch the first page of results:
478
+ * ```ts
479
+ * const result = listComboActivity(client, {
480
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
481
+ * pageSize: 10,
482
+ * });
483
+ *
484
+ * const firstPage = await result.firstPage();
485
+ *
486
+ * // Optionally, fetch additional pages:
487
+ * for await (const page of result.from(firstPage.nextCursor)) {
488
+ * // page.items: ComboActivity[]
489
+ * }
490
+ * ```
491
+ */
492
+ declare function listComboActivity(client: BaseClient, request: ListComboActivityRequest): Paginated<ComboActivity[]>;
493
+
494
+ declare enum ComboPositionSort {
495
+ CurrentValueDesc = "current_value_desc",
496
+ FirstEntryDesc = "first_entry_desc",
497
+ EntryCostDesc = "entry_cost_desc",
498
+ ResolvedAtDesc = "resolved_at_desc",
499
+ UpdatedAsc = "updated_asc"
500
+ }
501
+ declare const ListPositionsRequestSchema: z.ZodObject<{
502
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
311
503
  user: z.ZodString;
312
504
  market: z.ZodOptional<z.ZodArray<z.ZodString>>;
313
- title: z.ZodOptional<z.ZodString>;
314
505
  eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
506
+ sizeThreshold: z.ZodOptional<z.ZodNumber>;
507
+ redeemable: z.ZodOptional<z.ZodBoolean>;
508
+ mergeable: z.ZodOptional<z.ZodBoolean>;
315
509
  pageSize: z.ZodDefault<z.ZodNumber>;
316
510
  sortBy: z.ZodOptional<z.ZodEnum<{
511
+ TOKENS: "TOKENS";
512
+ CURRENT: "CURRENT";
513
+ INITIAL: "INITIAL";
514
+ CASHPNL: "CASHPNL";
515
+ PERCENTPNL: "PERCENTPNL";
317
516
  TITLE: "TITLE";
517
+ RESOLVING: "RESOLVING";
318
518
  PRICE: "PRICE";
319
519
  AVGPRICE: "AVGPRICE";
320
- REALIZEDPNL: "REALIZEDPNL";
321
- TIMESTAMP: "TIMESTAMP";
322
520
  }>>;
323
521
  sortDirection: z.ZodOptional<z.ZodEnum<{
324
522
  ASC: "ASC";
325
523
  DESC: "DESC";
326
524
  }>>;
327
- }, z.core.$strip>;
328
- declare const ListComboPositionsRequestSchema: z.ZodObject<{
329
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
330
- user: z.ZodString;
331
- pageSize: z.ZodDefault<z.ZodNumber>;
332
- status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
333
- conditionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>;
334
- positionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>;
335
- }, z.core.$strip>;
336
- declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
337
- user: z.ZodString;
338
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
339
- }, z.core.$strip>;
340
- declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
341
- user: z.ZodString;
342
- }, z.core.$strip>;
343
- declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
344
- user: z.ZodString;
525
+ title: z.ZodOptional<z.ZodString>;
345
526
  }, z.core.$strip>;
346
527
  type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
347
- type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
348
- type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
349
- type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
350
- type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
351
- type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
352
528
  type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
353
529
  declare const ListPositionsError: {
354
530
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
@@ -392,14 +568,30 @@ declare const ListPositionsError: {
392
568
  * ```
393
569
  */
394
570
  declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
571
+ declare const ListClosedPositionsRequestSchema: z.ZodObject<{
572
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
573
+ user: z.ZodString;
574
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
575
+ title: z.ZodOptional<z.ZodString>;
576
+ eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
577
+ pageSize: z.ZodDefault<z.ZodNumber>;
578
+ sortBy: z.ZodOptional<z.ZodEnum<{
579
+ TIMESTAMP: "TIMESTAMP";
580
+ TITLE: "TITLE";
581
+ PRICE: "PRICE";
582
+ AVGPRICE: "AVGPRICE";
583
+ REALIZEDPNL: "REALIZEDPNL";
584
+ }>>;
585
+ sortDirection: z.ZodOptional<z.ZodEnum<{
586
+ ASC: "ASC";
587
+ DESC: "DESC";
588
+ }>>;
589
+ }, z.core.$strip>;
590
+ type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
395
591
  type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
396
592
  declare const ListClosedPositionsError: {
397
593
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
398
594
  };
399
- type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
400
- declare const ListComboPositionsError: {
401
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
402
- };
403
595
  /**
404
596
  * Lists closed positions for a wallet.
405
597
  *
@@ -439,6 +631,21 @@ declare const ListComboPositionsError: {
439
631
  * ```
440
632
  */
441
633
  declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
634
+ declare const ListComboPositionsRequestSchema: z.ZodObject<{
635
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
636
+ user: z.ZodString;
637
+ pageSize: z.ZodDefault<z.ZodNumber>;
638
+ status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
639
+ sort: z.ZodOptional<z.ZodEnum<typeof ComboPositionSort>>;
640
+ conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>]>>;
641
+ updatedAfter: z.ZodOptional<z.ZodNumber>;
642
+ updatedBefore: z.ZodOptional<z.ZodNumber>;
643
+ }, z.core.$strip>;
644
+ type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
645
+ type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
646
+ declare const ListComboPositionsError: {
647
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
648
+ };
442
649
  /**
443
650
  * Lists combo positions for a wallet.
444
651
  *
@@ -472,8 +679,24 @@ declare function listClosedPositions(client: BaseClient, request: ListClosedPosi
472
679
  * status: ComboPositionStatus.Open,
473
680
  * });
474
681
  * ```
682
+ *
683
+ * @example
684
+ * Incrementally sync changed combo positions:
685
+ * ```ts
686
+ * const result = listComboPositions(client, {
687
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
688
+ * updatedAfter: 1_797_360_000,
689
+ * sort: ComboPositionSort.UpdatedAsc,
690
+ * pageSize: 1000,
691
+ * });
692
+ * ```
475
693
  */
476
694
  declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
695
+ declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
696
+ user: z.ZodString;
697
+ market: z.ZodOptional<z.ZodArray<z.ZodString>>;
698
+ }, z.core.$strip>;
699
+ type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
477
700
  type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
478
701
  declare const FetchPortfolioValueError: {
479
702
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
@@ -497,6 +720,10 @@ declare const FetchPortfolioValueError: {
497
720
  * ```
498
721
  */
499
722
  declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
723
+ declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
724
+ user: z.ZodString;
725
+ }, z.core.$strip>;
726
+ type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
500
727
  type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
501
728
  declare const FetchTradedMarketCountError: {
502
729
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
@@ -520,9 +747,13 @@ declare const FetchTradedMarketCountError: {
520
747
  * ```
521
748
  */
522
749
  declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
523
- type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
524
- declare const DownloadAccountingSnapshotError: {
525
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
750
+ declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
751
+ user: z.ZodString;
752
+ }, z.core.$strip>;
753
+ type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
754
+ type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
755
+ declare const DownloadAccountingSnapshotError: {
756
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
526
757
  };
527
758
  /**
528
759
  * Downloads an accounting snapshot archive for a wallet.
@@ -561,6 +792,7 @@ type SecureFetchPortfolioValueRequest = DefaultAccountWallet<FetchPortfolioValue
561
792
  type SecureFetchTradedMarketCountRequest = DefaultAccountWallet<FetchTradedMarketCountRequest>;
562
793
  type SecureDownloadAccountingSnapshotRequest = DefaultAccountWallet<DownloadAccountingSnapshotRequest>;
563
794
  type SecureListActivityRequest = DefaultAccountWallet<ListActivityRequest>;
795
+ type SecureListComboActivityRequest = DefaultAccountWallet<ListComboActivityRequest>;
564
796
  type CommonAccountActions = {
565
797
  /**
566
798
  * Lists positions for a market.
@@ -768,6 +1000,24 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
768
1000
  * ```
769
1001
  */
770
1002
  listActivity(request: ListActivityRequest): Paginated<Activity[]>;
1003
+ /**
1004
+ * Lists combo lifecycle activity for a wallet.
1005
+ *
1006
+ * @throws {@link ListComboActivityError}
1007
+ * Thrown on failure.
1008
+ *
1009
+ * @example
1010
+ * Fetch the first page of results:
1011
+ * ```ts
1012
+ * const paginator = client.listComboActivity({
1013
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
1014
+ * pageSize: 10,
1015
+ * });
1016
+ *
1017
+ * const firstPage = await paginator.firstPage();
1018
+ * ```
1019
+ */
1020
+ listComboActivity(request: ListComboActivityRequest): Paginated<ComboActivity[]>;
771
1021
  }>;
772
1022
  type SecureAccountActions = Prettify<CommonAccountActions & {
773
1023
  /**
@@ -843,6 +1093,15 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
843
1093
  * Thrown on failure.
844
1094
  */
845
1095
  listActivity(request?: SecureListActivityRequest): Paginated<Activity[]>;
1096
+ /**
1097
+ * Lists combo lifecycle activity for a wallet.
1098
+ *
1099
+ * Defaults to the authenticated account's wallet when `user` is omitted.
1100
+ *
1101
+ * @throws {@link ListComboActivityError}
1102
+ * Thrown on failure.
1103
+ */
1104
+ listComboActivity(request?: SecureListComboActivityRequest): Paginated<ComboActivity[]>;
846
1105
  /**
847
1106
  * Lists trades for the authenticated account across all pages.
848
1107
  *
@@ -1060,7 +1319,7 @@ type DataActions = {
1060
1319
  */
1061
1320
  fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
1062
1321
  /**
1063
- * Fetches the midpoint price for a token.
1322
+ * Fetches the midpoint price for a token as a decimal string.
1064
1323
  *
1065
1324
  * @throws {@link FetchMidpointError}
1066
1325
  * Thrown on failure.
@@ -1070,9 +1329,9 @@ type DataActions = {
1070
1329
  * const midpoint = await client.fetchMidpoint({ tokenId: '123' });
1071
1330
  * ```
1072
1331
  */
1073
- fetchMidpoint(request: FetchMidpointRequest): Promise<string>;
1332
+ fetchMidpoint(request: FetchMidpointRequest): Promise<DecimalString>;
1074
1333
  /**
1075
- * Fetches midpoint prices for multiple tokens.
1334
+ * Fetches midpoint prices for multiple tokens as a token ID keyed lookup.
1076
1335
  *
1077
1336
  * @throws {@link FetchMidpointsError}
1078
1337
  * Thrown on failure.
@@ -1082,9 +1341,9 @@ type DataActions = {
1082
1341
  * const midpoints = await client.fetchMidpoints([{ tokenId: '123' }]);
1083
1342
  * ```
1084
1343
  */
1085
- fetchMidpoints(request: FetchMidpointsRequest): Promise<Record<string, string>>;
1344
+ fetchMidpoints(request: FetchMidpointsRequest): Promise<Midpoints>;
1086
1345
  /**
1087
- * Fetches the current quoted price for a token and side.
1346
+ * Fetches the current quoted price for a token and side as a decimal string.
1088
1347
  *
1089
1348
  * @throws {@link FetchPriceError}
1090
1349
  * Thrown on failure.
@@ -1094,9 +1353,9 @@ type DataActions = {
1094
1353
  * const price = await client.fetchPrice({ tokenId: '123', side: OrderSide.BUY });
1095
1354
  * ```
1096
1355
  */
1097
- fetchPrice(request: FetchPriceRequest): Promise<string>;
1356
+ fetchPrice(request: FetchPriceRequest): Promise<DecimalString>;
1098
1357
  /**
1099
- * Fetches quoted prices for multiple tokens.
1358
+ * Fetches quoted prices for multiple tokens as a token ID keyed lookup.
1100
1359
  *
1101
1360
  * @throws {@link FetchPricesError}
1102
1361
  * Thrown on failure.
@@ -1132,7 +1391,7 @@ type DataActions = {
1132
1391
  */
1133
1392
  fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
1134
1393
  /**
1135
- * Fetches the spread for a token.
1394
+ * Fetches the spread for a token as a decimal string.
1136
1395
  *
1137
1396
  * @throws {@link FetchSpreadError}
1138
1397
  * Thrown on failure.
@@ -1142,9 +1401,9 @@ type DataActions = {
1142
1401
  * const spread = await client.fetchSpread({ tokenId: '123' });
1143
1402
  * ```
1144
1403
  */
1145
- fetchSpread(request: FetchSpreadRequest): Promise<string>;
1404
+ fetchSpread(request: FetchSpreadRequest): Promise<DecimalString>;
1146
1405
  /**
1147
- * Fetches spreads for multiple tokens.
1406
+ * Fetches spreads for multiple tokens as a token ID keyed lookup.
1148
1407
  *
1149
1408
  * @throws {@link FetchSpreadsError}
1150
1409
  * Thrown on failure.
@@ -1154,7 +1413,7 @@ type DataActions = {
1154
1413
  * const spreads = await client.fetchSpreads([{ tokenId: '123' }]);
1155
1414
  * ```
1156
1415
  */
1157
- fetchSpreads(request: FetchSpreadsRequest): Promise<Record<string, string>>;
1416
+ fetchSpreads(request: FetchSpreadsRequest): Promise<Spreads>;
1158
1417
  /**
1159
1418
  * Fetches the last traded price for a token.
1160
1419
  *
@@ -1524,6 +1783,25 @@ type DiscoveryActions = {
1524
1783
  * ```
1525
1784
  */
1526
1785
  fetchSeries(request: FetchSeriesRequest): Promise<Series>;
1786
+ /**
1787
+ * Lists market clarifications — notes that resolve ambiguity in how a market
1788
+ * settles.
1789
+ *
1790
+ * @throws {@link ListMarketClarificationsError}
1791
+ * Thrown on failure.
1792
+ *
1793
+ * @example
1794
+ * ```ts
1795
+ * const paginator = client.listMarketClarifications({
1796
+ * marketId: '512038',
1797
+ * });
1798
+ *
1799
+ * for await (const page of paginator) {
1800
+ * // page.items: MarketClarification[]
1801
+ * }
1802
+ * ```
1803
+ */
1804
+ listMarketClarifications(request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
1527
1805
  /**
1528
1806
  * Lists tags.
1529
1807
  *
@@ -1795,70 +2073,150 @@ type DiscoveryActions = {
1795
2073
  declare function discoveryActions(client: BasePublicClient): DiscoveryActions;
1796
2074
  declare function discoveryActions(client: BaseSecureClient): DiscoveryActions;
1797
2075
 
2076
+ /**
2077
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2078
+ */
1798
2079
  type PublicPerpsActions = {
1799
2080
  /**
1800
2081
  * Fetches Perps instruments.
1801
2082
  *
2083
+ * @example
2084
+ * ```ts
2085
+ * const instruments = await client.fetchPerpsInstruments();
2086
+ * ```
2087
+ *
1802
2088
  * @throws {@link FetchPerpsInstrumentsError}
1803
2089
  * Thrown on failure.
2090
+ *
2091
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1804
2092
  */
1805
2093
  fetchPerpsInstruments(request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
1806
2094
  /**
1807
2095
  * Fetches the current Perps ticker for an instrument.
1808
2096
  *
2097
+ * @example
2098
+ * ```ts
2099
+ * const ticker = await client.fetchPerpsTicker({ instrumentId: 1 });
2100
+ * ```
2101
+ *
1809
2102
  * @throws {@link FetchPerpsTickerError}
1810
2103
  * Thrown on failure.
2104
+ *
2105
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1811
2106
  */
1812
2107
  fetchPerpsTicker(request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
1813
2108
  /**
1814
2109
  * Fetches current Perps tickers.
1815
2110
  *
2111
+ * @example
2112
+ * ```ts
2113
+ * const tickers = await client.fetchPerpsTickers();
2114
+ * ```
2115
+ *
1816
2116
  * @throws {@link FetchPerpsTickersError}
1817
2117
  * Thrown on failure.
2118
+ *
2119
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1818
2120
  */
1819
2121
  fetchPerpsTickers(request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
1820
2122
  /**
1821
2123
  * Fetches a Perps order book.
1822
2124
  *
2125
+ * @example
2126
+ * ```ts
2127
+ * const book = await client.fetchPerpsBook({ instrumentId: 1, depth: 100 });
2128
+ * ```
2129
+ *
1823
2130
  * @throws {@link FetchPerpsBookError}
1824
2131
  * Thrown on failure.
2132
+ *
2133
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1825
2134
  */
1826
2135
  fetchPerpsBook(request: FetchPerpsBookRequest): Promise<PerpsBook>;
1827
2136
  /**
1828
2137
  * Lists Perps candles for an instrument with SDK-owned pagination.
1829
2138
  *
2139
+ * @example
2140
+ * ```ts
2141
+ * for await (const candles of client.listPerpsCandles({
2142
+ * instrumentId: 1,
2143
+ * interval: PerpsKlineInterval.OneMinute,
2144
+ * })) {
2145
+ * console.log(candles);
2146
+ * }
2147
+ * ```
2148
+ *
1830
2149
  * @throws {@link ListPerpsCandlesError}
1831
2150
  * Thrown on failure.
2151
+ *
2152
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1832
2153
  */
1833
2154
  listPerpsCandles(request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
1834
2155
  /**
1835
2156
  * Lists Perps funding-rate history for an instrument with SDK-owned pagination.
1836
2157
  *
2158
+ * @example
2159
+ * ```ts
2160
+ * for await (const rates of client.listPerpsFundingHistory({
2161
+ * instrumentId: 1,
2162
+ * })) {
2163
+ * console.log(rates);
2164
+ * }
2165
+ * ```
2166
+ *
1837
2167
  * @throws {@link ListPerpsFundingHistoryError}
1838
2168
  * Thrown on failure.
2169
+ *
2170
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1839
2171
  */
1840
2172
  listPerpsFundingHistory(request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
1841
2173
  /**
1842
2174
  * Lists recent Perps trades for an instrument with SDK-owned pagination.
1843
2175
  *
2176
+ * @example
2177
+ * ```ts
2178
+ * for await (const trades of client.listPerpsTrades({ instrumentId: 1 })) {
2179
+ * console.log(trades);
2180
+ * }
2181
+ * ```
2182
+ *
1844
2183
  * @throws {@link ListPerpsTradesError}
1845
2184
  * Thrown on failure.
2185
+ *
2186
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1846
2187
  */
1847
2188
  listPerpsTrades(request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
1848
2189
  /**
1849
2190
  * Fetches the Perps fee schedule.
1850
2191
  *
2192
+ * @example
2193
+ * ```ts
2194
+ * const fees = await client.fetchPerpsFees();
2195
+ * ```
2196
+ *
1851
2197
  * @throws {@link FetchPerpsFeesError}
1852
2198
  * Thrown on failure.
2199
+ *
2200
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1853
2201
  */
1854
2202
  fetchPerpsFees(): Promise<PerpsFeeScheduleEntry[]>;
1855
2203
  };
2204
+ /**
2205
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2206
+ */
1856
2207
  type SecurePerpsActions = PublicPerpsActions & {
1857
2208
  /**
1858
2209
  * Deposits collateral into Perps for the authenticated signer account.
1859
2210
  *
2211
+ * @example
2212
+ * ```ts
2213
+ * const transaction = await client.depositToPerps({ amount: 100_000_000n });
2214
+ * ```
2215
+ *
1860
2216
  * @throws {@link DepositToPerpsError}
1861
2217
  * Thrown on failure.
2218
+ *
2219
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1862
2220
  */
1863
2221
  depositToPerps(request: DepositToPerpsRequest): Promise<TransactionHandle>;
1864
2222
  /**
@@ -1870,8 +2228,15 @@ type SecurePerpsActions = PublicPerpsActions & {
1870
2228
  * longer credential lifetime, or pass existing credentials to validate and
1871
2229
  * resume a previous session.
1872
2230
  *
2231
+ * @example
2232
+ * ```ts
2233
+ * const session = await client.openPerpsSession();
2234
+ * ```
2235
+ *
1873
2236
  * @throws {@link OpenPerpsSessionError}
1874
2237
  * Thrown on failure.
2238
+ *
2239
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1875
2240
  */
1876
2241
  openPerpsSession(request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
1877
2242
  /**
@@ -1880,20 +2245,43 @@ type SecurePerpsActions = PublicPerpsActions & {
1880
2245
  * @remarks
1881
2246
  * This can revoke credentials outside the currently open Perps session.
1882
2247
  *
2248
+ * @example
2249
+ * ```ts
2250
+ * await client.revokePerpsCredentials({ proxy: session.credentials.proxy });
2251
+ * ```
2252
+ *
1883
2253
  * @throws {@link RevokePerpsCredentialsError}
1884
2254
  * Thrown on failure.
2255
+ *
2256
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1885
2257
  */
1886
2258
  revokePerpsCredentials(request: RevokePerpsCredentialsRequest): Promise<void>;
1887
2259
  /**
1888
2260
  * Requests a Perps withdrawal to the authenticated wallet.
1889
2261
  *
2262
+ * @example
2263
+ * ```ts
2264
+ * const withdrawalId = await client.withdrawFromPerps({ amount: 100_000_000n });
2265
+ * ```
2266
+ *
1890
2267
  * @throws {@link WithdrawFromPerpsError}
1891
2268
  * Thrown on failure.
2269
+ *
2270
+ * @experimental This API may change in a breaking way in any release, including patch releases.
1892
2271
  */
1893
2272
  withdrawFromPerps(request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
1894
2273
  };
2274
+ /**
2275
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2276
+ */
1895
2277
  type PerpsActions = PublicPerpsActions;
2278
+ /**
2279
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2280
+ */
1896
2281
  declare function perpsActions(client: BasePublicClient): PublicPerpsActions;
2282
+ /**
2283
+ * @experimental This API may change in a breaking way in any release, including patch releases.
2284
+ */
1897
2285
  declare function perpsActions(client: BaseSecureClient): SecurePerpsActions;
1898
2286
 
1899
2287
  type PublicRewardsActions = {
@@ -2149,9 +2537,9 @@ declare class RfqQuoteRejectedError extends PolymarketError {
2149
2537
  readonly rfqId: RfqId;
2150
2538
  constructor(message: string, options: ErrorOptions & RfqQuoteRejectedErrorOptions);
2151
2539
  }
2152
- type RfqQuoteError = RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
2540
+ type RfqQuoteError = ConnectionLostError | RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
2153
2541
  declare const RfqQuoteError: {
2154
- isError(error: unknown): error is SigningError | TransportError | UserInputError | TimeoutError | RfqQuoteRejectedError;
2542
+ isError(error: unknown): error is SigningError | TransportError | UserInputError | ConnectionLostError | TimeoutError | RfqQuoteRejectedError;
2155
2543
  };
2156
2544
  type RfqCancelQuoteRejectedErrorOptions = {
2157
2545
  /** RFQ error code for the rejected cancellation request. */
@@ -2174,9 +2562,9 @@ declare class RfqCancelQuoteRejectedError extends PolymarketError {
2174
2562
  readonly quoteId: RfqQuoteId;
2175
2563
  constructor(message: string, options: ErrorOptions & RfqCancelQuoteRejectedErrorOptions);
2176
2564
  }
2177
- type RfqCancelQuoteError = RfqCancelQuoteRejectedError | TimeoutError | TransportError;
2565
+ type RfqCancelQuoteError = ConnectionLostError | RfqCancelQuoteRejectedError | TimeoutError | TransportError;
2178
2566
  declare const RfqCancelQuoteError: {
2179
- isError(error: unknown): error is TransportError | TimeoutError | RfqCancelQuoteRejectedError;
2567
+ isError(error: unknown): error is TransportError | ConnectionLostError | TimeoutError | RfqCancelQuoteRejectedError;
2180
2568
  };
2181
2569
  type RfqConfirmationRejectedErrorOptions = {
2182
2570
  /** RFQ error code for the rejected confirmation decision. */
@@ -2199,9 +2587,9 @@ declare class RfqConfirmationRejectedError extends PolymarketError {
2199
2587
  readonly quoteId: RfqQuoteId;
2200
2588
  constructor(message: string, options: ErrorOptions & RfqConfirmationRejectedErrorOptions);
2201
2589
  }
2202
- type RfqConfirmationError = RfqConfirmationRejectedError | TimeoutError | TransportError;
2590
+ type RfqConfirmationError = ConnectionLostError | RfqConfirmationRejectedError | TimeoutError | TransportError;
2203
2591
  declare const RfqConfirmationError: {
2204
- isError(error: unknown): error is TransportError | TimeoutError | RfqConfirmationRejectedError;
2592
+ isError(error: unknown): error is TransportError | ConnectionLostError | TimeoutError | RfqConfirmationRejectedError;
2205
2593
  };
2206
2594
  /**
2207
2595
  * Server request asking the market maker to provide a quote for an RFQ.
@@ -2298,9 +2686,9 @@ interface RfqSession extends AsyncIterable<RfqEvent> {
2298
2686
  */
2299
2687
  close(): Promise<void>;
2300
2688
  }
2301
- type OpenRfqSessionError = TransportError;
2689
+ type OpenRfqSessionError = ConnectionLostError | TransportError;
2302
2690
  declare const OpenRfqSessionError: {
2303
- isError(error: unknown): error is TransportError;
2691
+ isError(error: unknown): error is TransportError | ConnectionLostError;
2304
2692
  };
2305
2693
  /**
2306
2694
  * Opens an RFQ event session.
@@ -2526,7 +2914,7 @@ declare const CancelOrderError: {
2526
2914
  * orderId: '123',
2527
2915
  * });
2528
2916
  *
2529
- * // response.canceled: string[]
2917
+ * // response.canceled: OrderId[]
2530
2918
  * ```
2531
2919
  */
2532
2920
  declare function cancelOrder(client: BaseSecureClient, request: CancelOrderRequest): Promise<CancelOrdersResponse>;
@@ -2550,7 +2938,7 @@ declare const CancelOrdersError: {
2550
2938
  * orderIds: ['1', '2'],
2551
2939
  * });
2552
2940
  *
2553
- * // response.canceled: string[]
2941
+ * // response.canceled: OrderId[]
2554
2942
  * ```
2555
2943
  */
2556
2944
  declare function cancelOrders(client: BaseSecureClient, request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
@@ -2571,7 +2959,7 @@ declare const CancelAllError: {
2571
2959
  * ```ts
2572
2960
  * const response = await cancelAll(client);
2573
2961
  *
2574
- * // response.canceled: string[]
2962
+ * // response.canceled: OrderId[]
2575
2963
  * ```
2576
2964
  */
2577
2965
  declare function cancelAll(client: BaseSecureClient): Promise<CancelOrdersResponse>;
@@ -2596,7 +2984,7 @@ declare const CancelMarketOrdersError: {
2596
2984
  * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
2597
2985
  * });
2598
2986
  *
2599
- * // response.canceled: string[]
2987
+ * // response.canceled: OrderId[]
2600
2988
  * ```
2601
2989
  */
2602
2990
  declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
@@ -2764,7 +3152,7 @@ type PrepareLimitOrderRequest = {
2764
3152
  * When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
2765
3153
  * expires at the given timestamp.
2766
3154
  *
2767
- * The timestamp must be at least 60 seconds in the future. Add your own
3155
+ * The timestamp must be at least 3 minutes in the future. Add your own
2768
3156
  * buffer for network latency and clock skew when deriving it from the
2769
3157
  * current time.
2770
3158
  *
@@ -2915,7 +3303,7 @@ type SecureTradingActions = {
2915
3303
  * Creates a signed limit order for the authenticated account.
2916
3304
  *
2917
3305
  * @remarks
2918
- * GTD expirations must be at least 60 seconds in the future. Add your own
3306
+ * GTD expirations must be at least 3 minutes in the future. Add your own
2919
3307
  * buffer for network latency and clock skew when deriving an expiration from
2920
3308
  * the current time.
2921
3309
  *
@@ -2938,7 +3326,7 @@ type SecureTradingActions = {
2938
3326
  * Creates and posts a limit order for the authenticated account.
2939
3327
  *
2940
3328
  * @remarks
2941
- * GTD expirations must be at least 60 seconds in the future. Add your own
3329
+ * GTD expirations must be at least 3 minutes in the future. Add your own
2942
3330
  * buffer for network latency and clock skew when deriving an expiration from
2943
3331
  * the current time.
2944
3332
  *
@@ -2996,7 +3384,7 @@ type SecureTradingActions = {
2996
3384
  * ```ts
2997
3385
  * const response = await client.cancelOrder({ orderId: '123' });
2998
3386
  *
2999
- * // response.canceled: string[]
3387
+ * // response.canceled: OrderId[]
3000
3388
  * ```
3001
3389
  */
3002
3390
  cancelOrder(request: CancelOrderRequest): Promise<CancelOrdersResponse>;
@@ -3010,7 +3398,7 @@ type SecureTradingActions = {
3010
3398
  * ```ts
3011
3399
  * const response = await client.cancelOrders({ orderIds: ['1', '2'] });
3012
3400
  *
3013
- * // response.canceled: string[]
3401
+ * // response.canceled: OrderId[]
3014
3402
  * ```
3015
3403
  */
3016
3404
  cancelOrders(request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
@@ -3024,7 +3412,7 @@ type SecureTradingActions = {
3024
3412
  * ```ts
3025
3413
  * const response = await client.cancelAll();
3026
3414
  *
3027
- * // response.canceled: string[]
3415
+ * // response.canceled: OrderId[]
3028
3416
  * ```
3029
3417
  */
3030
3418
  cancelAll(): Promise<CancelOrdersResponse>;
@@ -3040,7 +3428,7 @@ type SecureTradingActions = {
3040
3428
  * market: '0x0000000000000000000000000000000000000000000000000000000000000001',
3041
3429
  * });
3042
3430
  *
3043
- * // response.canceled: string[]
3431
+ * // response.canceled: OrderId[]
3044
3432
  * ```
3045
3433
  */
3046
3434
  cancelMarketOrders(request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
@@ -3094,12 +3482,6 @@ type SecureTradingActions = {
3094
3482
  declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
3095
3483
 
3096
3484
  type SecureWalletActions = {
3097
- /**
3098
- * @deprecated You no longer need to call this. `createSecureClient` ensures
3099
- * the account wallet is set up for its trading flow, so this always resolves
3100
- * to `true` and is retained only for backward compatibility.
3101
- */
3102
- isGaslessReady(): Promise<boolean>;
3103
3485
  /**
3104
3486
  * Sets up the approvals required for trading and supported position lifecycle workflows.
3105
3487
  *
@@ -3111,7 +3493,7 @@ type SecureWalletActions = {
3111
3493
  * await client.setupTradingApprovals();
3112
3494
  * ```
3113
3495
  */
3114
- setupTradingApprovals(): Promise<DeprecatedTransactionHandle>;
3496
+ setupTradingApprovals(): Promise<void>;
3115
3497
  /**
3116
3498
  * Approves ERC-20 token spending for the authenticated account.
3117
3499
  *
@@ -3307,6 +3689,9 @@ type ClobEndpoints = RestEndpoint & {
3307
3689
  user: WebSocketEndpoint;
3308
3690
  };
3309
3691
  type RfqEndpoints = RestEndpoint & WebSocketEndpoint;
3692
+ /**
3693
+ * @experimental This API may change in a breaking way in any release, including patch releases.
3694
+ */
3310
3695
  type PerpsEndpoints = RestEndpoint & WebSocketEndpoint;
3311
3696
  type EnvironmentContracts = {
3312
3697
  collateralToken: EvmAddress;
@@ -3489,12 +3874,6 @@ declare class BaseSecureClient<TPublicActions extends ClientActions = ClientActi
3489
3874
  * The authenticated account identity associated with this client, including the signer and wallet addresses and wallet type.
3490
3875
  */
3491
3876
  get account(): AccountIdentity;
3492
- /**
3493
- * @deprecated `createSecureClient` now sets up the account wallet for its
3494
- * trading flow, so this is a no-op retained only for backward compatibility
3495
- * and returns the current secure client.
3496
- */
3497
- setupGaslessWallet(): Promise<SecureClient<TPublicActions, TSecureActions>>;
3498
3877
  /**
3499
3878
  * Closes all active realtime subscriptions owned by this client.
3500
3879
  *
@@ -3653,7 +4032,7 @@ declare const FetchClosedOnlyModeError: {
3653
4032
  declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
3654
4033
  declare const ListOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
3655
4034
  tokenId: z.ZodOptional<z.ZodString>;
3656
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4035
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
3657
4036
  id: z.ZodOptional<z.ZodString>;
3658
4037
  market: z.ZodOptional<z.ZodString>;
3659
4038
  }, z.core.$strip>>;
@@ -3726,7 +4105,7 @@ declare const ListAccountTradesRequestSchema: z.ZodDefault<z.ZodObject<{
3726
4105
  after: z.ZodOptional<z.ZodString>;
3727
4106
  tokenId: z.ZodOptional<z.ZodString>;
3728
4107
  before: z.ZodOptional<z.ZodString>;
3729
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4108
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
3730
4109
  id: z.ZodOptional<z.ZodString>;
3731
4110
  makerAddress: z.ZodOptional<z.ZodString>;
3732
4111
  market: z.ZodOptional<z.ZodString>;
@@ -3916,7 +4295,7 @@ declare const FetchOrdersScoringError: {
3916
4295
  */
3917
4296
  declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
3918
4297
  declare const ListUserEarningsForDayRequestSchema: z.ZodObject<{
3919
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4298
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
3920
4299
  date: z.ZodString;
3921
4300
  }, z.core.$strip>;
3922
4301
  type ListUserEarningsForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
@@ -3982,7 +4361,7 @@ declare const FetchTotalEarningsForUserForDayError: {
3982
4361
  */
3983
4362
  declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
3984
4363
  declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
3985
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4364
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
3986
4365
  date: z.ZodString;
3987
4366
  noCompetition: z.ZodOptional<z.ZodBoolean>;
3988
4367
  orderBy: z.ZodOptional<z.ZodString>;
@@ -4049,135 +4428,6 @@ declare const FetchRewardPercentagesError: {
4049
4428
  */
4050
4429
  declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
4051
4430
 
4052
- declare const ListTradesRequestSchema: z.ZodObject<{
4053
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4054
- pageSize: z.ZodDefault<z.ZodNumber>;
4055
- takerOnly: z.ZodOptional<z.ZodBoolean>;
4056
- filterType: z.ZodOptional<z.ZodEnum<{
4057
- TOKENS: "TOKENS";
4058
- CASH: "CASH";
4059
- }>>;
4060
- filterAmount: z.ZodOptional<z.ZodNumber>;
4061
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4062
- eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4063
- user: z.ZodOptional<z.ZodString>;
4064
- side: z.ZodOptional<z.ZodEnum<{
4065
- BUY: "BUY";
4066
- SELL: "SELL";
4067
- }>>;
4068
- }, z.core.$strip>;
4069
- declare const ListActivityRequestSchema: z.ZodObject<{
4070
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4071
- pageSize: z.ZodDefault<z.ZodNumber>;
4072
- user: z.ZodString;
4073
- market: z.ZodOptional<z.ZodArray<z.ZodString>>;
4074
- eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
4075
- type: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof _polymarket_bindings_data.ActivityType>>>;
4076
- start: z.ZodOptional<z.ZodNumber>;
4077
- end: z.ZodOptional<z.ZodNumber>;
4078
- sortBy: z.ZodOptional<z.ZodEnum<{
4079
- TOKENS: "TOKENS";
4080
- TIMESTAMP: "TIMESTAMP";
4081
- CASH: "CASH";
4082
- }>>;
4083
- sortDirection: z.ZodOptional<z.ZodEnum<{
4084
- ASC: "ASC";
4085
- DESC: "DESC";
4086
- }>>;
4087
- side: z.ZodOptional<z.ZodEnum<{
4088
- BUY: "BUY";
4089
- SELL: "SELL";
4090
- }>>;
4091
- }, z.core.$strip>;
4092
- type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
4093
- type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
4094
- type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4095
- declare const ListTradesError: {
4096
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4097
- };
4098
- /**
4099
- * Lists trades for a wallet, market, or event.
4100
- *
4101
- * @remarks
4102
- * This is a low-level function. Most SDK consumers should prefer the client instance API.
4103
- *
4104
- * @throws {@link ListTradesError}
4105
- * Thrown on failure.
4106
- *
4107
- * @example
4108
- * Fetch the first page of results:
4109
- * ```ts
4110
- * const result = listTrades(client, {
4111
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4112
- * pageSize: 10,
4113
- * });
4114
- *
4115
- * const firstPage = await result.firstPage();
4116
- *
4117
- * // Optionally, fetch additional pages:
4118
- * for await (const page of result.from(firstPage.nextCursor)) {
4119
- * // page.items: Trade[]
4120
- * }
4121
- * ```
4122
- *
4123
- * @example
4124
- * Loop through all pages with `for await`:
4125
- * ```ts
4126
- * const result = listTrades(client, {
4127
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4128
- * pageSize: 10,
4129
- * });
4130
- *
4131
- * for await (const page of result) {
4132
- * // page.items: Trade[]
4133
- * }
4134
- * ```
4135
- */
4136
- declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade[]>;
4137
- type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
4138
- declare const ListActivityError: {
4139
- isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4140
- };
4141
- /**
4142
- * Lists wallet activity.
4143
- *
4144
- * @remarks
4145
- * This is a low-level function. Most SDK consumers should prefer the client instance API.
4146
- *
4147
- * @throws {@link ListActivityError}
4148
- * Thrown on failure.
4149
- *
4150
- * @example
4151
- * Fetch the first page of results:
4152
- * ```ts
4153
- * const result = listActivity(client, {
4154
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4155
- * pageSize: 10,
4156
- * });
4157
- *
4158
- * const firstPage = await result.firstPage();
4159
- *
4160
- * // Optionally, fetch additional pages:
4161
- * for await (const page of result.from(firstPage.nextCursor)) {
4162
- * // page.items: Activity[]
4163
- * }
4164
- * ```
4165
- *
4166
- * @example
4167
- * Loop through all pages with `for await`:
4168
- * ```ts
4169
- * const result = listActivity(client, {
4170
- * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
4171
- * pageSize: 10,
4172
- * });
4173
- *
4174
- * for await (const page of result) {
4175
- * // page.items: Activity[]
4176
- * }
4177
- * ```
4178
- */
4179
- declare function listActivity(client: BaseClient, request: ListActivityRequest): Paginated<Activity[]>;
4180
-
4181
4431
  type Erc20ApprovalWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest;
4182
4432
  type Erc20ApprovalWorkflow = AsyncGenerator<Erc20ApprovalWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
4183
4433
  declare const PrepareErc20ApprovalRequestSchema: z.ZodObject<{
@@ -4294,13 +4544,6 @@ type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSignin
4294
4544
  declare const SetupTradingApprovalsError: {
4295
4545
  isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
4296
4546
  };
4297
- type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
4298
- /**
4299
- * @deprecated `setupTradingApprovals` now waits internally. You do not need
4300
- * to call this method, and it will be removed in a later version.
4301
- */
4302
- wait(): Promise<void>;
4303
- };
4304
4547
  /**
4305
4548
  * Sets up the approvals required for trading.
4306
4549
  *
@@ -4310,13 +4553,13 @@ type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
4310
4553
  * @throws {@link SetupTradingApprovalsError}
4311
4554
  * Thrown on failure.
4312
4555
  */
4313
- declare function setupTradingApprovals(client: BaseSecureClient): Promise<DeprecatedTransactionHandle>;
4556
+ declare function setupTradingApprovals(client: BaseSecureClient): Promise<void>;
4314
4557
 
4315
4558
  declare const ListBuilderTradesRequestSchema: z.ZodObject<{
4316
4559
  after: z.ZodOptional<z.ZodString>;
4317
4560
  before: z.ZodOptional<z.ZodString>;
4318
4561
  builderCode: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.BuilderCode, string>>;
4319
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
4562
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
4320
4563
  id: z.ZodOptional<z.ZodString>;
4321
4564
  market: z.ZodOptional<z.ZodString>;
4322
4565
  tokenId: z.ZodOptional<z.ZodString>;
@@ -4369,7 +4612,7 @@ declare const FetchMidpointError: {
4369
4612
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4370
4613
  };
4371
4614
  /**
4372
- * Fetches the midpoint price for a token.
4615
+ * Fetches the midpoint price for a token as a decimal string.
4373
4616
  *
4374
4617
  * @remarks
4375
4618
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4388,7 +4631,7 @@ declare const FetchMidpointError: {
4388
4631
  * ```
4389
4632
  *
4390
4633
  */
4391
- declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<string>;
4634
+ declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<DecimalString>;
4392
4635
  declare const FetchMidpointsRequestSchema: z.ZodArray<z.ZodObject<{
4393
4636
  tokenId: z.ZodString;
4394
4637
  }, z.core.$strip>>;
@@ -4398,7 +4641,7 @@ declare const FetchMidpointsError: {
4398
4641
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4399
4642
  };
4400
4643
  /**
4401
- * Fetches midpoint prices for multiple tokens.
4644
+ * Fetches midpoint prices for multiple tokens as a token ID keyed lookup.
4402
4645
  *
4403
4646
  * @remarks
4404
4647
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4419,7 +4662,7 @@ declare const FetchMidpointsError: {
4419
4662
  * ```
4420
4663
  *
4421
4664
  */
4422
- declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Record<string, string>>;
4665
+ declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Midpoints>;
4423
4666
  declare const FetchTickSizeRequestSchema: z.ZodObject<{
4424
4667
  tokenId: z.ZodString;
4425
4668
  }, z.core.$strip>;
@@ -4540,7 +4783,7 @@ declare const FetchPriceError: {
4540
4783
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4541
4784
  };
4542
4785
  /**
4543
- * Fetches the current quoted price for a token and side.
4786
+ * Fetches the current quoted price for a token and side as a decimal string.
4544
4787
  *
4545
4788
  * @remarks
4546
4789
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4560,7 +4803,7 @@ declare const FetchPriceError: {
4560
4803
  * ```
4561
4804
  *
4562
4805
  */
4563
- declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<string>;
4806
+ declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<DecimalString>;
4564
4807
  declare const FetchPricesRequestSchema: z.ZodArray<z.ZodObject<{
4565
4808
  tokenId: z.ZodString;
4566
4809
  side: z.ZodEnum<typeof _polymarket_bindings.OrderSide>;
@@ -4571,7 +4814,7 @@ declare const FetchPricesError: {
4571
4814
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4572
4815
  };
4573
4816
  /**
4574
- * Fetches quoted prices for multiple tokens.
4817
+ * Fetches quoted prices for multiple tokens as a token ID keyed lookup.
4575
4818
  *
4576
4819
  * @remarks
4577
4820
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4661,7 +4904,7 @@ declare const FetchSpreadError: {
4661
4904
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4662
4905
  };
4663
4906
  /**
4664
- * Fetches the spread for a token.
4907
+ * Fetches the spread for a token as a decimal string.
4665
4908
  *
4666
4909
  * @remarks
4667
4910
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4680,7 +4923,7 @@ declare const FetchSpreadError: {
4680
4923
  * ```
4681
4924
  *
4682
4925
  */
4683
- declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<string>;
4926
+ declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<DecimalString>;
4684
4927
  declare const FetchSpreadsRequestSchema: z.ZodArray<z.ZodObject<{
4685
4928
  tokenId: z.ZodString;
4686
4929
  }, z.core.$strip>>;
@@ -4690,7 +4933,7 @@ declare const FetchSpreadsError: {
4690
4933
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
4691
4934
  };
4692
4935
  /**
4693
- * Fetches spreads for multiple tokens.
4936
+ * Fetches spreads for multiple tokens as a token ID keyed lookup.
4694
4937
  *
4695
4938
  * @remarks
4696
4939
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4711,7 +4954,7 @@ declare const FetchSpreadsError: {
4711
4954
  * ```
4712
4955
  *
4713
4956
  */
4714
- declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Record<string, string>>;
4957
+ declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Spreads>;
4715
4958
  declare const FetchLastTradePriceRequestSchema: z.ZodObject<{
4716
4959
  tokenId: z.ZodString;
4717
4960
  }, z.core.$strip>;
@@ -4808,7 +5051,7 @@ declare const FetchPriceHistoryError: {
4808
5051
  */
4809
5052
  declare function fetchPriceHistory(client: BaseClient, request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
4810
5053
  declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
4811
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5054
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
4812
5055
  sponsored: z.ZodOptional<z.ZodBoolean>;
4813
5056
  }, z.core.$strip>>;
4814
5057
  type ListCurrentRewardsRequest = z.input<typeof ListCurrentRewardsRequestSchema>;
@@ -4851,7 +5094,7 @@ declare const ListCurrentRewardsError: {
4851
5094
  declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
4852
5095
  declare const ListMarketRewardsRequestSchema: z.ZodObject<{
4853
5096
  conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
4854
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5097
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
4855
5098
  sponsored: z.ZodOptional<z.ZodBoolean>;
4856
5099
  }, z.core.$strip>;
4857
5100
  type ListMarketRewardsRequest = z.input<typeof ListMarketRewardsRequestSchema>;
@@ -4901,7 +5144,7 @@ declare function listMarketRewards(client: BaseClient, request: ListMarketReward
4901
5144
 
4902
5145
  declare const ListCommentsRequestSchema: z.ZodObject<{
4903
5146
  ascending: z.ZodOptional<z.ZodBoolean>;
4904
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5147
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
4905
5148
  pageSize: z.ZodDefault<z.ZodNumber>;
4906
5149
  getPositions: z.ZodOptional<z.ZodBoolean>;
4907
5150
  holdersOnly: z.ZodOptional<z.ZodBoolean>;
@@ -4916,7 +5159,7 @@ declare const FetchCommentsByIdRequestSchema: z.ZodObject<{
4916
5159
  declare const ListCommentsByUserAddressRequestSchema: z.ZodObject<{
4917
5160
  address: z.ZodString;
4918
5161
  ascending: z.ZodOptional<z.ZodBoolean>;
4919
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5162
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
4920
5163
  order: z.ZodOptional<z.ZodString>;
4921
5164
  pageSize: z.ZodDefault<z.ZodNumber>;
4922
5165
  }, z.core.$strip>;
@@ -5041,7 +5284,7 @@ declare function listCommentsByUserAddress(client: BaseClient, request: ListComm
5041
5284
  declare const ListEventsRequestSchema: z.ZodObject<{
5042
5285
  ascending: z.ZodOptional<z.ZodBoolean>;
5043
5286
  closed: z.ZodDefault<z.ZodBoolean>;
5044
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5287
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5045
5288
  pageSize: z.ZodOptional<z.ZodNumber>;
5046
5289
  cyom: z.ZodOptional<z.ZodBoolean>;
5047
5290
  endDateMax: z.ZodOptional<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, Date>>]>>;
@@ -5240,7 +5483,7 @@ declare const FetchEventLiveVolumeError: {
5240
5483
  declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
5241
5484
 
5242
5485
  declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
5243
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5486
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5244
5487
  pageSize: z.ZodDefault<z.ZodNumber>;
5245
5488
  timePeriod: z.ZodOptional<z.ZodEnum<{
5246
5489
  DAY: "DAY";
@@ -5270,7 +5513,7 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
5270
5513
  TECH: "TECH";
5271
5514
  FINANCE: "FINANCE";
5272
5515
  }>>;
5273
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5516
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5274
5517
  pageSize: z.ZodDefault<z.ZodNumber>;
5275
5518
  timePeriod: z.ZodOptional<z.ZodEnum<{
5276
5519
  DAY: "DAY";
@@ -5400,15 +5643,72 @@ declare const ListTraderLeaderboardError: {
5400
5643
  */
5401
5644
  declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
5402
5645
 
5403
- declare const ListMarketsRequestSchema: z.ZodObject<{
5646
+ declare const ListMarketClarificationsRequestSchema: z.ZodObject<{
5647
+ marketId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
5648
+ eventId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
5649
+ questionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
5650
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof MarketClarificationState>, z.ZodArray<z.ZodEnum<typeof MarketClarificationState>>]>>;
5651
+ showInFrontend: z.ZodOptional<z.ZodBoolean>;
5652
+ txHash: z.ZodOptional<z.ZodString>;
5653
+ order: z.ZodOptional<z.ZodString>;
5404
5654
  ascending: z.ZodOptional<z.ZodBoolean>;
5405
- closed: z.ZodOptional<z.ZodBoolean>;
5406
- clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5407
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5408
- pageSize: z.ZodOptional<z.ZodNumber>;
5409
- conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
5410
- cyom: z.ZodOptional<z.ZodBoolean>;
5411
- decimalized: z.ZodOptional<z.ZodBoolean>;
5655
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5656
+ pageSize: z.ZodDefault<z.ZodNumber>;
5657
+ }, z.core.$strip>;
5658
+ type ListMarketClarificationsRequest = z.input<typeof ListMarketClarificationsRequestSchema>;
5659
+ type ListMarketClarificationsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
5660
+ declare const ListMarketClarificationsError: {
5661
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
5662
+ };
5663
+ /**
5664
+ * Lists market clarifications — official notes that resolve ambiguity in how a
5665
+ * market settles.
5666
+ *
5667
+ * @remarks
5668
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
5669
+ *
5670
+ * @throws {@link ListMarketClarificationsError}
5671
+ * Thrown on failure.
5672
+ *
5673
+ * @example
5674
+ * Fetch the first page of results:
5675
+ * ```ts
5676
+ * const result = listMarketClarifications(client, {
5677
+ * marketId: '512038',
5678
+ * pageSize: 25,
5679
+ * });
5680
+ *
5681
+ * const firstPage = await result.firstPage();
5682
+ *
5683
+ * // Optionally, fetch additional pages:
5684
+ * for await (const page of result.from(firstPage.nextCursor)) {
5685
+ * // page.items: MarketClarification[]
5686
+ * }
5687
+ * ```
5688
+ *
5689
+ * @example
5690
+ * Loop through all pages with `for await`:
5691
+ * ```ts
5692
+ * const result = listMarketClarifications(client, {
5693
+ * marketId: '512038',
5694
+ * });
5695
+ *
5696
+ * for await (const page of result) {
5697
+ * // page.items: MarketClarification[]
5698
+ * }
5699
+ * ```
5700
+ */
5701
+ declare function listMarketClarifications(client: BaseClient, request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
5702
+
5703
+ declare const ListMarketsRequestSchema: z.ZodObject<{
5704
+ ascending: z.ZodOptional<z.ZodBoolean>;
5705
+ closed: z.ZodOptional<z.ZodBoolean>;
5706
+ clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5707
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5708
+ pageSize: z.ZodOptional<z.ZodNumber>;
5709
+ conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
5710
+ cyom: z.ZodOptional<z.ZodBoolean>;
5711
+ decimalized: z.ZodOptional<z.ZodBoolean>;
5412
5712
  endDateMax: z.ZodOptional<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, Date>>]>>;
5413
5713
  endDateMin: z.ZodOptional<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, Date>>]>>;
5414
5714
  gameId: z.ZodOptional<z.ZodString>;
@@ -5465,7 +5765,7 @@ declare const ListOpenInterestRequestSchema: z.ZodObject<{
5465
5765
  market: z.ZodOptional<z.ZodArray<z.ZodString>>;
5466
5766
  }, z.core.$strip>;
5467
5767
  declare const ListMarketPositionsRequestSchema: z.ZodObject<{
5468
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5768
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5469
5769
  market: z.ZodString;
5470
5770
  pageSize: z.ZodDefault<z.ZodNumber>;
5471
5771
  user: z.ZodOptional<z.ZodString>;
@@ -5535,7 +5835,7 @@ declare const ListMarketsError: {
5535
5835
  */
5536
5836
  declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market[]>;
5537
5837
  declare const ListComboMarketsRequestSchema: z.ZodObject<{
5538
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
5838
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5539
5839
  pageSize: z.ZodOptional<z.ZodNumber>;
5540
5840
  exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
5541
5841
  }, z.core.$strip>;
@@ -5727,196 +6027,138 @@ declare const ListMarketPositionsError: {
5727
6027
  */
5728
6028
  declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPosition[]>;
5729
6029
 
5730
- type PerpsHistoryParams = {
5731
- startTimestamp: number;
5732
- endTimestamp: number;
5733
- instrumentId?: PerpsInstrumentId;
5734
- depositStatus?: z.output<typeof PerpsDepositStatusSchema>;
5735
- withdrawalStatus?: z.output<typeof PerpsWithdrawalStatusSchema>;
5736
- hash?: z.output<typeof TxHashSchema>;
5737
- };
5738
- type PerpsIntervalHistoryParams = PerpsHistoryParams & {
5739
- interval: z.output<typeof PerpsPnlIntervalSchema>;
5740
- };
5741
- declare const FetchPerpsAccountConfigRequestSchema: z.ZodDefault<z.ZodObject<{
5742
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
5743
- }, z.core.$strip>>;
5744
- type FetchPerpsAccountConfigRequest = z.input<typeof FetchPerpsAccountConfigRequestSchema>;
5745
- declare const FetchPerpsOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
5746
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
5747
- }, z.core.$strip>>;
5748
- type FetchPerpsOpenOrdersRequest = z.input<typeof FetchPerpsOpenOrdersRequestSchema>;
5749
- declare const FetchPerpsOrdersRequestSchema: z.ZodPipe<z.ZodDefault<z.ZodObject<{
5750
- orderId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>>;
5751
- clientOrderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>>;
5752
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
5753
- start: z.ZodOptional<z.ZodNumber>;
5754
- end: z.ZodOptional<z.ZodNumber>;
5755
- }, z.core.$strip>>, z.ZodTransform<{
5756
- endTimestamp: number | undefined;
5757
- startTimestamp: number | undefined;
5758
- orderId?: _polymarket_bindings_perps.PerpsOrderId | undefined;
5759
- clientOrderId?: _polymarket_bindings_perps.PerpsClientOrderId | undefined;
5760
- instrumentId?: PerpsInstrumentId | undefined;
5761
- }, {
5762
- orderId?: _polymarket_bindings_perps.PerpsOrderId | undefined;
5763
- clientOrderId?: _polymarket_bindings_perps.PerpsClientOrderId | undefined;
5764
- instrumentId?: PerpsInstrumentId | undefined;
5765
- start?: number | undefined;
5766
- end?: number | undefined;
5767
- }>>;
5768
- type FetchPerpsOrdersRequest = z.input<typeof FetchPerpsOrdersRequestSchema>;
5769
- declare const ListPerpsFillsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5770
- start: z.ZodOptional<z.ZodNumber>;
5771
- end: z.ZodOptional<z.ZodNumber>;
5772
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5773
- }, z.core.$strip>, z.ZodTransform<{
5774
- cursor: PaginationCursor | undefined;
5775
- params: Omit<Record<string, unknown>, "start" | "end"> & PerpsHistoryParams;
5776
- }, {
5777
- start?: number | undefined;
5778
- end?: number | undefined;
5779
- cursor?: PaginationCursor | undefined;
5780
- }>>, z.ZodPipe<z.ZodObject<{
5781
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5782
- }, z.core.$strip>, z.ZodTransform<{
5783
- cursor: PaginationCursor;
5784
- params: undefined;
5785
- }, {
5786
- cursor: PaginationCursor;
5787
- }>>]>;
5788
- type ListPerpsFillsRequest = z.input<typeof ListPerpsFillsRequestSchema>;
5789
- declare const ListPerpsFundingPaymentsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5790
- start: z.ZodOptional<z.ZodNumber>;
5791
- end: z.ZodOptional<z.ZodNumber>;
5792
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5793
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
5794
- }, z.core.$strip>, z.ZodTransform<{
5795
- cursor: PaginationCursor | undefined;
5796
- params: Omit<{
5797
- start?: number | undefined;
5798
- end?: number | undefined;
5799
- instrumentId?: PerpsInstrumentId | undefined;
5800
- }, "start" | "end"> & PerpsHistoryParams;
5801
- }, {
5802
- start?: number | undefined;
5803
- end?: number | undefined;
5804
- cursor?: PaginationCursor | undefined;
5805
- instrumentId?: PerpsInstrumentId | undefined;
5806
- }>>, z.ZodPipe<z.ZodObject<{
5807
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5808
- }, z.core.$strip>, z.ZodTransform<{
5809
- cursor: PaginationCursor;
5810
- params: undefined;
5811
- }, {
5812
- cursor: PaginationCursor;
5813
- }>>]>;
5814
- type ListPerpsFundingPaymentsRequest = z.input<typeof ListPerpsFundingPaymentsRequestSchema>;
5815
- declare const ListPerpsDepositsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5816
- start: z.ZodOptional<z.ZodNumber>;
5817
- end: z.ZodOptional<z.ZodNumber>;
5818
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5819
- depositStatus: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsDepositStatus>>;
5820
- hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>;
5821
- }, z.core.$strip>, z.ZodTransform<{
5822
- cursor: PaginationCursor | undefined;
5823
- params: Omit<{
5824
- start?: number | undefined;
5825
- end?: number | undefined;
5826
- depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
5827
- hash?: _polymarket_types.TxHash | undefined;
5828
- }, "start" | "end"> & PerpsHistoryParams;
5829
- }, {
5830
- start?: number | undefined;
5831
- end?: number | undefined;
5832
- cursor?: PaginationCursor | undefined;
5833
- depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
5834
- hash?: _polymarket_types.TxHash | undefined;
5835
- }>>, z.ZodPipe<z.ZodObject<{
5836
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5837
- }, z.core.$strip>, z.ZodTransform<{
6030
+ /**
6031
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6032
+ */
6033
+ type FetchPerpsAccountConfigRequest = {
6034
+ /** Optional Perps instrument identifier filter. */
6035
+ instrumentId?: number;
6036
+ };
6037
+ /**
6038
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6039
+ */
6040
+ type FetchPerpsOpenOrdersRequest = {
6041
+ /** Optional Perps instrument identifier filter. */
6042
+ instrumentId?: number;
6043
+ };
6044
+ /**
6045
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6046
+ */
6047
+ type FetchPerpsOrdersRequest = {
6048
+ /** Optional order identifier filter. */
6049
+ orderId?: number;
6050
+ /** Optional caller-supplied idempotency identifier filter. */
6051
+ clientOrderId?: string;
6052
+ /** Optional Perps instrument identifier filter. */
6053
+ instrumentId?: number;
6054
+ /** Inclusive start timestamp in milliseconds. */
6055
+ start?: number;
6056
+ /** Inclusive end timestamp in milliseconds. */
6057
+ end?: number;
6058
+ };
6059
+ /**
6060
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6061
+ */
6062
+ type ListPerpsFillsRequest = {
6063
+ /** Inclusive start timestamp in milliseconds. */
6064
+ start?: number;
6065
+ /** Inclusive end timestamp in milliseconds. */
6066
+ end?: number;
6067
+ /** Opaque cursor returned by a previous page. */
6068
+ cursor?: PaginationCursor;
6069
+ } | {
6070
+ /** Opaque cursor returned by a previous page. */
5838
6071
  cursor: PaginationCursor;
5839
- params: undefined;
5840
- }, {
6072
+ };
6073
+ /**
6074
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6075
+ */
6076
+ type ListPerpsFundingPaymentsRequest = {
6077
+ /** Optional Perps instrument identifier filter. */
6078
+ instrumentId?: number;
6079
+ /** Inclusive start timestamp in milliseconds. */
6080
+ start?: number;
6081
+ /** Inclusive end timestamp in milliseconds. */
6082
+ end?: number;
6083
+ /** Opaque cursor returned by a previous page. */
6084
+ cursor?: PaginationCursor;
6085
+ } | {
6086
+ /** Opaque cursor returned by a previous page. */
5841
6087
  cursor: PaginationCursor;
5842
- }>>]>;
5843
- type ListPerpsDepositsRequest = z.input<typeof ListPerpsDepositsRequestSchema>;
5844
- declare const ListPerpsWithdrawalsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5845
- start: z.ZodOptional<z.ZodNumber>;
5846
- end: z.ZodOptional<z.ZodNumber>;
5847
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5848
- withdrawalStatus: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsWithdrawalStatus>>;
5849
- hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>;
5850
- }, z.core.$strip>, z.ZodTransform<{
5851
- cursor: PaginationCursor | undefined;
5852
- params: Omit<{
5853
- start?: number | undefined;
5854
- end?: number | undefined;
5855
- withdrawalStatus?: _polymarket_bindings_perps.PerpsWithdrawalStatus | undefined;
5856
- hash?: _polymarket_types.TxHash | undefined;
5857
- }, "start" | "end"> & PerpsHistoryParams;
5858
- }, {
5859
- start?: number | undefined;
5860
- end?: number | undefined;
5861
- cursor?: PaginationCursor | undefined;
5862
- withdrawalStatus?: _polymarket_bindings_perps.PerpsWithdrawalStatus | undefined;
5863
- hash?: _polymarket_types.TxHash | undefined;
5864
- }>>, z.ZodPipe<z.ZodObject<{
5865
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5866
- }, z.core.$strip>, z.ZodTransform<{
6088
+ };
6089
+ /**
6090
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6091
+ */
6092
+ type ListPerpsDepositsRequest = {
6093
+ /** Optional deposit status filter. */
6094
+ depositStatus?: PerpsDepositStatus;
6095
+ /** Optional transaction hash filter. */
6096
+ hash?: string;
6097
+ /** Inclusive start timestamp in milliseconds. */
6098
+ start?: number;
6099
+ /** Inclusive end timestamp in milliseconds. */
6100
+ end?: number;
6101
+ /** Opaque cursor returned by a previous page. */
6102
+ cursor?: PaginationCursor;
6103
+ } | {
6104
+ /** Opaque cursor returned by a previous page. */
5867
6105
  cursor: PaginationCursor;
5868
- params: undefined;
5869
- }, {
6106
+ };
6107
+ /**
6108
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6109
+ */
6110
+ type ListPerpsWithdrawalsRequest = {
6111
+ /** Optional withdrawal status filter. */
6112
+ withdrawalStatus?: PerpsWithdrawalStatus;
6113
+ /** Optional transaction hash filter. */
6114
+ hash?: string;
6115
+ /** Inclusive start timestamp in milliseconds. */
6116
+ start?: number;
6117
+ /** Inclusive end timestamp in milliseconds. */
6118
+ end?: number;
6119
+ /** Opaque cursor returned by a previous page. */
6120
+ cursor?: PaginationCursor;
6121
+ } | {
6122
+ /** Opaque cursor returned by a previous page. */
5870
6123
  cursor: PaginationCursor;
5871
- }>>]>;
5872
- type ListPerpsWithdrawalsRequest = z.input<typeof ListPerpsWithdrawalsRequestSchema>;
5873
- declare const ListPerpsEquityHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5874
- interval: z.ZodEnum<typeof _polymarket_bindings_perps.PerpsPnlInterval>;
5875
- start: z.ZodNumber;
5876
- end: z.ZodOptional<z.ZodNumber>;
5877
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5878
- }, z.core.$strip>, z.ZodTransform<{
5879
- cursor: PaginationCursor | undefined;
5880
- params: PerpsIntervalHistoryParams;
5881
- }, {
5882
- interval: _polymarket_bindings_perps.PerpsPnlInterval;
6124
+ };
6125
+ /**
6126
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6127
+ */
6128
+ type ListPerpsEquityHistoryRequest = {
6129
+ /** History interval. */
6130
+ interval: PerpsPnlInterval;
6131
+ /** Inclusive start timestamp in milliseconds. */
5883
6132
  start: number;
5884
- end?: number | undefined;
5885
- cursor?: PaginationCursor | undefined;
5886
- }>>, z.ZodPipe<z.ZodObject<{
5887
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5888
- }, z.core.$strip>, z.ZodTransform<{
5889
- cursor: PaginationCursor;
5890
- params: undefined;
5891
- }, {
6133
+ /** Inclusive end timestamp in milliseconds. */
6134
+ end?: number;
6135
+ /** Opaque cursor returned by a previous page. */
6136
+ cursor?: PaginationCursor;
6137
+ } | {
6138
+ /** Opaque cursor returned by a previous page. */
5892
6139
  cursor: PaginationCursor;
5893
- }>>]>;
5894
- type ListPerpsEquityHistoryRequest = z.input<typeof ListPerpsEquityHistoryRequestSchema>;
5895
- declare const ListPerpsPnlHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
5896
- interval: z.ZodEnum<typeof _polymarket_bindings_perps.PerpsPnlInterval>;
5897
- start: z.ZodNumber;
5898
- end: z.ZodOptional<z.ZodNumber>;
5899
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
5900
- }, z.core.$strip>, z.ZodTransform<{
5901
- cursor: PaginationCursor | undefined;
5902
- params: PerpsIntervalHistoryParams;
5903
- }, {
5904
- interval: _polymarket_bindings_perps.PerpsPnlInterval;
6140
+ };
6141
+ /**
6142
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6143
+ */
6144
+ type ListPerpsPnlHistoryRequest = {
6145
+ /** History interval. */
6146
+ interval: PerpsPnlInterval;
6147
+ /** Inclusive start timestamp in milliseconds. */
5905
6148
  start: number;
5906
- end?: number | undefined;
5907
- cursor?: PaginationCursor | undefined;
5908
- }>>, z.ZodPipe<z.ZodObject<{
5909
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
5910
- }, z.core.$strip>, z.ZodTransform<{
5911
- cursor: PaginationCursor;
5912
- params: undefined;
5913
- }, {
6149
+ /** Inclusive end timestamp in milliseconds. */
6150
+ end?: number;
6151
+ /** Opaque cursor returned by a previous page. */
6152
+ cursor?: PaginationCursor;
6153
+ } | {
6154
+ /** Opaque cursor returned by a previous page. */
5914
6155
  cursor: PaginationCursor;
5915
- }>>]>;
5916
- type ListPerpsPnlHistoryRequest = z.input<typeof ListPerpsPnlHistoryRequestSchema>;
6156
+ };
5917
6157
 
5918
6158
  /**
5919
6159
  * Good-til-cancelled Perps order.
6160
+ *
6161
+ * @experimental This API may change in a breaking way in any release, including patch releases.
5920
6162
  */
5921
6163
  type PerpsPlaceGtcOrderRequest = {
5922
6164
  /** Perps instrument identifier to trade. */
@@ -5931,11 +6173,15 @@ type PerpsPlaceGtcOrderRequest = {
5931
6173
  timeInForce: PerpsTimeInForce.GTC;
5932
6174
  /** Whether the order must rest instead of taking liquidity. */
5933
6175
  postOnly?: boolean;
6176
+ /** Whether the order may only reduce or close an existing position. */
6177
+ reduceOnly?: boolean;
5934
6178
  /** Optional caller-supplied idempotency identifier. */
5935
6179
  clientOrderId?: string;
5936
6180
  };
5937
6181
  /**
5938
6182
  * Immediate-or-cancel Perps order.
6183
+ *
6184
+ * @experimental This API may change in a breaking way in any release, including patch releases.
5939
6185
  */
5940
6186
  type PerpsPlaceIocOrderRequest = {
5941
6187
  /** Perps instrument identifier to trade. */
@@ -5948,12 +6194,16 @@ type PerpsPlaceIocOrderRequest = {
5948
6194
  quantity: PerpsDecimalInput;
5949
6195
  /** Immediate-or-cancel execution. */
5950
6196
  timeInForce: PerpsTimeInForce.IOC;
5951
- postOnly?: undefined;
6197
+ postOnly?: never;
6198
+ /** Whether the order may only reduce or close an existing position. */
6199
+ reduceOnly?: boolean;
5952
6200
  /** Optional caller-supplied idempotency identifier. */
5953
6201
  clientOrderId?: string;
5954
6202
  };
5955
6203
  /**
5956
6204
  * Fill-or-kill Perps order.
6205
+ *
6206
+ * @experimental This API may change in a breaking way in any release, including patch releases.
5957
6207
  */
5958
6208
  type PerpsPlaceFokOrderRequest = {
5959
6209
  /** Perps instrument identifier to trade. */
@@ -5966,61 +6216,333 @@ type PerpsPlaceFokOrderRequest = {
5966
6216
  quantity: PerpsDecimalInput;
5967
6217
  /** Fill-or-kill execution. */
5968
6218
  timeInForce: PerpsTimeInForce.FOK;
5969
- postOnly?: undefined;
6219
+ postOnly?: never;
6220
+ /** Whether the order may only reduce or close an existing position. */
6221
+ reduceOnly?: boolean;
5970
6222
  /** Optional caller-supplied idempotency identifier. */
5971
6223
  clientOrderId?: string;
5972
6224
  };
5973
6225
  /**
5974
- * Request parameters for placing one Perps order.
6226
+ * Request parameters for one Perps order.
6227
+ *
6228
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6229
+ */
6230
+ type PerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
6231
+ /**
6232
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6233
+ */
6234
+ type PerpsTpSlTrigger = {
6235
+ triggerPrice: PerpsDecimalInput;
6236
+ limitPrice?: PerpsDecimalInput;
6237
+ };
6238
+ /**
6239
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6240
+ */
6241
+ type PerpsPositionTpSlTrigger = {
6242
+ triggerPrice: PerpsDecimalInput;
6243
+ };
6244
+ /**
6245
+ * Request parameters for posting one or more Perps orders.
6246
+ *
6247
+ * @experimental This API may change in a breaking way in any release, including patch releases.
5975
6248
  */
5976
- type PlacePerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
5977
- /** Request parameters for posting one or more Perps orders. */
5978
6249
  type PostPerpsOrdersRequest = {
5979
6250
  /** Orders to post as one command. */
5980
- orders: PlacePerpsOrderRequest[];
6251
+ orders: PerpsOrderRequest[];
5981
6252
  /** Optional command expiration timestamp in milliseconds. */
5982
6253
  expiresAt?: number;
5983
6254
  };
5984
- declare const CancelPerpsOrderRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
5985
- orderId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>;
5986
- clientOrderId: z.ZodOptional<z.ZodUndefined>;
5987
- expiresAt: z.ZodOptional<z.ZodNumber>;
5988
- }, z.core.$strip>, z.ZodObject<{
5989
- clientOrderId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>;
5990
- orderId: z.ZodOptional<z.ZodUndefined>;
5991
- expiresAt: z.ZodOptional<z.ZodNumber>;
5992
- }, z.core.$strip>]>;
5993
- type CancelPerpsOrderRequest = z.input<typeof CancelPerpsOrderRequestSchema>;
5994
- declare const CancelPerpsOrdersRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
5995
- orderIds: z.ZodArray<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>>;
5996
- clientOrderIds: z.ZodOptional<z.ZodUndefined>;
5997
- expiresAt: z.ZodOptional<z.ZodNumber>;
5998
- }, z.core.$strip>, z.ZodObject<{
5999
- clientOrderIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>>;
6000
- orderIds: z.ZodOptional<z.ZodUndefined>;
6001
- expiresAt: z.ZodOptional<z.ZodNumber>;
6002
- }, z.core.$strip>]>;
6003
- type CancelPerpsOrdersRequest = z.input<typeof CancelPerpsOrdersRequestSchema>;
6004
- declare const UpdatePerpsLeverageRequestSchema: z.ZodObject<{
6005
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
6006
- leverage: z.ZodNumber;
6007
- crossMargin: z.ZodBoolean;
6008
- }, z.core.$strip>;
6009
- type UpdatePerpsLeverageRequest = z.input<typeof UpdatePerpsLeverageRequestSchema>;
6255
+ /**
6256
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6257
+ */
6258
+ type PlacePerpsOrderRequest = {
6259
+ /** Perps instrument identifier to trade. */
6260
+ instrumentId: number;
6261
+ /** Trade direction. */
6262
+ side: OrderSide;
6263
+ /** Limit price. */
6264
+ price: PerpsDecimalInput;
6265
+ /** Order quantity. */
6266
+ quantity: PerpsDecimalInput;
6267
+ /** Good-til-cancelled execution. */
6268
+ timeInForce: PerpsTimeInForce.GTC;
6269
+ /** Whether the order must rest instead of taking liquidity. */
6270
+ postOnly?: boolean;
6271
+ /** Whether the order may only reduce or close an existing position. */
6272
+ reduceOnly?: boolean;
6273
+ /** Optional caller-supplied idempotency identifier. */
6274
+ clientOrderId?: string;
6275
+ /** Optional command expiration timestamp in milliseconds. */
6276
+ expiresAt?: number;
6277
+ takeProfit?: never;
6278
+ stopLoss?: never;
6279
+ } | {
6280
+ /** Perps instrument identifier to trade. */
6281
+ instrumentId: number;
6282
+ /** Trade direction. */
6283
+ side: OrderSide;
6284
+ /** Optional limit price. Omit for market-style execution. */
6285
+ price?: PerpsDecimalInput;
6286
+ /** Order quantity. */
6287
+ quantity: PerpsDecimalInput;
6288
+ /** Immediate-or-cancel execution. */
6289
+ timeInForce: PerpsTimeInForce.IOC;
6290
+ postOnly?: never;
6291
+ /** Whether the order may only reduce or close an existing position. */
6292
+ reduceOnly?: boolean;
6293
+ /** Optional caller-supplied idempotency identifier. */
6294
+ clientOrderId?: string;
6295
+ /** Optional command expiration timestamp in milliseconds. */
6296
+ expiresAt?: number;
6297
+ takeProfit?: never;
6298
+ stopLoss?: never;
6299
+ } | {
6300
+ /** Perps instrument identifier to trade. */
6301
+ instrumentId: number;
6302
+ /** Trade direction. */
6303
+ side: OrderSide;
6304
+ /** Optional limit price. Omit for market-style execution. */
6305
+ price?: PerpsDecimalInput;
6306
+ /** Order quantity. */
6307
+ quantity: PerpsDecimalInput;
6308
+ /** Fill-or-kill execution. */
6309
+ timeInForce: PerpsTimeInForce.FOK;
6310
+ postOnly?: never;
6311
+ /** Whether the order may only reduce or close an existing position. */
6312
+ reduceOnly?: boolean;
6313
+ /** Optional caller-supplied idempotency identifier. */
6314
+ clientOrderId?: string;
6315
+ /** Optional command expiration timestamp in milliseconds. */
6316
+ expiresAt?: number;
6317
+ takeProfit?: never;
6318
+ stopLoss?: never;
6319
+ };
6320
+ /**
6321
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6322
+ */
6323
+ type PlacePerpsOrderWithTpSlRequest = {
6324
+ /** Perps instrument identifier to trade. */
6325
+ instrumentId: number;
6326
+ /** Trade direction. */
6327
+ side: OrderSide;
6328
+ /** Limit price. */
6329
+ price: PerpsDecimalInput;
6330
+ /** Order quantity. */
6331
+ quantity: PerpsDecimalInput;
6332
+ /** Good-til-cancelled execution. */
6333
+ timeInForce: PerpsTimeInForce.GTC;
6334
+ /** Whether the order must rest instead of taking liquidity. */
6335
+ postOnly?: boolean;
6336
+ /** Whether the order may only reduce or close an existing position. */
6337
+ reduceOnly?: boolean;
6338
+ /** Optional caller-supplied idempotency identifier. */
6339
+ clientOrderId?: string;
6340
+ /** Optional command expiration timestamp in milliseconds. */
6341
+ expiresAt?: number;
6342
+ /** Take-profit trigger to place with the entry order. */
6343
+ takeProfit: PerpsTpSlTrigger;
6344
+ /** Optional stop-loss trigger to place with the entry order. */
6345
+ stopLoss?: PerpsTpSlTrigger;
6346
+ } | {
6347
+ /** Perps instrument identifier to trade. */
6348
+ instrumentId: number;
6349
+ /** Trade direction. */
6350
+ side: OrderSide;
6351
+ /** Limit price. */
6352
+ price: PerpsDecimalInput;
6353
+ /** Order quantity. */
6354
+ quantity: PerpsDecimalInput;
6355
+ /** Good-til-cancelled execution. */
6356
+ timeInForce: PerpsTimeInForce.GTC;
6357
+ /** Whether the order must rest instead of taking liquidity. */
6358
+ postOnly?: boolean;
6359
+ /** Whether the order may only reduce or close an existing position. */
6360
+ reduceOnly?: boolean;
6361
+ /** Optional caller-supplied idempotency identifier. */
6362
+ clientOrderId?: string;
6363
+ /** Optional command expiration timestamp in milliseconds. */
6364
+ expiresAt?: number;
6365
+ /** Optional take-profit trigger to place with the entry order. */
6366
+ takeProfit?: PerpsTpSlTrigger;
6367
+ /** Stop-loss trigger to place with the entry order. */
6368
+ stopLoss: PerpsTpSlTrigger;
6369
+ } | {
6370
+ /** Perps instrument identifier to trade. */
6371
+ instrumentId: number;
6372
+ /** Trade direction. */
6373
+ side: OrderSide;
6374
+ /** Optional limit price. Omit for market-style execution. */
6375
+ price?: PerpsDecimalInput;
6376
+ /** Order quantity. */
6377
+ quantity: PerpsDecimalInput;
6378
+ /** Immediate-or-cancel execution. */
6379
+ timeInForce: PerpsTimeInForce.IOC;
6380
+ postOnly?: never;
6381
+ /** Whether the order may only reduce or close an existing position. */
6382
+ reduceOnly?: boolean;
6383
+ /** Optional caller-supplied idempotency identifier. */
6384
+ clientOrderId?: string;
6385
+ /** Optional command expiration timestamp in milliseconds. */
6386
+ expiresAt?: number;
6387
+ /** Take-profit trigger to place with the entry order. */
6388
+ takeProfit: PerpsTpSlTrigger;
6389
+ /** Optional stop-loss trigger to place with the entry order. */
6390
+ stopLoss?: PerpsTpSlTrigger;
6391
+ } | {
6392
+ /** Perps instrument identifier to trade. */
6393
+ instrumentId: number;
6394
+ /** Trade direction. */
6395
+ side: OrderSide;
6396
+ /** Optional limit price. Omit for market-style execution. */
6397
+ price?: PerpsDecimalInput;
6398
+ /** Order quantity. */
6399
+ quantity: PerpsDecimalInput;
6400
+ /** Immediate-or-cancel execution. */
6401
+ timeInForce: PerpsTimeInForce.IOC;
6402
+ postOnly?: never;
6403
+ /** Whether the order may only reduce or close an existing position. */
6404
+ reduceOnly?: boolean;
6405
+ /** Optional caller-supplied idempotency identifier. */
6406
+ clientOrderId?: string;
6407
+ /** Optional command expiration timestamp in milliseconds. */
6408
+ expiresAt?: number;
6409
+ /** Optional take-profit trigger to place with the entry order. */
6410
+ takeProfit?: PerpsTpSlTrigger;
6411
+ /** Stop-loss trigger to place with the entry order. */
6412
+ stopLoss: PerpsTpSlTrigger;
6413
+ } | {
6414
+ /** Perps instrument identifier to trade. */
6415
+ instrumentId: number;
6416
+ /** Trade direction. */
6417
+ side: OrderSide;
6418
+ /** Optional limit price. Omit for market-style execution. */
6419
+ price?: PerpsDecimalInput;
6420
+ /** Order quantity. */
6421
+ quantity: PerpsDecimalInput;
6422
+ /** Fill-or-kill execution. */
6423
+ timeInForce: PerpsTimeInForce.FOK;
6424
+ postOnly?: never;
6425
+ /** Whether the order may only reduce or close an existing position. */
6426
+ reduceOnly?: boolean;
6427
+ /** Optional caller-supplied idempotency identifier. */
6428
+ clientOrderId?: string;
6429
+ /** Optional command expiration timestamp in milliseconds. */
6430
+ expiresAt?: number;
6431
+ /** Take-profit trigger to place with the entry order. */
6432
+ takeProfit: PerpsTpSlTrigger;
6433
+ /** Optional stop-loss trigger to place with the entry order. */
6434
+ stopLoss?: PerpsTpSlTrigger;
6435
+ } | {
6436
+ /** Perps instrument identifier to trade. */
6437
+ instrumentId: number;
6438
+ /** Trade direction. */
6439
+ side: OrderSide;
6440
+ /** Optional limit price. Omit for market-style execution. */
6441
+ price?: PerpsDecimalInput;
6442
+ /** Order quantity. */
6443
+ quantity: PerpsDecimalInput;
6444
+ /** Fill-or-kill execution. */
6445
+ timeInForce: PerpsTimeInForce.FOK;
6446
+ postOnly?: never;
6447
+ /** Whether the order may only reduce or close an existing position. */
6448
+ reduceOnly?: boolean;
6449
+ /** Optional caller-supplied idempotency identifier. */
6450
+ clientOrderId?: string;
6451
+ /** Optional command expiration timestamp in milliseconds. */
6452
+ expiresAt?: number;
6453
+ /** Optional take-profit trigger to place with the entry order. */
6454
+ takeProfit?: PerpsTpSlTrigger;
6455
+ /** Stop-loss trigger to place with the entry order. */
6456
+ stopLoss: PerpsTpSlTrigger;
6457
+ };
6458
+ /**
6459
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6460
+ */
6461
+ type PlacePerpsPositionTpSlRequest = {
6462
+ /** Perps instrument identifier whose current position should receive TP/SL protection. */
6463
+ instrumentId: number;
6464
+ /** Take-profit trigger to place for the current position. */
6465
+ takeProfit: PerpsPositionTpSlTrigger;
6466
+ /** Optional stop-loss trigger to place alongside the take-profit. */
6467
+ stopLoss?: PerpsPositionTpSlTrigger;
6468
+ /** Optional command expiration timestamp in milliseconds. */
6469
+ expiresAt?: number;
6470
+ } | {
6471
+ /** Perps instrument identifier whose current position should receive TP/SL protection. */
6472
+ instrumentId: number;
6473
+ /** Optional take-profit trigger to place alongside the stop-loss. */
6474
+ takeProfit?: PerpsPositionTpSlTrigger;
6475
+ /** Stop-loss trigger to place for the current position. */
6476
+ stopLoss: PerpsPositionTpSlTrigger;
6477
+ /** Optional command expiration timestamp in milliseconds. */
6478
+ expiresAt?: number;
6479
+ };
6480
+ /**
6481
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6482
+ */
6483
+ type CancelPerpsOrderRequest = {
6484
+ /** Order identifier to cancel. */
6485
+ orderId: number;
6486
+ clientOrderId?: never;
6487
+ /** Optional command expiration timestamp in milliseconds. */
6488
+ expiresAt?: number;
6489
+ } | {
6490
+ /** Caller-supplied idempotency identifier to cancel. */
6491
+ clientOrderId: string;
6492
+ orderId?: never;
6493
+ /** Optional command expiration timestamp in milliseconds. */
6494
+ expiresAt?: number;
6495
+ };
6496
+ /**
6497
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6498
+ */
6499
+ type CancelPerpsOrdersRequest = {
6500
+ /** Order identifiers to cancel. */
6501
+ orderIds: number[];
6502
+ clientOrderIds?: never;
6503
+ /** Optional command expiration timestamp in milliseconds. */
6504
+ expiresAt?: number;
6505
+ } | {
6506
+ /** Caller-supplied idempotency identifiers to cancel. */
6507
+ clientOrderIds: string[];
6508
+ orderIds?: never;
6509
+ /** Optional command expiration timestamp in milliseconds. */
6510
+ expiresAt?: number;
6511
+ };
6512
+ /**
6513
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6514
+ */
6515
+ type CancelAllPerpsOrdersRequest = {
6516
+ /** Optional Perps instrument identifier to scope cancellation. */
6517
+ instrumentId?: number;
6518
+ /** Optional command expiration timestamp in milliseconds. */
6519
+ expiresAt?: number;
6520
+ };
6521
+ /**
6522
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6523
+ */
6524
+ type UpdatePerpsLeverageRequest = {
6525
+ /** Perps instrument identifier whose leverage should be updated. */
6526
+ instrumentId: number;
6527
+ /** Target leverage multiplier. */
6528
+ leverage: number;
6529
+ /** Whether the instrument should use cross margin. */
6530
+ crossMargin: boolean;
6531
+ };
6532
+ /**
6533
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6534
+ */
6010
6535
  type UpdatePerpsLeverageError = RequestRejectedError | SigningError | TransportError | UserInputError;
6536
+ /**
6537
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6538
+ */
6011
6539
  declare const UpdatePerpsLeverageError: {
6012
6540
  isError(error: unknown): error is SigningError | TransportError | UserInputError | RequestRejectedError;
6013
6541
  };
6014
- declare const UpdatePerpsMarginRequestSchema: z.ZodObject<{
6015
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
6016
- amount: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings.DecimalString, number>>]>;
6017
- }, z.core.$strip>;
6018
- type UpdatePerpsMarginRequest = z.input<typeof UpdatePerpsMarginRequestSchema>;
6019
- type UpdatePerpsMarginError = RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
6020
- declare const UpdatePerpsMarginError: {
6021
- isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
6022
- };
6023
6542
 
6543
+ /**
6544
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6545
+ */
6024
6546
  type PerpsSessionOptions = {
6025
6547
  chainId: number;
6026
6548
  credentials: PerpsCredentials;
@@ -6029,43 +6551,286 @@ type PerpsSessionOptions = {
6029
6551
  restUrl: string;
6030
6552
  wsUrl: string;
6031
6553
  };
6554
+ /**
6555
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6556
+ */
6557
+ type PerpsSessionLifecycleError = RequestRejectedError | TransportError;
6558
+ /**
6559
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6560
+ */
6561
+ type PerpsSessionAccountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
6562
+ /**
6563
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6564
+ */
6565
+ type PerpsSessionTradingError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
6566
+ /**
6567
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6568
+ */
6569
+ type PerpsPlacedTpSlOrder = {
6570
+ orderId: PerpsOrderId;
6571
+ };
6572
+ /**
6573
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6574
+ */
6575
+ type PerpsPlacedTpSlOrders = {
6576
+ takeProfit?: PerpsPlacedTpSlOrder;
6577
+ stopLoss?: PerpsPlacedTpSlOrder;
6578
+ };
6579
+ /**
6580
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6581
+ */
6582
+ type PlacePerpsOrderResult = {
6583
+ order: PerpsOrder;
6584
+ };
6585
+ /**
6586
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6587
+ */
6588
+ type PlacePerpsOrderWithTpSlResult = PlacePerpsOrderResult & {
6589
+ tpSl: PerpsPlacedTpSlOrders;
6590
+ };
6591
+ /**
6592
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6593
+ */
6594
+ type PlacePerpsPositionTpSlResult = {
6595
+ tpSl: PerpsPlacedTpSlOrders;
6596
+ };
6597
+ /**
6598
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6599
+ */
6032
6600
  declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
6033
6601
  #private;
6034
6602
  readonly credentials: PerpsCredentials;
6603
+ /**
6604
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6605
+ */
6035
6606
  constructor(options: PerpsSessionOptions);
6607
+ /**
6608
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6609
+ */
6036
6610
  get closed(): boolean;
6611
+ /**
6612
+ * Connects and authenticates the session WebSocket.
6613
+ *
6614
+ * @throws {@link PerpsSessionLifecycleError}
6615
+ * Thrown on failure.
6616
+ *
6617
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6618
+ */
6037
6619
  connect(): Promise<void>;
6620
+ /**
6621
+ * Closes the session and releases pending requests.
6622
+ *
6623
+ * @throws {@link PerpsSessionLifecycleError}
6624
+ * Thrown on failure.
6625
+ *
6626
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6627
+ */
6038
6628
  close(): Promise<void>;
6629
+ /**
6630
+ * Iterates authenticated Perps account events emitted by this session.
6631
+ *
6632
+ * @example
6633
+ * ```ts
6634
+ * for await (const event of session) {
6635
+ * if (event.type === 'order') {
6636
+ * console.log(event.payload.id);
6637
+ * }
6638
+ * }
6639
+ * ```
6640
+ *
6641
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6642
+ */
6039
6643
  [Symbol.asyncIterator](): AsyncIterator<PerpsSessionEvent>;
6644
+ /**
6645
+ * Fetches current Perps balances for the authenticated account.
6646
+ *
6647
+ * @throws {@link PerpsSessionAccountError}
6648
+ * Thrown on failure.
6649
+ *
6650
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6651
+ */
6040
6652
  fetchBalances(): Promise<PerpsBalance[]>;
6653
+ /**
6654
+ * Fetches the current Perps portfolio for the authenticated account.
6655
+ *
6656
+ * @throws {@link PerpsSessionAccountError}
6657
+ * Thrown on failure.
6658
+ *
6659
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6660
+ */
6041
6661
  fetchPortfolio(): Promise<PerpsPortfolio>;
6662
+ /**
6663
+ * Fetches account-level Perps statistics for the authenticated account.
6664
+ *
6665
+ * @throws {@link PerpsSessionAccountError}
6666
+ * Thrown on failure.
6667
+ *
6668
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6669
+ */
6670
+ fetchStats(): Promise<PerpsAccountStats>;
6671
+ /**
6672
+ * Fetches Perps account configuration, optionally filtered by instrument.
6673
+ *
6674
+ * @throws {@link PerpsSessionAccountError}
6675
+ * Thrown on failure.
6676
+ *
6677
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6678
+ */
6042
6679
  fetchAccountConfig(request?: FetchPerpsAccountConfigRequest): Promise<PerpsAccountConfig[]>;
6680
+ /**
6681
+ * Fetches currently open Perps orders, optionally filtered by instrument.
6682
+ *
6683
+ * @throws {@link PerpsSessionAccountError}
6684
+ * Thrown on failure.
6685
+ *
6686
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6687
+ */
6043
6688
  fetchOpenOrders(request?: FetchPerpsOpenOrdersRequest): Promise<PerpsOrder[]>;
6689
+ /**
6690
+ * Fetches Perps orders for the authenticated account.
6691
+ *
6692
+ * @throws {@link PerpsSessionAccountError}
6693
+ * Thrown on failure.
6694
+ *
6695
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6696
+ */
6044
6697
  fetchOrders(request?: FetchPerpsOrdersRequest): Promise<PerpsOrder[]>;
6698
+ /**
6699
+ * Lists Perps fills with SDK-owned pagination.
6700
+ *
6701
+ * @throws {@link PerpsSessionAccountError}
6702
+ * Thrown on failure.
6703
+ *
6704
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6705
+ */
6045
6706
  listFills(request?: ListPerpsFillsRequest): Paginated<PerpsAccountFill[]>;
6707
+ /**
6708
+ * Lists Perps funding payments with SDK-owned pagination.
6709
+ *
6710
+ * @throws {@link PerpsSessionAccountError}
6711
+ * Thrown on failure.
6712
+ *
6713
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6714
+ */
6046
6715
  listFundingPayments(request?: ListPerpsFundingPaymentsRequest): Paginated<PerpsAccountFundingPayment[]>;
6716
+ /**
6717
+ * Lists Perps deposits with SDK-owned pagination.
6718
+ *
6719
+ * @throws {@link PerpsSessionAccountError}
6720
+ * Thrown on failure.
6721
+ *
6722
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6723
+ */
6047
6724
  listDeposits(request?: ListPerpsDepositsRequest): Paginated<PerpsDeposit[]>;
6725
+ /**
6726
+ * Lists Perps withdrawals with SDK-owned pagination.
6727
+ *
6728
+ * @throws {@link PerpsSessionAccountError}
6729
+ * Thrown on failure.
6730
+ *
6731
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6732
+ */
6048
6733
  listWithdrawals(request?: ListPerpsWithdrawalsRequest): Paginated<PerpsWithdrawal[]>;
6734
+ /**
6735
+ * Lists Perps equity history with SDK-owned pagination.
6736
+ *
6737
+ * @throws {@link PerpsSessionAccountError}
6738
+ * Thrown on failure.
6739
+ *
6740
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6741
+ */
6049
6742
  listEquityHistory(request: ListPerpsEquityHistoryRequest): Paginated<PerpsEquityPoint[]>;
6743
+ /**
6744
+ * Lists Perps PnL history with SDK-owned pagination.
6745
+ *
6746
+ * @throws {@link PerpsSessionAccountError}
6747
+ * Thrown on failure.
6748
+ *
6749
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6750
+ */
6050
6751
  listPnlHistory(request: ListPerpsPnlHistoryRequest): Paginated<PerpsPnlPoint[]>;
6051
6752
  /**
6052
6753
  * Places one Perps order and resolves with the first matching orders update.
6053
6754
  *
6054
- * @throws Thrown on failure.
6755
+ * @example
6756
+ * ```ts
6757
+ * const { order } = await session.placeOrder({
6758
+ * instrumentId: 1,
6759
+ * price: '100',
6760
+ * quantity: '1',
6761
+ * side: OrderSide.BUY,
6762
+ * timeInForce: PerpsTimeInForce.GTC,
6763
+ * });
6764
+ * ```
6765
+ *
6766
+ * @example
6767
+ * ```ts
6768
+ * const { order, tpSl } = await session.placeOrder({
6769
+ * instrumentId: 1,
6770
+ * price: '100',
6771
+ * quantity: '1',
6772
+ * side: OrderSide.BUY,
6773
+ * stopLoss: { triggerPrice: '90' },
6774
+ * timeInForce: PerpsTimeInForce.GTC,
6775
+ * });
6776
+ * ```
6777
+ *
6778
+ * @throws {@link PerpsSessionTradingError}
6779
+ * Thrown on failure.
6780
+ *
6781
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6782
+ */
6783
+ placeOrder(request: PlacePerpsOrderWithTpSlRequest): Promise<PlacePerpsOrderWithTpSlResult>;
6784
+ /**
6785
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6055
6786
  */
6056
- placeOrder(request: PlacePerpsOrderRequest): Promise<PerpsOrder>;
6787
+ placeOrder(request: PlacePerpsOrderRequest): Promise<PlacePerpsOrderResult>;
6057
6788
  /**
6058
6789
  * Posts one or more Perps orders and returns queue-entry acknowledgements.
6059
6790
  *
6060
6791
  * @remarks
6061
6792
  * This is a low-level method. Most SDK consumers should prefer `placeOrder`.
6793
+ *
6794
+ * @throws {@link PerpsSessionTradingError}
6795
+ * Thrown on failure.
6796
+ *
6797
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6062
6798
  */
6063
6799
  postOrders(request: PostPerpsOrdersRequest): Promise<PerpsPostOrderAck[]>;
6800
+ /**
6801
+ * Places take-profit and/or stop-loss protection for the current position.
6802
+ *
6803
+ * @remarks
6804
+ * The exit side is inferred from the current position for the requested
6805
+ * instrument.
6806
+ *
6807
+ * @example
6808
+ * ```ts
6809
+ * const { tpSl } = await session.placePositionTpSl({
6810
+ * instrumentId: 1,
6811
+ * stopLoss: { triggerPrice: '90' },
6812
+ * });
6813
+ * ```
6814
+ *
6815
+ * @throws {@link PerpsSessionAccountError}
6816
+ * Thrown when the current position cannot be read.
6817
+ *
6818
+ * @throws {@link PerpsSessionTradingError}
6819
+ * Thrown when the TP/SL command fails.
6820
+ *
6821
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6822
+ */
6823
+ placePositionTpSl(request: PlacePerpsPositionTpSlRequest): Promise<PlacePerpsPositionTpSlResult>;
6064
6824
  /**
6065
6825
  * Cancels one Perps order and returns the cancel result.
6066
6826
  *
6067
6827
  * @remarks
6068
6828
  * The returned status reflects whether the cancel happened.
6829
+ *
6830
+ * @throws {@link PerpsSessionTradingError}
6831
+ * Thrown on failure.
6832
+ *
6833
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6069
6834
  */
6070
6835
  cancelOrder(request: CancelPerpsOrderRequest): Promise<PerpsCancelOrderResult>;
6071
6836
  /**
@@ -6073,34 +6838,67 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
6073
6838
  *
6074
6839
  * @remarks
6075
6840
  * Each returned status reflects whether that cancel happened.
6841
+ *
6842
+ * @throws {@link PerpsSessionTradingError}
6843
+ * Thrown on failure.
6844
+ *
6845
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6076
6846
  */
6077
6847
  cancelOrders(request: CancelPerpsOrdersRequest): Promise<PerpsCancelOrderResult[]>;
6078
- updateLeverage(request: UpdatePerpsLeverageRequest): Promise<void>;
6079
- updateMargin(request: UpdatePerpsMarginRequest): Promise<void>;
6848
+ /**
6849
+ * Cancels all open Perps orders for the authenticated account.
6850
+ *
6851
+ * @remarks
6852
+ * Omit `instrumentId` to cancel open orders across all instruments. The
6853
+ * endpoint returns once the cancel-all request is accepted; individual orders
6854
+ * can still race with fills or other cancels.
6855
+ *
6856
+ * @throws {@link PerpsSessionTradingError}
6857
+ * Thrown on failure.
6858
+ *
6859
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6860
+ */
6861
+ cancelAllOrders(request?: CancelAllPerpsOrdersRequest): Promise<void>;
6862
+ /**
6863
+ * Updates Perps leverage and margin mode for an instrument.
6864
+ *
6865
+ * @example
6866
+ * ```ts
6867
+ * await session.updateLeverage({
6868
+ * crossMargin: true,
6869
+ * instrumentId: 1,
6870
+ * leverage: 2,
6871
+ * });
6872
+ * ```
6873
+ *
6874
+ * @throws {@link UpdatePerpsLeverageError}
6875
+ * Thrown on failure.
6876
+ *
6877
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6878
+ */
6879
+ updateLeverage(request: UpdatePerpsLeverageRequest): Promise<PerpsUpdateLeverageResult>;
6080
6880
  }
6081
6881
 
6082
6882
  type PerpsPublicReadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
6083
6883
  declare const PerpsPublicReadError: {
6084
6884
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6085
6885
  };
6086
- type PerpsCandlesParams = {
6087
- instrumentId: z.output<typeof PerpsInstrumentIdSchema>;
6088
- interval: PerpsKlineInterval;
6089
- startTimestamp: number;
6090
- endTimestamp: number;
6091
- };
6092
- type PerpsTimeRangeParams = {
6093
- instrumentId: z.output<typeof PerpsInstrumentIdSchema>;
6094
- startTimestamp: number;
6095
- endTimestamp: number;
6096
- };
6097
- declare const FetchPerpsInstrumentsRequestSchema: z.ZodDefault<z.ZodObject<{
6098
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>>;
6099
- instrumentType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentType>>;
6100
- category: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentCategory>>;
6101
- }, z.core.$strip>>;
6102
- type FetchPerpsInstrumentsRequest = z.input<typeof FetchPerpsInstrumentsRequestSchema>;
6886
+ /**
6887
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6888
+ */
6889
+ type FetchPerpsInstrumentsRequest = {
6890
+ /** Perps instrument identifier to fetch. */
6891
+ instrumentId?: number;
6892
+ /** Optional instrument category filter. */
6893
+ category?: PerpsInstrumentCategory;
6894
+ };
6895
+ /**
6896
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6897
+ */
6103
6898
  type FetchPerpsInstrumentsError = PerpsPublicReadError;
6899
+ /**
6900
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6901
+ */
6104
6902
  declare const FetchPerpsInstrumentsError: {
6105
6903
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6106
6904
  };
@@ -6112,13 +6910,24 @@ declare const FetchPerpsInstrumentsError: {
6112
6910
  *
6113
6911
  * @throws {@link FetchPerpsInstrumentsError}
6114
6912
  * Thrown on failure.
6913
+ *
6914
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6115
6915
  */
6116
6916
  declare function fetchPerpsInstruments(client: BaseClient, request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
6117
- declare const FetchPerpsTickerRequestSchema: z.ZodObject<{
6118
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
6119
- }, z.core.$strip>;
6120
- type FetchPerpsTickerRequest = z.input<typeof FetchPerpsTickerRequestSchema>;
6917
+ /**
6918
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6919
+ */
6920
+ type FetchPerpsTickerRequest = {
6921
+ /** Perps instrument identifier whose ticker should be fetched. */
6922
+ instrumentId: number;
6923
+ };
6924
+ /**
6925
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6926
+ */
6121
6927
  type FetchPerpsTickerError = PerpsPublicReadError;
6928
+ /**
6929
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6930
+ */
6122
6931
  declare const FetchPerpsTickerError: {
6123
6932
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6124
6933
  };
@@ -6130,13 +6939,24 @@ declare const FetchPerpsTickerError: {
6130
6939
  *
6131
6940
  * @throws {@link FetchPerpsTickerError}
6132
6941
  * Thrown on failure.
6942
+ *
6943
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6133
6944
  */
6134
6945
  declare function fetchPerpsTicker(client: BaseClient, request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
6135
- declare const FetchPerpsTickersRequestSchema: z.ZodDefault<z.ZodObject<{
6136
- instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>>;
6137
- }, z.core.$strip>>;
6138
- type FetchPerpsTickersRequest = z.input<typeof FetchPerpsTickersRequestSchema>;
6946
+ /**
6947
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6948
+ */
6949
+ type FetchPerpsTickersRequest = {
6950
+ /** Optional Perps instrument identifier filter. */
6951
+ instrumentId?: number;
6952
+ };
6953
+ /**
6954
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6955
+ */
6139
6956
  type FetchPerpsTickersError = PerpsPublicReadError;
6957
+ /**
6958
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6959
+ */
6140
6960
  declare const FetchPerpsTickersError: {
6141
6961
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6142
6962
  };
@@ -6148,15 +6968,30 @@ declare const FetchPerpsTickersError: {
6148
6968
  *
6149
6969
  * @throws {@link FetchPerpsTickersError}
6150
6970
  * Thrown on failure.
6971
+ *
6972
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6151
6973
  */
6152
6974
  declare function fetchPerpsTickers(client: BaseClient, request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
6975
+ /**
6976
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6977
+ */
6153
6978
  type PerpsBookDepth = 10 | 100 | 500 | 1000;
6154
- declare const FetchPerpsBookRequestSchema: z.ZodObject<{
6155
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
6156
- depth: z.ZodDefault<z.ZodType<PerpsBookDepth, unknown, z.core.$ZodTypeInternals<PerpsBookDepth, unknown>>>;
6157
- }, z.core.$strip>;
6158
- type FetchPerpsBookRequest = z.input<typeof FetchPerpsBookRequestSchema>;
6979
+ /**
6980
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6981
+ */
6982
+ type FetchPerpsBookRequest = {
6983
+ /** Perps instrument identifier whose order book should be fetched. */
6984
+ instrumentId: number;
6985
+ /** Number of price levels to return on each side. */
6986
+ depth?: PerpsBookDepth;
6987
+ };
6988
+ /**
6989
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6990
+ */
6159
6991
  type FetchPerpsBookError = PerpsPublicReadError;
6992
+ /**
6993
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6994
+ */
6160
6995
  declare const FetchPerpsBookError: {
6161
6996
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6162
6997
  };
@@ -6168,33 +7003,35 @@ declare const FetchPerpsBookError: {
6168
7003
  *
6169
7004
  * @throws {@link FetchPerpsBookError}
6170
7005
  * Thrown on failure.
7006
+ *
7007
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6171
7008
  */
6172
7009
  declare function fetchPerpsBook(client: BaseClient, request: FetchPerpsBookRequest): Promise<PerpsBook>;
6173
- declare const ListPerpsCandlesRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
6174
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
6175
- interval: z.ZodEnum<typeof PerpsKlineInterval>;
6176
- start: z.ZodOptional<z.ZodNumber>;
6177
- end: z.ZodOptional<z.ZodNumber>;
6178
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
6179
- }, z.core.$strip>, z.ZodTransform<{
6180
- cursor: PaginationCursor | undefined;
6181
- params: PerpsCandlesParams;
6182
- }, {
6183
- instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
7010
+ /**
7011
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7012
+ */
7013
+ type ListPerpsCandlesRequest = {
7014
+ /** Perps instrument identifier whose candles should be listed. */
7015
+ instrumentId: number;
7016
+ /** Candle interval. */
6184
7017
  interval: PerpsKlineInterval;
6185
- start?: number | undefined;
6186
- end?: number | undefined;
6187
- cursor?: PaginationCursor | undefined;
6188
- }>>, z.ZodPipe<z.ZodObject<{
6189
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
6190
- }, z.core.$strip>, z.ZodTransform<{
6191
- cursor: PaginationCursor;
6192
- params: undefined;
6193
- }, {
7018
+ /** Inclusive start timestamp in milliseconds. */
7019
+ start?: number;
7020
+ /** Inclusive end timestamp in milliseconds. */
7021
+ end?: number;
7022
+ /** Opaque cursor returned by a previous page. */
7023
+ cursor?: PaginationCursor;
7024
+ } | {
7025
+ /** Opaque cursor returned by a previous page. */
6194
7026
  cursor: PaginationCursor;
6195
- }>>]>;
6196
- type ListPerpsCandlesRequest = z.input<typeof ListPerpsCandlesRequestSchema>;
7027
+ };
7028
+ /**
7029
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7030
+ */
6197
7031
  type ListPerpsCandlesError = PerpsPublicReadError;
7032
+ /**
7033
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7034
+ */
6198
7035
  declare const ListPerpsCandlesError: {
6199
7036
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6200
7037
  };
@@ -6206,31 +7043,33 @@ declare const ListPerpsCandlesError: {
6206
7043
  *
6207
7044
  * @throws {@link ListPerpsCandlesError}
6208
7045
  * Thrown on failure.
7046
+ *
7047
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6209
7048
  */
6210
7049
  declare function listPerpsCandles(client: BaseClient, request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
6211
- declare const ListPerpsFundingHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
6212
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
6213
- start: z.ZodOptional<z.ZodNumber>;
6214
- end: z.ZodOptional<z.ZodNumber>;
6215
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
6216
- }, z.core.$strip>, z.ZodTransform<{
6217
- cursor: PaginationCursor | undefined;
6218
- params: PerpsTimeRangeParams;
6219
- }, {
6220
- instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
6221
- start?: number | undefined;
6222
- end?: number | undefined;
6223
- cursor?: PaginationCursor | undefined;
6224
- }>>, z.ZodPipe<z.ZodObject<{
6225
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
6226
- }, z.core.$strip>, z.ZodTransform<{
6227
- cursor: PaginationCursor;
6228
- params: undefined;
6229
- }, {
7050
+ /**
7051
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7052
+ */
7053
+ type ListPerpsFundingHistoryRequest = {
7054
+ /** Perps instrument identifier whose funding history should be listed. */
7055
+ instrumentId: number;
7056
+ /** Inclusive start timestamp in milliseconds. */
7057
+ start?: number;
7058
+ /** Inclusive end timestamp in milliseconds. */
7059
+ end?: number;
7060
+ /** Opaque cursor returned by a previous page. */
7061
+ cursor?: PaginationCursor;
7062
+ } | {
7063
+ /** Opaque cursor returned by a previous page. */
6230
7064
  cursor: PaginationCursor;
6231
- }>>]>;
6232
- type ListPerpsFundingHistoryRequest = z.input<typeof ListPerpsFundingHistoryRequestSchema>;
7065
+ };
7066
+ /**
7067
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7068
+ */
6233
7069
  type ListPerpsFundingHistoryError = PerpsPublicReadError;
7070
+ /**
7071
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7072
+ */
6234
7073
  declare const ListPerpsFundingHistoryError: {
6235
7074
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6236
7075
  };
@@ -6242,31 +7081,33 @@ declare const ListPerpsFundingHistoryError: {
6242
7081
  *
6243
7082
  * @throws {@link ListPerpsFundingHistoryError}
6244
7083
  * Thrown on failure.
7084
+ *
7085
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6245
7086
  */
6246
7087
  declare function listPerpsFundingHistory(client: BaseClient, request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
6247
- declare const ListPerpsTradesRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
6248
- instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
6249
- start: z.ZodOptional<z.ZodNumber>;
6250
- end: z.ZodOptional<z.ZodNumber>;
6251
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
6252
- }, z.core.$strip>, z.ZodTransform<{
6253
- cursor: PaginationCursor | undefined;
6254
- params: PerpsTimeRangeParams;
6255
- }, {
6256
- instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
6257
- start?: number | undefined;
6258
- end?: number | undefined;
6259
- cursor?: PaginationCursor | undefined;
6260
- }>>, z.ZodPipe<z.ZodObject<{
6261
- cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
6262
- }, z.core.$strip>, z.ZodTransform<{
6263
- cursor: PaginationCursor;
6264
- params: undefined;
6265
- }, {
7088
+ /**
7089
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7090
+ */
7091
+ type ListPerpsTradesRequest = {
7092
+ /** Perps instrument identifier whose recent trades should be listed. */
7093
+ instrumentId: number;
7094
+ /** Inclusive start timestamp in milliseconds. */
7095
+ start?: number;
7096
+ /** Inclusive end timestamp in milliseconds. */
7097
+ end?: number;
7098
+ /** Opaque cursor returned by a previous page. */
7099
+ cursor?: PaginationCursor;
7100
+ } | {
7101
+ /** Opaque cursor returned by a previous page. */
6266
7102
  cursor: PaginationCursor;
6267
- }>>]>;
6268
- type ListPerpsTradesRequest = z.input<typeof ListPerpsTradesRequestSchema>;
7103
+ };
7104
+ /**
7105
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7106
+ */
6269
7107
  type ListPerpsTradesError = PerpsPublicReadError;
7108
+ /**
7109
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7110
+ */
6270
7111
  declare const ListPerpsTradesError: {
6271
7112
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6272
7113
  };
@@ -6278,9 +7119,17 @@ declare const ListPerpsTradesError: {
6278
7119
  *
6279
7120
  * @throws {@link ListPerpsTradesError}
6280
7121
  * Thrown on failure.
7122
+ *
7123
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6281
7124
  */
6282
7125
  declare function listPerpsTrades(client: BaseClient, request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
7126
+ /**
7127
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7128
+ */
6283
7129
  type FetchPerpsFeesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
7130
+ /**
7131
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7132
+ */
6284
7133
  declare const FetchPerpsFeesError: {
6285
7134
  isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6286
7135
  };
@@ -6292,55 +7141,108 @@ declare const FetchPerpsFeesError: {
6292
7141
  *
6293
7142
  * @throws {@link FetchPerpsFeesError}
6294
7143
  * Thrown on failure.
7144
+ *
7145
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6295
7146
  */
6296
7147
  declare function fetchPerpsFees(client: BaseClient): Promise<PerpsFeeScheduleEntry[]>;
6297
- declare const CreatePerpsSessionRequestSchema: z.ZodObject<{
6298
- expiresIn: z.ZodDefault<z.ZodNumber>;
6299
- label: z.ZodOptional<z.ZodString>;
6300
- }, z.core.$strict>;
6301
- declare const ResumePerpsSessionRequestSchema: z.ZodObject<{
6302
- credentials: z.ZodObject<{
6303
- proxy: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
6304
- privateKey: z.ZodCustom<PrivateKey, PrivateKey>;
6305
- secret: z.ZodString;
6306
- expiresAt: z.ZodNumber;
6307
- }, z.core.$strip>;
6308
- }, z.core.$strict>;
6309
- declare const RevokePerpsCredentialsRequestSchema: z.ZodObject<{
6310
- proxy: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
6311
- }, z.core.$strip>;
6312
- type CreatePerpsSessionRequest = z.input<typeof CreatePerpsSessionRequestSchema>;
6313
- type ResumePerpsSessionRequest = z.input<typeof ResumePerpsSessionRequestSchema>;
7148
+ /**
7149
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7150
+ */
7151
+ type CreatePerpsSessionRequest = {
7152
+ /** Delegated credential lifetime in milliseconds. */
7153
+ expiresIn?: number;
7154
+ /** Optional label for the delegated credentials. */
7155
+ label?: string;
7156
+ };
7157
+ /**
7158
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7159
+ */
7160
+ type ResumePerpsSessionRequest = {
7161
+ /** Existing delegated Perps credentials to validate and resume. */
7162
+ credentials: PerpsCredentials;
7163
+ };
7164
+ /**
7165
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7166
+ */
6314
7167
  type OpenPerpsSessionRequest = CreatePerpsSessionRequest | ResumePerpsSessionRequest;
6315
- type RevokePerpsCredentialsRequest = z.input<typeof RevokePerpsCredentialsRequestSchema>;
7168
+ /**
7169
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7170
+ */
7171
+ type RevokePerpsCredentialsRequest = {
7172
+ /** Proxy address whose delegated credentials should be revoked. */
7173
+ proxy: string;
7174
+ };
7175
+ /**
7176
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7177
+ */
6316
7178
  type PerpsDepositWorkflowRequest = GaslessWorkflowRequest | SendPerpsDepositTransactionRequest;
7179
+ /**
7180
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7181
+ */
6317
7182
  type PerpsDepositWorkflow = AsyncGenerator<PerpsDepositWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
6318
- declare const DepositToPerpsRequestSchema: z.ZodObject<{
6319
- amount: z.ZodBigInt;
6320
- metadata: z.ZodOptional<z.ZodString>;
6321
- }, z.core.$strip>;
6322
- declare const WithdrawFromPerpsRequestSchema: z.ZodObject<{
6323
- amount: z.ZodBigInt;
6324
- }, z.core.$strip>;
6325
- type DepositToPerpsRequest = z.input<typeof DepositToPerpsRequestSchema>;
6326
- type WithdrawFromPerpsRequest = z.input<typeof WithdrawFromPerpsRequestSchema>;
7183
+ /**
7184
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7185
+ */
7186
+ type DepositToPerpsRequest = {
7187
+ /** Collateral amount in base units. */
7188
+ amount: bigint;
7189
+ /** Optional wallet-visible metadata for gasless deposit workflows. */
7190
+ metadata?: string;
7191
+ };
7192
+ /**
7193
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7194
+ */
7195
+ type WithdrawFromPerpsRequest = {
7196
+ /** Collateral amount in base units. */
7197
+ amount: bigint;
7198
+ };
7199
+ /**
7200
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7201
+ */
6327
7202
  type OpenPerpsSessionError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
7203
+ /**
7204
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7205
+ */
6328
7206
  declare const OpenPerpsSessionError: {
6329
7207
  isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6330
7208
  };
7209
+ /**
7210
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7211
+ */
6331
7212
  type RevokePerpsCredentialsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
7213
+ /**
7214
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7215
+ */
6332
7216
  declare const RevokePerpsCredentialsError: {
6333
7217
  isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6334
7218
  };
7219
+ /**
7220
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7221
+ */
6335
7222
  type PreparePerpsDepositError = UserInputError;
7223
+ /**
7224
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7225
+ */
6336
7226
  declare const PreparePerpsDepositError: {
6337
7227
  isError(error: unknown): error is UserInputError;
6338
7228
  };
7229
+ /**
7230
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7231
+ */
6339
7232
  type DepositToPerpsError = RateLimitError | RequestRejectedError | CancelledSigningError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
7233
+ /**
7234
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7235
+ */
6340
7236
  declare const DepositToPerpsError: {
6341
7237
  isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6342
7238
  };
7239
+ /**
7240
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7241
+ */
6343
7242
  type WithdrawFromPerpsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
7243
+ /**
7244
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7245
+ */
6344
7246
  declare const WithdrawFromPerpsError: {
6345
7247
  isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
6346
7248
  };
@@ -6355,6 +7257,8 @@ declare const WithdrawFromPerpsError: {
6355
7257
  *
6356
7258
  * @throws {@link OpenPerpsSessionError}
6357
7259
  * Thrown on failure.
7260
+ *
7261
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6358
7262
  */
6359
7263
  declare function openPerpsSession(client: BaseSecureClient, request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
6360
7264
  /**
@@ -6366,6 +7270,8 @@ declare function openPerpsSession(client: BaseSecureClient, request?: OpenPerpsS
6366
7270
  *
6367
7271
  * @throws {@link RevokePerpsCredentialsError}
6368
7272
  * Thrown on failure.
7273
+ *
7274
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6369
7275
  */
6370
7276
  declare function revokePerpsCredentials(client: BaseSecureClient, request: RevokePerpsCredentialsRequest): Promise<void>;
6371
7277
  /**
@@ -6378,6 +7284,8 @@ declare function revokePerpsCredentials(client: BaseSecureClient, request: Revok
6378
7284
  *
6379
7285
  * @throws {@link PreparePerpsDepositError}
6380
7286
  * Thrown on failure.
7287
+ *
7288
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6381
7289
  */
6382
7290
  declare function preparePerpsDeposit(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<PerpsDepositWorkflow>;
6383
7291
  /**
@@ -6385,6 +7293,8 @@ declare function preparePerpsDeposit(client: BaseSecureClient, request: DepositT
6385
7293
  *
6386
7294
  * @throws {@link DepositToPerpsError}
6387
7295
  * Thrown on failure.
7296
+ *
7297
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6388
7298
  */
6389
7299
  declare function depositToPerps(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<TransactionHandle>;
6390
7300
  /**
@@ -6396,6 +7306,8 @@ declare function depositToPerps(client: BaseSecureClient, request: DepositToPerp
6396
7306
  *
6397
7307
  * @throws {@link WithdrawFromPerpsError}
6398
7308
  * Thrown on failure.
7309
+ *
7310
+ * @experimental This API may change in a breaking way in any release, including patch releases.
6399
7311
  */
6400
7312
  declare function withdrawFromPerps(client: BaseSecureClient, request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
6401
7313
 
@@ -6816,7 +7728,7 @@ declare const SearchRequestSchema: z.ZodObject<{
6816
7728
  q: z.ZodString;
6817
7729
  ascending: z.ZodOptional<z.ZodBoolean>;
6818
7730
  cache: z.ZodOptional<z.ZodBoolean>;
6819
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
7731
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
6820
7732
  eventsStatus: z.ZodOptional<z.ZodString>;
6821
7733
  eventsTag: z.ZodOptional<z.ZodArray<z.ZodString>>;
6822
7734
  excludeTagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
@@ -6877,7 +7789,7 @@ declare function search(client: BaseClient, request: SearchRequest): Paginated<S
6877
7789
  declare const ListSeriesRequestSchema: z.ZodObject<{
6878
7790
  ascending: z.ZodOptional<z.ZodBoolean>;
6879
7791
  closed: z.ZodOptional<z.ZodBoolean>;
6880
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
7792
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
6881
7793
  excludeEvents: z.ZodOptional<z.ZodBoolean>;
6882
7794
  locale: z.ZodOptional<z.ZodString>;
6883
7795
  order: z.ZodOptional<z.ZodString>;
@@ -6969,7 +7881,13 @@ type SportsEventType = SportsEvent['type'];
6969
7881
  type CommentsEventType = CommentsEvent['type'];
6970
7882
  type CryptoPricesEventType = CryptoPricesEvent['type'];
6971
7883
  type EquityPricesEventType = EquityPricesEvent['type'];
7884
+ /**
7885
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7886
+ */
6972
7887
  type PerpsMarketDataEventType = PerpsMarketDataEvent['type'];
7888
+ /**
7889
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7890
+ */
6973
7891
  type PerpsStreamingCandleInterval = Exclude<PerpsKlineInterval, PerpsKlineInterval.OneSecond>;
6974
7892
  type PerpsInstrumentIdInput = number;
6975
7893
  type MarketSubscription = {
@@ -7004,31 +7922,52 @@ type EquityPricesSubscription = {
7004
7922
  symbol: string;
7005
7923
  types?: readonly EquityPricesEventType[];
7006
7924
  };
7925
+ /**
7926
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7927
+ */
7007
7928
  type PerpsTradesSubscription = {
7008
7929
  topic: 'perps.trades';
7009
7930
  instrumentId: PerpsInstrumentIdInput;
7010
7931
  };
7932
+ /**
7933
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7934
+ */
7011
7935
  type PerpsBboSubscription = {
7012
7936
  topic: 'perps.bbo';
7013
7937
  instrumentId: PerpsInstrumentIdInput;
7014
7938
  };
7939
+ /**
7940
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7941
+ */
7015
7942
  type PerpsBookSubscription = {
7016
7943
  topic: 'perps.book';
7017
7944
  instrumentId: PerpsInstrumentIdInput;
7018
7945
  };
7946
+ /**
7947
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7948
+ */
7019
7949
  type PerpsCandlesSubscription = {
7020
7950
  topic: 'perps.candles';
7021
7951
  instrumentId: PerpsInstrumentIdInput;
7022
7952
  interval: PerpsStreamingCandleInterval;
7023
7953
  };
7954
+ /**
7955
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7956
+ */
7024
7957
  type PerpsTickersSubscription = {
7025
7958
  topic: 'perps.tickers';
7026
7959
  instrumentId?: PerpsInstrumentIdInput;
7027
7960
  };
7961
+ /**
7962
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7963
+ */
7028
7964
  type PerpsStatisticsSubscription = {
7029
7965
  topic: 'perps.statistics';
7030
7966
  instrumentId?: PerpsInstrumentIdInput;
7031
7967
  };
7968
+ /**
7969
+ * @experimental This API may change in a breaking way in any release, including patch releases.
7970
+ */
7032
7971
  type PerpsMarketDataSubscription = PerpsTradesSubscription | PerpsBboSubscription | PerpsBookSubscription | PerpsCandlesSubscription | PerpsTickersSubscription | PerpsStatisticsSubscription;
7033
7972
  type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
7034
7973
  type SecureSubscriptionSpec = PublicSubscriptionSpec | UserSubscription;
@@ -7089,7 +8028,7 @@ declare function subscribe<const TSubscriptions extends readonly SecureSubscript
7089
8028
 
7090
8029
  declare const ListTagsRequestSchema: z.ZodObject<{
7091
8030
  ascending: z.ZodOptional<z.ZodBoolean>;
7092
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
8031
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
7093
8032
  includeTemplate: z.ZodOptional<z.ZodBoolean>;
7094
8033
  isCarousel: z.ZodOptional<z.ZodBoolean>;
7095
8034
  locale: z.ZodOptional<z.ZodString>;
@@ -7261,7 +8200,7 @@ declare function fetchRelatedTagResources(client: BaseClient, request: FetchRela
7261
8200
  declare const ListTeamsRequestSchema: z.ZodObject<{
7262
8201
  abbreviation: z.ZodOptional<z.ZodArray<z.ZodString>>;
7263
8202
  ascending: z.ZodOptional<z.ZodBoolean>;
7264
- cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
8203
+ cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
7265
8204
  league: z.ZodOptional<z.ZodArray<z.ZodString>>;
7266
8205
  name: z.ZodOptional<z.ZodArray<z.ZodString>>;
7267
8206
  order: z.ZodOptional<z.ZodString>;
@@ -7431,4 +8370,4 @@ type Signer = {
7431
8370
  sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
7432
8371
  };
7433
8372
 
7434
- export { FetchPublicProfileError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type EnvironmentConfig as E, FetchClosedOnlyModeError as F, FetchEventLiveVolumeError as G, FetchEventTagsError as H, FetchLastTradePriceError as I, FetchLastTradePricesError as J, FetchMarketError as K, FetchMarketTagsError as L, FetchMidpointError as M, FetchMidpointsError as N, FetchNotificationsError as O, FetchOrderBookError as P, FetchOrderBooksError as Q, FetchOrderError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchOrderScoringError as V, FetchOrdersScoringError as W, FetchPortfolioValueError as X, FetchPriceError as Y, FetchPriceHistoryError as Z, FetchPricesError as _, type TypedData as a, RfqConfirmationError as a$, FetchRelatedTagResourcesError as a0, FetchRelatedTagsError as a1, FetchRewardPercentagesError as a2, FetchSeriesError as a3, FetchSpreadError as a4, FetchSpreadsError as a5, FetchTagError as a6, FetchTotalEarningsForUserForDayError as a7, FetchTradedMarketCountError as a8, InsufficientLiquidityError as a9, MergePositionsError as aA, OpenRfqSessionError as aB, type Page as aC, PageSizeSchema as aD, type Paginated as aE, type PerpsActions as aF, type PerpsEndpoints as aG, PerpsSession as aH, PostOrderError as aI, PostOrdersError as aJ, type PublicAccountActions as aK, type PublicActions as aL, type PublicClient as aM, type PublicClientOptions as aN, type PublicPerpsActions as aO, type PublicRewardsActions as aP, type PublicSubscriptionsActions as aQ, RateLimitError as aR, RedeemPositionsError as aS, RequestRejectedError as aT, type RequestRejectedErrorOptions as aU, type RestEndpoint as aV, type RfqCancelQuoteAck as aW, RfqCancelQuoteError as aX, RfqCancelQuoteRejectedError as aY, type RfqCancelQuoteRejectedErrorOptions as aZ, type RfqConfirmationAck as a_, ListAccountTradesError as aa, ListActivityError as ab, ListBuilderLeaderboardError as ac, ListBuilderTradesError as ad, ListBuilderVolumeError as ae, ListClosedPositionsError as af, ListComboMarketsError as ag, ListComboPositionsError as ah, ListCommentsByUserAddressError as ai, ListCommentsError as aj, ListCurrentRewardsError as ak, ListEventsError as al, ListMarketHoldersError as am, ListMarketPositionsError as an, ListMarketRewardsError as ao, ListMarketsError as ap, ListOpenInterestError as aq, ListOpenOrdersError as ar, ListPositionsError as as, ListSeriesError as at, ListTagsError as au, ListTeamsError as av, ListTraderLeaderboardError as aw, ListTradesError as ax, ListUserEarningsAndMarketsConfigError as ay, ListUserEarningsForDayError as az, type TransactionCall as b, rfqActions as b$, RfqConfirmationRejectedError as b0, type RfqConfirmationRequestEvent as b1, type RfqEndpoints as b2, type RfqEvent as b3, RfqQuoteError as b4, type RfqQuoteReference as b5, RfqQuoteRejectedError as b6, type RfqQuoteRejectedErrorOptions as b7, type RfqQuoteRequestEvent as b8, type RfqQuoteResponse as b9, SplitPositionError as bA, TimeoutError as bB, TransactionFailedError as bC, type TransactionHandle as bD, type TransactionOutcome as bE, TransferErc20Error as bF, TransportError as bG, type TypedDataDomain as bH, type TypedDataField as bI, UnexpectedResponseError as bJ, UpdatePerpsLeverageError as bK, UpdatePerpsMarginError as bL, WaitForTransactionError as bM, type WalletDerivationConfig as bN, type WebSocketEndpoint as bO, accountActions as bP, allActions as bQ, analyticsActions as bR, createPublicClient as bS, createSecureClient as bT, dataActions as bU, discoveryActions as bV, forkEnvironmentConfig as bW, makeErrorGuard as bX, perpsActions as bY, production as bZ, rewardsActions as b_, type RfqQuoteSource as ba, type RfqSession as bb, type RfqTradeEvent as bc, SearchError as bd, SearchSort as be, type SecureAccountActions as bf, type SecureActions as bg, type SecureClient as bh, type SecureClientOptions as bi, type SecureDownloadAccountingSnapshotRequest as bj, type SecureFetchPortfolioValueRequest as bk, type SecureFetchTradedMarketCountRequest as bl, type SecureListActivityRequest as bm, type SecureListClosedPositionsRequest as bn, type SecureListComboPositionsRequest as bo, type SecureListPositionsRequest as bp, type SecurePerpsActions as bq, type SecureRewardsActions as br, type SecureRfqActions as bs, type SecureSubscriptionsActions as bt, type SecureTradingActions as bu, type SecureWalletActions as bv, SetupGaslessWalletError as bw, SetupTradingApprovalsError as bx, type SignerTransactionRequest as by, SigningError as bz, type AccountIdentity as c, type FetchPerpsInstrumentsRequest as c$, subscriptionsActions as c0, tradingActions as c1, walletActions as c2, type CancelMarketOrdersRequest as c3, type CancelOrderRequest as c4, type CancelOrdersRequest as c5, type CancelPerpsOrderRequest as c6, type CancelPerpsOrdersRequest as c7, type CommentsEventType as c8, type CommentsSubscription as c9, type FetchCommentsByIdRequest as cA, type FetchEventLiveVolumeRequest as cB, type FetchEventRequest as cC, type FetchEventTagsRequest as cD, FetchExecuteParamsError as cE, type FetchExecuteParamsRequest as cF, type FetchGaslessTransactionRequest as cG, type FetchLastTradePriceRequest as cH, type FetchLastTradePricesRequest as cI, FetchMarketInfoError as cJ, type FetchMarketInfoRequest as cK, type FetchMarketRequest as cL, type FetchMarketTagsRequest as cM, type FetchMidpointRequest as cN, type FetchMidpointsRequest as cO, FetchNegRiskError as cP, type FetchNegRiskRequest as cQ, type FetchOrderBookRequest as cR, type FetchOrderBooksRequest as cS, type FetchOrderRequest as cT, type FetchOrderScoringRequest as cU, type FetchOrdersScoringRequest as cV, type FetchPerpsAccountConfigRequest as cW, FetchPerpsBookError as cX, type FetchPerpsBookRequest as cY, FetchPerpsFeesError as cZ, FetchPerpsInstrumentsError as c_, type CreatePerpsSessionRequest as ca, type CryptoPricesEventType as cb, type CryptoPricesSubscription as cc, DeployDepositWalletError as cd, DepositToPerpsError as ce, type DepositToPerpsRequest as cf, type DeprecatedTransactionHandle as cg, type DownloadAccountingSnapshotRequest as ch, type DropNotificationsRequest as ci, type EquityPricesEventType as cj, type EquityPricesSubscription as ck, type Erc1155ApprovalForAllWorkflow as cl, type Erc1155ApprovalForAllWorkflowRequest as cm, type Erc20ApprovalWorkflow as cn, type Erc20ApprovalWorkflowRequest as co, type Erc20TransferWorkflow as cp, type Erc20TransferWorkflowRequest as cq, type EstimateMarketBuyPriceRequest as cr, type EstimateMarketPriceRequest as cs, type EstimateMarketSellPriceRequest as ct, type EventForSubscriptionSpec as cu, type EventForSubscriptionSpecs as cv, FetchBalanceAllowanceError as cw, type FetchBalanceAllowanceRequest as cx, FetchBuilderFeeRatesError as cy, type FetchBuilderFeeRatesRequest as cz, type AnalyticsActions as d, type ListUserEarningsAndMarketsConfigRequest as d$, type FetchPerpsOpenOrdersRequest as d0, type FetchPerpsOrdersRequest as d1, FetchPerpsTickerError as d2, type FetchPerpsTickerRequest as d3, FetchPerpsTickersError as d4, type FetchPerpsTickersRequest as d5, type FetchPortfolioValueRequest as d6, type FetchPriceHistoryRequest as d7, type FetchPriceRequest as d8, type FetchPricesRequest as d9, type ListCommentsRequest as dA, type ListCurrentRewardsRequest as dB, type ListEventsRequest as dC, type ListMarketHoldersRequest as dD, type ListMarketPositionsRequest as dE, type ListMarketRewardsRequest as dF, type ListMarketsRequest as dG, type ListOpenInterestRequest as dH, type ListOpenOrdersRequest as dI, ListPerpsCandlesError as dJ, type ListPerpsCandlesRequest as dK, type ListPerpsDepositsRequest as dL, type ListPerpsEquityHistoryRequest as dM, type ListPerpsFillsRequest as dN, ListPerpsFundingHistoryError as dO, type ListPerpsFundingHistoryRequest as dP, type ListPerpsFundingPaymentsRequest as dQ, type ListPerpsPnlHistoryRequest as dR, ListPerpsTradesError as dS, type ListPerpsTradesRequest as dT, type ListPerpsWithdrawalsRequest as dU, type ListPositionsRequest as dV, type ListSeriesRequest as dW, type ListTagsRequest as dX, type ListTeamsRequest as dY, type ListTraderLeaderboardRequest as dZ, type ListTradesRequest as d_, type FetchPublicProfileRequest as da, type FetchRelatedTagResourcesRequest as db, type FetchRelatedTagsRequest as dc, type FetchSeriesRequest as dd, type FetchSpreadRequest as de, type FetchSpreadsRequest as df, type FetchTagRequest as dg, FetchTickSizeError as dh, type FetchTickSizeRequest as di, type FetchTotalEarningsForUserForDayRequest as dj, type FetchTradedMarketCountRequest as dk, GaslessTransactionMetadataSchema as dl, type GaslessWorkflow as dm, type GaslessWorkflowRequest as dn, IsWalletDeployedError as dp, type IsWalletDeployedRequest as dq, type ListAccountTradesRequest as dr, type ListActivityRequest as ds, type ListBuilderLeaderboardRequest as dt, type ListBuilderTradesRequest as du, type ListBuilderVolumeRequest as dv, type ListClosedPositionsRequest as dw, type ListComboMarketsRequest as dx, type ListComboPositionsRequest as dy, type ListCommentsByUserAddressRequest as dz, ApproveErc1155ForAllError as e, type PrepareSplitPositionRequest as e$, type ListUserEarningsForDayRequest as e0, type MarketEventType as e1, type MarketSubscription as e2, MergeComboPositionError as e3, MergeMarketPositionError as e4, type MergePositionsWorkflow as e5, type MergePositionsWorkflowRequest as e6, OpenPerpsSessionError as e7, type OpenPerpsSessionRequest as e8, type OrderDraft as e9, type PrepareErc20TransferRequest as eA, PrepareGaslessTransactionError as eB, type PrepareGaslessTransactionRequest as eC, type PrepareLimitOrderRequest as eD, type PrepareMarketBuyOrderRequest as eE, type PrepareMarketOrderRequest as eF, type PrepareMarketSellOrderRequest as eG, PrepareMergeComboPositionError as eH, type PrepareMergeComboPositionRequest as eI, PrepareMergeMarketPositionError as eJ, type PrepareMergeMarketPositionRequest as eK, PrepareMergePositionsError as eL, type PrepareMergePositionsRequest as eM, PreparePerpsDepositError as eN, PrepareRedeemComboPositionError as eO, type PrepareRedeemComboPositionRequest as eP, type PrepareRedeemMarketPositionsByConditionIdRequest as eQ, type PrepareRedeemMarketPositionsByMarketIdRequest as eR, PrepareRedeemMarketPositionsError as eS, type PrepareRedeemMarketPositionsRequest as eT, PrepareRedeemPositionsError as eU, type PrepareRedeemPositionsRequest as eV, PrepareSplitComboPositionError as eW, type PrepareSplitComboPositionRequest as eX, PrepareSplitMarketPositionError as eY, type PrepareSplitMarketPositionRequest as eZ, PrepareSplitPositionError as e_, type OrderPostingWorkflow as ea, type OrderWorkflow as eb, type OrderWorkflowRequest as ec, type PerpsBboSubscription as ed, type PerpsBookDepth as ee, type PerpsBookSubscription as ef, type PerpsCandlesSubscription as eg, type PerpsDepositWorkflow as eh, type PerpsDepositWorkflowRequest as ei, type PerpsMarketDataEventType as ej, type PerpsMarketDataSubscription as ek, type PerpsPlaceFokOrderRequest as el, type PerpsPlaceGtcOrderRequest as em, type PerpsPlaceIocOrderRequest as en, type PerpsStatisticsSubscription as eo, type PerpsStreamingCandleInterval as ep, type PerpsTickersSubscription as eq, type PerpsTradesSubscription as er, type PlacePerpsOrderRequest as es, type PostOrdersRequest as et, type PostPerpsOrdersRequest as eu, PrepareErc1155ApprovalForAllError as ev, type PrepareErc1155ApprovalForAllRequest as ew, PrepareErc20ApprovalError as ex, type PrepareErc20ApprovalRequest as ey, PrepareErc20TransferError as ez, ApproveErc20Error as f, fetchMidpoint as f$, PrepareTradingApprovalsError as f0, type PublicRealtimeEvent as f1, type PublicRealtimeTopic as f2, type PublicSubscriptionSpec as f3, type RedeemPositionsWorkflow as f4, type RedeemPositionsWorkflowRequest as f5, ResolveConditionByTokenError as f6, type ResolveConditionByTokenRequest as f7, type ResumePerpsSessionRequest as f8, RevokePerpsCredentialsError as f9, WithdrawFromPerpsError as fA, type WithdrawFromPerpsRequest as fB, approveErc1155ForAll as fC, approveErc20 as fD, cancelAll as fE, cancelMarketOrders as fF, cancelOrder as fG, cancelOrders as fH, deployDepositWallet as fI, depositToPerps as fJ, downloadAccountingSnapshot as fK, dropNotifications as fL, estimateMarketPrice as fM, fetchBalanceAllowance as fN, fetchBuilderFeeRates as fO, fetchBuilderVolume as fP, fetchClosedOnlyMode as fQ, fetchCommentsById as fR, fetchEvent as fS, fetchEventLiveVolume as fT, fetchEventTags as fU, fetchExecuteParams as fV, fetchLastTradePrice as fW, fetchLastTradePrices as fX, fetchMarket as fY, fetchMarketInfo as fZ, fetchMarketTags as f_, type RevokePerpsCredentialsRequest as fa, type RfqConfirmationRejectedErrorOptions as fb, type RfqExecutionUpdateEvent as fc, type SearchRequest as fd, type SearchResults as fe, type SecureRealtimeEvent as ff, type SecureRealtimeTopic as fg, type SecureSubscriptionSpec as fh, type SignedOrder as fi, SplitComboPositionError as fj, SplitMarketPositionError as fk, type SplitPositionWorkflow as fl, type SplitPositionWorkflowRequest as fm, type SportsEventType as fn, type SportsSubscription as fo, type SubscribeError as fp, type SubscriptionHandle as fq, type TradingApprovalsWorkflow as fr, type TradingApprovalsWorkflowRequest as fs, UpdateBalanceAllowanceError as ft, type UpdateBalanceAllowanceRequest as fu, type UpdatePerpsLeverageRequest as fv, type UpdatePerpsMarginRequest as fw, type UserEventType as fx, type UserSubscription as fy, WaitForGaslessTransactionError as fz, BasePublicClient as g, postOrder as g$, fetchMidpoints as g0, fetchNegRisk as g1, fetchNotifications as g2, fetchOrder as g3, fetchOrderBook as g4, fetchOrderBooks as g5, fetchOrderScoring as g6, fetchOrdersScoring as g7, fetchPerpsBook as g8, fetchPerpsFees as g9, listComboPositions as gA, listComments as gB, listCommentsByUserAddress as gC, listCurrentRewards as gD, listEvents as gE, listMarketHolders as gF, listMarketPositions as gG, listMarketRewards as gH, listMarkets as gI, listOpenInterest as gJ, listOpenOrders as gK, listPerpsCandles as gL, listPerpsFundingHistory as gM, listPerpsTrades as gN, listPositions as gO, listSeries as gP, listTags as gQ, listTeams as gR, listTraderLeaderboard as gS, listTrades as gT, listUserEarningsAndMarketsConfig as gU, listUserEarningsForDay as gV, mergeComboPosition as gW, mergeMarketPosition as gX, mergePositions as gY, openPerpsSession as gZ, openRfqSession as g_, fetchPerpsInstruments as ga, fetchPerpsTicker as gb, fetchPerpsTickers as gc, fetchPortfolioValue as gd, fetchPrice as ge, fetchPriceHistory as gf, fetchPrices as gg, fetchPublicProfile as gh, fetchRelatedTagResources as gi, fetchRelatedTags as gj, fetchRewardPercentages as gk, fetchSeries as gl, fetchSpread as gm, fetchSpreads as gn, fetchTag as go, fetchTickSize as gp, fetchTotalEarningsForUserForDay as gq, fetchTradedMarketCount as gr, fetchTransaction as gs, isWalletDeployed as gt, listAccountTrades as gu, listActivity as gv, listBuilderLeaderboard as gw, listBuilderTrades as gx, listClosedPositions as gy, listComboMarkets as gz, BaseSecureClient as h, postOrders as h0, prepareErc1155ApprovalForAll as h1, prepareErc20Approval as h2, prepareErc20Transfer as h3, prepareGaslessTransaction as h4, prepareMergeComboPosition as h5, prepareMergeMarketPosition as h6, prepareMergePositions as h7, preparePerpsDeposit as h8, prepareRedeemComboPosition as h9, prepareRedeemMarketPositions as ha, prepareRedeemPositions as hb, prepareSplitComboPosition as hc, prepareSplitMarketPosition as hd, prepareSplitPosition as he, prepareTradingApprovals as hf, redeemPositions as hg, resolveConditionByToken as hh, revokePerpsCredentials as hi, search as hj, setupTradingApprovals as hk, splitComboPosition as hl, splitMarketPosition as hm, splitPosition as hn, subscribe as ho, transferErc20 as hp, updateBalanceAllowance as hq, withdrawFromPerps as hr, 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, type ClobEndpoints as q, CreateSecureClientError as r, type DiscoveryActions as s, DownloadAccountingSnapshotError as t, DropNotificationsError as u, type EnvironmentConfigFork as v, type EnvironmentContracts as w, EstimateMarketPriceError as x, FetchCommentsByIdError as y, FetchEventError as z };
8373
+ export { FetchOrderBookError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type DepositToPerpsRequest as E, type DiscoveryActions as F, DownloadAccountingSnapshotError as G, DropNotificationsError as H, type EnvironmentConfig as I, type EnvironmentConfigFork as J, type EnvironmentContracts as K, EstimateMarketPriceError as L, FetchClosedOnlyModeError as M, FetchCommentsByIdError as N, FetchEventError as O, FetchEventLiveVolumeError as P, FetchEventTagsError as Q, FetchLastTradePriceError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchLastTradePricesError as V, FetchMarketError as W, FetchMarketTagsError as X, FetchMidpointError as Y, FetchMidpointsError as Z, FetchNotificationsError as _, type TypedData as a, ListSeriesError as a$, FetchOrderBooksError as a0, FetchOrderError as a1, FetchOrderScoringError as a2, FetchOrdersScoringError as a3, type FetchPerpsAccountConfigRequest as a4, FetchPerpsBookError as a5, type FetchPerpsBookRequest as a6, FetchPerpsFeesError as a7, FetchPerpsInstrumentsError as a8, type FetchPerpsInstrumentsRequest as a9, ListClosedPositionsError as aA, ListComboActivityError as aB, ListComboMarketsError 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, ListPerpsCandlesError as aO, type ListPerpsCandlesRequest as aP, type ListPerpsDepositsRequest as aQ, type ListPerpsEquityHistoryRequest as aR, type ListPerpsFillsRequest as aS, ListPerpsFundingHistoryError as aT, type ListPerpsFundingHistoryRequest as aU, type ListPerpsFundingPaymentsRequest as aV, type ListPerpsPnlHistoryRequest as aW, ListPerpsTradesError as aX, type ListPerpsTradesRequest as aY, type ListPerpsWithdrawalsRequest as aZ, ListPositionsError as a_, type FetchPerpsOpenOrdersRequest as aa, type FetchPerpsOrdersRequest as ab, FetchPerpsTickerError as ac, type FetchPerpsTickerRequest as ad, FetchPerpsTickersError as ae, type FetchPerpsTickersRequest as af, FetchPortfolioValueError as ag, FetchPriceError as ah, FetchPriceHistoryError as ai, FetchPricesError as aj, FetchPublicProfileError as ak, FetchRelatedTagResourcesError as al, FetchRelatedTagsError as am, FetchRewardPercentagesError as an, FetchSeriesError as ao, FetchSpreadError as ap, FetchSpreadsError as aq, FetchTagError as ar, FetchTotalEarningsForUserForDayError as as, FetchTradedMarketCountError as at, InsufficientLiquidityError as au, ListAccountTradesError as av, ListActivityError as aw, ListBuilderLeaderboardError as ax, ListBuilderTradesError as ay, ListBuilderVolumeError as az, type TransactionCall as b, type RfqQuoteReference as b$, ListTagsError as b0, ListTeamsError as b1, ListTraderLeaderboardError as b2, ListTradesError as b3, ListUserEarningsAndMarketsConfigError as b4, ListUserEarningsForDayError as b5, MergePositionsError as b6, OpenPerpsSessionError as b7, type OpenPerpsSessionRequest as b8, OpenRfqSessionError as b9, type PostPerpsOrdersRequest as bA, type PublicAccountActions as bB, type PublicActions as bC, type PublicClient as bD, type PublicClientOptions as bE, type PublicPerpsActions as bF, type PublicRewardsActions as bG, type PublicSubscriptionsActions as bH, RateLimitError as bI, RedeemPositionsError as bJ, RequestRejectedError as bK, type RequestRejectedErrorOptions as bL, type RestEndpoint as bM, type ResumePerpsSessionRequest as bN, RevokePerpsCredentialsError as bO, type RevokePerpsCredentialsRequest as bP, type RfqCancelQuoteAck as bQ, RfqCancelQuoteError as bR, RfqCancelQuoteRejectedError as bS, type RfqCancelQuoteRejectedErrorOptions as bT, type RfqConfirmationAck as bU, RfqConfirmationError as bV, RfqConfirmationRejectedError as bW, type RfqConfirmationRequestEvent as bX, type RfqEndpoints as bY, type RfqEvent as bZ, RfqQuoteError as b_, type Page as ba, PageSizeSchema as bb, type Paginated as bc, type PerpsActions as bd, type PerpsBookDepth as be, type PerpsEndpoints as bf, type PerpsOrderRequest as bg, type PerpsPlaceFokOrderRequest as bh, type PerpsPlaceGtcOrderRequest as bi, type PerpsPlaceIocOrderRequest as bj, type PerpsPlacedTpSlOrder as bk, type PerpsPlacedTpSlOrders as bl, type PerpsPositionTpSlTrigger as bm, PerpsSession as bn, type PerpsSessionAccountError as bo, type PerpsSessionLifecycleError as bp, type PerpsSessionTradingError as bq, type PerpsTpSlTrigger as br, type PlacePerpsOrderRequest as bs, type PlacePerpsOrderResult as bt, type PlacePerpsOrderWithTpSlRequest as bu, type PlacePerpsOrderWithTpSlResult as bv, type PlacePerpsPositionTpSlRequest as bw, type PlacePerpsPositionTpSlResult as bx, PostOrderError as by, PostOrdersError as bz, type AccountIdentity as c, subscriptionsActions as c$, RfqQuoteRejectedError as c0, type RfqQuoteRejectedErrorOptions as c1, type RfqQuoteRequestEvent as c2, type RfqQuoteResponse as c3, type RfqQuoteSource as c4, type RfqSession as c5, type RfqTradeEvent as c6, SearchError as c7, SearchSort as c8, type SecureAccountActions as c9, TransferErc20Error as cA, TransportError as cB, type TypedDataDomain as cC, type TypedDataField as cD, UnexpectedResponseError as cE, UpdatePerpsLeverageError as cF, type UpdatePerpsLeverageRequest as cG, WaitForTransactionError as cH, type WalletDerivationConfig as cI, type WebSocketCloseCode as cJ, type WebSocketEndpoint as cK, WebSocketKnownCloseCode as cL, WithdrawFromPerpsError as cM, type WithdrawFromPerpsRequest as cN, accountActions as cO, allActions as cP, analyticsActions as cQ, createPublicClient as cR, createSecureClient as cS, dataActions as cT, discoveryActions as cU, forkEnvironmentConfig as cV, makeErrorGuard as cW, perpsActions as cX, production as cY, rewardsActions as cZ, rfqActions as c_, type SecureActions as ca, type SecureClient as cb, type SecureClientOptions as cc, type SecureDownloadAccountingSnapshotRequest as cd, type SecureFetchPortfolioValueRequest as ce, type SecureFetchTradedMarketCountRequest as cf, type SecureListActivityRequest as cg, type SecureListClosedPositionsRequest as ch, type SecureListComboActivityRequest as ci, type SecureListComboPositionsRequest as cj, type SecureListPositionsRequest as ck, type SecurePerpsActions as cl, type SecureRewardsActions as cm, type SecureRfqActions as cn, type SecureSubscriptionsActions as co, type SecureTradingActions as cp, type SecureWalletActions as cq, SetupGaslessWalletError as cr, SetupTradingApprovalsError as cs, type SignerTransactionRequest as ct, SigningError as cu, SplitPositionError as cv, TimeoutError as cw, TransactionFailedError as cx, type TransactionHandle as cy, type TransactionOutcome as cz, type AnalyticsActions as d, FetchTickSizeError as d$, tradingActions as d0, walletActions as d1, type CancelMarketOrdersRequest as d2, type CancelOrderRequest as d3, type CancelOrdersRequest as d4, type CommentsEventType as d5, type CommentsSubscription as d6, type CryptoPricesEventType as d7, type CryptoPricesSubscription as d8, DeployDepositWalletError as d9, type FetchGaslessTransactionRequest as dA, type FetchLastTradePriceRequest as dB, type FetchLastTradePricesRequest as dC, FetchMarketInfoError as dD, type FetchMarketInfoRequest as dE, type FetchMarketRequest as dF, type FetchMarketTagsRequest as dG, type FetchMidpointRequest as dH, type FetchMidpointsRequest as dI, FetchNegRiskError as dJ, type FetchNegRiskRequest as dK, type FetchOrderBookRequest as dL, type FetchOrderBooksRequest as dM, type FetchOrderRequest as dN, type FetchOrderScoringRequest as dO, type FetchOrdersScoringRequest as dP, type FetchPortfolioValueRequest as dQ, type FetchPriceHistoryRequest as dR, type FetchPriceRequest as dS, type FetchPricesRequest as dT, type FetchPublicProfileRequest as dU, type FetchRelatedTagResourcesRequest as dV, type FetchRelatedTagsRequest as dW, type FetchSeriesRequest as dX, type FetchSpreadRequest as dY, type FetchSpreadsRequest as dZ, type FetchTagRequest as d_, type DownloadAccountingSnapshotRequest as da, type DropNotificationsRequest as db, type EquityPricesEventType as dc, type EquityPricesSubscription as dd, type Erc1155ApprovalForAllWorkflow as de, type Erc1155ApprovalForAllWorkflowRequest as df, type Erc20ApprovalWorkflow as dg, type Erc20ApprovalWorkflowRequest as dh, type Erc20TransferWorkflow as di, type Erc20TransferWorkflowRequest as dj, type EstimateMarketBuyPriceRequest as dk, type EstimateMarketPriceRequest as dl, type EstimateMarketSellPriceRequest as dm, type EventForSubscriptionSpec as dn, type EventForSubscriptionSpecs as dp, FetchBalanceAllowanceError as dq, type FetchBalanceAllowanceRequest as dr, FetchBuilderFeeRatesError as ds, type FetchBuilderFeeRatesRequest as dt, type FetchCommentsByIdRequest as du, type FetchEventLiveVolumeRequest as dv, type FetchEventRequest as dw, type FetchEventTagsRequest as dx, FetchExecuteParamsError as dy, type FetchExecuteParamsRequest as dz, ApproveErc1155ForAllError as e, PrepareErc20TransferError as e$, type FetchTickSizeRequest as e0, type FetchTotalEarningsForUserForDayRequest as e1, type FetchTradedMarketCountRequest as e2, GaslessTransactionMetadataSchema as e3, type GaslessWorkflow as e4, type GaslessWorkflowRequest as e5, IsWalletDeployedError as e6, type IsWalletDeployedRequest as e7, type ListAccountTradesRequest as e8, type ListActivityRequest as e9, type ListUserEarningsForDayRequest as eA, type MarketEventType as eB, type MarketSubscription as eC, MergeComboPositionError as eD, MergeMarketPositionError as eE, type MergePositionsWorkflow as eF, type MergePositionsWorkflowRequest as eG, type OrderDraft as eH, type OrderPostingWorkflow as eI, type OrderWorkflow as eJ, type OrderWorkflowRequest as eK, type PerpsBboSubscription as eL, type PerpsBookSubscription as eM, type PerpsCandlesSubscription as eN, type PerpsDepositWorkflow as eO, type PerpsDepositWorkflowRequest as eP, type PerpsMarketDataEventType as eQ, type PerpsMarketDataSubscription as eR, type PerpsStatisticsSubscription as eS, type PerpsStreamingCandleInterval as eT, type PerpsTickersSubscription as eU, type PerpsTradesSubscription as eV, type PostOrdersRequest as eW, PrepareErc1155ApprovalForAllError as eX, type PrepareErc1155ApprovalForAllRequest as eY, PrepareErc20ApprovalError as eZ, type PrepareErc20ApprovalRequest as e_, type ListBuilderLeaderboardRequest as ea, type ListBuilderTradesRequest as eb, type ListBuilderVolumeRequest as ec, type ListClosedPositionsRequest as ed, type ListComboActivityRequest as ee, type ListComboMarketsRequest as ef, type ListComboPositionsRequest as eg, type ListCommentsByUserAddressRequest as eh, type ListCommentsRequest as ei, type ListCurrentRewardsRequest as ej, type ListEventsRequest as ek, ListMarketClarificationsError as el, type ListMarketClarificationsRequest as em, type ListMarketHoldersRequest as en, type ListMarketPositionsRequest as eo, type ListMarketRewardsRequest as ep, type ListMarketsRequest as eq, type ListOpenInterestRequest as er, type ListOpenOrdersRequest as es, type ListPositionsRequest as et, type ListSeriesRequest as eu, type ListTagsRequest as ev, type ListTeamsRequest as ew, type ListTraderLeaderboardRequest as ex, type ListTradesRequest as ey, type ListUserEarningsAndMarketsConfigRequest as ez, ApproveErc20Error as f, cancelOrder as f$, type PrepareErc20TransferRequest as f0, PrepareGaslessTransactionError as f1, type PrepareGaslessTransactionRequest as f2, type PrepareLimitOrderRequest as f3, type PrepareMarketBuyOrderRequest as f4, type PrepareMarketOrderRequest as f5, type PrepareMarketSellOrderRequest as f6, PrepareMergeComboPositionError as f7, type PrepareMergeComboPositionRequest as f8, PrepareMergeMarketPositionError as f9, type RfqConfirmationRejectedErrorOptions as fA, type RfqExecutionUpdateEvent as fB, type SearchRequest as fC, type SearchResults as fD, type SecureRealtimeEvent as fE, type SecureRealtimeTopic as fF, type SecureSubscriptionSpec as fG, type SignedOrder as fH, SplitComboPositionError as fI, SplitMarketPositionError as fJ, type SplitPositionWorkflow as fK, type SplitPositionWorkflowRequest as fL, type SportsEventType as fM, type SportsSubscription as fN, type SubscribeError as fO, type SubscriptionHandle as fP, type TradingApprovalsWorkflow as fQ, type TradingApprovalsWorkflowRequest as fR, UpdateBalanceAllowanceError as fS, type UpdateBalanceAllowanceRequest as fT, type UserEventType as fU, type UserSubscription as fV, WaitForGaslessTransactionError as fW, approveErc1155ForAll as fX, approveErc20 as fY, cancelAll as fZ, cancelMarketOrders as f_, type PrepareMergeMarketPositionRequest as fa, PrepareMergePositionsError as fb, type PrepareMergePositionsRequest as fc, PreparePerpsDepositError as fd, PrepareRedeemComboPositionError as fe, type PrepareRedeemComboPositionRequest as ff, type PrepareRedeemMarketPositionsByConditionIdRequest as fg, type PrepareRedeemMarketPositionsByMarketIdRequest as fh, PrepareRedeemMarketPositionsError as fi, type PrepareRedeemMarketPositionsRequest as fj, PrepareRedeemPositionsError as fk, type PrepareRedeemPositionsRequest as fl, PrepareSplitComboPositionError as fm, type PrepareSplitComboPositionRequest as fn, PrepareSplitMarketPositionError as fo, type PrepareSplitMarketPositionRequest as fp, PrepareSplitPositionError as fq, type PrepareSplitPositionRequest as fr, PrepareTradingApprovalsError as fs, type PublicRealtimeEvent as ft, type PublicRealtimeTopic as fu, type PublicSubscriptionSpec as fv, type RedeemPositionsWorkflow as fw, type RedeemPositionsWorkflowRequest as fx, ResolveConditionByTokenError as fy, type ResolveConditionByTokenRequest as fz, BasePublicClient as g, listMarketClarifications as g$, cancelOrders as g0, deployDepositWallet as g1, depositToPerps as g2, downloadAccountingSnapshot as g3, dropNotifications as g4, estimateMarketPrice as g5, fetchBalanceAllowance as g6, fetchBuilderFeeRates as g7, fetchBuilderVolume as g8, fetchClosedOnlyMode as g9, fetchPriceHistory as gA, fetchPrices as gB, fetchPublicProfile as gC, fetchRelatedTagResources as gD, fetchRelatedTags as gE, fetchRewardPercentages as gF, fetchSeries as gG, fetchSpread as gH, fetchSpreads as gI, fetchTag as gJ, fetchTickSize as gK, fetchTotalEarningsForUserForDay as gL, fetchTradedMarketCount as gM, fetchTransaction as gN, isWalletDeployed as gO, listAccountTrades as gP, listActivity as gQ, listBuilderLeaderboard as gR, listBuilderTrades as gS, listClosedPositions as gT, listComboActivity as gU, listComboMarkets as gV, listComboPositions as gW, listComments as gX, listCommentsByUserAddress as gY, listCurrentRewards as gZ, listEvents as g_, fetchCommentsById as ga, fetchEvent as gb, fetchEventLiveVolume as gc, fetchEventTags as gd, fetchExecuteParams as ge, fetchLastTradePrice as gf, fetchLastTradePrices as gg, fetchMarket as gh, fetchMarketInfo as gi, fetchMarketTags as gj, fetchMidpoint as gk, fetchMidpoints as gl, fetchNegRisk as gm, fetchNotifications as gn, fetchOrder as go, fetchOrderBook as gp, fetchOrderBooks as gq, fetchOrderScoring as gr, fetchOrdersScoring as gs, fetchPerpsBook as gt, fetchPerpsFees as gu, fetchPerpsInstruments as gv, fetchPerpsTicker as gw, fetchPerpsTickers as gx, fetchPortfolioValue as gy, fetchPrice as gz, BaseSecureClient as h, listMarketHolders as h0, listMarketPositions as h1, listMarketRewards as h2, listMarkets as h3, listOpenInterest as h4, listOpenOrders as h5, listPerpsCandles as h6, listPerpsFundingHistory as h7, listPerpsTrades as h8, listPositions as h9, prepareSplitMarketPosition as hA, prepareSplitPosition as hB, prepareTradingApprovals as hC, redeemPositions as hD, resolveConditionByToken as hE, revokePerpsCredentials as hF, search as hG, setupTradingApprovals as hH, splitComboPosition as hI, splitMarketPosition as hJ, splitPosition as hK, subscribe as hL, transferErc20 as hM, updateBalanceAllowance as hN, withdrawFromPerps as hO, listSeries as ha, listTags as hb, listTeams as hc, listTraderLeaderboard as hd, listTrades as he, listUserEarningsAndMarketsConfig as hf, listUserEarningsForDay as hg, mergeComboPosition as hh, mergeMarketPosition as hi, mergePositions as hj, openPerpsSession as hk, openRfqSession as hl, postOrder as hm, postOrders as hn, prepareErc1155ApprovalForAll as ho, prepareErc20Approval as hp, prepareErc20Transfer as hq, prepareGaslessTransaction as hr, prepareMergeComboPosition as hs, prepareMergeMarketPosition as ht, prepareMergePositions as hu, preparePerpsDeposit as hv, prepareRedeemComboPosition as hw, prepareRedeemMarketPositions as hx, prepareRedeemPositions as hy, prepareSplitComboPosition as hz, type BeginAuthenticationRequest as i, type CancelAllPerpsOrdersRequest as j, CancelMarketOrdersError as k, CancelOrderError as l, CancelOrdersError as m, type CancelPerpsOrderRequest as n, type CancelPerpsOrdersRequest as o, CancelledSigningError as p, type Client as q, type ClientActions as r, type ClientDecorator as s, type ClobEndpoints as t, ComboPositionSort as u, ConnectionLostError as v, type ConnectionLostErrorOptions as w, type CreatePerpsSessionRequest as x, CreateSecureClientError as y, DepositToPerpsError as z };