@polymarket/client 0.5.0 → 0.7.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,19 +1,61 @@
1
1
  import * as _polymarket_bindings from '@polymarket/bindings';
2
- import { PaginationCursor, DecimalString, OrderSide, OrderType, TokenId, BuilderCode, TxHash, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue, PositionId, TransactionId } from '@polymarket/bindings';
3
- import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, TxHash as TxHash$1 } from '@polymarket/types';
2
+ import { TransactionId, PaginationCursor, DecimalString, BuilderCode, OrderSide, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, SessionSignerScope } from '@polymarket/bindings';
3
+ import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, SessionSignerSignature, TxHash as TxHash$1 } from '@polymarket/types';
4
4
  import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
5
5
  import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
6
6
  import { ZodError, z } from 'zod';
7
7
  import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
8
8
  import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
9
9
  import * as _polymarket_bindings_data 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';
10
+ import { Activity, ComboActivity, Trade, ComboPositionStatus, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
11
11
  import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
12
- import { ComboMarket, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId, CollateralReturnPlanResponse } from '@polymarket/bindings/combos';
12
+ import { ComboMarket, RfqRejectionCode, RfqQuoteId, RfqId, ComboAcceptFailureReason, BuilderRfqError, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, ComboQuoteUnavailableReason, RfqStatus, RfqErrorCode, BuilderRfqStatusResponse, CollateralReturnPlanResponse } from '@polymarket/bindings/combos';
13
13
  import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsSortDirection, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsOrder, PerpsOrderId, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsAutoCancelStatus, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsNotificationEntry, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
14
14
  import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, CryptoPricesChainlinkTwapTopic, CryptoPricesChainlinkTwapWindowSeconds, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
15
15
  import { Hex } from 'ox';
16
16
 
17
+ /** Independent rate-limit bucket affected by an order or cancellation. */
18
+ type RateLimitBucket = 'order' | 'cancel';
19
+ /**
20
+ * Per-signer rate-limit state reported by order and cancellation responses.
21
+ *
22
+ * @remarks
23
+ * Fields mirror the `Poly-RateLimit-*` response headers. `remaining` and
24
+ * `reset` are normally reported together, while `tier` can be absent. These
25
+ * fields remain optional because malformed header values are ignored;
26
+ * `warning` is `false` whenever the response does not report warning mode.
27
+ */
28
+ type RateLimitUpdate = {
29
+ /** Rate-limit bucket affected by the request, when that request declares one. */
30
+ bucket?: RateLimitBucket;
31
+ /**
32
+ * Token balance remaining in the applicable rate-limit bucket after the
33
+ * request was accounted for. Can be negative for tiers that allow a
34
+ * negative cancellation balance. A value of `0` alone does not prove the
35
+ * bucket is exhausted because it can also be reported when no active limit
36
+ * applies; do not back off solely because this value is zero.
37
+ */
38
+ remaining?: number;
39
+ /**
40
+ * Unix timestamp, in seconds, when the current rate-limit wait period ends.
41
+ */
42
+ reset?: number;
43
+ /** Rate-limit tier applied to the request. */
44
+ tier?: string;
45
+ /**
46
+ * `true` when the limiter runs in warning mode and the request would have
47
+ * been rejected under live enforcement. Monitor this to adjust request
48
+ * patterns before enforcement begins.
49
+ */
50
+ warning: boolean;
51
+ };
52
+ /**
53
+ * Listener invoked whenever a response reports per-signer rate-limit state.
54
+ * The listener may return a promise; synchronous errors and promise rejections
55
+ * are ignored.
56
+ */
57
+ type RateLimitUpdateListener = (update: RateLimitUpdate) => void;
58
+
17
59
  type ResponseValidationContext = {
18
60
  endpoint: string;
19
61
  };
@@ -87,13 +129,34 @@ declare class ConnectionLostError extends PolymarketError {
87
129
  readonly reason: string;
88
130
  constructor(message: string, options: ErrorOptions & ConnectionLostErrorOptions);
89
131
  }
132
+ /**
133
+ * Trading restriction reported by the venue while orders cannot be placed
134
+ * normally. The SDK does not retry automatically; callers decide how to
135
+ * react, honoring {@link RequestRejectedError.retryAfter} when provided.
136
+ */
137
+ declare enum TradingRestriction {
138
+ /** The matching engine is restarting and rejects order requests until it is back. */
139
+ RESTARTING = "restarting",
140
+ /** Cancels and post-only orders are accepted; other orders are rejected. */
141
+ POST_ONLY = "post_only"
142
+ }
90
143
  type RequestRejectedErrorOptions = {
91
144
  status: number;
145
+ /**
146
+ * Machine-readable error code from the response body, when the service
147
+ * provided one.
148
+ */
149
+ code?: string;
92
150
  /**
93
151
  * Server-requested delay in seconds before retrying, when the response
94
152
  * provided one.
95
153
  */
96
154
  retryAfter?: number;
155
+ /**
156
+ * Trading restriction that caused the rejection, when the response
157
+ * identified one.
158
+ */
159
+ restriction?: TradingRestriction;
97
160
  };
98
161
  /**
99
162
  * Error thrown when a service responds with a non-success status other than
@@ -102,11 +165,21 @@ type RequestRejectedErrorOptions = {
102
165
  declare class RequestRejectedError extends PolymarketError {
103
166
  name: "RequestRejectedError";
104
167
  readonly status: number;
168
+ /**
169
+ * Machine-readable error code from the response body, when the service
170
+ * provided one.
171
+ */
172
+ readonly code?: string;
105
173
  /**
106
174
  * Server-requested delay in seconds before retrying, when the response
107
175
  * provided one.
108
176
  */
109
177
  readonly retryAfter?: number;
178
+ /**
179
+ * Trading restriction that caused the rejection, when the response
180
+ * identified one.
181
+ */
182
+ readonly restriction?: TradingRestriction;
110
183
  constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
111
184
  }
112
185
  type RateLimitErrorOptions = {
@@ -115,6 +188,11 @@ type RateLimitErrorOptions = {
115
188
  * provided one.
116
189
  */
117
190
  retryAfter?: number;
191
+ /**
192
+ * Rate-limit state reported with the rejection, when the response provided
193
+ * it.
194
+ */
195
+ rateLimit?: RateLimitUpdate;
118
196
  };
119
197
  /**
120
198
  * Error thrown when the service rejects a request because the rate limit has
@@ -127,6 +205,11 @@ declare class RateLimitError extends PolymarketError {
127
205
  * provided one.
128
206
  */
129
207
  readonly retryAfter?: number;
208
+ /**
209
+ * Rate-limit state reported with the rejection, when the response provided
210
+ * it.
211
+ */
212
+ readonly rateLimit?: RateLimitUpdate;
130
213
  constructor(message: string, options?: ErrorOptions & RateLimitErrorOptions);
131
214
  }
132
215
  /**
@@ -251,7 +334,7 @@ declare const FetchExecuteParamsError: {
251
334
  */
252
335
  declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest): Promise<RelayerExecuteParams>;
253
336
  declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
254
- transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.TransactionId, string>>;
337
+ transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
255
338
  }, z.core.$strip>;
256
339
  type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
257
340
  declare const IsWalletDeployedRequestSchema: z.ZodObject<{
@@ -677,17 +760,24 @@ declare const ListClosedPositionsError: {
677
760
  * ```
678
761
  */
679
762
  declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
763
+ /**
764
+ * One status or a non-empty ordered list of statuses for filtering combo positions.
765
+ * Pass multiple statuses as an array rather than a comma-separated string.
766
+ */
767
+ type ComboPositionStatusFilter = ComboPositionStatus | readonly [ComboPositionStatus, ...ComboPositionStatus[]];
680
768
  declare const ListComboPositionsRequestSchema: z.ZodObject<{
681
769
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
682
770
  user: z.ZodString;
683
771
  pageSize: z.ZodDefault<z.ZodNumber>;
684
- status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
772
+ status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ComboPositionStatus>, z.ZodTuple<[z.ZodEnum<typeof ComboPositionStatus>], z.ZodEnum<typeof ComboPositionStatus>>]>>;
685
773
  sort: z.ZodOptional<z.ZodEnum<typeof ComboPositionSort>>;
686
774
  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>>>]>>;
687
775
  updatedAfter: z.ZodOptional<z.ZodNumber>;
688
776
  updatedBefore: z.ZodOptional<z.ZodNumber>;
689
777
  }, z.core.$strip>;
690
- type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
778
+ type ListComboPositionsRequest = Omit<z.input<typeof ListComboPositionsRequestSchema>, 'status'> & {
779
+ status?: ComboPositionStatusFilter;
780
+ };
691
781
  type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
692
782
  declare const ListComboPositionsError: {
693
783
  isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
@@ -727,6 +817,20 @@ declare const ListComboPositionsError: {
727
817
  * ```
728
818
  *
729
819
  * @example
820
+ * Filter to any of several resolved statuses. Pass multiple statuses as an
821
+ * array rather than a comma-separated string:
822
+ * ```ts
823
+ * const result = listComboPositions(client, {
824
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
825
+ * status: [
826
+ * ComboPositionStatus.ResolvedWin,
827
+ * ComboPositionStatus.ResolvedPartial,
828
+ * ComboPositionStatus.ResolvedLoss,
829
+ * ],
830
+ * });
831
+ * ```
832
+ *
833
+ * @example
730
834
  * Incrementally sync changed combo positions:
731
835
  * ```ts
732
836
  * const result = listComboPositions(client, {
@@ -966,6 +1070,19 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
966
1070
  *
967
1071
  * const firstPage = await paginator.firstPage();
968
1072
  * ```
1073
+ *
1074
+ * @example
1075
+ * Filter to any of several resolved statuses:
1076
+ * ```ts
1077
+ * const paginator = client.listComboPositions({
1078
+ * user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
1079
+ * status: [
1080
+ * ComboPositionStatus.ResolvedWin,
1081
+ * ComboPositionStatus.ResolvedPartial,
1082
+ * ComboPositionStatus.ResolvedLoss,
1083
+ * ],
1084
+ * });
1085
+ * ```
969
1086
  */
970
1087
  listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
971
1088
  /**
@@ -1103,6 +1220,17 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
1103
1220
  *
1104
1221
  * @throws {@link ListComboPositionsError}
1105
1222
  * Thrown on failure.
1223
+ *
1224
+ * @example
1225
+ * Filter the authenticated account's positions to multiple statuses:
1226
+ * ```ts
1227
+ * const paginator = client.listComboPositions({
1228
+ * status: [
1229
+ * ComboPositionStatus.ResolvedWin,
1230
+ * ComboPositionStatus.ResolvedPartial,
1231
+ * ],
1232
+ * });
1233
+ * ```
1106
1234
  */
1107
1235
  listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
1108
1236
  /**
@@ -1188,6 +1316,7 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
1188
1316
  listAccountTrades(request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
1189
1317
  /**
1190
1318
  * Fetches notifications for the authenticated account.
1319
+ * Notifications of a kind this SDK version does not recognize are omitted.
1191
1320
  *
1192
1321
  * @throws {@link FetchNotificationsError}
1193
1322
  * Thrown on failure.
@@ -1467,24 +1596,33 @@ type DataActions = {
1467
1596
  /**
1468
1597
  * Fetches the last traded price for a token.
1469
1598
  *
1599
+ * Returns `null` when the token has not traded.
1600
+ *
1470
1601
  * @throws {@link FetchLastTradePriceError}
1471
1602
  * Thrown on failure.
1472
1603
  *
1473
1604
  * @example
1474
1605
  * ```ts
1475
- * const price = await client.fetchLastTradePrice({ tokenId: '123' });
1606
+ * const trade = await client.fetchLastTradePrice({ tokenId: '123' });
1607
+ *
1608
+ * // trade === LastTradePrice | null
1476
1609
  * ```
1477
1610
  */
1478
- fetchLastTradePrice(request: FetchLastTradePriceRequest): Promise<LastTradePrice>;
1611
+ fetchLastTradePrice(request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
1479
1612
  /**
1480
1613
  * Fetches last traded prices for multiple tokens.
1481
1614
  *
1615
+ * Tokens without trades are omitted from the response. Match returned rows by
1616
+ * `tokenId`; the array is not positionally aligned with the request.
1617
+ *
1482
1618
  * @throws {@link FetchLastTradePricesError}
1483
1619
  * Thrown on failure.
1484
1620
  *
1485
1621
  * @example
1486
1622
  * ```ts
1487
- * const prices = await client.fetchLastTradePrices([{ tokenId: '123' }]);
1623
+ * const tokenId = '123';
1624
+ * const trades = await client.fetchLastTradePrices([{ tokenId }]);
1625
+ * const trade = trades.find((candidate) => candidate.tokenId === tokenId);
1488
1626
  * ```
1489
1627
  */
1490
1628
  fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<LastTradePriceForToken[]>;
@@ -1517,6 +1655,15 @@ type DataActions = {
1517
1655
  * amount: 10,
1518
1656
  * });
1519
1657
  * ```
1658
+ *
1659
+ * @example Position-backed outcome
1660
+ * ```ts
1661
+ * const price = await client.estimateMarketPrice({
1662
+ * positionId: '456',
1663
+ * side: OrderSide.SELL,
1664
+ * shares: 10,
1665
+ * });
1666
+ * ```
1520
1667
  */
1521
1668
  estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
1522
1669
  /**
@@ -2736,9 +2883,9 @@ interface RfqSession extends AsyncIterable<RfqEvent> {
2736
2883
  */
2737
2884
  close(): Promise<void>;
2738
2885
  }
2739
- type OpenRfqSessionError = ConnectionLostError | TransportError;
2886
+ type OpenRfqSessionError = ConnectionLostError | TransportError | UserInputError;
2740
2887
  declare const OpenRfqSessionError: {
2741
- isError(error: unknown): error is TransportError | ConnectionLostError;
2888
+ isError(error: unknown): error is TransportError | UserInputError | ConnectionLostError;
2742
2889
  };
2743
2890
  /**
2744
2891
  * Opens an RFQ event session.
@@ -2752,6 +2899,338 @@ declare const OpenRfqSessionError: {
2752
2899
  * Thrown on failure.
2753
2900
  */
2754
2901
  declare function openRfqSession(client: BaseSecureClient): Promise<RfqSession>;
2902
+ type RfqRequestRejectedErrorOptions = {
2903
+ /** HTTP status of the rejection. */
2904
+ status: number;
2905
+ /** Classified rejection reason. */
2906
+ code: RfqRejectionCode;
2907
+ };
2908
+ /**
2909
+ * Error thrown when an RFQ request or acceptance is rejected.
2910
+ *
2911
+ * @remarks
2912
+ * Inspect {@link RfqRequestRejectedError.code} to distinguish permanent input
2913
+ * problems (`INVALID_RFQ`, `CONTRADICTORY_LEGS`) from transient conditions
2914
+ * (`LEG_METADATA_UNAVAILABLE`) that may be retried.
2915
+ *
2916
+ * Wire codes not recognized by this SDK version map to
2917
+ * {@link RfqRejectionCode.RequestFailed}; the original error is preserved on
2918
+ * `cause`.
2919
+ */
2920
+ declare class RfqRequestRejectedError extends PolymarketError {
2921
+ name: "RfqRequestRejectedError";
2922
+ /** HTTP status of the rejection. */
2923
+ readonly status: number;
2924
+ /** Classified rejection reason. */
2925
+ readonly code: RfqRejectionCode;
2926
+ constructor(message: string, options: ErrorOptions & RfqRequestRejectedErrorOptions);
2927
+ }
2928
+ type ComboQuoteFields = {
2929
+ /** RFQ identifier. */
2930
+ rfqId: RfqId;
2931
+ /** Winning quote identifier. */
2932
+ quoteId: RfqQuoteId;
2933
+ /** Builder code attached to the signed acceptance order. */
2934
+ builderCode: BuilderCode;
2935
+ /** Combo YES position traded by the acceptance order. */
2936
+ positionId: PositionId;
2937
+ /** Signed-order collateral for BUY, or position shares for SELL. */
2938
+ makerAmount: DecimalString;
2939
+ /** Signed-order shares for BUY, or gross collateral limit for SELL. */
2940
+ takerAmount: DecimalString;
2941
+ /** Blended price across legs, in collateral per outcome token. */
2942
+ blendedPrice: DecimalString;
2943
+ /** Total collateral including fees for BUY, or position shares for SELL. */
2944
+ totalRequired: DecimalString;
2945
+ /** Acceptance deadline (Unix ms). */
2946
+ expiresAt: EpochMilliseconds;
2947
+ };
2948
+ /**
2949
+ * A self-contained winning combo quote.
2950
+ *
2951
+ * @remarks
2952
+ * The quote is plain JSON data and carries every input needed to accept it.
2953
+ * It may be persisted or routed between processes before being passed to
2954
+ * {@link acceptComboQuote}.
2955
+ */
2956
+ type ComboQuote = ComboQuoteFields & ({
2957
+ /** Trade direction of the original request. */
2958
+ direction: OrderSide.BUY;
2959
+ /** Net proceeds apply only to SELL quotes. */
2960
+ netReceive?: undefined;
2961
+ } | {
2962
+ /** Trade direction of the original request. */
2963
+ direction: OrderSide.SELL;
2964
+ /** Exact collateral proceeds for the quoted bundle after fees. */
2965
+ netReceive: DecimalString;
2966
+ });
2967
+ type RequestComboQuoteParams = {
2968
+ /** Position IDs of the combo legs. Between 2 and 50, no duplicates. */
2969
+ legPositionIds: string[];
2970
+ /**
2971
+ * Combinatorial position side. Only `YES` is currently supported.
2972
+ *
2973
+ * @defaultValue {@link RfqSide.Yes}
2974
+ */
2975
+ side?: RfqSide.Yes;
2976
+ } & ({
2977
+ direction: OrderSide.BUY;
2978
+ /**
2979
+ * Collateral to spend, in USDC, including fees.
2980
+ *
2981
+ * This is the human-readable amount: `1` means one dollar, not one
2982
+ * 6-decimal base unit.
2983
+ */
2984
+ amount: number | string;
2985
+ } | {
2986
+ direction: OrderSide.SELL;
2987
+ /**
2988
+ * Size to sell, in outcome tokens.
2989
+ *
2990
+ * This is the human-readable token amount: `1` means one full share,
2991
+ * not one 6-decimal base unit.
2992
+ */
2993
+ size: number | string;
2994
+ });
2995
+ type RequestComboQuoteResult = {
2996
+ rfqId: RfqId;
2997
+ /** The winning quote. */
2998
+ quote: ComboQuote;
2999
+ } | {
3000
+ rfqId: RfqId;
3001
+ /** No usable quote was returned. */
3002
+ quote: null;
3003
+ reason: ComboQuoteUnavailableReason;
3004
+ };
3005
+ type RequestComboQuoteError = RateLimitError | RfqRequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3006
+ declare const RequestComboQuoteError: {
3007
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RateLimitError | RfqRequestRejectedError;
3008
+ };
3009
+ /**
3010
+ * Requests a quote for a combo of positions.
3011
+ *
3012
+ * @remarks
3013
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3014
+ *
3015
+ * Resolves when the quote competition window closes. A request that attracts
3016
+ * no usable quotes is a normal outcome, returned as `quote: null` with a
3017
+ * reason rather than thrown.
3018
+ *
3019
+ * A winning quote is self-contained JSON data and may be persisted or routed
3020
+ * to another process before acceptance.
3021
+ *
3022
+ * @throws {@link RequestComboQuoteError}
3023
+ * Thrown on failure.
3024
+ *
3025
+ * @example
3026
+ * ```ts
3027
+ * const result = await requestComboQuote(client, {
3028
+ * legPositionIds: ['123', '456'],
3029
+ * direction: OrderSide.BUY,
3030
+ * amount: 100,
3031
+ * });
3032
+ *
3033
+ * if (result.quote !== null) {
3034
+ * // result.quote.blendedPrice: DecimalString
3035
+ * // result.quote.totalRequired: DecimalString
3036
+ * // SELL quotes also carry result.quote.netReceive after fees.
3037
+ * }
3038
+ * ```
3039
+ */
3040
+ declare function requestComboQuote(client: BaseSecureClient, params: RequestComboQuoteParams): Promise<RequestComboQuoteResult>;
3041
+ declare const AcceptComboQuoteParamsSchema: z.ZodObject<{
3042
+ blendedPrice: z.ZodString;
3043
+ builderCode: z.ZodPipe<z.ZodString, z.ZodTransform<BuilderCode, string>>;
3044
+ direction: z.ZodType<OrderSide, "BUY" | "SELL", z.core.$ZodTypeInternals<OrderSide, "BUY" | "SELL">>;
3045
+ expiresAt: z.ZodNumber;
3046
+ makerAmount: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>, z.ZodTransform<_polymarket_bindings.BaseUnits, string>>;
3047
+ netReceive: z.ZodOptional<z.ZodString>;
3048
+ positionId: z.ZodPipe<z.ZodString, z.ZodTransform<PositionId, string>>;
3049
+ quoteId: z.ZodPipe<z.ZodString, z.ZodTransform<RfqQuoteId, string>>;
3050
+ rfqId: z.ZodPipe<z.ZodString, z.ZodTransform<RfqId, string>>;
3051
+ takerAmount: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<string, string | number>>, z.ZodTransform<_polymarket_bindings.BaseUnits, string>>;
3052
+ totalRequired: z.ZodString;
3053
+ }, z.core.$strip>;
3054
+ type AcceptComboQuoteParamsInput = z.input<typeof AcceptComboQuoteParamsSchema>;
3055
+ type AcceptComboQuoteParamsFields = {
3056
+ /** RFQ identifier. */
3057
+ rfqId: string;
3058
+ /** Winning quote identifier. */
3059
+ quoteId: string;
3060
+ /** Builder code attached to the signed acceptance order. */
3061
+ builderCode: string;
3062
+ /** Trade direction of the original request. */
3063
+ direction: `${OrderSide}`;
3064
+ /** Combo YES position traded by the acceptance order. */
3065
+ positionId: string;
3066
+ /** Signed-order collateral for BUY, or position shares for SELL. */
3067
+ makerAmount: number | string;
3068
+ /** Signed-order shares for BUY, or gross collateral limit for SELL. */
3069
+ takerAmount: number | string;
3070
+ /** Exact collateral proceeds after fees for a SELL quote. */
3071
+ netReceive?: string;
3072
+ /** Blended price across legs, in collateral per outcome token. */
3073
+ blendedPrice: string;
3074
+ /** Total collateral including fees for BUY, or position shares for SELL. */
3075
+ totalRequired: string;
3076
+ /** Acceptance deadline (Unix ms). */
3077
+ expiresAt: number;
3078
+ };
3079
+ type AcceptComboQuoteParamsSchemaMatch = AcceptComboQuoteParamsFields extends AcceptComboQuoteParamsInput ? AcceptComboQuoteParamsInput extends AcceptComboQuoteParamsFields ? unknown : never : never;
3080
+ /**
3081
+ * Plain JSON representation of a self-contained combo quote.
3082
+ *
3083
+ * @remarks
3084
+ * {@link ComboQuote} is assignable to this type, while quotes restored from a
3085
+ * typed transport or persistence boundary do not need to recreate the SDK's
3086
+ * branded return types. Its fields are checked against the runtime input
3087
+ * schema at compile time.
3088
+ */
3089
+ type AcceptComboQuoteParams = AcceptComboQuoteParamsInput & AcceptComboQuoteParamsFields & AcceptComboQuoteParamsSchemaMatch;
3090
+ type AcceptComboQuoteResult = {
3091
+ status: 'executing';
3092
+ rfqId: RfqId;
3093
+ /**
3094
+ * Hash of the recorded acceptance order.
3095
+ *
3096
+ * Absent when a retry attached to an acceptance recorded by an earlier
3097
+ * attempt; the retried order was not the one recorded.
3098
+ */
3099
+ takerOrderHash?: string;
3100
+ } | {
3101
+ status: 'failed';
3102
+ rfqId: RfqId;
3103
+ reason: ComboAcceptFailureReason;
3104
+ /** Raw error behind the failure, when provided. */
3105
+ error?: BuilderRfqError;
3106
+ };
3107
+ type AcceptComboQuoteError = CancelledSigningError | RateLimitError | RfqRequestRejectedError | SigningError | TimeoutError | TransportError | UnexpectedResponseError | UserInputError;
3108
+ declare const AcceptComboQuoteError: {
3109
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RateLimitError | TimeoutError | RfqRequestRejectedError;
3110
+ };
3111
+ /**
3112
+ * Accepts a self-contained combo quote, signing the acceptance order for the
3113
+ * authenticated account.
3114
+ *
3115
+ * @remarks
3116
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3117
+ *
3118
+ * Resolves at the maker last-look outcome. A maker declining or the
3119
+ * acceptance window expiring is a normal outcome, returned as
3120
+ * `status: 'failed'`. `status: 'executing'` means the trade was handed off
3121
+ * for onchain execution; follow it with {@link waitForComboFill}.
3122
+ *
3123
+ * A transport failure or unrecognized acceptance response is retried once
3124
+ * automatically; this is safe because an already-accepted RFQ reports its
3125
+ * current status instead of executing twice. After such a retry
3126
+ * `takerOrderHash` is absent because the retried order was not the one
3127
+ * recorded.
3128
+ *
3129
+ * The quote is JSON-serializable and may cross process boundaries before
3130
+ * acceptance. The accepting client must represent the same account and
3131
+ * builder identity used to request it.
3132
+ * Treat the quote as signing-sensitive data: preserve its integrity across
3133
+ * process boundaries and do not accept fields modified by an untrusted client.
3134
+ *
3135
+ * @throws {@link AcceptComboQuoteError}
3136
+ * Thrown on failure.
3137
+ *
3138
+ * @example
3139
+ * ```ts
3140
+ * const result = await requestComboQuote(client, {
3141
+ * legPositionIds: ['123', '456'],
3142
+ * direction: OrderSide.BUY,
3143
+ * amount: 100,
3144
+ * });
3145
+ *
3146
+ * if (result.quote !== null) {
3147
+ * const acceptance = await acceptComboQuote(client, result.quote);
3148
+ * }
3149
+ * ```
3150
+ */
3151
+ declare function acceptComboQuote(client: BaseSecureClient, params: AcceptComboQuoteParams): Promise<AcceptComboQuoteResult>;
3152
+ type WaitForComboFillParams = {
3153
+ /** RFQ identifier of an accepted RFQ. */
3154
+ rfqId: string;
3155
+ /**
3156
+ * Give up after this long.
3157
+ *
3158
+ * @defaultValue 30_000
3159
+ */
3160
+ timeoutMs?: number;
3161
+ /** @defaultValue 1_000 */
3162
+ pollingIntervalMs?: number;
3163
+ };
3164
+ type WaitForComboFillResult = {
3165
+ status: RfqStatus.Filled;
3166
+ rfqId: RfqId;
3167
+ txHash: TxHash;
3168
+ } | {
3169
+ status: RfqStatus.Failed | RfqStatus.Expired | RfqStatus.Canceled;
3170
+ rfqId: RfqId;
3171
+ /** Raw error behind the failure, when provided. */
3172
+ error?: BuilderRfqError;
3173
+ };
3174
+ type WaitForComboFillError = RateLimitError | RfqRequestRejectedError | TimeoutError | TransportError | UnexpectedResponseError | UserInputError;
3175
+ declare const WaitForComboFillError: {
3176
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RateLimitError | TimeoutError | RfqRequestRejectedError;
3177
+ };
3178
+ /**
3179
+ * Waits for an accepted RFQ to reach a terminal state.
3180
+ *
3181
+ * @remarks
3182
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
3183
+ *
3184
+ * Polls the RFQ status until it is filled (or confirmed onchain), `FAILED`,
3185
+ * `EXPIRED`, or `CANCELED`. Terminal failure is a normal outcome and is
3186
+ * returned, not thrown. A {@link TimeoutError} does not mean the trade
3187
+ * failed; resume with {@link fetchRfqStatus}.
3188
+ *
3189
+ * @throws {@link WaitForComboFillError}
3190
+ * Thrown on failure.
3191
+ *
3192
+ * @example
3193
+ * ```ts
3194
+ * const fill = await waitForComboFill(client, { rfqId });
3195
+ *
3196
+ * if (fill.status === RfqStatus.Filled) {
3197
+ * // fill.txHash: TxHash
3198
+ * }
3199
+ * ```
3200
+ */
3201
+ declare function waitForComboFill(client: BaseSecureClient, params: WaitForComboFillParams): Promise<WaitForComboFillResult>;
3202
+ type FetchRfqStatusParams = {
3203
+ /** RFQ identifier of an accepted RFQ. */
3204
+ rfqId: string;
3205
+ };
3206
+ /**
3207
+ * Status projection for an accepted RFQ.
3208
+ *
3209
+ * @remarks
3210
+ * Onchain execution progress is merged into the top-level `status`:
3211
+ * {@link RfqExecutionStatus} values surface alongside the RFQ lifecycle.
3212
+ */
3213
+ type RfqStatusResult = BuilderRfqStatusResponse;
3214
+ type FetchRfqStatusError = RateLimitError | RfqRequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
3215
+ declare const FetchRfqStatusError: {
3216
+ isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RateLimitError | RfqRequestRejectedError;
3217
+ };
3218
+ /**
3219
+ * Fetches the status of an accepted RFQ.
3220
+ *
3221
+ * @remarks
3222
+ * Status is available once an acceptance has been recorded; earlier reads are
3223
+ * rejected.
3224
+ *
3225
+ * @throws {@link FetchRfqStatusError}
3226
+ * Thrown on failure.
3227
+ *
3228
+ * @example
3229
+ * ```ts
3230
+ * const status = await fetchRfqStatus(client, { rfqId });
3231
+ * ```
3232
+ */
3233
+ declare function fetchRfqStatus(client: BaseSecureClient, params: FetchRfqStatusParams): Promise<RfqStatusResult>;
2755
3234
 
2756
3235
  type SecureRfqActions = {
2757
3236
  /**
@@ -2887,9 +3366,163 @@ type SecureRfqActions = {
2887
3366
  * Thrown on failure.
2888
3367
  */
2889
3368
  openRfqSession(): Promise<RfqSession>;
3369
+ /**
3370
+ * Requests a quote for a combo of positions.
3371
+ *
3372
+ * @remarks
3373
+ * Resolves when the quote competition window closes. A request that
3374
+ * attracts no usable quotes is a normal outcome, returned as `quote: null`
3375
+ * with a reason rather than thrown.
3376
+ *
3377
+ * A winning quote is self-contained JSON data and may be persisted or
3378
+ * routed to another process before acceptance.
3379
+ *
3380
+ * Requires a Builder API Key in the client configuration, via
3381
+ * `builderApiKey(...)` or `remoteBuilderSigning(...)`.
3382
+ *
3383
+ * @throws {@link RequestComboQuoteError}
3384
+ * Thrown on failure.
3385
+ *
3386
+ * @example
3387
+ * ```ts
3388
+ * const result = await client.requestComboQuote({
3389
+ * legPositionIds: ['123', '456'],
3390
+ * direction: OrderSide.BUY,
3391
+ * amount: 100,
3392
+ * });
3393
+ *
3394
+ * if (result.quote !== null) {
3395
+ * // result.quote.blendedPrice: DecimalString
3396
+ * // result.quote.totalRequired: DecimalString
3397
+ * // SELL quotes also carry result.quote.netReceive after fees.
3398
+ * // result.quote.expiresAt: EpochMilliseconds
3399
+ * }
3400
+ * ```
3401
+ */
3402
+ requestComboQuote(params: RequestComboQuoteParams): Promise<RequestComboQuoteResult>;
3403
+ /**
3404
+ * Accepts a self-contained combo quote, signing the acceptance order for
3405
+ * the authenticated account.
3406
+ *
3407
+ * @remarks
3408
+ * Resolves at the maker last-look outcome. A maker declining or the
3409
+ * acceptance window expiring is a normal outcome, returned as
3410
+ * `status: 'failed'`. `status: 'executing'` means the trade was handed off
3411
+ * for onchain execution; follow it with `waitForComboFill`.
3412
+ *
3413
+ * A transport failure or unrecognized acceptance response is retried once
3414
+ * automatically; this is safe because an already-accepted RFQ reports its
3415
+ * current status instead of executing twice. After such a retry
3416
+ * `takerOrderHash` is absent because the retried order was not the one
3417
+ * recorded.
3418
+ *
3419
+ * The quote is JSON-serializable and may cross process boundaries before
3420
+ * acceptance. The accepting client must represent the same account and
3421
+ * builder identity used to request it.
3422
+ * Treat the quote as signing-sensitive data: preserve its integrity across
3423
+ * process boundaries and do not accept fields modified by an untrusted client.
3424
+ *
3425
+ * @throws {@link AcceptComboQuoteError}
3426
+ * Thrown on failure.
3427
+ *
3428
+ * @example
3429
+ * ```ts
3430
+ * const result = await client.requestComboQuote({
3431
+ * legPositionIds: ['123', '456'],
3432
+ * direction: OrderSide.BUY,
3433
+ * amount: 100,
3434
+ * });
3435
+ *
3436
+ * if (result.quote !== null) {
3437
+ * const acceptance = await client.acceptComboQuote(result.quote);
3438
+ * }
3439
+ * ```
3440
+ */
3441
+ acceptComboQuote(params: AcceptComboQuoteParams): Promise<AcceptComboQuoteResult>;
3442
+ /**
3443
+ * Waits for an accepted RFQ to reach a terminal state.
3444
+ *
3445
+ * @remarks
3446
+ * Polls the RFQ status until it is filled (or confirmed onchain),
3447
+ * `FAILED`, `EXPIRED`, or `CANCELED`. Terminal failure is a normal outcome
3448
+ * and is returned, not thrown. A `TimeoutError` does not mean the trade
3449
+ * failed; resume with the `fetchRfqStatus` action from
3450
+ * `@polymarket/client/actions`.
3451
+ *
3452
+ * @throws {@link WaitForComboFillError}
3453
+ * Thrown on failure.
3454
+ *
3455
+ * @example
3456
+ * ```ts
3457
+ * const fill = await client.waitForComboFill({ rfqId });
3458
+ *
3459
+ * if (fill.status === RfqStatus.Filled) {
3460
+ * // fill.txHash: TxHash
3461
+ * }
3462
+ * ```
3463
+ */
3464
+ waitForComboFill(params: WaitForComboFillParams): Promise<WaitForComboFillResult>;
2890
3465
  };
2891
3466
  declare function rfqActions(client: BaseSecureClient): SecureRfqActions;
2892
3467
 
3468
+ type SessionKeyActions = {
3469
+ /**
3470
+ * Authorizes an externally managed signer for selected venues.
3471
+ *
3472
+ * The SDK receives only the public address. The application remains
3473
+ * responsible for generating, storing, and protecting the private key.
3474
+ * When scopes are omitted, authorization defaults to `ALL`.
3475
+ * Requires builder API-key authentication.
3476
+ *
3477
+ * @remarks
3478
+ * Resolves after the submitted transaction is confirmed and the session key
3479
+ * appears in the active session-key list.
3480
+ *
3481
+ * @example
3482
+ * ```ts
3483
+ * const authorization = await client.authorizeSessionKey({
3484
+ * address: sessionAddress,
3485
+ * validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
3486
+ * });
3487
+ * ```
3488
+ *
3489
+ * @throws {@link AuthorizeSessionKeyError}
3490
+ * Thrown on failure.
3491
+ */
3492
+ authorizeSessionKey(request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
3493
+ /**
3494
+ * Fetches the active session keys authorized for the Deposit Wallet.
3495
+ *
3496
+ * @example
3497
+ * ```ts
3498
+ * const sessionKeys = await client.fetchSessionKeys();
3499
+ * ```
3500
+ *
3501
+ * @throws {@link FetchSessionKeysError}
3502
+ * Thrown on failure.
3503
+ */
3504
+ fetchSessionKeys(): Promise<SessionKey[]>;
3505
+ /**
3506
+ * Revokes a session key authorized for the Deposit Wallet.
3507
+ *
3508
+ * Revocation may take several minutes while existing activity is canceled and
3509
+ * the on-chain revocation is confirmed.
3510
+ * Requires API-key authentication that supports gasless transactions.
3511
+ *
3512
+ * @example
3513
+ * ```ts
3514
+ * const revocation = await client.revokeSessionKey({
3515
+ * address: sessionAddress,
3516
+ * });
3517
+ * ```
3518
+ *
3519
+ * @throws {@link RevokeSessionKeyError}
3520
+ * Thrown on failure.
3521
+ */
3522
+ revokeSessionKey(request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
3523
+ };
3524
+ declare function sessionKeyActions(client: BaseSecureClient): SessionKeyActions;
3525
+
2893
3526
  type PublicSubscriptionsActions = {
2894
3527
  /**
2895
3528
  * Starts one or more realtime subscriptions on this client.
@@ -3039,9 +3672,20 @@ declare const CancelMarketOrdersError: {
3039
3672
  */
3040
3673
  declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
3041
3674
 
3042
- type EstimateMarketBuyPriceRequest = {
3043
- /** TokenID of the Conditional token asset to estimate. */
3675
+ /**
3676
+ * Identifies the asset to trade. Provide exactly one identifier.
3677
+ */
3678
+ type OrderAsset = {
3679
+ /** CTF token identifier. */
3044
3680
  tokenId: string;
3681
+ positionId?: never;
3682
+ } | {
3683
+ /** Polymarket V2 position identifier. */
3684
+ positionId: string;
3685
+ tokenId?: never;
3686
+ };
3687
+
3688
+ type EstimateMarketBuyPriceRequest = OrderAsset & {
3045
3689
  /** Buy side of the estimate. */
3046
3690
  side: OrderSide.BUY;
3047
3691
  /** Desired USD buy notional to match against current ask depth. */
@@ -3053,9 +3697,7 @@ type EstimateMarketBuyPriceRequest = {
3053
3697
  */
3054
3698
  orderType?: OrderType.FAK | OrderType.FOK;
3055
3699
  };
3056
- type EstimateMarketSellPriceRequest = {
3057
- /** TokenID of the Conditional token asset to estimate. */
3058
- tokenId: string;
3700
+ type EstimateMarketSellPriceRequest = OrderAsset & {
3059
3701
  /** Sell side of the estimate. */
3060
3702
  side: OrderSide.SELL;
3061
3703
  /** Number of conditional-token shares to match against current bid depth. */
@@ -3100,14 +3742,21 @@ declare const EstimateMarketPriceError: {
3100
3742
  * // price === 0.53
3101
3743
  * ```
3102
3744
  *
3745
+ * @example Position-backed outcome
3746
+ * ```ts
3747
+ * const price = await estimateMarketPrice(client, {
3748
+ * positionId: '456',
3749
+ * side: OrderSide.SELL,
3750
+ * shares: 10,
3751
+ * });
3752
+ * ```
3753
+ *
3103
3754
  * @throws {@link EstimateMarketPriceError}
3104
3755
  * Thrown on failure.
3105
3756
  */
3106
3757
  declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
3107
3758
 
3108
- type BasePrepareMarketOrderRequest = {
3109
- /** TokenID of the Conditional token asset being traded */
3110
- tokenId: string;
3759
+ type BasePrepareMarketOrderRequest = OrderAsset & {
3111
3760
  /** Optional builder attribution code. */
3112
3761
  builderCode?: HexString;
3113
3762
  /**
@@ -3156,7 +3805,7 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
3156
3805
  /** Sell side of the order. */
3157
3806
  side: OrderSide.SELL;
3158
3807
  /**
3159
- * Number of outcome tokens to sell.
3808
+ * Number of outcome shares to sell.
3160
3809
  *
3161
3810
  * This is the human-readable token amount: `1` means one full share, not one
3162
3811
  * 6-decimal base unit.
@@ -3173,13 +3822,11 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
3173
3822
  minPrice?: number | string;
3174
3823
  };
3175
3824
  type PrepareMarketOrderRequest = PrepareMarketBuyOrderRequest | PrepareMarketSellOrderRequest;
3176
- type PrepareLimitOrderRequest = {
3177
- /** TokenID of the Conditional token asset being traded */
3178
- tokenId: string;
3825
+ type PrepareLimitOrderRequest = OrderAsset & {
3179
3826
  /** Price used to create the order */
3180
3827
  price: number | string;
3181
3828
  /**
3182
- * Order size in outcome tokens.
3829
+ * Order size in outcome shares.
3183
3830
  *
3184
3831
  * This is the human-readable token amount: `1` means one full share, not one
3185
3832
  * 6-decimal base unit.
@@ -3209,19 +3856,7 @@ type PrepareLimitOrderRequest = {
3209
3856
  */
3210
3857
  expiration?: number;
3211
3858
  };
3212
- type OrderDraft = {
3213
- builderCode?: BuilderCode;
3214
- chainId: number;
3215
- exchangeAddress: EvmAddress;
3216
- expiration: number;
3217
- funderAddress: EvmAddress;
3218
- offeredAmount: bigint;
3219
- orderType: OrderType;
3220
- side: OrderSide;
3221
- signer: EvmAddress;
3222
- requestedAmount: bigint;
3223
- tokenId: TokenId;
3224
- };
3859
+ type OrderSignature = EvmSignature | Erc1271Signature | SessionSignerSignature;
3225
3860
  type SignedOrder = {
3226
3861
  builder: HexString;
3227
3862
  expiration: number;
@@ -3235,19 +3870,22 @@ type SignedOrder = {
3235
3870
  signer: EvmAddress;
3236
3871
  takerAmount: string;
3237
3872
  timestamp: string;
3238
- tokenId: TokenId;
3239
- signature: EvmSignature | Erc1271Signature;
3873
+ /**
3874
+ * Asset identifier encoded in the exchange order. The protocol field is
3875
+ * named `tokenId` for both CTF token IDs and Polymarket V2 position IDs.
3876
+ */
3877
+ tokenId: PositionId | TokenId;
3878
+ signature: OrderSignature;
3240
3879
  postOnly?: boolean;
3241
3880
  };
3242
3881
  type OrderWorkflowRequest = SignOrderRequest;
3243
3882
  type OrderWorkflow = AsyncGenerator<OrderWorkflowRequest, SignedOrder, EvmAddress | EvmSignature>;
3244
3883
  type OrderPostingWorkflow = AsyncGenerator<OrderWorkflowRequest, OrderResponse, EvmAddress | EvmSignature>;
3245
3884
 
3246
- declare const PostOrdersRequestSchema: z.ZodArray<z.ZodCustom<SignedOrder, SignedOrder>>;
3247
- type PostOrdersRequest = z.input<typeof PostOrdersRequestSchema>;
3248
- type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
3885
+ type PostOrdersRequest = SignedOrder[];
3886
+ type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
3249
3887
  declare const PostOrderError: {
3250
- isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
3888
+ isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
3251
3889
  };
3252
3890
  type PostOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
3253
3891
  declare const PostOrdersError: {
@@ -3361,6 +3999,15 @@ type SecureTradingActions = {
3361
3999
  * tokenId: '123',
3362
4000
  * });
3363
4001
  * ```
4002
+ *
4003
+ * @example Position-backed market buy
4004
+ * ```ts
4005
+ * const order = await client.createMarketOrder({
4006
+ * amount: 10,
4007
+ * positionId: '456',
4008
+ * side: OrderSide.BUY,
4009
+ * });
4010
+ * ```
3364
4011
  */
3365
4012
  createMarketOrder(request: PrepareMarketOrderRequest): Promise<SignedOrder>;
3366
4013
  /**
@@ -3423,7 +4070,7 @@ type SecureTradingActions = {
3423
4070
  * @throws {@link CreateLimitOrderError}
3424
4071
  * Thrown on failure.
3425
4072
  *
3426
- * @example
4073
+ * @example Token-backed limit order
3427
4074
  * ```ts
3428
4075
  * const order = await client.createLimitOrder({
3429
4076
  * postOnly: true,
@@ -3433,6 +4080,17 @@ type SecureTradingActions = {
3433
4080
  * tokenId: '123',
3434
4081
  * });
3435
4082
  * ```
4083
+ *
4084
+ * @example Position-backed limit order
4085
+ * ```ts
4086
+ * const order = await client.createLimitOrder({
4087
+ * postOnly: true,
4088
+ * positionId: '456',
4089
+ * price: 0.52,
4090
+ * side: OrderSide.BUY,
4091
+ * size: 10,
4092
+ * });
4093
+ * ```
3436
4094
  */
3437
4095
  createLimitOrder(request: PrepareLimitOrderRequest): Promise<SignedOrder>;
3438
4096
  /**
@@ -3856,7 +4514,7 @@ type SecureWalletActions = {
3856
4514
  declare function walletActions(client: BaseSecureClient): SecureWalletActions;
3857
4515
 
3858
4516
  type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
3859
- type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
4517
+ type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SessionKeyActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
3860
4518
  declare function allActions(client: BasePublicClient): PublicActions;
3861
4519
  declare function allActions(client: BaseSecureClient): SecureActions;
3862
4520
 
@@ -3882,6 +4540,7 @@ type ClobEndpoints = RestEndpoint & {
3882
4540
  user: WebSocketEndpoint;
3883
4541
  };
3884
4542
  type CombosEndpoints = RestEndpoint & WebSocketEndpoint & {
4543
+ builderGateway: RestEndpoint;
3885
4544
  collateralReturn: RestEndpoint;
3886
4545
  };
3887
4546
  /**
@@ -3924,6 +4583,7 @@ type EnvironmentConfigFork = {
3924
4583
  gamma?: Partial<RestEndpoint>;
3925
4584
  data?: Partial<RestEndpoint>;
3926
4585
  combos?: EnvironmentConfigForkEndpoint & {
4586
+ builderGateway?: Partial<RestEndpoint>;
3927
4587
  collateralReturn?: Partial<RestEndpoint>;
3928
4588
  };
3929
4589
  perps?: EnvironmentConfigForkEndpoint;
@@ -3953,9 +4613,18 @@ type ServiceRequest = {
3953
4613
  params?: URLSearchParams;
3954
4614
  };
3955
4615
 
4616
+ /** Relationship between the authenticated signer and the active account wallet. */
4617
+ declare enum SignerType {
4618
+ /** Signer owns or deterministically controls the active account wallet. */
4619
+ OWNER = "OWNER",
4620
+ /** Signer uses the Deposit Wallet session-signature path. */
4621
+ SESSION_KEY = "SESSION_KEY"
4622
+ }
3956
4623
  type AccountIdentity = {
3957
4624
  /** Authenticated EOA that signs API authentication, orders, and wallet operations. */
3958
4625
  signer: EvmAddress;
4626
+ /** Relationship between the authenticated signer and the active account wallet. */
4627
+ signerType: SignerType;
3959
4628
  /** Active Polymarket account/funder wallet used for balances, positions, and execution. */
3960
4629
  wallet: EvmAddress;
3961
4630
  /** Wallet classification used for order signatures and transaction routing. */
@@ -4005,6 +4674,7 @@ type BeginAuthenticationRequest = {
4005
4674
  type PublicClientConfig = {
4006
4675
  environment: EnvironmentConfig;
4007
4676
  apiKey?: ApiKeyAuthorization;
4677
+ onRateLimitUpdate?: RateLimitUpdateListener;
4008
4678
  };
4009
4679
  declare class BasePublicClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> extends AbstractClient<PublicContext> {
4010
4680
  #private;
@@ -4147,6 +4817,17 @@ type PublicClientOptions = {
4147
4817
  * Optional request authorization applied by the client when needed.
4148
4818
  */
4149
4819
  apiKey?: ApiKeyAuthorization;
4820
+ /**
4821
+ * Listener invoked whenever a response reports per-signer rate-limit state,
4822
+ * as order and cancellation responses do.
4823
+ *
4824
+ * @remarks
4825
+ * Use this to monitor remaining rate-limit capacity and warning-mode
4826
+ * signals, and adjust request patterns before requests are rejected.
4827
+ * Errors thrown by the listener and rejections from promises it returns are
4828
+ * ignored.
4829
+ */
4830
+ onRateLimitUpdate?: RateLimitUpdateListener;
4150
4831
  };
4151
4832
  type SecureClientOptions = PublicClientOptions & {
4152
4833
  /**
@@ -4358,6 +5039,7 @@ declare const DropNotificationsRequestSchema: z.ZodObject<{
4358
5039
  type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
4359
5040
  /**
4360
5041
  * Fetches notifications for the authenticated account.
5042
+ * Notifications of a kind this SDK version does not recognize are omitted.
4361
5043
  *
4362
5044
  * @remarks
4363
5045
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
@@ -4933,9 +5615,9 @@ declare const ResolveConditionByTokenError: {
4933
5615
  * @throws {@link ResolveConditionByTokenError}
4934
5616
  * Thrown on failure.
4935
5617
  */
4936
- declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest): Promise<CtfConditionId>;
5618
+ declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest): Promise<ConditionId>;
4937
5619
  declare const FetchMarketInfoRequestSchema: z.ZodObject<{
4938
- conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
5620
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
4939
5621
  }, z.core.$strip>;
4940
5622
  type FetchMarketInfoRequest = z.input<typeof FetchMarketInfoRequestSchema>;
4941
5623
  type FetchMarketInfoError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
@@ -5163,6 +5845,8 @@ declare const FetchLastTradePriceError: {
5163
5845
  /**
5164
5846
  * Fetches the last traded price for a token.
5165
5847
  *
5848
+ * Returns `null` when the token has not traded.
5849
+ *
5166
5850
  * @remarks
5167
5851
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
5168
5852
  *
@@ -5176,11 +5860,11 @@ declare const FetchLastTradePriceError: {
5176
5860
  * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
5177
5861
  * });
5178
5862
  *
5179
- * // trade === { price: '0.53', side: OrderSide.BUY }
5863
+ * // trade === LastTradePrice | null
5180
5864
  * ```
5181
5865
  *
5182
5866
  */
5183
- declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest): Promise<LastTradePrice>;
5867
+ declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
5184
5868
  declare const FetchLastTradePricesRequestSchema: z.ZodArray<z.ZodObject<{
5185
5869
  tokenId: z.ZodString;
5186
5870
  }, z.core.$strip>>;
@@ -5192,6 +5876,9 @@ declare const FetchLastTradePricesError: {
5192
5876
  /**
5193
5877
  * Fetches last traded prices for multiple tokens.
5194
5878
  *
5879
+ * Tokens without trades are omitted from the response. Match returned rows by
5880
+ * `tokenId`; the array is not positionally aligned with the request.
5881
+ *
5195
5882
  * @remarks
5196
5883
  * This is a low-level function. Most SDK consumers should prefer the client instance API.
5197
5884
  *
@@ -5200,14 +5887,11 @@ declare const FetchLastTradePricesError: {
5200
5887
  *
5201
5888
  * @example
5202
5889
  * ```ts
5203
- * const trades = await fetchLastTradePrices(client, [
5204
- * {
5205
- * tokenId:
5206
- * '8501497159083948713316135768103773293754490207922884688769443031624417212426',
5207
- * },
5208
- * ]);
5890
+ * const tokenId =
5891
+ * '8501497159083948713316135768103773293754490207922884688769443031624417212426';
5892
+ * const trades = await fetchLastTradePrices(client, [{ tokenId }]);
5209
5893
  *
5210
- * // trades[0] === { tokenId, price: '0.53', side: OrderSide.BUY }
5894
+ * const trade = trades.find((candidate) => candidate.tokenId === tokenId);
5211
5895
  * ```
5212
5896
  *
5213
5897
  */
@@ -5290,7 +5974,7 @@ declare const ListCurrentRewardsError: {
5290
5974
  */
5291
5975
  declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
5292
5976
  declare const ListMarketRewardsRequestSchema: z.ZodObject<{
5293
- conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
5977
+ conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
5294
5978
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5295
5979
  sponsored: z.ZodOptional<z.ZodBoolean>;
5296
5980
  }, z.core.$strip>;
@@ -5745,18 +6429,18 @@ declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
5745
6429
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5746
6430
  pageSize: z.ZodDefault<z.ZodNumber>;
5747
6431
  timePeriod: z.ZodOptional<z.ZodEnum<{
6432
+ ALL: "ALL";
5748
6433
  DAY: "DAY";
5749
6434
  WEEK: "WEEK";
5750
6435
  MONTH: "MONTH";
5751
- ALL: "ALL";
5752
6436
  }>>;
5753
6437
  }, z.core.$strip>;
5754
6438
  declare const ListBuilderVolumeRequestSchema: z.ZodObject<{
5755
6439
  timePeriod: z.ZodOptional<z.ZodEnum<{
6440
+ ALL: "ALL";
5756
6441
  DAY: "DAY";
5757
6442
  WEEK: "WEEK";
5758
6443
  MONTH: "MONTH";
5759
- ALL: "ALL";
5760
6444
  }>>;
5761
6445
  }, z.core.$strip>;
5762
6446
  declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
@@ -5775,10 +6459,10 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
5775
6459
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5776
6460
  pageSize: z.ZodDefault<z.ZodNumber>;
5777
6461
  timePeriod: z.ZodOptional<z.ZodEnum<{
6462
+ ALL: "ALL";
5778
6463
  DAY: "DAY";
5779
6464
  WEEK: "WEEK";
5780
6465
  MONTH: "MONTH";
5781
- ALL: "ALL";
5782
6466
  }>>;
5783
6467
  orderBy: z.ZodOptional<z.ZodEnum<{
5784
6468
  PNL: "PNL";
@@ -5965,7 +6649,7 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
5965
6649
  clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5966
6650
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
5967
6651
  pageSize: z.ZodOptional<z.ZodNumber>;
5968
- conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
6652
+ conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>>>;
5969
6653
  cyom: z.ZodOptional<z.ZodBoolean>;
5970
6654
  decimalized: z.ZodOptional<z.ZodBoolean>;
5971
6655
  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>>]>>;
@@ -6096,7 +6780,7 @@ declare function listMarkets(client: BaseClient, request?: ListMarketsRequest):
6096
6780
  declare const ListComboMarketsRequestSchema: z.ZodObject<{
6097
6781
  cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
6098
6782
  pageSize: z.ZodOptional<z.ZodNumber>;
6099
- exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
6783
+ exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>>>;
6100
6784
  }, z.core.$strip>;
6101
6785
  type ListComboMarketsRequest = z.input<typeof ListComboMarketsRequestSchema>;
6102
6786
  type ListComboMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
@@ -7810,7 +8494,7 @@ type PrepareSplitMarketPositionRequest = {
7810
8494
  /** Amount of collateral to convert into market positions. */
7811
8495
  amount: bigint;
7812
8496
  /** Existing market condition ID that identifies the positions to mint. */
7813
- conditionId: string | CtfConditionId;
8497
+ conditionId: string | ConditionId;
7814
8498
  /** Optional transaction metadata for workflows that support metadata. */
7815
8499
  metadata?: string;
7816
8500
  };
@@ -7964,7 +8648,7 @@ type PrepareMergeMarketPositionRequest = {
7964
8648
  /** Amount per complementary market position to merge. */
7965
8649
  amount: bigint | 'max';
7966
8650
  /** Existing market condition ID that identifies the positions to merge. */
7967
- conditionId: string | CtfConditionId;
8651
+ conditionId: string | ConditionId;
7968
8652
  /** Optional transaction metadata for workflows that support metadata. */
7969
8653
  metadata?: string;
7970
8654
  };
@@ -8074,7 +8758,7 @@ declare function mergePositions(client: BaseSecureClient, request: PrepareMergeP
8074
8758
  */
8075
8759
  type PrepareRedeemMarketPositionsByConditionIdRequest = {
8076
8760
  /** Existing market condition ID that identifies the positions to redeem. */
8077
- conditionId: string | CtfConditionId;
8761
+ conditionId: string | ConditionId;
8078
8762
  marketId?: never;
8079
8763
  amount?: never;
8080
8764
  positionId?: never;
@@ -8367,6 +9051,122 @@ declare const FetchSeriesError: {
8367
9051
  */
8368
9052
  declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest): Promise<Series>;
8369
9053
 
9054
+ /**
9055
+ * A scoped session key authorized for the Deposit Wallet.
9056
+ */
9057
+ type SessionKey = {
9058
+ /** Public EVM address of the externally managed session signer. */
9059
+ address: EvmAddress$1;
9060
+ /** Venue scopes granted to the signer. */
9061
+ scopes: SessionSignerScope[];
9062
+ /** Absolute expiry as whole Unix seconds. */
9063
+ validUntil: number;
9064
+ };
9065
+ type FetchSessionKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
9066
+ declare const FetchSessionKeysError: {
9067
+ isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
9068
+ };
9069
+ /**
9070
+ * Fetches the active session keys authorized for the Deposit Wallet.
9071
+ *
9072
+ * @remarks
9073
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
9074
+ *
9075
+ * @example
9076
+ * ```ts
9077
+ * const sessionKeys = await fetchSessionKeys(client);
9078
+ * ```
9079
+ *
9080
+ * @throws {@link FetchSessionKeysError}
9081
+ * Thrown on failure.
9082
+ */
9083
+ declare function fetchSessionKeys(client: BaseSecureClient): Promise<SessionKey[]>;
9084
+ /** Parameters for authorizing a scoped session key. */
9085
+ type AuthorizeSessionKeyRequest = {
9086
+ /** Public EVM address of the externally managed session signer. */
9087
+ address: string;
9088
+ /** Stable key to reuse when retrying the same logical authorization. */
9089
+ idempotencyKey?: string;
9090
+ /** Requested scopes. Defaults to `ALL`, which must appear alone. */
9091
+ scopes?: SessionSignerScope[];
9092
+ /** Absolute expiry as whole future Unix seconds. */
9093
+ validUntil: number;
9094
+ };
9095
+ /** Result of a confirmed session-key authorization. */
9096
+ type AuthorizeSessionKeyResult = {
9097
+ /** Session-key metadata associated with the confirmed authorization. */
9098
+ sessionKey: SessionKey;
9099
+ /** Confirmed transaction that applied the authorization. */
9100
+ transaction: TransactionOutcome;
9101
+ };
9102
+ type AuthorizeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
9103
+ declare const AuthorizeSessionKeyError: {
9104
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
9105
+ };
9106
+ /**
9107
+ * Authorizes an externally managed signer for selected venues.
9108
+ *
9109
+ * The SDK receives only the public address. The application remains
9110
+ * responsible for generating, storing, and protecting the private key.
9111
+ * When scopes are omitted, authorization defaults to `ALL`.
9112
+ * Requires builder API-key authentication.
9113
+ *
9114
+ * @remarks
9115
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
9116
+ *
9117
+ * Resolves after the submitted transaction is confirmed and the session key
9118
+ * appears in the active session-key list.
9119
+ *
9120
+ * @example
9121
+ * ```ts
9122
+ * const authorization = await authorizeSessionKey(client, {
9123
+ * address: sessionAddress,
9124
+ * validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
9125
+ * });
9126
+ * ```
9127
+ *
9128
+ * @throws {@link AuthorizeSessionKeyError}
9129
+ * Thrown on failure.
9130
+ */
9131
+ declare function authorizeSessionKey(client: BaseSecureClient, request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
9132
+ /** Parameters for revoking a session key. */
9133
+ type RevokeSessionKeyRequest = {
9134
+ /** Public EVM address of the session signer to revoke. */
9135
+ address: string;
9136
+ /** Stable key to reuse when retrying the same signed revocation. */
9137
+ idempotencyKey?: string;
9138
+ };
9139
+ /** Result of a confirmed session-key revocation. */
9140
+ type RevokeSessionKeyResult = {
9141
+ /** Confirmed transaction that applied the revocation. */
9142
+ transaction: TransactionOutcome;
9143
+ };
9144
+ type RevokeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
9145
+ declare const RevokeSessionKeyError: {
9146
+ isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
9147
+ };
9148
+ /**
9149
+ * Revokes a session key authorized for the Deposit Wallet.
9150
+ *
9151
+ * Revocation may take several minutes while existing activity is canceled and
9152
+ * the on-chain revocation is confirmed.
9153
+ * Requires API-key authentication that supports gasless transactions.
9154
+ *
9155
+ * @remarks
9156
+ * This is a low-level function. Most SDK consumers should prefer the client instance API.
9157
+ *
9158
+ * @example
9159
+ * ```ts
9160
+ * const revocation = await revokeSessionKey(client, {
9161
+ * address: sessionAddress,
9162
+ * });
9163
+ * ```
9164
+ *
9165
+ * @throws {@link RevokeSessionKeyError}
9166
+ * Thrown on failure.
9167
+ */
9168
+ declare function revokeSessionKey(client: BaseSecureClient, request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
9169
+
8370
9170
  type MarketEventType = MarketEvent['type'];
8371
9171
  type UserEventType = UserEvent['type'];
8372
9172
  type SportsEventType = SportsEvent['type'];
@@ -8878,4 +9678,4 @@ type Signer = {
8878
9678
  sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
8879
9679
  };
8880
9680
 
8881
- export { FetchEventTagsError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type ConnectionLostErrorOptions as D, type CreatePerpsSessionRequest as E, CreateSecureClientError as F, type CryptoPricesChainlinkTwapSubscription as G, type DataActions as H, DepositToPerpsError as I, type DepositToPerpsRequest as J, type DisarmPerpsAutoCancelRequest as K, type DiscoveryActions as L, DownloadAccountingSnapshotError as M, DropNotificationsError as N, type EnvironmentConfig as O, type EnvironmentConfigFork as P, type EnvironmentContracts as Q, EstimateMarketPriceError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, ExecuteCollateralReturnPlanError as V, type ExecuteCollateralReturnPlanRequest as W, FetchClosedOnlyModeError as X, FetchCommentsByIdError as Y, FetchEventError as Z, FetchEventLiveVolumeError as _, type TypedData as a, ListPerpsFundingHistoryError as a$, FetchLastTradePriceError as a0, FetchLastTradePricesError as a1, FetchMarketError as a2, FetchMarketTagsError as a3, FetchMidpointError as a4, FetchMidpointsError as a5, FetchNotificationsError as a6, FetchOrderBookError as a7, FetchOrderBooksError as a8, FetchOrderError as a9, FetchTotalEarningsForUserForDayError as aA, FetchTradedMarketCountError as aB, InsufficientLiquidityError as aC, ListAccountTradesError as aD, ListActivityError as aE, ListBuilderLeaderboardError as aF, ListBuilderTradesError as aG, ListBuilderVolumeError as aH, ListClosedPositionsError as aI, ListComboActivityError as aJ, ListComboMarketsError as aK, ListComboPositionsError as aL, ListCommentsByUserAddressError as aM, ListCommentsError as aN, ListCurrentRewardsError as aO, ListEventsError as aP, ListMarketHoldersError as aQ, ListMarketPositionsError as aR, ListMarketRewardsError as aS, ListMarketsError as aT, ListOpenInterestError as aU, ListOpenOrdersError as aV, ListPerpsCandlesError as aW, type ListPerpsCandlesRequest as aX, type ListPerpsDepositsRequest as aY, type ListPerpsEquityHistoryRequest as aZ, type ListPerpsFillsRequest as a_, FetchOrderScoringError as aa, FetchOrdersScoringError as ab, type FetchPerpsAccountConfigRequest as ac, FetchPerpsBookError as ad, type FetchPerpsBookRequest as ae, FetchPerpsFeesError as af, FetchPerpsInstrumentsError as ag, type FetchPerpsInstrumentsRequest as ah, type FetchPerpsOpenOrdersRequest as ai, type FetchPerpsOrdersRequest as aj, FetchPerpsTickerError as ak, type FetchPerpsTickerRequest as al, FetchPerpsTickersError as am, type FetchPerpsTickersRequest as an, FetchPortfolioValueError as ao, FetchPriceError as ap, FetchPriceHistoryError as aq, FetchPricesError as ar, FetchPublicProfileError as as, FetchRelatedTagResourcesError as at, FetchRelatedTagsError as au, FetchRewardPercentagesError as av, FetchSeriesError as aw, FetchSpreadError as ax, FetchSpreadsError as ay, FetchTagError as az, type TransactionCall as b, type RevokePerpsCredentialsRequest as b$, type ListPerpsFundingHistoryRequest as b0, type ListPerpsFundingPaymentsRequest as b1, type ListPerpsNotificationsRequest as b2, type ListPerpsPnlHistoryRequest as b3, ListPerpsTradesError as b4, type ListPerpsTradesRequest as b5, type ListPerpsWithdrawalsRequest as b6, ListPositionsError as b7, ListSeriesError as b8, ListTagsError as b9, type PerpsSessionTradingError as bA, type PerpsTpSlTrigger as bB, type PlacePerpsOrderRequest as bC, type PlacePerpsOrderResult as bD, type PlacePerpsOrderWithTpSlRequest as bE, type PlacePerpsOrderWithTpSlResult as bF, type PlacePerpsPositionTpSlRequest as bG, type PlacePerpsPositionTpSlResult as bH, PlanCollateralReturnError as bI, PostOrderError as bJ, PostOrdersError as bK, type PostPerpsOrdersRequest as bL, type PublicAccountActions as bM, type PublicActions as bN, type PublicClient as bO, type PublicClientOptions as bP, type PublicPerpsActions as bQ, type PublicRewardsActions as bR, type PublicSubscriptionsActions as bS, RateLimitError as bT, type RateLimitErrorOptions as bU, RedeemPositionsError as bV, RequestRejectedError as bW, type RequestRejectedErrorOptions as bX, type RestEndpoint as bY, type ResumePerpsSessionRequest as bZ, RevokePerpsCredentialsError as b_, ListTeamsError as ba, ListTraderLeaderboardError as bb, ListTradesError as bc, ListUserEarningsAndMarketsConfigError as bd, ListUserEarningsForDayError as be, type MarkPerpsNotificationsReadRequest as bf, MergePositionsError as bg, OpenPerpsSessionError as bh, type OpenPerpsSessionRequest as bi, OpenRfqSessionError as bj, type Page as bk, PageSizeSchema as bl, type Paginated as bm, type PerpsActions as bn, type PerpsBookDepth as bo, type PerpsEndpoints as bp, type PerpsOrderRequest as bq, type PerpsPlaceFokOrderRequest as br, type PerpsPlaceGtcOrderRequest as bs, type PerpsPlaceIocOrderRequest as bt, type PerpsPlacedTpSlOrder as bu, type PerpsPlacedTpSlOrders as bv, type PerpsPositionTpSlTrigger as bw, PerpsSession as bx, type PerpsSessionAccountError as by, type PerpsSessionLifecycleError as bz, type AccountIdentity as c, WithdrawFromPerpsError as c$, type RfqCancelQuoteAck as c0, RfqCancelQuoteError as c1, RfqCancelQuoteRejectedError as c2, type RfqCancelQuoteRejectedErrorOptions as c3, type RfqConfirmationAck as c4, RfqConfirmationError as c5, RfqConfirmationRejectedError as c6, type RfqConfirmationRequestEvent as c7, type RfqEvent as c8, RfqQuoteError as c9, type SecureTradingActions as cA, type SecureWalletActions as cB, SetupGaslessWalletError as cC, SetupTradingApprovalsError as cD, type SignerTransactionRequest as cE, SigningError as cF, SplitPositionError as cG, SubscribeError as cH, TimeoutError as cI, TransactionFailedError as cJ, type TransactionHandle as cK, type TransactionOutcome as cL, TransferErc20Error as cM, TransportError as cN, type TypedDataDomain as cO, type TypedDataField as cP, UnexpectedResponseError as cQ, UpdatePerpsLeverageError as cR, type UpdatePerpsLeverageRequest as cS, UpdatePerpsMarginError as cT, type UpdatePerpsMarginRequest as cU, WaitForOrderFillSettlementError as cV, WaitForTransactionError as cW, type WalletDerivationConfig as cX, type WebSocketCloseCode as cY, type WebSocketEndpoint as cZ, WebSocketKnownCloseCode as c_, type RfqQuoteReference as ca, RfqQuoteRejectedError as cb, type RfqQuoteRejectedErrorOptions as cc, type RfqQuoteRequestEvent as cd, type RfqQuoteResponse as ce, type RfqQuoteSource as cf, type RfqSession as cg, type RfqTradeEvent as ch, SearchError as ci, SearchSort as cj, type SecureAccountActions as ck, type SecureActions as cl, type SecureClient as cm, type SecureClientOptions as cn, type SecureDownloadAccountingSnapshotRequest as co, type SecureFetchPortfolioValueRequest as cp, type SecureFetchTradedMarketCountRequest as cq, type SecureListActivityRequest as cr, type SecureListClosedPositionsRequest as cs, type SecureListComboActivityRequest as ct, type SecureListComboPositionsRequest as cu, type SecureListPositionsRequest as cv, type SecurePerpsActions as cw, type SecureRewardsActions as cx, type SecureRfqActions as cy, type SecureSubscriptionsActions as cz, type AnalyticsActions as d, type FetchOrderBookRequest as d$, type WithdrawFromPerpsRequest as d0, accountActions as d1, allActions as d2, analyticsActions as d3, createPublicClient as d4, createSecureClient as d5, dataActions as d6, discoveryActions as d7, forkEnvironmentConfig as d8, makeErrorGuard as d9, type Erc20TransferWorkflowRequest as dA, type EstimateMarketBuyPriceRequest as dB, type EstimateMarketPriceRequest as dC, type EstimateMarketSellPriceRequest as dD, type EventForSubscriptionSpec as dE, type EventForSubscriptionSpecs as dF, FetchBalanceAllowanceError as dG, type FetchBalanceAllowanceRequest as dH, FetchBuilderFeeRatesError as dI, type FetchBuilderFeeRatesRequest as dJ, type FetchCommentsByIdRequest as dK, type FetchEventLiveVolumeRequest as dL, type FetchEventRequest as dM, type FetchEventTagsRequest as dN, FetchExecuteParamsError as dO, type FetchExecuteParamsRequest as dP, type FetchGaslessTransactionRequest as dQ, type FetchLastTradePriceRequest as dR, type FetchLastTradePricesRequest as dS, FetchMarketInfoError as dT, type FetchMarketInfoRequest as dU, type FetchMarketRequest as dV, type FetchMarketTagsRequest as dW, type FetchMidpointRequest as dX, type FetchMidpointsRequest as dY, FetchNegRiskError as dZ, type FetchNegRiskRequest as d_, perpsActions as da, production as db, rewardsActions as dc, rfqActions as dd, subscriptionsActions as de, tradingActions as df, walletActions as dg, type CancelMarketOrdersRequest as dh, type CancelOrderRequest as di, type CancelOrdersRequest as dj, type CollateralReturnExecutionWorkflow as dk, type CommentsEventType as dl, type CommentsSubscription as dm, type CryptoPricesEventType as dn, type CryptoPricesSubscription as dp, DeployDepositWalletError as dq, type DownloadAccountingSnapshotRequest as dr, type DropNotificationsRequest as ds, type EquityPricesEventType as dt, type EquityPricesSubscription as du, type Erc1155ApprovalForAllWorkflow as dv, type Erc1155ApprovalForAllWorkflowRequest as dw, type Erc20ApprovalWorkflow as dx, type Erc20ApprovalWorkflowRequest as dy, type Erc20TransferWorkflow as dz, ApproveErc1155ForAllError as e, type PerpsBboSubscription as e$, type FetchOrderBooksRequest as e0, type FetchOrderRequest as e1, type FetchOrderScoringRequest as e2, type FetchOrdersScoringRequest as e3, type FetchPortfolioValueRequest as e4, type FetchPriceHistoryRequest as e5, type FetchPriceRequest as e6, type FetchPricesRequest as e7, type FetchPublicProfileRequest as e8, type FetchRelatedTagResourcesRequest as e9, type ListEventsRequest as eA, ListMarketClarificationsError as eB, type ListMarketClarificationsRequest as eC, type ListMarketHoldersRequest as eD, type ListMarketPositionsRequest as eE, type ListMarketRewardsRequest as eF, type ListMarketsRequest as eG, type ListOpenInterestRequest as eH, type ListOpenOrdersRequest as eI, type ListPositionsRequest as eJ, type ListSeriesRequest as eK, type ListTagsRequest as eL, type ListTeamsRequest as eM, type ListTraderLeaderboardRequest as eN, type ListTradesRequest as eO, type ListUserEarningsAndMarketsConfigRequest as eP, type ListUserEarningsForDayRequest as eQ, type MarketEventType as eR, type MarketSubscription as eS, MergeComboPositionError as eT, MergeMarketPositionError as eU, type MergePositionsWorkflow as eV, type MergePositionsWorkflowRequest as eW, type OrderDraft as eX, type OrderPostingWorkflow as eY, type OrderWorkflow as eZ, type OrderWorkflowRequest as e_, type FetchRelatedTagsRequest as ea, type FetchSeriesRequest as eb, type FetchSpreadRequest as ec, type FetchSpreadsRequest as ed, type FetchTagRequest as ee, FetchTickSizeError as ef, type FetchTickSizeRequest as eg, type FetchTotalEarningsForUserForDayRequest as eh, type FetchTradedMarketCountRequest as ei, GaslessTransactionMetadataSchema as ej, type GaslessWorkflow as ek, type GaslessWorkflowRequest as el, IsWalletDeployedError as em, type IsWalletDeployedRequest as en, type ListAccountTradesRequest as eo, type ListActivityRequest as ep, type ListBuilderLeaderboardRequest as eq, type ListBuilderTradesRequest as er, type ListBuilderVolumeRequest as es, type ListClosedPositionsRequest as et, type ListComboActivityRequest as eu, type ListComboMarketsRequest as ev, type ListComboPositionsRequest as ew, type ListCommentsByUserAddressRequest as ex, type ListCommentsRequest as ey, type ListCurrentRewardsRequest as ez, ApproveErc20Error as f, type SplitPositionWorkflow as f$, type PerpsBookSubscription as f0, type PerpsCandlesSubscription as f1, type PerpsDepositWorkflow as f2, type PerpsDepositWorkflowRequest as f3, type PerpsMarketDataEventType as f4, type PerpsMarketDataSubscription as f5, type PerpsStatisticsSubscription as f6, type PerpsStreamingCandleInterval as f7, type PerpsTickersSubscription as f8, type PerpsTradesSubscription as f9, type PrepareRedeemMarketPositionsRequest as fA, PrepareRedeemPositionsError as fB, type PrepareRedeemPositionsRequest as fC, PrepareSplitComboPositionError as fD, type PrepareSplitComboPositionRequest as fE, PrepareSplitMarketPositionError as fF, type PrepareSplitMarketPositionRequest as fG, PrepareSplitPositionError as fH, type PrepareSplitPositionRequest as fI, PrepareTradingApprovalsError as fJ, type PublicRealtimeEvent as fK, type PublicRealtimeTopic as fL, type PublicSubscriptionSpec as fM, type RedeemPositionsWorkflow as fN, type RedeemPositionsWorkflowRequest as fO, ResolveConditionByTokenError as fP, type ResolveConditionByTokenRequest as fQ, type RfqConfirmationRejectedErrorOptions as fR, type RfqExecutionUpdateEvent as fS, type SearchRequest as fT, type SearchResults as fU, type SecureRealtimeEvent as fV, type SecureRealtimeTopic as fW, type SecureSubscriptionSpec as fX, type SignedOrder as fY, SplitComboPositionError as fZ, SplitMarketPositionError as f_, type PostOrdersRequest as fa, PrepareCollateralReturnExecutionError as fb, PrepareErc1155ApprovalForAllError as fc, type PrepareErc1155ApprovalForAllRequest as fd, PrepareErc20ApprovalError as fe, type PrepareErc20ApprovalRequest as ff, PrepareErc20TransferError as fg, type PrepareErc20TransferRequest as fh, PrepareGaslessTransactionError as fi, type PrepareGaslessTransactionRequest as fj, type PrepareLimitOrderRequest as fk, type PrepareMarketBuyOrderRequest as fl, type PrepareMarketOrderRequest as fm, type PrepareMarketSellOrderRequest as fn, PrepareMergeComboPositionError as fo, type PrepareMergeComboPositionRequest as fp, PrepareMergeMarketPositionError as fq, type PrepareMergeMarketPositionRequest as fr, PrepareMergePositionsError as fs, type PrepareMergePositionsRequest as ft, PreparePerpsDepositError as fu, PrepareRedeemComboPositionError as fv, type PrepareRedeemComboPositionRequest as fw, type PrepareRedeemMarketPositionsByConditionIdRequest as fx, type PrepareRedeemMarketPositionsByMarketIdRequest as fy, PrepareRedeemMarketPositionsError as fz, ArmPerpsAutoCancelError as g, fetchTag as g$, type SplitPositionWorkflowRequest as g0, type SportsEventType as g1, type SportsSubscription as g2, type SubscriptionHandle as g3, type TradingApprovalsWorkflow as g4, type TradingApprovalsWorkflowRequest as g5, UpdateBalanceAllowanceError as g6, type UpdateBalanceAllowanceRequest as g7, type UserEventType as g8, type UserSubscription as g9, fetchMarketInfo as gA, fetchMarketTags as gB, fetchMidpoint as gC, fetchMidpoints as gD, fetchNegRisk as gE, fetchNotifications as gF, fetchOrder as gG, fetchOrderBook as gH, fetchOrderBooks as gI, fetchOrderScoring as gJ, fetchOrdersScoring as gK, fetchPerpsBook as gL, fetchPerpsFees as gM, fetchPerpsInstruments as gN, fetchPerpsTicker as gO, fetchPerpsTickers as gP, fetchPortfolioValue as gQ, fetchPrice as gR, fetchPriceHistory as gS, fetchPrices as gT, fetchPublicProfile as gU, fetchRelatedTagResources as gV, fetchRelatedTags as gW, fetchRewardPercentages as gX, fetchSeries as gY, fetchSpread as gZ, fetchSpreads as g_, WaitForGaslessTransactionError as ga, type WaitForOrderFillSettlementRequest as gb, approveErc1155ForAll as gc, approveErc20 as gd, cancelAll as ge, cancelMarketOrders as gf, cancelOrder as gg, cancelOrders as gh, deployDepositWallet as gi, depositToPerps as gj, downloadAccountingSnapshot as gk, dropNotifications as gl, estimateMarketPrice as gm, executeCollateralReturnPlan as gn, fetchBalanceAllowance as go, fetchBuilderFeeRates as gp, fetchBuilderVolume as gq, fetchClosedOnlyMode as gr, fetchCommentsById as gs, fetchEvent as gt, fetchEventLiveVolume as gu, fetchEventTags as gv, fetchExecuteParams as gw, fetchLastTradePrice as gx, fetchLastTradePrices as gy, fetchMarket as gz, type ArmPerpsAutoCancelRequest as h, setupTradingApprovals as h$, fetchTickSize as h0, fetchTotalEarningsForUserForDay as h1, fetchTradedMarketCount as h2, fetchTransaction as h3, isWalletDeployed as h4, listAccountTrades as h5, listActivity as h6, listBuilderLeaderboard as h7, listBuilderTrades as h8, listClosedPositions as h9, mergeMarketPosition as hA, mergePositions as hB, openPerpsSession as hC, openRfqSession as hD, planCollateralReturn as hE, postOrder as hF, postOrders as hG, prepareCollateralReturnExecution as hH, prepareErc1155ApprovalForAll as hI, prepareErc20Approval as hJ, prepareErc20Transfer as hK, prepareGaslessTransaction as hL, prepareMergeComboPosition as hM, prepareMergeMarketPosition as hN, prepareMergePositions as hO, preparePerpsDeposit as hP, prepareRedeemComboPosition as hQ, prepareRedeemMarketPositions as hR, prepareRedeemPositions as hS, prepareSplitComboPosition as hT, prepareSplitMarketPosition as hU, prepareSplitPosition as hV, prepareTradingApprovals as hW, redeemPositions as hX, resolveConditionByToken as hY, revokePerpsCredentials as hZ, search as h_, listComboActivity as ha, listComboMarkets as hb, listComboPositions as hc, listComments as hd, listCommentsByUserAddress as he, listCurrentRewards as hf, listEvents as hg, listMarketClarifications as hh, listMarketHolders as hi, listMarketPositions as hj, listMarketRewards as hk, listMarkets as hl, listOpenInterest as hm, listOpenOrders as hn, listPerpsCandles as ho, listPerpsFundingHistory as hp, listPerpsTrades as hq, listPositions as hr, listSeries as hs, listTags as ht, listTeams as hu, listTraderLeaderboard as hv, listTrades as hw, listUserEarningsAndMarketsConfig as hx, listUserEarningsForDay as hy, mergeComboPosition as hz, AutoCancelDailyLimitError as i, splitComboPosition as i0, splitMarketPosition as i1, splitPosition as i2, subscribe as i3, transferErc20 as i4, updateBalanceAllowance as i5, waitForOrderFillSettlement as i6, withdrawFromPerps as i7, BasePublicClient as j, BaseSecureClient as k, type BeginAuthenticationRequest as l, type CancelAllPerpsOrdersRequest as m, CancelMarketOrdersError as n, CancelOrderError as o, CancelOrdersError as p, type CancelPerpsOrderRequest as q, type CancelPerpsOrdersRequest as r, CancelledSigningError as s, type Client as t, type ClientActions as u, type ClientDecorator as v, type ClobEndpoints as w, ComboPositionSort as x, type CombosEndpoints as y, ConnectionLostError as z };
9681
+ export { type EnvironmentContracts as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type ClientActions as D, type ClientDecorator as E, type ClobEndpoints as F, ComboPositionSort as G, type ComboPositionStatusFilter as H, type ComboQuote as I, type CombosEndpoints as J, ConnectionLostError as K, type ConnectionLostErrorOptions as L, type CreatePerpsSessionRequest as M, CreateSecureClientError as N, type CryptoPricesChainlinkTwapSubscription as O, type DataActions as P, DepositToPerpsError as Q, type DepositToPerpsRequest as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type DisarmPerpsAutoCancelRequest as V, type DiscoveryActions as W, DownloadAccountingSnapshotError as X, DropNotificationsError as Y, type EnvironmentConfig as Z, type EnvironmentConfigFork as _, type TypedData as a, ListMarketHoldersError as a$, EstimateMarketPriceError as a0, ExecuteCollateralReturnPlanError as a1, type ExecuteCollateralReturnPlanRequest as a2, FetchClosedOnlyModeError as a3, FetchCommentsByIdError as a4, FetchEventError as a5, FetchEventLiveVolumeError as a6, FetchEventTagsError as a7, FetchLastTradePriceError as a8, FetchLastTradePricesError as a9, FetchPublicProfileError as aA, FetchRelatedTagResourcesError as aB, FetchRelatedTagsError as aC, FetchRewardPercentagesError as aD, FetchRfqStatusError as aE, type FetchRfqStatusParams as aF, FetchSeriesError as aG, FetchSessionKeysError as aH, FetchSpreadError as aI, FetchSpreadsError as aJ, FetchTagError as aK, FetchTotalEarningsForUserForDayError as aL, FetchTradedMarketCountError as aM, InsufficientLiquidityError as aN, ListAccountTradesError as aO, ListActivityError as aP, ListBuilderLeaderboardError as aQ, ListBuilderTradesError as aR, ListBuilderVolumeError as aS, ListClosedPositionsError as aT, ListComboActivityError as aU, ListComboMarketsError as aV, ListComboPositionsError as aW, ListCommentsByUserAddressError as aX, ListCommentsError as aY, ListCurrentRewardsError as aZ, ListEventsError as a_, FetchMarketError as aa, FetchMarketTagsError as ab, FetchMidpointError as ac, FetchMidpointsError as ad, FetchNotificationsError as ae, FetchOrderBookError as af, FetchOrderBooksError as ag, FetchOrderError as ah, FetchOrderScoringError as ai, FetchOrdersScoringError as aj, type FetchPerpsAccountConfigRequest as ak, FetchPerpsBookError as al, type FetchPerpsBookRequest as am, FetchPerpsFeesError as an, FetchPerpsInstrumentsError as ao, type FetchPerpsInstrumentsRequest as ap, type FetchPerpsOpenOrdersRequest as aq, type FetchPerpsOrdersRequest as ar, FetchPerpsTickerError as as, type FetchPerpsTickerRequest as at, FetchPerpsTickersError as au, type FetchPerpsTickersRequest as av, FetchPortfolioValueError as aw, FetchPriceError as ax, FetchPriceHistoryError as ay, FetchPricesError as az, type TransactionCall as b, type PublicClient as b$, ListMarketPositionsError as b0, ListMarketRewardsError as b1, ListMarketsError as b2, ListOpenInterestError as b3, ListOpenOrdersError as b4, ListPerpsCandlesError as b5, type ListPerpsCandlesRequest as b6, type ListPerpsDepositsRequest as b7, type ListPerpsEquityHistoryRequest as b8, type ListPerpsFillsRequest as b9, type PerpsActions as bA, type PerpsBookDepth as bB, type PerpsEndpoints as bC, type PerpsOrderRequest as bD, type PerpsPlaceFokOrderRequest as bE, type PerpsPlaceGtcOrderRequest as bF, type PerpsPlaceIocOrderRequest as bG, type PerpsPlacedTpSlOrder as bH, type PerpsPlacedTpSlOrders as bI, type PerpsPositionTpSlTrigger as bJ, PerpsSession as bK, type PerpsSessionAccountError as bL, type PerpsSessionLifecycleError as bM, type PerpsSessionTradingError as bN, type PerpsTpSlTrigger as bO, type PlacePerpsOrderRequest as bP, type PlacePerpsOrderResult as bQ, type PlacePerpsOrderWithTpSlRequest as bR, type PlacePerpsOrderWithTpSlResult as bS, type PlacePerpsPositionTpSlRequest as bT, type PlacePerpsPositionTpSlResult as bU, PlanCollateralReturnError as bV, PostOrderError as bW, PostOrdersError as bX, type PostPerpsOrdersRequest as bY, type PublicAccountActions as bZ, type PublicActions as b_, ListPerpsFundingHistoryError as ba, type ListPerpsFundingHistoryRequest as bb, type ListPerpsFundingPaymentsRequest as bc, type ListPerpsNotificationsRequest as bd, type ListPerpsPnlHistoryRequest as be, ListPerpsTradesError as bf, type ListPerpsTradesRequest as bg, type ListPerpsWithdrawalsRequest as bh, ListPositionsError as bi, ListSeriesError as bj, ListTagsError as bk, ListTeamsError as bl, ListTraderLeaderboardError as bm, ListTradesError as bn, ListUserEarningsAndMarketsConfigError as bo, ListUserEarningsForDayError as bp, type MarkPerpsNotificationsReadRequest as bq, MergePositionsError as br, OpenPerpsSessionError as bs, type OpenPerpsSessionRequest as bt, OpenRfqSessionError as bu, type OrderAsset as bv, type OrderSignature as bw, type Page as bx, PageSizeSchema as by, type Paginated as bz, AcceptComboQuoteError as c, type SessionKey as c$, type PublicClientOptions as c0, type PublicPerpsActions as c1, type PublicRewardsActions as c2, type PublicSubscriptionsActions as c3, type RateLimitBucket as c4, RateLimitError as c5, type RateLimitErrorOptions as c6, type RateLimitUpdate as c7, type RateLimitUpdateListener as c8, RedeemPositionsError as c9, type RfqQuoteResponse as cA, type RfqQuoteSource as cB, RfqRequestRejectedError as cC, type RfqRequestRejectedErrorOptions as cD, type RfqSession as cE, type RfqStatusResult as cF, type RfqTradeEvent as cG, SearchError as cH, SearchSort as cI, type SecureAccountActions as cJ, type SecureActions as cK, type SecureClient as cL, type SecureClientOptions as cM, type SecureDownloadAccountingSnapshotRequest as cN, type SecureFetchPortfolioValueRequest as cO, type SecureFetchTradedMarketCountRequest as cP, type SecureListActivityRequest as cQ, type SecureListClosedPositionsRequest as cR, type SecureListComboActivityRequest as cS, type SecureListComboPositionsRequest as cT, type SecureListPositionsRequest as cU, type SecurePerpsActions as cV, type SecureRewardsActions as cW, type SecureRfqActions as cX, type SecureSubscriptionsActions as cY, type SecureTradingActions as cZ, type SecureWalletActions as c_, RequestComboQuoteError as ca, type RequestComboQuoteParams as cb, type RequestComboQuoteResult as cc, RequestRejectedError as cd, type RequestRejectedErrorOptions as ce, type RestEndpoint as cf, type ResumePerpsSessionRequest as cg, RevokePerpsCredentialsError as ch, type RevokePerpsCredentialsRequest as ci, RevokeSessionKeyError as cj, type RevokeSessionKeyRequest as ck, type RevokeSessionKeyResult as cl, type RfqCancelQuoteAck as cm, RfqCancelQuoteError as cn, RfqCancelQuoteRejectedError as co, type RfqCancelQuoteRejectedErrorOptions as cp, type RfqConfirmationAck as cq, RfqConfirmationError as cr, RfqConfirmationRejectedError as cs, type RfqConfirmationRequestEvent as ct, type RfqEvent as cu, RfqQuoteError as cv, type RfqQuoteReference as cw, RfqQuoteRejectedError as cx, type RfqQuoteRejectedErrorOptions as cy, type RfqQuoteRequestEvent as cz, type AcceptComboQuoteParams as d, type EquityPricesEventType as d$, type SessionKeyActions as d0, SetupGaslessWalletError as d1, SetupTradingApprovalsError as d2, type SignedOrder as d3, type SignerTransactionRequest as d4, SignerType as d5, SigningError as d6, SplitPositionError as d7, SubscribeError as d8, TimeoutError as d9, allActions as dA, analyticsActions as dB, createPublicClient as dC, createSecureClient as dD, dataActions as dE, discoveryActions as dF, forkEnvironmentConfig as dG, makeErrorGuard as dH, perpsActions as dI, production as dJ, rewardsActions as dK, rfqActions as dL, sessionKeyActions as dM, subscriptionsActions as dN, tradingActions as dO, walletActions as dP, type CancelMarketOrdersRequest as dQ, type CancelOrderRequest as dR, type CancelOrdersRequest as dS, type CollateralReturnExecutionWorkflow as dT, type CommentsEventType as dU, type CommentsSubscription as dV, type CryptoPricesEventType as dW, type CryptoPricesSubscription as dX, DeployDepositWalletError as dY, type DownloadAccountingSnapshotRequest as dZ, type DropNotificationsRequest as d_, TradingRestriction as da, TransactionFailedError as db, type TransactionHandle as dc, type TransactionOutcome as dd, TransferErc20Error as de, TransportError as df, type TypedDataDomain as dg, type TypedDataField as dh, UnexpectedResponseError as di, UpdatePerpsLeverageError as dj, type UpdatePerpsLeverageRequest as dk, UpdatePerpsMarginError as dl, type UpdatePerpsMarginRequest as dm, WaitForComboFillError as dn, type WaitForComboFillParams as dp, type WaitForComboFillResult as dq, WaitForOrderFillSettlementError as dr, WaitForTransactionError as ds, type WalletDerivationConfig as dt, type WebSocketCloseCode as du, type WebSocketEndpoint as dv, WebSocketKnownCloseCode as dw, WithdrawFromPerpsError as dx, type WithdrawFromPerpsRequest as dy, accountActions as dz, type AcceptComboQuoteResult as e, type ListClosedPositionsRequest as e$, type EquityPricesSubscription as e0, type Erc1155ApprovalForAllWorkflow as e1, type Erc1155ApprovalForAllWorkflowRequest as e2, type Erc20ApprovalWorkflow as e3, type Erc20ApprovalWorkflowRequest as e4, type Erc20TransferWorkflow as e5, type Erc20TransferWorkflowRequest as e6, type EstimateMarketBuyPriceRequest as e7, type EstimateMarketPriceRequest as e8, type EstimateMarketSellPriceRequest as e9, type FetchOrderScoringRequest as eA, type FetchOrdersScoringRequest as eB, type FetchPortfolioValueRequest as eC, type FetchPriceHistoryRequest as eD, type FetchPriceRequest as eE, type FetchPricesRequest as eF, type FetchPublicProfileRequest as eG, type FetchRelatedTagResourcesRequest as eH, type FetchRelatedTagsRequest as eI, type FetchSeriesRequest as eJ, type FetchSpreadRequest as eK, type FetchSpreadsRequest as eL, type FetchTagRequest as eM, FetchTickSizeError as eN, type FetchTickSizeRequest as eO, type FetchTotalEarningsForUserForDayRequest as eP, type FetchTradedMarketCountRequest as eQ, GaslessTransactionMetadataSchema as eR, type GaslessWorkflow as eS, type GaslessWorkflowRequest as eT, IsWalletDeployedError as eU, type IsWalletDeployedRequest as eV, type ListAccountTradesRequest as eW, type ListActivityRequest as eX, type ListBuilderLeaderboardRequest as eY, type ListBuilderTradesRequest as eZ, type ListBuilderVolumeRequest as e_, type EventForSubscriptionSpec as ea, type EventForSubscriptionSpecs as eb, FetchBalanceAllowanceError as ec, type FetchBalanceAllowanceRequest as ed, FetchBuilderFeeRatesError as ee, type FetchBuilderFeeRatesRequest as ef, type FetchCommentsByIdRequest as eg, type FetchEventLiveVolumeRequest as eh, type FetchEventRequest as ei, type FetchEventTagsRequest as ej, FetchExecuteParamsError as ek, type FetchExecuteParamsRequest as el, type FetchGaslessTransactionRequest as em, type FetchLastTradePriceRequest as en, type FetchLastTradePricesRequest as eo, FetchMarketInfoError as ep, type FetchMarketInfoRequest as eq, type FetchMarketRequest as er, type FetchMarketTagsRequest as es, type FetchMidpointRequest as et, type FetchMidpointsRequest as eu, FetchNegRiskError as ev, type FetchNegRiskRequest as ew, type FetchOrderBookRequest as ex, type FetchOrderBooksRequest as ey, type FetchOrderRequest as ez, type AccountIdentity as f, PreparePerpsDepositError as f$, type ListComboActivityRequest as f0, type ListComboMarketsRequest as f1, type ListComboPositionsRequest as f2, type ListCommentsByUserAddressRequest as f3, type ListCommentsRequest as f4, type ListCurrentRewardsRequest as f5, type ListEventsRequest as f6, ListMarketClarificationsError as f7, type ListMarketClarificationsRequest as f8, type ListMarketHoldersRequest as f9, type PerpsDepositWorkflowRequest as fA, type PerpsMarketDataEventType as fB, type PerpsMarketDataSubscription as fC, type PerpsStatisticsSubscription as fD, type PerpsStreamingCandleInterval as fE, type PerpsTickersSubscription as fF, type PerpsTradesSubscription as fG, type PostOrdersRequest as fH, PrepareCollateralReturnExecutionError as fI, PrepareErc1155ApprovalForAllError as fJ, type PrepareErc1155ApprovalForAllRequest as fK, PrepareErc20ApprovalError as fL, type PrepareErc20ApprovalRequest as fM, PrepareErc20TransferError as fN, type PrepareErc20TransferRequest as fO, PrepareGaslessTransactionError as fP, type PrepareGaslessTransactionRequest as fQ, type PrepareLimitOrderRequest as fR, type PrepareMarketBuyOrderRequest as fS, type PrepareMarketOrderRequest as fT, type PrepareMarketSellOrderRequest as fU, PrepareMergeComboPositionError as fV, type PrepareMergeComboPositionRequest as fW, PrepareMergeMarketPositionError as fX, type PrepareMergeMarketPositionRequest as fY, PrepareMergePositionsError as fZ, type PrepareMergePositionsRequest as f_, type ListMarketPositionsRequest as fa, type ListMarketRewardsRequest as fb, type ListMarketsRequest as fc, type ListOpenInterestRequest as fd, type ListOpenOrdersRequest as fe, type ListPositionsRequest as ff, type ListSeriesRequest as fg, type ListTagsRequest as fh, type ListTeamsRequest as fi, type ListTraderLeaderboardRequest as fj, type ListTradesRequest as fk, type ListUserEarningsAndMarketsConfigRequest as fl, type ListUserEarningsForDayRequest as fm, type MarketEventType as fn, type MarketSubscription as fo, MergeComboPositionError as fp, MergeMarketPositionError as fq, type MergePositionsWorkflow as fr, type MergePositionsWorkflowRequest as fs, type OrderPostingWorkflow as ft, type OrderWorkflow as fu, type OrderWorkflowRequest as fv, type PerpsBboSubscription as fw, type PerpsBookSubscription as fx, type PerpsCandlesSubscription as fy, type PerpsDepositWorkflow as fz, type AnalyticsActions as g, fetchEvent as g$, PrepareRedeemComboPositionError as g0, type PrepareRedeemComboPositionRequest as g1, type PrepareRedeemMarketPositionsByConditionIdRequest as g2, type PrepareRedeemMarketPositionsByMarketIdRequest as g3, PrepareRedeemMarketPositionsError as g4, type PrepareRedeemMarketPositionsRequest as g5, PrepareRedeemPositionsError as g6, type PrepareRedeemPositionsRequest as g7, PrepareSplitComboPositionError as g8, type PrepareSplitComboPositionRequest as g9, type TradingApprovalsWorkflow as gA, type TradingApprovalsWorkflowRequest as gB, UpdateBalanceAllowanceError as gC, type UpdateBalanceAllowanceRequest as gD, type UserEventType as gE, type UserSubscription as gF, WaitForGaslessTransactionError as gG, type WaitForOrderFillSettlementRequest as gH, acceptComboQuote as gI, approveErc1155ForAll as gJ, approveErc20 as gK, authorizeSessionKey as gL, cancelAll as gM, cancelMarketOrders as gN, cancelOrder as gO, cancelOrders as gP, deployDepositWallet as gQ, depositToPerps as gR, downloadAccountingSnapshot as gS, dropNotifications as gT, estimateMarketPrice as gU, executeCollateralReturnPlan as gV, fetchBalanceAllowance as gW, fetchBuilderFeeRates as gX, fetchBuilderVolume as gY, fetchClosedOnlyMode as gZ, fetchCommentsById as g_, PrepareSplitMarketPositionError as ga, type PrepareSplitMarketPositionRequest as gb, PrepareSplitPositionError as gc, type PrepareSplitPositionRequest as gd, PrepareTradingApprovalsError as ge, type PublicRealtimeEvent as gf, type PublicRealtimeTopic as gg, type PublicSubscriptionSpec as gh, type RedeemPositionsWorkflow as gi, type RedeemPositionsWorkflowRequest as gj, ResolveConditionByTokenError as gk, type ResolveConditionByTokenRequest as gl, type RfqConfirmationRejectedErrorOptions as gm, type RfqExecutionUpdateEvent as gn, type SearchRequest as go, type SearchResults as gp, type SecureRealtimeEvent as gq, type SecureRealtimeTopic as gr, type SecureSubscriptionSpec as gs, SplitComboPositionError as gt, SplitMarketPositionError as gu, type SplitPositionWorkflow as gv, type SplitPositionWorkflowRequest as gw, type SportsEventType as gx, type SportsSubscription as gy, type SubscriptionHandle as gz, ApproveErc1155ForAllError as h, listPositions as h$, fetchEventLiveVolume as h0, fetchEventTags as h1, fetchExecuteParams as h2, fetchLastTradePrice as h3, fetchLastTradePrices as h4, fetchMarket as h5, fetchMarketInfo as h6, fetchMarketTags as h7, fetchMidpoint as h8, fetchMidpoints as h9, fetchTickSize as hA, fetchTotalEarningsForUserForDay as hB, fetchTradedMarketCount as hC, fetchTransaction as hD, isWalletDeployed as hE, listAccountTrades as hF, listActivity as hG, listBuilderLeaderboard as hH, listBuilderTrades as hI, listClosedPositions as hJ, listComboActivity as hK, listComboMarkets as hL, listComboPositions as hM, listComments as hN, listCommentsByUserAddress as hO, listCurrentRewards as hP, listEvents as hQ, listMarketClarifications as hR, listMarketHolders as hS, listMarketPositions as hT, listMarketRewards as hU, listMarkets as hV, listOpenInterest as hW, listOpenOrders as hX, listPerpsCandles as hY, listPerpsFundingHistory as hZ, listPerpsTrades as h_, fetchNegRisk as ha, fetchNotifications as hb, fetchOrder as hc, fetchOrderBook as hd, fetchOrderBooks as he, fetchOrderScoring as hf, fetchOrdersScoring as hg, fetchPerpsBook as hh, fetchPerpsFees as hi, fetchPerpsInstruments as hj, fetchPerpsTicker as hk, fetchPerpsTickers as hl, fetchPortfolioValue as hm, fetchPrice as hn, fetchPriceHistory as ho, fetchPrices as hp, fetchPublicProfile as hq, fetchRelatedTagResources as hr, fetchRelatedTags as hs, fetchRewardPercentages as ht, fetchRfqStatus as hu, fetchSeries as hv, fetchSessionKeys as hw, fetchSpread as hx, fetchSpreads as hy, fetchTag as hz, ApproveErc20Error as i, listSeries as i0, listTags as i1, listTeams as i2, listTraderLeaderboard as i3, listTrades as i4, listUserEarningsAndMarketsConfig as i5, listUserEarningsForDay as i6, mergeComboPosition as i7, mergeMarketPosition as i8, mergePositions as i9, revokePerpsCredentials as iA, revokeSessionKey as iB, search as iC, setupTradingApprovals as iD, splitComboPosition as iE, splitMarketPosition as iF, splitPosition as iG, subscribe as iH, transferErc20 as iI, updateBalanceAllowance as iJ, waitForComboFill as iK, waitForOrderFillSettlement as iL, withdrawFromPerps as iM, openPerpsSession as ia, openRfqSession as ib, planCollateralReturn as ic, postOrder as id, postOrders as ie, prepareCollateralReturnExecution as ig, prepareErc1155ApprovalForAll as ih, prepareErc20Approval as ii, prepareErc20Transfer as ij, prepareGaslessTransaction as ik, prepareMergeComboPosition as il, prepareMergeMarketPosition as im, prepareMergePositions as io, preparePerpsDeposit as ip, prepareRedeemComboPosition as iq, prepareRedeemMarketPositions as ir, prepareRedeemPositions as is, prepareSplitComboPosition as it, prepareSplitMarketPosition as iu, prepareSplitPosition as iv, prepareTradingApprovals as iw, redeemPositions as ix, requestComboQuote as iy, resolveConditionByToken as iz, ArmPerpsAutoCancelError as j, type ArmPerpsAutoCancelRequest as k, AuthorizeSessionKeyError as l, type AuthorizeSessionKeyRequest as m, type AuthorizeSessionKeyResult as n, AutoCancelDailyLimitError as o, BasePublicClient as p, BaseSecureClient as q, type BeginAuthenticationRequest as r, type CancelAllPerpsOrdersRequest as s, CancelMarketOrdersError as t, CancelOrderError as u, CancelOrdersError as v, type CancelPerpsOrderRequest as w, type CancelPerpsOrdersRequest as x, CancelledSigningError as y, type Client as z };