@polymarket/client 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +4 -3
- package/dist/actions/index.js +1 -1
- package/dist/chunk-DLZLJOGO.js +6 -0
- package/dist/chunk-DLZLJOGO.js.map +1 -0
- package/dist/chunk-RUTB3ZZX.js +3 -0
- package/dist/chunk-RUTB3ZZX.js.map +1 -0
- package/dist/chunk-ZH5ERGHG.js +2 -0
- package/dist/chunk-ZH5ERGHG.js.map +1 -0
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/ethers-v5.js +1 -1
- package/dist/ethers-v5.js.map +1 -1
- package/dist/index.d.ts +30 -30
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/node.js +1 -1
- package/dist/privy.js +1 -1
- package/dist/{sports-BPp6UXlR.d.ts → sports-C9hVRTX2.d.ts} +1 -1
- package/dist/{types-RGx7fNNl.d.ts → types-Cg8WP4aO.d.ts} +879 -364
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/dist/viem.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-DB2YMGIT.js +0 -3
- package/dist/chunk-DB2YMGIT.js.map +0 -1
- package/dist/chunk-MCGT5BAF.js +0 -6
- package/dist/chunk-MCGT5BAF.js.map +0 -1
- package/dist/chunk-O4EZ2N7U.js +0 -2
- package/dist/chunk-O4EZ2N7U.js.map +0 -1
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
|
-
import { PaginationCursor, DecimalString, BuilderCode, OrderSide, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue,
|
|
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
|
-
import
|
|
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';
|
|
7
|
+
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForAsset, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OpenOrder, ApiKeyCreds, AssetType, BalanceAllowanceResponse, PriceHistoryInterval, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
9
8
|
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';
|
|
9
|
+
import { Activity, ComboActivity, Trade, ComboPositionStatus, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
|
|
11
10
|
import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
|
|
12
11
|
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
12
|
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
13
|
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
14
|
import { Hex } from 'ox';
|
|
16
15
|
|
|
16
|
+
/** Independent rate-limit bucket affected by an order or cancellation. */
|
|
17
|
+
type RateLimitBucket = 'order' | 'cancel';
|
|
18
|
+
/**
|
|
19
|
+
* Per-signer rate-limit state reported by order and cancellation responses.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Fields mirror the `Poly-RateLimit-*` response headers. `remaining` and
|
|
23
|
+
* `reset` are normally reported together, while `tier` can be absent. These
|
|
24
|
+
* fields remain optional because malformed header values are ignored;
|
|
25
|
+
* `warning` is `false` whenever the response does not report warning mode.
|
|
26
|
+
*/
|
|
27
|
+
type RateLimitUpdate = {
|
|
28
|
+
/** Rate-limit bucket affected by the request, when that request declares one. */
|
|
29
|
+
bucket?: RateLimitBucket;
|
|
30
|
+
/**
|
|
31
|
+
* Token balance remaining in the applicable rate-limit bucket after the
|
|
32
|
+
* request was accounted for. Can be negative for tiers that allow a
|
|
33
|
+
* negative cancellation balance. A value of `0` alone does not prove the
|
|
34
|
+
* bucket is exhausted because it can also be reported when no active limit
|
|
35
|
+
* applies; do not back off solely because this value is zero.
|
|
36
|
+
*/
|
|
37
|
+
remaining?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Unix timestamp, in seconds, when the current rate-limit wait period ends.
|
|
40
|
+
*/
|
|
41
|
+
reset?: number;
|
|
42
|
+
/** Rate-limit tier applied to the request. */
|
|
43
|
+
tier?: string;
|
|
44
|
+
/**
|
|
45
|
+
* `true` when the limiter runs in warning mode and the request would have
|
|
46
|
+
* been rejected under live enforcement. Monitor this to adjust request
|
|
47
|
+
* patterns before enforcement begins.
|
|
48
|
+
*/
|
|
49
|
+
warning: boolean;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Listener invoked whenever a response reports per-signer rate-limit state.
|
|
53
|
+
* The listener may return a promise; synchronous errors and promise rejections
|
|
54
|
+
* are ignored.
|
|
55
|
+
*/
|
|
56
|
+
type RateLimitUpdateListener = (update: RateLimitUpdate) => void;
|
|
57
|
+
|
|
17
58
|
type ResponseValidationContext = {
|
|
18
59
|
endpoint: string;
|
|
19
60
|
};
|
|
@@ -87,6 +128,17 @@ declare class ConnectionLostError extends PolymarketError {
|
|
|
87
128
|
readonly reason: string;
|
|
88
129
|
constructor(message: string, options: ErrorOptions & ConnectionLostErrorOptions);
|
|
89
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Trading restriction reported by the venue while orders cannot be placed
|
|
133
|
+
* normally. The SDK does not retry automatically; callers decide how to
|
|
134
|
+
* react, honoring {@link RequestRejectedError.retryAfter} when provided.
|
|
135
|
+
*/
|
|
136
|
+
declare enum TradingRestriction {
|
|
137
|
+
/** The matching engine is restarting and rejects order requests until it is back. */
|
|
138
|
+
RESTARTING = "restarting",
|
|
139
|
+
/** Cancels and post-only orders are accepted; other orders are rejected. */
|
|
140
|
+
POST_ONLY = "post_only"
|
|
141
|
+
}
|
|
90
142
|
type RequestRejectedErrorOptions = {
|
|
91
143
|
status: number;
|
|
92
144
|
/**
|
|
@@ -99,6 +151,11 @@ type RequestRejectedErrorOptions = {
|
|
|
99
151
|
* provided one.
|
|
100
152
|
*/
|
|
101
153
|
retryAfter?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Trading restriction that caused the rejection, when the response
|
|
156
|
+
* identified one.
|
|
157
|
+
*/
|
|
158
|
+
restriction?: TradingRestriction;
|
|
102
159
|
};
|
|
103
160
|
/**
|
|
104
161
|
* Error thrown when a service responds with a non-success status other than
|
|
@@ -117,6 +174,11 @@ declare class RequestRejectedError extends PolymarketError {
|
|
|
117
174
|
* provided one.
|
|
118
175
|
*/
|
|
119
176
|
readonly retryAfter?: number;
|
|
177
|
+
/**
|
|
178
|
+
* Trading restriction that caused the rejection, when the response
|
|
179
|
+
* identified one.
|
|
180
|
+
*/
|
|
181
|
+
readonly restriction?: TradingRestriction;
|
|
120
182
|
constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
|
|
121
183
|
}
|
|
122
184
|
type RateLimitErrorOptions = {
|
|
@@ -125,6 +187,11 @@ type RateLimitErrorOptions = {
|
|
|
125
187
|
* provided one.
|
|
126
188
|
*/
|
|
127
189
|
retryAfter?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Rate-limit state reported with the rejection, when the response provided
|
|
192
|
+
* it.
|
|
193
|
+
*/
|
|
194
|
+
rateLimit?: RateLimitUpdate;
|
|
128
195
|
};
|
|
129
196
|
/**
|
|
130
197
|
* Error thrown when the service rejects a request because the rate limit has
|
|
@@ -137,6 +204,11 @@ declare class RateLimitError extends PolymarketError {
|
|
|
137
204
|
* provided one.
|
|
138
205
|
*/
|
|
139
206
|
readonly retryAfter?: number;
|
|
207
|
+
/**
|
|
208
|
+
* Rate-limit state reported with the rejection, when the response provided
|
|
209
|
+
* it.
|
|
210
|
+
*/
|
|
211
|
+
readonly rateLimit?: RateLimitUpdate;
|
|
140
212
|
constructor(message: string, options?: ErrorOptions & RateLimitErrorOptions);
|
|
141
213
|
}
|
|
142
214
|
/**
|
|
@@ -261,7 +333,7 @@ declare const FetchExecuteParamsError: {
|
|
|
261
333
|
*/
|
|
262
334
|
declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest): Promise<RelayerExecuteParams>;
|
|
263
335
|
declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
|
|
264
|
-
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
336
|
+
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
|
|
265
337
|
}, z.core.$strip>;
|
|
266
338
|
type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
|
|
267
339
|
declare const IsWalletDeployedRequestSchema: z.ZodObject<{
|
|
@@ -687,17 +759,24 @@ declare const ListClosedPositionsError: {
|
|
|
687
759
|
* ```
|
|
688
760
|
*/
|
|
689
761
|
declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
762
|
+
/**
|
|
763
|
+
* One status or a non-empty ordered list of statuses for filtering combo positions.
|
|
764
|
+
* Pass multiple statuses as an array rather than a comma-separated string.
|
|
765
|
+
*/
|
|
766
|
+
type ComboPositionStatusFilter = ComboPositionStatus | readonly [ComboPositionStatus, ...ComboPositionStatus[]];
|
|
690
767
|
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
691
768
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
692
769
|
user: z.ZodString;
|
|
693
770
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
694
|
-
status: z.ZodOptional<z.ZodEnum<typeof
|
|
771
|
+
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ComboPositionStatus>, z.ZodTuple<[z.ZodEnum<typeof ComboPositionStatus>], z.ZodEnum<typeof ComboPositionStatus>>]>>;
|
|
695
772
|
sort: z.ZodOptional<z.ZodEnum<typeof ComboPositionSort>>;
|
|
696
773
|
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>>>]>>;
|
|
697
774
|
updatedAfter: z.ZodOptional<z.ZodNumber>;
|
|
698
775
|
updatedBefore: z.ZodOptional<z.ZodNumber>;
|
|
699
776
|
}, z.core.$strip>;
|
|
700
|
-
type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema
|
|
777
|
+
type ListComboPositionsRequest = Omit<z.input<typeof ListComboPositionsRequestSchema>, 'status'> & {
|
|
778
|
+
status?: ComboPositionStatusFilter;
|
|
779
|
+
};
|
|
701
780
|
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
702
781
|
declare const ListComboPositionsError: {
|
|
703
782
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -737,6 +816,20 @@ declare const ListComboPositionsError: {
|
|
|
737
816
|
* ```
|
|
738
817
|
*
|
|
739
818
|
* @example
|
|
819
|
+
* Filter to any of several resolved statuses. Pass multiple statuses as an
|
|
820
|
+
* array rather than a comma-separated string:
|
|
821
|
+
* ```ts
|
|
822
|
+
* const result = listComboPositions(client, {
|
|
823
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
824
|
+
* status: [
|
|
825
|
+
* ComboPositionStatus.ResolvedWin,
|
|
826
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
827
|
+
* ComboPositionStatus.ResolvedLoss,
|
|
828
|
+
* ],
|
|
829
|
+
* });
|
|
830
|
+
* ```
|
|
831
|
+
*
|
|
832
|
+
* @example
|
|
740
833
|
* Incrementally sync changed combo positions:
|
|
741
834
|
* ```ts
|
|
742
835
|
* const result = listComboPositions(client, {
|
|
@@ -976,6 +1069,19 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
976
1069
|
*
|
|
977
1070
|
* const firstPage = await paginator.firstPage();
|
|
978
1071
|
* ```
|
|
1072
|
+
*
|
|
1073
|
+
* @example
|
|
1074
|
+
* Filter to any of several resolved statuses:
|
|
1075
|
+
* ```ts
|
|
1076
|
+
* const paginator = client.listComboPositions({
|
|
1077
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1078
|
+
* status: [
|
|
1079
|
+
* ComboPositionStatus.ResolvedWin,
|
|
1080
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
1081
|
+
* ComboPositionStatus.ResolvedLoss,
|
|
1082
|
+
* ],
|
|
1083
|
+
* });
|
|
1084
|
+
* ```
|
|
979
1085
|
*/
|
|
980
1086
|
listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
981
1087
|
/**
|
|
@@ -1113,6 +1219,17 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1113
1219
|
*
|
|
1114
1220
|
* @throws {@link ListComboPositionsError}
|
|
1115
1221
|
* Thrown on failure.
|
|
1222
|
+
*
|
|
1223
|
+
* @example
|
|
1224
|
+
* Filter the authenticated account's positions to multiple statuses:
|
|
1225
|
+
* ```ts
|
|
1226
|
+
* const paginator = client.listComboPositions({
|
|
1227
|
+
* status: [
|
|
1228
|
+
* ComboPositionStatus.ResolvedWin,
|
|
1229
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
1230
|
+
* ],
|
|
1231
|
+
* });
|
|
1232
|
+
* ```
|
|
1116
1233
|
*/
|
|
1117
1234
|
listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
1118
1235
|
/**
|
|
@@ -1198,6 +1315,7 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1198
1315
|
listAccountTrades(request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
|
|
1199
1316
|
/**
|
|
1200
1317
|
* Fetches notifications for the authenticated account.
|
|
1318
|
+
* Notifications of a kind this SDK version does not recognize are omitted.
|
|
1201
1319
|
*
|
|
1202
1320
|
* @throws {@link FetchNotificationsError}
|
|
1203
1321
|
* Thrown on failure.
|
|
@@ -1379,143 +1497,142 @@ type DataActions = {
|
|
|
1379
1497
|
*/
|
|
1380
1498
|
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
|
|
1381
1499
|
/**
|
|
1382
|
-
* Fetches the midpoint price for
|
|
1500
|
+
* Fetches the midpoint price for an exchange asset as a decimal string.
|
|
1383
1501
|
*
|
|
1384
1502
|
* @throws {@link FetchMidpointError}
|
|
1385
1503
|
* Thrown on failure.
|
|
1386
1504
|
*
|
|
1387
1505
|
* @example
|
|
1388
1506
|
* ```ts
|
|
1389
|
-
* const midpoint = await client.fetchMidpoint({
|
|
1507
|
+
* const midpoint = await client.fetchMidpoint({ assetId: '123' });
|
|
1390
1508
|
* ```
|
|
1391
1509
|
*/
|
|
1392
1510
|
fetchMidpoint(request: FetchMidpointRequest): Promise<DecimalString>;
|
|
1393
1511
|
/**
|
|
1394
|
-
* Fetches midpoint prices for multiple
|
|
1512
|
+
* Fetches midpoint prices for multiple exchange assets as an asset ID keyed lookup.
|
|
1395
1513
|
*
|
|
1396
1514
|
* @throws {@link FetchMidpointsError}
|
|
1397
1515
|
* Thrown on failure.
|
|
1398
1516
|
*
|
|
1399
1517
|
* @example
|
|
1400
1518
|
* ```ts
|
|
1401
|
-
* const midpoints = await client.fetchMidpoints([{
|
|
1519
|
+
* const midpoints = await client.fetchMidpoints([{ assetId: '123' }]);
|
|
1402
1520
|
* ```
|
|
1403
1521
|
*/
|
|
1404
1522
|
fetchMidpoints(request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
1405
1523
|
/**
|
|
1406
|
-
* Fetches the current quoted price for
|
|
1524
|
+
* Fetches the current quoted price for an exchange asset and side as a decimal string.
|
|
1407
1525
|
*
|
|
1408
1526
|
* @throws {@link FetchPriceError}
|
|
1409
1527
|
* Thrown on failure.
|
|
1410
1528
|
*
|
|
1411
1529
|
* @example
|
|
1412
1530
|
* ```ts
|
|
1413
|
-
* const price = await client.fetchPrice({
|
|
1531
|
+
* const price = await client.fetchPrice({ assetId: '123', side: OrderSide.BUY });
|
|
1414
1532
|
* ```
|
|
1415
1533
|
*/
|
|
1416
1534
|
fetchPrice(request: FetchPriceRequest): Promise<DecimalString>;
|
|
1417
1535
|
/**
|
|
1418
|
-
* Fetches quoted prices for multiple
|
|
1536
|
+
* Fetches quoted prices for multiple exchange assets as an asset ID keyed lookup.
|
|
1419
1537
|
*
|
|
1420
1538
|
* @throws {@link FetchPricesError}
|
|
1421
1539
|
* Thrown on failure.
|
|
1422
1540
|
*
|
|
1423
1541
|
* @example
|
|
1424
1542
|
* ```ts
|
|
1425
|
-
* const prices = await client.fetchPrices([{
|
|
1543
|
+
* const prices = await client.fetchPrices([{ assetId: '123', side: OrderSide.BUY }]);
|
|
1426
1544
|
* ```
|
|
1427
1545
|
*/
|
|
1428
1546
|
fetchPrices(request: FetchPricesRequest): Promise<Prices>;
|
|
1429
1547
|
/**
|
|
1430
|
-
* Fetches the current order book for
|
|
1548
|
+
* Fetches the current order book for an exchange asset.
|
|
1431
1549
|
*
|
|
1432
1550
|
* @throws {@link FetchOrderBookError}
|
|
1433
1551
|
* Thrown on failure.
|
|
1434
1552
|
*
|
|
1435
1553
|
* @example
|
|
1436
1554
|
* ```ts
|
|
1437
|
-
* const book = await client.fetchOrderBook({
|
|
1555
|
+
* const book = await client.fetchOrderBook({ assetId: '123' });
|
|
1438
1556
|
* ```
|
|
1439
1557
|
*/
|
|
1440
1558
|
fetchOrderBook(request: FetchOrderBookRequest): Promise<OrderBook>;
|
|
1441
1559
|
/**
|
|
1442
|
-
* Fetches order books for multiple
|
|
1560
|
+
* Fetches order books for multiple exchange assets.
|
|
1443
1561
|
*
|
|
1444
1562
|
* @throws {@link FetchOrderBooksError}
|
|
1445
1563
|
* Thrown on failure.
|
|
1446
1564
|
*
|
|
1447
1565
|
* @example
|
|
1448
1566
|
* ```ts
|
|
1449
|
-
* const books = await client.fetchOrderBooks([{
|
|
1567
|
+
* const books = await client.fetchOrderBooks([{ assetId: '123' }]);
|
|
1450
1568
|
* ```
|
|
1451
1569
|
*/
|
|
1452
1570
|
fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
1453
1571
|
/**
|
|
1454
|
-
* Fetches the spread for
|
|
1572
|
+
* Fetches the spread for an exchange asset as a decimal string.
|
|
1455
1573
|
*
|
|
1456
1574
|
* @throws {@link FetchSpreadError}
|
|
1457
1575
|
* Thrown on failure.
|
|
1458
1576
|
*
|
|
1459
1577
|
* @example
|
|
1460
1578
|
* ```ts
|
|
1461
|
-
* const spread = await client.fetchSpread({
|
|
1579
|
+
* const spread = await client.fetchSpread({ assetId: '123' });
|
|
1462
1580
|
* ```
|
|
1463
1581
|
*/
|
|
1464
1582
|
fetchSpread(request: FetchSpreadRequest): Promise<DecimalString>;
|
|
1465
1583
|
/**
|
|
1466
|
-
* Fetches spreads for multiple
|
|
1584
|
+
* Fetches spreads for multiple exchange assets as an asset ID keyed lookup.
|
|
1467
1585
|
*
|
|
1468
1586
|
* @throws {@link FetchSpreadsError}
|
|
1469
1587
|
* Thrown on failure.
|
|
1470
1588
|
*
|
|
1471
1589
|
* @example
|
|
1472
1590
|
* ```ts
|
|
1473
|
-
* const spreads = await client.fetchSpreads([{
|
|
1591
|
+
* const spreads = await client.fetchSpreads([{ assetId: '123' }]);
|
|
1474
1592
|
* ```
|
|
1475
1593
|
*/
|
|
1476
1594
|
fetchSpreads(request: FetchSpreadsRequest): Promise<Spreads>;
|
|
1477
1595
|
/**
|
|
1478
|
-
* Fetches the last traded price for
|
|
1596
|
+
* Fetches the last traded price for an exchange asset.
|
|
1479
1597
|
*
|
|
1480
|
-
* Returns `null` when the
|
|
1598
|
+
* Returns `null` when the asset has not traded.
|
|
1481
1599
|
*
|
|
1482
1600
|
* @throws {@link FetchLastTradePriceError}
|
|
1483
1601
|
* Thrown on failure.
|
|
1484
1602
|
*
|
|
1485
1603
|
* @example
|
|
1486
1604
|
* ```ts
|
|
1487
|
-
* const trade = await client.fetchLastTradePrice({
|
|
1605
|
+
* const trade = await client.fetchLastTradePrice({ assetId: '123' });
|
|
1488
1606
|
*
|
|
1489
1607
|
* // trade === LastTradePrice | null
|
|
1490
1608
|
* ```
|
|
1491
1609
|
*/
|
|
1492
1610
|
fetchLastTradePrice(request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
|
|
1493
1611
|
/**
|
|
1494
|
-
* Fetches last traded prices for multiple
|
|
1612
|
+
* Fetches last traded prices for multiple exchange assets.
|
|
1495
1613
|
*
|
|
1496
|
-
*
|
|
1497
|
-
* `
|
|
1614
|
+
* Assets without trades are omitted from the response. Match returned rows by
|
|
1615
|
+
* `assetId`; the array is not positionally aligned with the request.
|
|
1498
1616
|
*
|
|
1499
1617
|
* @throws {@link FetchLastTradePricesError}
|
|
1500
1618
|
* Thrown on failure.
|
|
1501
1619
|
*
|
|
1502
1620
|
* @example
|
|
1503
1621
|
* ```ts
|
|
1504
|
-
* const
|
|
1505
|
-
* const
|
|
1506
|
-
* const trade = trades.find((candidate) => candidate.tokenId === tokenId);
|
|
1622
|
+
* const trades = await client.fetchLastTradePrices([{ assetId: '123' }]);
|
|
1623
|
+
* const trade = trades.find((candidate) => candidate.assetId === '123');
|
|
1507
1624
|
* ```
|
|
1508
1625
|
*/
|
|
1509
|
-
fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<
|
|
1626
|
+
fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
1510
1627
|
/**
|
|
1511
|
-
* Fetches historical price points for
|
|
1628
|
+
* Fetches historical price points for an exchange asset.
|
|
1512
1629
|
*
|
|
1513
1630
|
* @throws {@link FetchPriceHistoryError}
|
|
1514
1631
|
* Thrown on failure.
|
|
1515
1632
|
*
|
|
1516
1633
|
* @example
|
|
1517
1634
|
* ```ts
|
|
1518
|
-
* const history = await client.fetchPriceHistory({
|
|
1635
|
+
* const history = await client.fetchPriceHistory({ assetId: '123', interval: '1d' });
|
|
1519
1636
|
* ```
|
|
1520
1637
|
*/
|
|
1521
1638
|
fetchPriceHistory(request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
|
|
@@ -1536,6 +1653,15 @@ type DataActions = {
|
|
|
1536
1653
|
* amount: 10,
|
|
1537
1654
|
* });
|
|
1538
1655
|
* ```
|
|
1656
|
+
*
|
|
1657
|
+
* @example Position-backed outcome
|
|
1658
|
+
* ```ts
|
|
1659
|
+
* const price = await client.estimateMarketPrice({
|
|
1660
|
+
* positionId: '456',
|
|
1661
|
+
* side: OrderSide.SELL,
|
|
1662
|
+
* shares: 10,
|
|
1663
|
+
* });
|
|
1664
|
+
* ```
|
|
1539
1665
|
*/
|
|
1540
1666
|
estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
|
|
1541
1667
|
/**
|
|
@@ -2755,9 +2881,9 @@ interface RfqSession extends AsyncIterable<RfqEvent> {
|
|
|
2755
2881
|
*/
|
|
2756
2882
|
close(): Promise<void>;
|
|
2757
2883
|
}
|
|
2758
|
-
type OpenRfqSessionError = ConnectionLostError | TransportError;
|
|
2884
|
+
type OpenRfqSessionError = ConnectionLostError | TransportError | UserInputError;
|
|
2759
2885
|
declare const OpenRfqSessionError: {
|
|
2760
|
-
isError(error: unknown): error is TransportError | ConnectionLostError;
|
|
2886
|
+
isError(error: unknown): error is TransportError | UserInputError | ConnectionLostError;
|
|
2761
2887
|
};
|
|
2762
2888
|
/**
|
|
2763
2889
|
* Opens an RFQ event session.
|
|
@@ -3337,6 +3463,64 @@ type SecureRfqActions = {
|
|
|
3337
3463
|
};
|
|
3338
3464
|
declare function rfqActions(client: BaseSecureClient): SecureRfqActions;
|
|
3339
3465
|
|
|
3466
|
+
type SessionKeyActions = {
|
|
3467
|
+
/**
|
|
3468
|
+
* Authorizes an externally managed signer for selected venues.
|
|
3469
|
+
*
|
|
3470
|
+
* The SDK receives only the public address. The application remains
|
|
3471
|
+
* responsible for generating, storing, and protecting the private key.
|
|
3472
|
+
* When scopes are omitted, authorization defaults to `ALL`.
|
|
3473
|
+
* Requires builder API-key authentication.
|
|
3474
|
+
*
|
|
3475
|
+
* @remarks
|
|
3476
|
+
* Resolves after the submitted transaction is confirmed and the session key
|
|
3477
|
+
* appears in the active session-key list.
|
|
3478
|
+
*
|
|
3479
|
+
* @example
|
|
3480
|
+
* ```ts
|
|
3481
|
+
* const authorization = await client.authorizeSessionKey({
|
|
3482
|
+
* address: sessionAddress,
|
|
3483
|
+
* validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
|
|
3484
|
+
* });
|
|
3485
|
+
* ```
|
|
3486
|
+
*
|
|
3487
|
+
* @throws {@link AuthorizeSessionKeyError}
|
|
3488
|
+
* Thrown on failure.
|
|
3489
|
+
*/
|
|
3490
|
+
authorizeSessionKey(request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
|
|
3491
|
+
/**
|
|
3492
|
+
* Fetches the active session keys authorized for the Deposit Wallet.
|
|
3493
|
+
*
|
|
3494
|
+
* @example
|
|
3495
|
+
* ```ts
|
|
3496
|
+
* const sessionKeys = await client.fetchSessionKeys();
|
|
3497
|
+
* ```
|
|
3498
|
+
*
|
|
3499
|
+
* @throws {@link FetchSessionKeysError}
|
|
3500
|
+
* Thrown on failure.
|
|
3501
|
+
*/
|
|
3502
|
+
fetchSessionKeys(): Promise<SessionKey[]>;
|
|
3503
|
+
/**
|
|
3504
|
+
* Revokes a session key authorized for the Deposit Wallet.
|
|
3505
|
+
*
|
|
3506
|
+
* Revocation may take several minutes while existing activity is canceled and
|
|
3507
|
+
* the on-chain revocation is confirmed.
|
|
3508
|
+
* Requires API-key authentication that supports gasless transactions.
|
|
3509
|
+
*
|
|
3510
|
+
* @example
|
|
3511
|
+
* ```ts
|
|
3512
|
+
* const revocation = await client.revokeSessionKey({
|
|
3513
|
+
* address: sessionAddress,
|
|
3514
|
+
* });
|
|
3515
|
+
* ```
|
|
3516
|
+
*
|
|
3517
|
+
* @throws {@link RevokeSessionKeyError}
|
|
3518
|
+
* Thrown on failure.
|
|
3519
|
+
*/
|
|
3520
|
+
revokeSessionKey(request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
|
|
3521
|
+
};
|
|
3522
|
+
declare function sessionKeyActions(client: BaseSecureClient): SessionKeyActions;
|
|
3523
|
+
|
|
3340
3524
|
type PublicSubscriptionsActions = {
|
|
3341
3525
|
/**
|
|
3342
3526
|
* Starts one or more realtime subscriptions on this client.
|
|
@@ -3347,7 +3531,7 @@ type PublicSubscriptionsActions = {
|
|
|
3347
3531
|
* @example
|
|
3348
3532
|
* ```ts
|
|
3349
3533
|
* const handle = await client.subscribe([
|
|
3350
|
-
* { topic: 'market',
|
|
3534
|
+
* { topic: 'market', assetIds: ['123'] },
|
|
3351
3535
|
* ]);
|
|
3352
3536
|
*
|
|
3353
3537
|
* for await (const event of handle) {
|
|
@@ -3368,7 +3552,7 @@ type SecureSubscriptionsActions = {
|
|
|
3368
3552
|
* ```ts
|
|
3369
3553
|
* const handle = await client.subscribe([
|
|
3370
3554
|
* { topic: 'user' },
|
|
3371
|
-
* { topic: 'market',
|
|
3555
|
+
* { topic: 'market', assetIds: ['123'] },
|
|
3372
3556
|
* ]);
|
|
3373
3557
|
*
|
|
3374
3558
|
* for await (const event of handle) {
|
|
@@ -3387,10 +3571,6 @@ declare const CancelOrderRequestSchema: z.ZodObject<{
|
|
|
3387
3571
|
declare const CancelOrdersRequestSchema: z.ZodObject<{
|
|
3388
3572
|
orderIds: z.ZodArray<z.ZodString>;
|
|
3389
3573
|
}, z.core.$strip>;
|
|
3390
|
-
declare const CancelMarketOrdersRequestSchema: z.ZodObject<{
|
|
3391
|
-
tokenId: z.ZodOptional<z.ZodString>;
|
|
3392
|
-
market: z.ZodOptional<z.ZodString>;
|
|
3393
|
-
}, z.core.$strip>;
|
|
3394
3574
|
type CancelOrderRequest = z.input<typeof CancelOrderRequestSchema>;
|
|
3395
3575
|
type CancelOrderError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3396
3576
|
declare const CancelOrderError: {
|
|
@@ -3460,14 +3640,24 @@ declare const CancelAllError: {
|
|
|
3460
3640
|
* ```
|
|
3461
3641
|
*/
|
|
3462
3642
|
declare function cancelAll(client: BaseSecureClient): Promise<CancelOrdersResponse>;
|
|
3463
|
-
type CancelMarketOrdersRequest =
|
|
3643
|
+
type CancelMarketOrdersRequest = {
|
|
3644
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
3645
|
+
assetId?: string;
|
|
3646
|
+
tokenId?: never;
|
|
3647
|
+
market?: string;
|
|
3648
|
+
} | {
|
|
3649
|
+
assetId?: never;
|
|
3650
|
+
/** @deprecated Use `assetId`. */
|
|
3651
|
+
tokenId?: string;
|
|
3652
|
+
market?: string;
|
|
3653
|
+
};
|
|
3464
3654
|
type CancelMarketOrdersError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3465
3655
|
declare const CancelMarketOrdersError: {
|
|
3466
3656
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3467
3657
|
};
|
|
3468
3658
|
/**
|
|
3469
3659
|
* Cancels all open orders for the authenticated account that match the market
|
|
3470
|
-
* or
|
|
3660
|
+
* or asset filter.
|
|
3471
3661
|
*
|
|
3472
3662
|
* @remarks
|
|
3473
3663
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -3486,9 +3676,20 @@ declare const CancelMarketOrdersError: {
|
|
|
3486
3676
|
*/
|
|
3487
3677
|
declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
|
|
3488
3678
|
|
|
3489
|
-
|
|
3490
|
-
|
|
3679
|
+
/**
|
|
3680
|
+
* Identifies the asset to trade. Provide exactly one identifier.
|
|
3681
|
+
*/
|
|
3682
|
+
type OrderAsset = {
|
|
3683
|
+
/** CTF token identifier. */
|
|
3491
3684
|
tokenId: string;
|
|
3685
|
+
positionId?: never;
|
|
3686
|
+
} | {
|
|
3687
|
+
/** Polymarket V2 position identifier. */
|
|
3688
|
+
positionId: string;
|
|
3689
|
+
tokenId?: never;
|
|
3690
|
+
};
|
|
3691
|
+
|
|
3692
|
+
type EstimateMarketBuyPriceRequest = OrderAsset & {
|
|
3492
3693
|
/** Buy side of the estimate. */
|
|
3493
3694
|
side: OrderSide.BUY;
|
|
3494
3695
|
/** Desired USD buy notional to match against current ask depth. */
|
|
@@ -3500,9 +3701,7 @@ type EstimateMarketBuyPriceRequest = {
|
|
|
3500
3701
|
*/
|
|
3501
3702
|
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3502
3703
|
};
|
|
3503
|
-
type EstimateMarketSellPriceRequest = {
|
|
3504
|
-
/** TokenID of the Conditional token asset to estimate. */
|
|
3505
|
-
tokenId: string;
|
|
3704
|
+
type EstimateMarketSellPriceRequest = OrderAsset & {
|
|
3506
3705
|
/** Sell side of the estimate. */
|
|
3507
3706
|
side: OrderSide.SELL;
|
|
3508
3707
|
/** Number of conditional-token shares to match against current bid depth. */
|
|
@@ -3547,14 +3746,21 @@ declare const EstimateMarketPriceError: {
|
|
|
3547
3746
|
* // price === 0.53
|
|
3548
3747
|
* ```
|
|
3549
3748
|
*
|
|
3749
|
+
* @example Position-backed outcome
|
|
3750
|
+
* ```ts
|
|
3751
|
+
* const price = await estimateMarketPrice(client, {
|
|
3752
|
+
* positionId: '456',
|
|
3753
|
+
* side: OrderSide.SELL,
|
|
3754
|
+
* shares: 10,
|
|
3755
|
+
* });
|
|
3756
|
+
* ```
|
|
3757
|
+
*
|
|
3550
3758
|
* @throws {@link EstimateMarketPriceError}
|
|
3551
3759
|
* Thrown on failure.
|
|
3552
3760
|
*/
|
|
3553
3761
|
declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
|
|
3554
3762
|
|
|
3555
|
-
type BasePrepareMarketOrderRequest = {
|
|
3556
|
-
/** TokenID of the Conditional token asset being traded */
|
|
3557
|
-
tokenId: string;
|
|
3763
|
+
type BasePrepareMarketOrderRequest = OrderAsset & {
|
|
3558
3764
|
/** Optional builder attribution code. */
|
|
3559
3765
|
builderCode?: HexString;
|
|
3560
3766
|
/**
|
|
@@ -3603,7 +3809,7 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
|
|
|
3603
3809
|
/** Sell side of the order. */
|
|
3604
3810
|
side: OrderSide.SELL;
|
|
3605
3811
|
/**
|
|
3606
|
-
* Number of outcome
|
|
3812
|
+
* Number of outcome shares to sell.
|
|
3607
3813
|
*
|
|
3608
3814
|
* This is the human-readable token amount: `1` means one full share, not one
|
|
3609
3815
|
* 6-decimal base unit.
|
|
@@ -3620,13 +3826,11 @@ type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
|
|
|
3620
3826
|
minPrice?: number | string;
|
|
3621
3827
|
};
|
|
3622
3828
|
type PrepareMarketOrderRequest = PrepareMarketBuyOrderRequest | PrepareMarketSellOrderRequest;
|
|
3623
|
-
type PrepareLimitOrderRequest = {
|
|
3624
|
-
/** TokenID of the Conditional token asset being traded */
|
|
3625
|
-
tokenId: string;
|
|
3829
|
+
type PrepareLimitOrderRequest = OrderAsset & {
|
|
3626
3830
|
/** Price used to create the order */
|
|
3627
3831
|
price: number | string;
|
|
3628
3832
|
/**
|
|
3629
|
-
* Order size in outcome
|
|
3833
|
+
* Order size in outcome shares.
|
|
3630
3834
|
*
|
|
3631
3835
|
* This is the human-readable token amount: `1` means one full share, not one
|
|
3632
3836
|
* 6-decimal base unit.
|
|
@@ -3656,19 +3860,7 @@ type PrepareLimitOrderRequest = {
|
|
|
3656
3860
|
*/
|
|
3657
3861
|
expiration?: number;
|
|
3658
3862
|
};
|
|
3659
|
-
type
|
|
3660
|
-
builderCode?: BuilderCode;
|
|
3661
|
-
chainId: number;
|
|
3662
|
-
exchangeAddress: EvmAddress;
|
|
3663
|
-
expiration: number;
|
|
3664
|
-
funderAddress: EvmAddress;
|
|
3665
|
-
offeredAmount: bigint;
|
|
3666
|
-
orderType: OrderType;
|
|
3667
|
-
side: OrderSide;
|
|
3668
|
-
signer: EvmAddress;
|
|
3669
|
-
requestedAmount: bigint;
|
|
3670
|
-
tokenId: TokenId;
|
|
3671
|
-
};
|
|
3863
|
+
type OrderSignature = EvmSignature | Erc1271Signature | SessionSignerSignature;
|
|
3672
3864
|
type SignedOrder = {
|
|
3673
3865
|
builder: HexString;
|
|
3674
3866
|
expiration: number;
|
|
@@ -3682,19 +3874,22 @@ type SignedOrder = {
|
|
|
3682
3874
|
signer: EvmAddress;
|
|
3683
3875
|
takerAmount: string;
|
|
3684
3876
|
timestamp: string;
|
|
3685
|
-
|
|
3686
|
-
|
|
3877
|
+
/**
|
|
3878
|
+
* Asset identifier encoded in the exchange order. The protocol field is
|
|
3879
|
+
* named `tokenId` for both CTF token IDs and Polymarket V2 position IDs.
|
|
3880
|
+
*/
|
|
3881
|
+
tokenId: PositionId | TokenId;
|
|
3882
|
+
signature: OrderSignature;
|
|
3687
3883
|
postOnly?: boolean;
|
|
3688
3884
|
};
|
|
3689
3885
|
type OrderWorkflowRequest = SignOrderRequest;
|
|
3690
3886
|
type OrderWorkflow = AsyncGenerator<OrderWorkflowRequest, SignedOrder, EvmAddress | EvmSignature>;
|
|
3691
3887
|
type OrderPostingWorkflow = AsyncGenerator<OrderWorkflowRequest, OrderResponse, EvmAddress | EvmSignature>;
|
|
3692
3888
|
|
|
3693
|
-
|
|
3694
|
-
type
|
|
3695
|
-
type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
3889
|
+
type PostOrdersRequest = SignedOrder[];
|
|
3890
|
+
type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3696
3891
|
declare const PostOrderError: {
|
|
3697
|
-
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3892
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3698
3893
|
};
|
|
3699
3894
|
type PostOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3700
3895
|
declare const PostOrdersError: {
|
|
@@ -3808,6 +4003,15 @@ type SecureTradingActions = {
|
|
|
3808
4003
|
* tokenId: '123',
|
|
3809
4004
|
* });
|
|
3810
4005
|
* ```
|
|
4006
|
+
*
|
|
4007
|
+
* @example Position-backed market buy
|
|
4008
|
+
* ```ts
|
|
4009
|
+
* const order = await client.createMarketOrder({
|
|
4010
|
+
* amount: 10,
|
|
4011
|
+
* positionId: '456',
|
|
4012
|
+
* side: OrderSide.BUY,
|
|
4013
|
+
* });
|
|
4014
|
+
* ```
|
|
3811
4015
|
*/
|
|
3812
4016
|
createMarketOrder(request: PrepareMarketOrderRequest): Promise<SignedOrder>;
|
|
3813
4017
|
/**
|
|
@@ -3870,7 +4074,7 @@ type SecureTradingActions = {
|
|
|
3870
4074
|
* @throws {@link CreateLimitOrderError}
|
|
3871
4075
|
* Thrown on failure.
|
|
3872
4076
|
*
|
|
3873
|
-
* @example
|
|
4077
|
+
* @example Token-backed limit order
|
|
3874
4078
|
* ```ts
|
|
3875
4079
|
* const order = await client.createLimitOrder({
|
|
3876
4080
|
* postOnly: true,
|
|
@@ -3880,6 +4084,17 @@ type SecureTradingActions = {
|
|
|
3880
4084
|
* tokenId: '123',
|
|
3881
4085
|
* });
|
|
3882
4086
|
* ```
|
|
4087
|
+
*
|
|
4088
|
+
* @example Position-backed limit order
|
|
4089
|
+
* ```ts
|
|
4090
|
+
* const order = await client.createLimitOrder({
|
|
4091
|
+
* postOnly: true,
|
|
4092
|
+
* positionId: '456',
|
|
4093
|
+
* price: 0.52,
|
|
4094
|
+
* side: OrderSide.BUY,
|
|
4095
|
+
* size: 10,
|
|
4096
|
+
* });
|
|
4097
|
+
* ```
|
|
3883
4098
|
*/
|
|
3884
4099
|
createLimitOrder(request: PrepareLimitOrderRequest): Promise<SignedOrder>;
|
|
3885
4100
|
/**
|
|
@@ -4005,7 +4220,7 @@ type SecureTradingActions = {
|
|
|
4005
4220
|
*/
|
|
4006
4221
|
cancelAll(): Promise<CancelOrdersResponse>;
|
|
4007
4222
|
/**
|
|
4008
|
-
* Cancels all open orders for the authenticated account that match the market or
|
|
4223
|
+
* Cancels all open orders for the authenticated account that match the market or asset filter.
|
|
4009
4224
|
*
|
|
4010
4225
|
* @throws {@link CancelMarketOrdersError}
|
|
4011
4226
|
* Thrown on failure.
|
|
@@ -4142,7 +4357,7 @@ type SecureWalletActions = {
|
|
|
4142
4357
|
*/
|
|
4143
4358
|
transferErc20(request: PrepareErc20TransferRequest): Promise<TransactionHandle>;
|
|
4144
4359
|
/**
|
|
4145
|
-
* Splits collateral into
|
|
4360
|
+
* Splits collateral into positions.
|
|
4146
4361
|
*
|
|
4147
4362
|
* @throws {@link SplitPositionError}
|
|
4148
4363
|
* Thrown on failure.
|
|
@@ -4151,8 +4366,7 @@ type SecureWalletActions = {
|
|
|
4151
4366
|
* ```ts
|
|
4152
4367
|
* const handle = await client.splitPosition({
|
|
4153
4368
|
* amount: 1n,
|
|
4154
|
-
* conditionId:
|
|
4155
|
-
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4369
|
+
* conditionId: '0x123…',
|
|
4156
4370
|
* });
|
|
4157
4371
|
*
|
|
4158
4372
|
* const outcome = await handle.wait();
|
|
@@ -4174,7 +4388,7 @@ type SecureWalletActions = {
|
|
|
4174
4388
|
*/
|
|
4175
4389
|
splitPosition(request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
|
|
4176
4390
|
/**
|
|
4177
|
-
* Merges complementary
|
|
4391
|
+
* Merges complementary positions back into collateral.
|
|
4178
4392
|
*
|
|
4179
4393
|
* @throws {@link MergePositionsError}
|
|
4180
4394
|
* Thrown on failure.
|
|
@@ -4183,8 +4397,7 @@ type SecureWalletActions = {
|
|
|
4183
4397
|
* ```ts
|
|
4184
4398
|
* const handle = await client.mergePositions({
|
|
4185
4399
|
* amount: 'max',
|
|
4186
|
-
* conditionId:
|
|
4187
|
-
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4400
|
+
* conditionId: '0x123…',
|
|
4188
4401
|
* });
|
|
4189
4402
|
*
|
|
4190
4403
|
* const outcome = await handle.wait();
|
|
@@ -4206,7 +4419,7 @@ type SecureWalletActions = {
|
|
|
4206
4419
|
*/
|
|
4207
4420
|
mergePositions(request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
|
|
4208
4421
|
/**
|
|
4209
|
-
* Redeems
|
|
4422
|
+
* Redeems held positions for a market or a specific position by ID.
|
|
4210
4423
|
*
|
|
4211
4424
|
* @throws {@link RedeemPositionsError}
|
|
4212
4425
|
* Thrown on failure.
|
|
@@ -4215,8 +4428,7 @@ type SecureWalletActions = {
|
|
|
4215
4428
|
* ```ts
|
|
4216
4429
|
* // Redeem a market by condition ID.
|
|
4217
4430
|
* const handle = await client.redeemPositions({
|
|
4218
|
-
* conditionId:
|
|
4219
|
-
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4431
|
+
* conditionId: '0x123…',
|
|
4220
4432
|
* });
|
|
4221
4433
|
*
|
|
4222
4434
|
* const outcome = await handle.wait();
|
|
@@ -4235,7 +4447,7 @@ type SecureWalletActions = {
|
|
|
4235
4447
|
* // outcome.transactionHash: TxHash
|
|
4236
4448
|
* ```
|
|
4237
4449
|
*
|
|
4238
|
-
* @example Redeem a
|
|
4450
|
+
* @example Redeem a Polymarket V2 position by position ID.
|
|
4239
4451
|
* ```ts
|
|
4240
4452
|
* const handle = await client.redeemPositions({
|
|
4241
4453
|
* positionId: '123',
|
|
@@ -4303,7 +4515,7 @@ type SecureWalletActions = {
|
|
|
4303
4515
|
declare function walletActions(client: BaseSecureClient): SecureWalletActions;
|
|
4304
4516
|
|
|
4305
4517
|
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
|
|
4306
|
-
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
4518
|
+
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SessionKeyActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
4307
4519
|
declare function allActions(client: BasePublicClient): PublicActions;
|
|
4308
4520
|
declare function allActions(client: BaseSecureClient): SecureActions;
|
|
4309
4521
|
|
|
@@ -4346,6 +4558,8 @@ type EnvironmentContracts = {
|
|
|
4346
4558
|
negRiskExchange: EvmAddress;
|
|
4347
4559
|
exchangeV3: EvmAddress;
|
|
4348
4560
|
protocolV2Router: EvmAddress;
|
|
4561
|
+
binaryModule: EvmAddress;
|
|
4562
|
+
negRiskModule: EvmAddress;
|
|
4349
4563
|
combinatorialModule: EvmAddress;
|
|
4350
4564
|
positionManager: EvmAddress;
|
|
4351
4565
|
autoRedeemOperator: EvmAddress;
|
|
@@ -4402,9 +4616,18 @@ type ServiceRequest = {
|
|
|
4402
4616
|
params?: URLSearchParams;
|
|
4403
4617
|
};
|
|
4404
4618
|
|
|
4619
|
+
/** Relationship between the authenticated signer and the active account wallet. */
|
|
4620
|
+
declare enum SignerType {
|
|
4621
|
+
/** Signer owns or deterministically controls the active account wallet. */
|
|
4622
|
+
OWNER = "OWNER",
|
|
4623
|
+
/** Signer uses the Deposit Wallet session-signature path. */
|
|
4624
|
+
SESSION_KEY = "SESSION_KEY"
|
|
4625
|
+
}
|
|
4405
4626
|
type AccountIdentity = {
|
|
4406
4627
|
/** Authenticated EOA that signs API authentication, orders, and wallet operations. */
|
|
4407
4628
|
signer: EvmAddress;
|
|
4629
|
+
/** Relationship between the authenticated signer and the active account wallet. */
|
|
4630
|
+
signerType: SignerType;
|
|
4408
4631
|
/** Active Polymarket account/funder wallet used for balances, positions, and execution. */
|
|
4409
4632
|
wallet: EvmAddress;
|
|
4410
4633
|
/** Wallet classification used for order signatures and transaction routing. */
|
|
@@ -4454,6 +4677,7 @@ type BeginAuthenticationRequest = {
|
|
|
4454
4677
|
type PublicClientConfig = {
|
|
4455
4678
|
environment: EnvironmentConfig;
|
|
4456
4679
|
apiKey?: ApiKeyAuthorization;
|
|
4680
|
+
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
4457
4681
|
};
|
|
4458
4682
|
declare class BasePublicClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> extends AbstractClient<PublicContext> {
|
|
4459
4683
|
#private;
|
|
@@ -4596,6 +4820,17 @@ type PublicClientOptions = {
|
|
|
4596
4820
|
* Optional request authorization applied by the client when needed.
|
|
4597
4821
|
*/
|
|
4598
4822
|
apiKey?: ApiKeyAuthorization;
|
|
4823
|
+
/**
|
|
4824
|
+
* Listener invoked whenever a response reports per-signer rate-limit state,
|
|
4825
|
+
* as order and cancellation responses do.
|
|
4826
|
+
*
|
|
4827
|
+
* @remarks
|
|
4828
|
+
* Use this to monitor remaining rate-limit capacity and warning-mode
|
|
4829
|
+
* signals, and adjust request patterns before requests are rejected.
|
|
4830
|
+
* Errors thrown by the listener and rejections from promises it returns are
|
|
4831
|
+
* ignored.
|
|
4832
|
+
*/
|
|
4833
|
+
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
4599
4834
|
};
|
|
4600
4835
|
type SecureClientOptions = PublicClientOptions & {
|
|
4601
4836
|
/**
|
|
@@ -4676,13 +4911,21 @@ declare const FetchClosedOnlyModeError: {
|
|
|
4676
4911
|
* ```
|
|
4677
4912
|
*/
|
|
4678
4913
|
declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4914
|
+
type ListOpenOrdersRequest = {
|
|
4915
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
4916
|
+
assetId?: string;
|
|
4917
|
+
tokenId?: never;
|
|
4918
|
+
cursor?: string;
|
|
4919
|
+
id?: string;
|
|
4920
|
+
market?: string;
|
|
4921
|
+
} | {
|
|
4922
|
+
assetId?: never;
|
|
4923
|
+
/** @deprecated Use `assetId`. */
|
|
4924
|
+
tokenId?: string;
|
|
4925
|
+
cursor?: string;
|
|
4926
|
+
id?: string;
|
|
4927
|
+
market?: string;
|
|
4928
|
+
};
|
|
4686
4929
|
type ListOpenOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4687
4930
|
declare const ListOpenOrdersError: {
|
|
4688
4931
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -4747,16 +4990,27 @@ declare const FetchOrderError: {
|
|
|
4747
4990
|
* ```
|
|
4748
4991
|
*/
|
|
4749
4992
|
declare function fetchOrder(client: BaseSecureClient, request: FetchOrderRequest): Promise<OpenOrder>;
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4993
|
+
type ListAccountTradesRequest = {
|
|
4994
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
4995
|
+
assetId?: string;
|
|
4996
|
+
tokenId?: never;
|
|
4997
|
+
after?: string;
|
|
4998
|
+
before?: string;
|
|
4999
|
+
cursor?: string;
|
|
5000
|
+
id?: string;
|
|
5001
|
+
makerAddress?: string;
|
|
5002
|
+
market?: string;
|
|
5003
|
+
} | {
|
|
5004
|
+
assetId?: never;
|
|
5005
|
+
/** @deprecated Use `assetId`. */
|
|
5006
|
+
tokenId?: string;
|
|
5007
|
+
after?: string;
|
|
5008
|
+
before?: string;
|
|
5009
|
+
cursor?: string;
|
|
5010
|
+
id?: string;
|
|
5011
|
+
makerAddress?: string;
|
|
5012
|
+
market?: string;
|
|
5013
|
+
};
|
|
4760
5014
|
type ListAccountTradesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4761
5015
|
declare const ListAccountTradesError: {
|
|
4762
5016
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -4807,6 +5061,7 @@ declare const DropNotificationsRequestSchema: z.ZodObject<{
|
|
|
4807
5061
|
type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
|
|
4808
5062
|
/**
|
|
4809
5063
|
* Fetches notifications for the authenticated account.
|
|
5064
|
+
* Notifications of a kind this SDK version does not recognize are omitted.
|
|
4810
5065
|
*
|
|
4811
5066
|
* @remarks
|
|
4812
5067
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4840,11 +5095,17 @@ declare const DropNotificationsError: {
|
|
|
4840
5095
|
* ```
|
|
4841
5096
|
*/
|
|
4842
5097
|
declare function dropNotifications(client: BaseSecureClient, request: DropNotificationsRequest): Promise<void>;
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
5098
|
+
type FetchBalanceAllowanceRequest = {
|
|
5099
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5100
|
+
assetId?: string;
|
|
5101
|
+
tokenId?: never;
|
|
5102
|
+
assetType: AssetType;
|
|
5103
|
+
} | {
|
|
5104
|
+
assetId?: never;
|
|
5105
|
+
/** @deprecated Use `assetId`. */
|
|
5106
|
+
tokenId?: string;
|
|
5107
|
+
assetType: AssetType;
|
|
5108
|
+
};
|
|
4848
5109
|
type FetchBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4849
5110
|
declare const FetchBalanceAllowanceError: {
|
|
4850
5111
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -4866,11 +5127,17 @@ declare const FetchBalanceAllowanceError: {
|
|
|
4866
5127
|
* ```
|
|
4867
5128
|
*/
|
|
4868
5129
|
declare function fetchBalanceAllowance(client: BaseSecureClient, request: FetchBalanceAllowanceRequest): Promise<BalanceAllowanceResponse>;
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
5130
|
+
type UpdateBalanceAllowanceRequest = {
|
|
5131
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5132
|
+
assetId?: string;
|
|
5133
|
+
tokenId?: never;
|
|
5134
|
+
assetType: AssetType;
|
|
5135
|
+
} | {
|
|
5136
|
+
assetId?: never;
|
|
5137
|
+
/** @deprecated Use `assetId`. */
|
|
5138
|
+
tokenId?: string;
|
|
5139
|
+
assetType: AssetType;
|
|
5140
|
+
};
|
|
4874
5141
|
type UpdateBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4875
5142
|
declare const UpdateBalanceAllowanceError: {
|
|
4876
5143
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -5201,16 +5468,27 @@ declare const SetupTradingApprovalsError: {
|
|
|
5201
5468
|
*/
|
|
5202
5469
|
declare function setupTradingApprovals(client: BaseSecureClient): Promise<void>;
|
|
5203
5470
|
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5471
|
+
type ListBuilderTradesRequest = {
|
|
5472
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5473
|
+
assetId?: string;
|
|
5474
|
+
tokenId?: never;
|
|
5475
|
+
after?: string;
|
|
5476
|
+
before?: string;
|
|
5477
|
+
builderCode: string;
|
|
5478
|
+
cursor?: string;
|
|
5479
|
+
id?: string;
|
|
5480
|
+
market?: string;
|
|
5481
|
+
} | {
|
|
5482
|
+
assetId?: never;
|
|
5483
|
+
/** @deprecated Use `assetId`. */
|
|
5484
|
+
tokenId?: string;
|
|
5485
|
+
after?: string;
|
|
5486
|
+
before?: string;
|
|
5487
|
+
builderCode: string;
|
|
5488
|
+
cursor?: string;
|
|
5489
|
+
id?: string;
|
|
5490
|
+
market?: string;
|
|
5491
|
+
};
|
|
5214
5492
|
type ListBuilderTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5215
5493
|
declare const ListBuilderTradesError: {
|
|
5216
5494
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -5249,16 +5527,21 @@ declare const ListBuilderTradesError: {
|
|
|
5249
5527
|
*/
|
|
5250
5528
|
declare function listBuilderTrades(client: BaseClient, request: ListBuilderTradesRequest): Paginated<BuilderTrade[]>;
|
|
5251
5529
|
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5530
|
+
type FetchMidpointRequest = {
|
|
5531
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5532
|
+
assetId: string;
|
|
5533
|
+
tokenId?: never;
|
|
5534
|
+
} | {
|
|
5535
|
+
assetId?: never;
|
|
5536
|
+
/** @deprecated Use `assetId`. */
|
|
5537
|
+
tokenId: string;
|
|
5538
|
+
};
|
|
5256
5539
|
type FetchMidpointError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5257
5540
|
declare const FetchMidpointError: {
|
|
5258
5541
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5259
5542
|
};
|
|
5260
5543
|
/**
|
|
5261
|
-
* Fetches the midpoint price for
|
|
5544
|
+
* Fetches the midpoint price for an exchange asset as a decimal string.
|
|
5262
5545
|
*
|
|
5263
5546
|
* @remarks
|
|
5264
5547
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5269,8 +5552,7 @@ declare const FetchMidpointError: {
|
|
|
5269
5552
|
* @example
|
|
5270
5553
|
* ```ts
|
|
5271
5554
|
* const midpoint = await fetchMidpoint(client, {
|
|
5272
|
-
*
|
|
5273
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5555
|
+
* assetId: '123',
|
|
5274
5556
|
* });
|
|
5275
5557
|
*
|
|
5276
5558
|
* // midpoint === '0.53'
|
|
@@ -5278,16 +5560,21 @@ declare const FetchMidpointError: {
|
|
|
5278
5560
|
*
|
|
5279
5561
|
*/
|
|
5280
5562
|
declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<DecimalString>;
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5563
|
+
type FetchMidpointsRequest = Array<{
|
|
5564
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5565
|
+
assetId: string;
|
|
5566
|
+
tokenId?: never;
|
|
5567
|
+
} | {
|
|
5568
|
+
assetId?: never;
|
|
5569
|
+
/** @deprecated Use `assetId`. */
|
|
5570
|
+
tokenId: string;
|
|
5571
|
+
}>;
|
|
5285
5572
|
type FetchMidpointsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5286
5573
|
declare const FetchMidpointsError: {
|
|
5287
5574
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5288
5575
|
};
|
|
5289
5576
|
/**
|
|
5290
|
-
* Fetches midpoint prices for multiple
|
|
5577
|
+
* Fetches midpoint prices for multiple exchange assets as an asset ID keyed lookup.
|
|
5291
5578
|
*
|
|
5292
5579
|
* @remarks
|
|
5293
5580
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5299,26 +5586,30 @@ declare const FetchMidpointsError: {
|
|
|
5299
5586
|
* ```ts
|
|
5300
5587
|
* const midpoints = await fetchMidpoints(client, [
|
|
5301
5588
|
* {
|
|
5302
|
-
*
|
|
5303
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5589
|
+
* assetId: '123',
|
|
5304
5590
|
* },
|
|
5305
5591
|
* ]);
|
|
5306
5592
|
*
|
|
5307
|
-
* // midpoints[
|
|
5593
|
+
* // midpoints['123'] === '0.53'
|
|
5308
5594
|
* ```
|
|
5309
5595
|
*
|
|
5310
5596
|
*/
|
|
5311
5597
|
declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5598
|
+
type FetchTickSizeRequest = {
|
|
5599
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5600
|
+
assetId: string;
|
|
5601
|
+
tokenId?: never;
|
|
5602
|
+
} | {
|
|
5603
|
+
assetId?: never;
|
|
5604
|
+
/** @deprecated Use `assetId`. */
|
|
5605
|
+
tokenId: string;
|
|
5606
|
+
};
|
|
5316
5607
|
type FetchTickSizeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5317
5608
|
declare const FetchTickSizeError: {
|
|
5318
5609
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5319
5610
|
};
|
|
5320
5611
|
/**
|
|
5321
|
-
* Fetches the minimum price tick size for
|
|
5612
|
+
* Fetches the minimum price tick size for an exchange asset's order book.
|
|
5322
5613
|
*
|
|
5323
5614
|
* @remarks
|
|
5324
5615
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5329,24 +5620,28 @@ declare const FetchTickSizeError: {
|
|
|
5329
5620
|
* @example
|
|
5330
5621
|
* ```ts
|
|
5331
5622
|
* const tickSize = await fetchTickSize(client, {
|
|
5332
|
-
*
|
|
5333
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5623
|
+
* assetId: '123',
|
|
5334
5624
|
* });
|
|
5335
5625
|
*
|
|
5336
5626
|
* // tickSize === 0.01
|
|
5337
5627
|
* ```
|
|
5338
5628
|
*/
|
|
5339
5629
|
declare function fetchTickSize(client: BaseClient, request: FetchTickSizeRequest): Promise<TickSizeValue>;
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5630
|
+
type FetchNegRiskRequest = {
|
|
5631
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5632
|
+
assetId: string;
|
|
5633
|
+
tokenId?: never;
|
|
5634
|
+
} | {
|
|
5635
|
+
assetId?: never;
|
|
5636
|
+
/** @deprecated Use `assetId`. */
|
|
5637
|
+
tokenId: string;
|
|
5638
|
+
};
|
|
5344
5639
|
type FetchNegRiskError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5345
5640
|
declare const FetchNegRiskError: {
|
|
5346
5641
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5347
5642
|
};
|
|
5348
5643
|
/**
|
|
5349
|
-
* Fetches whether
|
|
5644
|
+
* Fetches whether an exchange asset is in a negative-risk market.
|
|
5350
5645
|
*
|
|
5351
5646
|
* @remarks
|
|
5352
5647
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5357,24 +5652,28 @@ declare const FetchNegRiskError: {
|
|
|
5357
5652
|
* @example
|
|
5358
5653
|
* ```ts
|
|
5359
5654
|
* const negRisk = await fetchNegRisk(client, {
|
|
5360
|
-
*
|
|
5361
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5655
|
+
* assetId: '123',
|
|
5362
5656
|
* });
|
|
5363
5657
|
*
|
|
5364
5658
|
* // negRisk === false
|
|
5365
5659
|
* ```
|
|
5366
5660
|
*/
|
|
5367
5661
|
declare function fetchNegRisk(client: BaseClient, request: FetchNegRiskRequest): Promise<boolean>;
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5662
|
+
type ResolveConditionByTokenRequest = {
|
|
5663
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5664
|
+
assetId: string;
|
|
5665
|
+
tokenId?: never;
|
|
5666
|
+
} | {
|
|
5667
|
+
assetId?: never;
|
|
5668
|
+
/** @deprecated Use `assetId`. */
|
|
5669
|
+
tokenId: string;
|
|
5670
|
+
};
|
|
5372
5671
|
type ResolveConditionByTokenError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5373
5672
|
declare const ResolveConditionByTokenError: {
|
|
5374
5673
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5375
5674
|
};
|
|
5376
5675
|
/**
|
|
5377
|
-
* Resolves the condition ID for
|
|
5676
|
+
* Resolves the condition ID for an exchange asset.
|
|
5378
5677
|
*
|
|
5379
5678
|
* @remarks
|
|
5380
5679
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5419,17 +5718,23 @@ declare const FetchBuilderFeeRatesError: {
|
|
|
5419
5718
|
* Thrown on failure.
|
|
5420
5719
|
*/
|
|
5421
5720
|
declare function fetchBuilderFeeRates(client: BaseClient, request: FetchBuilderFeeRatesRequest): Promise<BuilderFeeRates>;
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5721
|
+
type FetchPriceRequest = {
|
|
5722
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5723
|
+
assetId: string;
|
|
5724
|
+
tokenId?: never;
|
|
5725
|
+
side: OrderSide;
|
|
5726
|
+
} | {
|
|
5727
|
+
assetId?: never;
|
|
5728
|
+
/** @deprecated Use `assetId`. */
|
|
5729
|
+
tokenId: string;
|
|
5730
|
+
side: OrderSide;
|
|
5731
|
+
};
|
|
5427
5732
|
type FetchPriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5428
5733
|
declare const FetchPriceError: {
|
|
5429
5734
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5430
5735
|
};
|
|
5431
5736
|
/**
|
|
5432
|
-
* Fetches the current quoted price for
|
|
5737
|
+
* Fetches the current quoted price for an exchange asset and side as a decimal string.
|
|
5433
5738
|
*
|
|
5434
5739
|
* @remarks
|
|
5435
5740
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5440,8 +5745,7 @@ declare const FetchPriceError: {
|
|
|
5440
5745
|
* @example
|
|
5441
5746
|
* ```ts
|
|
5442
5747
|
* const price = await fetchPrice(client, {
|
|
5443
|
-
*
|
|
5444
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5748
|
+
* assetId: '123',
|
|
5445
5749
|
* side: OrderSide.BUY,
|
|
5446
5750
|
* });
|
|
5447
5751
|
*
|
|
@@ -5450,17 +5754,23 @@ declare const FetchPriceError: {
|
|
|
5450
5754
|
*
|
|
5451
5755
|
*/
|
|
5452
5756
|
declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<DecimalString>;
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5757
|
+
type FetchPricesRequest = Array<{
|
|
5758
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5759
|
+
assetId: string;
|
|
5760
|
+
tokenId?: never;
|
|
5761
|
+
side: OrderSide;
|
|
5762
|
+
} | {
|
|
5763
|
+
assetId?: never;
|
|
5764
|
+
/** @deprecated Use `assetId`. */
|
|
5765
|
+
tokenId: string;
|
|
5766
|
+
side: OrderSide;
|
|
5767
|
+
}>;
|
|
5458
5768
|
type FetchPricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5459
5769
|
declare const FetchPricesError: {
|
|
5460
5770
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5461
5771
|
};
|
|
5462
5772
|
/**
|
|
5463
|
-
* Fetches quoted prices for multiple
|
|
5773
|
+
* Fetches quoted prices for multiple exchange assets as an asset ID keyed lookup.
|
|
5464
5774
|
*
|
|
5465
5775
|
* @remarks
|
|
5466
5776
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5472,27 +5782,31 @@ declare const FetchPricesError: {
|
|
|
5472
5782
|
* ```ts
|
|
5473
5783
|
* const prices = await fetchPrices(client, [
|
|
5474
5784
|
* {
|
|
5475
|
-
*
|
|
5476
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5785
|
+
* assetId: '123',
|
|
5477
5786
|
* side: OrderSide.BUY,
|
|
5478
5787
|
* },
|
|
5479
5788
|
* ]);
|
|
5480
5789
|
*
|
|
5481
|
-
* // prices[
|
|
5790
|
+
* // prices['123']?.BUY === '0.52'
|
|
5482
5791
|
* ```
|
|
5483
5792
|
*
|
|
5484
5793
|
*/
|
|
5485
5794
|
declare function fetchPrices(client: BaseClient, request: FetchPricesRequest): Promise<Prices>;
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5795
|
+
type FetchOrderBookRequest = {
|
|
5796
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5797
|
+
assetId: string;
|
|
5798
|
+
tokenId?: never;
|
|
5799
|
+
} | {
|
|
5800
|
+
assetId?: never;
|
|
5801
|
+
/** @deprecated Use `assetId`. */
|
|
5802
|
+
tokenId: string;
|
|
5803
|
+
};
|
|
5490
5804
|
type FetchOrderBookError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5491
5805
|
declare const FetchOrderBookError: {
|
|
5492
5806
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5493
5807
|
};
|
|
5494
5808
|
/**
|
|
5495
|
-
* Fetches the current order book for
|
|
5809
|
+
* Fetches the current order book for an exchange asset.
|
|
5496
5810
|
*
|
|
5497
5811
|
* @remarks
|
|
5498
5812
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5503,24 +5817,28 @@ declare const FetchOrderBookError: {
|
|
|
5503
5817
|
* @example
|
|
5504
5818
|
* ```ts
|
|
5505
5819
|
* const orderBook = await fetchOrderBook(client, {
|
|
5506
|
-
*
|
|
5507
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5820
|
+
* assetId: '123',
|
|
5508
5821
|
* });
|
|
5509
5822
|
*
|
|
5510
5823
|
* // orderBook.bids / orderBook.asks
|
|
5511
5824
|
* ```
|
|
5512
5825
|
*/
|
|
5513
5826
|
declare function fetchOrderBook(client: BaseClient, request: FetchOrderBookRequest): Promise<OrderBook>;
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5827
|
+
type FetchOrderBooksRequest = Array<{
|
|
5828
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5829
|
+
assetId: string;
|
|
5830
|
+
tokenId?: never;
|
|
5831
|
+
} | {
|
|
5832
|
+
assetId?: never;
|
|
5833
|
+
/** @deprecated Use `assetId`. */
|
|
5834
|
+
tokenId: string;
|
|
5835
|
+
}>;
|
|
5518
5836
|
type FetchOrderBooksError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5519
5837
|
declare const FetchOrderBooksError: {
|
|
5520
5838
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5521
5839
|
};
|
|
5522
5840
|
/**
|
|
5523
|
-
* Fetches order books for multiple
|
|
5841
|
+
* Fetches order books for multiple exchange assets.
|
|
5524
5842
|
*
|
|
5525
5843
|
* @remarks
|
|
5526
5844
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5532,8 +5850,7 @@ declare const FetchOrderBooksError: {
|
|
|
5532
5850
|
* ```ts
|
|
5533
5851
|
* const books = await fetchOrderBooks(client, [
|
|
5534
5852
|
* {
|
|
5535
|
-
*
|
|
5536
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5853
|
+
* assetId: '123',
|
|
5537
5854
|
* },
|
|
5538
5855
|
* ])
|
|
5539
5856
|
*
|
|
@@ -5541,16 +5858,21 @@ declare const FetchOrderBooksError: {
|
|
|
5541
5858
|
* ```
|
|
5542
5859
|
*/
|
|
5543
5860
|
declare function fetchOrderBooks(client: BaseClient, request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5861
|
+
type FetchSpreadRequest = {
|
|
5862
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5863
|
+
assetId: string;
|
|
5864
|
+
tokenId?: never;
|
|
5865
|
+
} | {
|
|
5866
|
+
assetId?: never;
|
|
5867
|
+
/** @deprecated Use `assetId`. */
|
|
5868
|
+
tokenId: string;
|
|
5869
|
+
};
|
|
5548
5870
|
type FetchSpreadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5549
5871
|
declare const FetchSpreadError: {
|
|
5550
5872
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5551
5873
|
};
|
|
5552
5874
|
/**
|
|
5553
|
-
* Fetches the spread for
|
|
5875
|
+
* Fetches the spread for an exchange asset as a decimal string.
|
|
5554
5876
|
*
|
|
5555
5877
|
* @remarks
|
|
5556
5878
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5561,8 +5883,7 @@ declare const FetchSpreadError: {
|
|
|
5561
5883
|
* @example
|
|
5562
5884
|
* ```ts
|
|
5563
5885
|
* const spread = await fetchSpread(client, {
|
|
5564
|
-
*
|
|
5565
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5886
|
+
* assetId: '123',
|
|
5566
5887
|
* });
|
|
5567
5888
|
*
|
|
5568
5889
|
* // spread === '0.02'
|
|
@@ -5570,16 +5891,21 @@ declare const FetchSpreadError: {
|
|
|
5570
5891
|
*
|
|
5571
5892
|
*/
|
|
5572
5893
|
declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<DecimalString>;
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5894
|
+
type FetchSpreadsRequest = Array<{
|
|
5895
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5896
|
+
assetId: string;
|
|
5897
|
+
tokenId?: never;
|
|
5898
|
+
} | {
|
|
5899
|
+
assetId?: never;
|
|
5900
|
+
/** @deprecated Use `assetId`. */
|
|
5901
|
+
tokenId: string;
|
|
5902
|
+
}>;
|
|
5577
5903
|
type FetchSpreadsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5578
5904
|
declare const FetchSpreadsError: {
|
|
5579
5905
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5580
5906
|
};
|
|
5581
5907
|
/**
|
|
5582
|
-
* Fetches spreads for multiple
|
|
5908
|
+
* Fetches spreads for multiple exchange assets as an asset ID keyed lookup.
|
|
5583
5909
|
*
|
|
5584
5910
|
* @remarks
|
|
5585
5911
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5591,28 +5917,32 @@ declare const FetchSpreadsError: {
|
|
|
5591
5917
|
* ```ts
|
|
5592
5918
|
* const spreads = await fetchSpreads(client, [
|
|
5593
5919
|
* {
|
|
5594
|
-
*
|
|
5595
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5920
|
+
* assetId: '123',
|
|
5596
5921
|
* },
|
|
5597
5922
|
* ]);
|
|
5598
5923
|
*
|
|
5599
|
-
* // spreads[
|
|
5924
|
+
* // spreads['123'] === '0.02'
|
|
5600
5925
|
* ```
|
|
5601
5926
|
*
|
|
5602
5927
|
*/
|
|
5603
5928
|
declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Spreads>;
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5929
|
+
type FetchLastTradePriceRequest = {
|
|
5930
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5931
|
+
assetId: string;
|
|
5932
|
+
tokenId?: never;
|
|
5933
|
+
} | {
|
|
5934
|
+
assetId?: never;
|
|
5935
|
+
/** @deprecated Use `assetId`. */
|
|
5936
|
+
tokenId: string;
|
|
5937
|
+
};
|
|
5608
5938
|
type FetchLastTradePriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5609
5939
|
declare const FetchLastTradePriceError: {
|
|
5610
5940
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5611
5941
|
};
|
|
5612
5942
|
/**
|
|
5613
|
-
* Fetches the last traded price for
|
|
5943
|
+
* Fetches the last traded price for an exchange asset.
|
|
5614
5944
|
*
|
|
5615
|
-
* Returns `null` when the
|
|
5945
|
+
* Returns `null` when the asset has not traded.
|
|
5616
5946
|
*
|
|
5617
5947
|
* @remarks
|
|
5618
5948
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5623,8 +5953,7 @@ declare const FetchLastTradePriceError: {
|
|
|
5623
5953
|
* @example
|
|
5624
5954
|
* ```ts
|
|
5625
5955
|
* const trade = await fetchLastTradePrice(client, {
|
|
5626
|
-
*
|
|
5627
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
5956
|
+
* assetId: '123',
|
|
5628
5957
|
* });
|
|
5629
5958
|
*
|
|
5630
5959
|
* // trade === LastTradePrice | null
|
|
@@ -5632,19 +5961,24 @@ declare const FetchLastTradePriceError: {
|
|
|
5632
5961
|
*
|
|
5633
5962
|
*/
|
|
5634
5963
|
declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5964
|
+
type FetchLastTradePricesRequest = Array<{
|
|
5965
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
5966
|
+
assetId: string;
|
|
5967
|
+
tokenId?: never;
|
|
5968
|
+
} | {
|
|
5969
|
+
assetId?: never;
|
|
5970
|
+
/** @deprecated Use `assetId`. */
|
|
5971
|
+
tokenId: string;
|
|
5972
|
+
}>;
|
|
5639
5973
|
type FetchLastTradePricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5640
5974
|
declare const FetchLastTradePricesError: {
|
|
5641
5975
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5642
5976
|
};
|
|
5643
5977
|
/**
|
|
5644
|
-
* Fetches last traded prices for multiple
|
|
5978
|
+
* Fetches last traded prices for multiple exchange assets.
|
|
5645
5979
|
*
|
|
5646
|
-
*
|
|
5647
|
-
* `
|
|
5980
|
+
* Assets without trades are omitted from the response. Match returned rows by
|
|
5981
|
+
* `assetId`; the array is not positionally aligned with the request.
|
|
5648
5982
|
*
|
|
5649
5983
|
* @remarks
|
|
5650
5984
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5654,29 +5988,36 @@ declare const FetchLastTradePricesError: {
|
|
|
5654
5988
|
*
|
|
5655
5989
|
* @example
|
|
5656
5990
|
* ```ts
|
|
5657
|
-
* const
|
|
5658
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426';
|
|
5659
|
-
* const trades = await fetchLastTradePrices(client, [{ tokenId }]);
|
|
5991
|
+
* const trades = await fetchLastTradePrices(client, [{ assetId: '123' }]);
|
|
5660
5992
|
*
|
|
5661
|
-
* const trade = trades.find((candidate) => candidate.
|
|
5993
|
+
* const trade = trades.find((candidate) => candidate.assetId === '123');
|
|
5662
5994
|
* ```
|
|
5663
5995
|
*
|
|
5664
5996
|
*/
|
|
5665
|
-
declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest): Promise<
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5997
|
+
declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
5998
|
+
type FetchPriceHistoryRequest = {
|
|
5999
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
6000
|
+
assetId: string;
|
|
6001
|
+
tokenId?: never;
|
|
6002
|
+
startTs?: number;
|
|
6003
|
+
endTs?: number;
|
|
6004
|
+
fidelity?: number;
|
|
6005
|
+
interval?: PriceHistoryInterval;
|
|
6006
|
+
} | {
|
|
6007
|
+
assetId?: never;
|
|
6008
|
+
/** @deprecated Use `assetId`. */
|
|
6009
|
+
tokenId: string;
|
|
6010
|
+
startTs?: number;
|
|
6011
|
+
endTs?: number;
|
|
6012
|
+
fidelity?: number;
|
|
6013
|
+
interval?: PriceHistoryInterval;
|
|
6014
|
+
};
|
|
5674
6015
|
type FetchPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5675
6016
|
declare const FetchPriceHistoryError: {
|
|
5676
6017
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5677
6018
|
};
|
|
5678
6019
|
/**
|
|
5679
|
-
* Fetches historical price points for
|
|
6020
|
+
* Fetches historical price points for an exchange asset.
|
|
5680
6021
|
*
|
|
5681
6022
|
* @remarks
|
|
5682
6023
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -5687,8 +6028,7 @@ declare const FetchPriceHistoryError: {
|
|
|
5687
6028
|
* @example
|
|
5688
6029
|
* ```ts
|
|
5689
6030
|
* const history = await fetchPriceHistory(client, {
|
|
5690
|
-
*
|
|
5691
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
6031
|
+
* assetId: '123',
|
|
5692
6032
|
* interval: PriceHistoryInterval.ONE_DAY,
|
|
5693
6033
|
* fidelity: 60,
|
|
5694
6034
|
* });
|
|
@@ -6196,18 +6536,18 @@ declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
6196
6536
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6197
6537
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6198
6538
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6539
|
+
ALL: "ALL";
|
|
6199
6540
|
DAY: "DAY";
|
|
6200
6541
|
WEEK: "WEEK";
|
|
6201
6542
|
MONTH: "MONTH";
|
|
6202
|
-
ALL: "ALL";
|
|
6203
6543
|
}>>;
|
|
6204
6544
|
}, z.core.$strip>;
|
|
6205
6545
|
declare const ListBuilderVolumeRequestSchema: z.ZodObject<{
|
|
6206
6546
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6547
|
+
ALL: "ALL";
|
|
6207
6548
|
DAY: "DAY";
|
|
6208
6549
|
WEEK: "WEEK";
|
|
6209
6550
|
MONTH: "MONTH";
|
|
6210
|
-
ALL: "ALL";
|
|
6211
6551
|
}>>;
|
|
6212
6552
|
}, z.core.$strip>;
|
|
6213
6553
|
declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
@@ -6226,10 +6566,10 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
6226
6566
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6227
6567
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6228
6568
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6569
|
+
ALL: "ALL";
|
|
6229
6570
|
DAY: "DAY";
|
|
6230
6571
|
WEEK: "WEEK";
|
|
6231
6572
|
MONTH: "MONTH";
|
|
6232
|
-
ALL: "ALL";
|
|
6233
6573
|
}>>;
|
|
6234
6574
|
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
6235
6575
|
PNL: "PNL";
|
|
@@ -8254,8 +8594,18 @@ declare function depositToPerps(client: BaseSecureClient, request: DepositToPerp
|
|
|
8254
8594
|
*/
|
|
8255
8595
|
declare function withdrawFromPerps(client: BaseSecureClient, request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
|
|
8256
8596
|
|
|
8597
|
+
type SplitPositionWorkflowRequest = GaslessWorkflowRequest | SendSplitPositionTransactionRequest;
|
|
8598
|
+
type SplitPositionWorkflow = AsyncGenerator<SplitPositionWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8599
|
+
type PrepareSplitPositionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8600
|
+
declare const PrepareSplitPositionError: {
|
|
8601
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8602
|
+
};
|
|
8257
8603
|
/**
|
|
8258
8604
|
* Parameters for preparing a market position split.
|
|
8605
|
+
*
|
|
8606
|
+
* @remarks
|
|
8607
|
+
* The condition ID may identify either a CTF or Polymarket V2 market. The SDK
|
|
8608
|
+
* resolves the protocol internally.
|
|
8259
8609
|
*/
|
|
8260
8610
|
type PrepareSplitMarketPositionRequest = {
|
|
8261
8611
|
/** Amount of collateral to convert into market positions. */
|
|
@@ -8265,66 +8615,12 @@ type PrepareSplitMarketPositionRequest = {
|
|
|
8265
8615
|
/** Optional transaction metadata for workflows that support metadata. */
|
|
8266
8616
|
metadata?: string;
|
|
8267
8617
|
};
|
|
8268
|
-
/**
|
|
8269
|
-
* Parameters for preparing a combo position split.
|
|
8270
|
-
*/
|
|
8271
|
-
type PrepareSplitComboPositionRequest = {
|
|
8272
|
-
/** Amount of collateral to convert into combo positions. */
|
|
8273
|
-
amount: bigint;
|
|
8274
|
-
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
8275
|
-
legs: string[] | PositionId[];
|
|
8276
|
-
/** Optional transaction metadata for workflows that support metadata. */
|
|
8277
|
-
metadata?: string;
|
|
8278
|
-
};
|
|
8279
|
-
/**
|
|
8280
|
-
* Parameters for preparing either supported position split workflow.
|
|
8281
|
-
*
|
|
8282
|
-
* @remarks
|
|
8283
|
-
* Provide either a market `conditionId` or combo `legs`.
|
|
8284
|
-
*/
|
|
8285
|
-
type PrepareSplitPositionRequest = PrepareSplitMarketPositionRequest | PrepareSplitComboPositionRequest;
|
|
8286
|
-
type SplitPositionWorkflowRequest = GaslessWorkflowRequest | SendSplitPositionTransactionRequest;
|
|
8287
|
-
type MergePositionsWorkflowRequest = GaslessWorkflowRequest | SendMergePositionsTransactionRequest;
|
|
8288
|
-
type RedeemPositionsWorkflowRequest = GaslessWorkflowRequest | SendRedeemPositionsTransactionRequest;
|
|
8289
|
-
type SplitPositionWorkflow = AsyncGenerator<SplitPositionWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8290
|
-
type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8291
|
-
type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8292
|
-
type PrepareSplitPositionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8293
|
-
declare const PrepareSplitPositionError: {
|
|
8294
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8295
|
-
};
|
|
8618
|
+
/** @deprecated Use {@link PrepareSplitPositionError}. */
|
|
8296
8619
|
type PrepareSplitMarketPositionError = PrepareSplitPositionError;
|
|
8620
|
+
/** @deprecated Use {@link PrepareSplitPositionError}. */
|
|
8297
8621
|
declare const PrepareSplitMarketPositionError: {
|
|
8298
8622
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8299
8623
|
};
|
|
8300
|
-
type PrepareSplitComboPositionError = PrepareSplitPositionError;
|
|
8301
|
-
declare const PrepareSplitComboPositionError: {
|
|
8302
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8303
|
-
};
|
|
8304
|
-
type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8305
|
-
declare const PrepareMergePositionsError: {
|
|
8306
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8307
|
-
};
|
|
8308
|
-
type PrepareMergeMarketPositionError = PrepareMergePositionsError;
|
|
8309
|
-
declare const PrepareMergeMarketPositionError: {
|
|
8310
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8311
|
-
};
|
|
8312
|
-
type PrepareMergeComboPositionError = PrepareMergePositionsError;
|
|
8313
|
-
declare const PrepareMergeComboPositionError: {
|
|
8314
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8315
|
-
};
|
|
8316
|
-
type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8317
|
-
declare const PrepareRedeemPositionsError: {
|
|
8318
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8319
|
-
};
|
|
8320
|
-
type PrepareRedeemMarketPositionsError = PrepareRedeemPositionsError;
|
|
8321
|
-
declare const PrepareRedeemMarketPositionsError: {
|
|
8322
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8323
|
-
};
|
|
8324
|
-
type PrepareRedeemComboPositionError = PrepareRedeemPositionsError;
|
|
8325
|
-
declare const PrepareRedeemComboPositionError: {
|
|
8326
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8327
|
-
};
|
|
8328
8624
|
/**
|
|
8329
8625
|
* Starts a split workflow for a market condition.
|
|
8330
8626
|
*
|
|
@@ -8340,10 +8636,27 @@ declare const PrepareRedeemComboPositionError: {
|
|
|
8340
8636
|
* });
|
|
8341
8637
|
* ```
|
|
8342
8638
|
*
|
|
8343
|
-
* @throws {@link
|
|
8639
|
+
* @throws {@link PrepareSplitPositionError}
|
|
8344
8640
|
* Thrown on failure.
|
|
8345
8641
|
*/
|
|
8346
8642
|
declare function prepareSplitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<SplitPositionWorkflow>;
|
|
8643
|
+
/**
|
|
8644
|
+
* Parameters for preparing a combo position split.
|
|
8645
|
+
*/
|
|
8646
|
+
type PrepareSplitComboPositionRequest = {
|
|
8647
|
+
/** Amount of collateral to convert into combo positions. */
|
|
8648
|
+
amount: bigint;
|
|
8649
|
+
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
8650
|
+
legs: string[] | PositionId[];
|
|
8651
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
8652
|
+
metadata?: string;
|
|
8653
|
+
};
|
|
8654
|
+
/** @deprecated Use {@link PrepareSplitPositionError}. */
|
|
8655
|
+
type PrepareSplitComboPositionError = PrepareSplitPositionError;
|
|
8656
|
+
/** @deprecated Use {@link PrepareSplitPositionError}. */
|
|
8657
|
+
declare const PrepareSplitComboPositionError: {
|
|
8658
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8659
|
+
};
|
|
8347
8660
|
/**
|
|
8348
8661
|
* Starts a split workflow for a combo position from leg position IDs.
|
|
8349
8662
|
*
|
|
@@ -8358,12 +8671,20 @@ declare function prepareSplitMarketPosition(client: BaseSecureClient, request: P
|
|
|
8358
8671
|
* });
|
|
8359
8672
|
* ```
|
|
8360
8673
|
*
|
|
8361
|
-
* @throws {@link
|
|
8674
|
+
* @throws {@link PrepareSplitPositionError}
|
|
8362
8675
|
* Thrown on failure.
|
|
8363
8676
|
*/
|
|
8364
8677
|
declare function prepareSplitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<SplitPositionWorkflow>;
|
|
8365
8678
|
/**
|
|
8366
|
-
*
|
|
8679
|
+
* Parameters for preparing a position split.
|
|
8680
|
+
*
|
|
8681
|
+
* @remarks
|
|
8682
|
+
* Provide `conditionId` for an existing market condition or `legs` to derive a
|
|
8683
|
+
* Combo condition.
|
|
8684
|
+
*/
|
|
8685
|
+
type PrepareSplitPositionRequest = PrepareSplitMarketPositionRequest | PrepareSplitComboPositionRequest;
|
|
8686
|
+
/**
|
|
8687
|
+
* Starts a position split workflow.
|
|
8367
8688
|
*
|
|
8368
8689
|
* @throws {@link PrepareSplitPositionError}
|
|
8369
8690
|
* Thrown on failure.
|
|
@@ -8373,43 +8694,57 @@ type SplitPositionError = CancelledSigningError | RateLimitError | RequestReject
|
|
|
8373
8694
|
declare const SplitPositionError: {
|
|
8374
8695
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8375
8696
|
};
|
|
8697
|
+
/** @deprecated Use {@link SplitPositionError}. */
|
|
8376
8698
|
type SplitMarketPositionError = SplitPositionError;
|
|
8699
|
+
/** @deprecated Use {@link SplitPositionError}. */
|
|
8377
8700
|
declare const SplitMarketPositionError: {
|
|
8378
8701
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8379
8702
|
};
|
|
8380
|
-
type SplitComboPositionError = SplitPositionError;
|
|
8381
|
-
declare const SplitComboPositionError: {
|
|
8382
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8383
|
-
};
|
|
8384
8703
|
/**
|
|
8385
8704
|
* Splits collateral into market positions.
|
|
8386
8705
|
*
|
|
8387
8706
|
* @remarks
|
|
8388
8707
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8389
8708
|
*
|
|
8390
|
-
* @throws {@link
|
|
8709
|
+
* @throws {@link SplitPositionError}
|
|
8391
8710
|
* Thrown on failure.
|
|
8392
8711
|
*/
|
|
8393
8712
|
declare function splitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<TransactionHandle>;
|
|
8713
|
+
/** @deprecated Use {@link SplitPositionError}. */
|
|
8714
|
+
type SplitComboPositionError = SplitPositionError;
|
|
8715
|
+
/** @deprecated Use {@link SplitPositionError}. */
|
|
8716
|
+
declare const SplitComboPositionError: {
|
|
8717
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8718
|
+
};
|
|
8394
8719
|
/**
|
|
8395
8720
|
* Splits collateral into combo positions from leg position IDs.
|
|
8396
8721
|
*
|
|
8397
8722
|
* @remarks
|
|
8398
8723
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8399
8724
|
*
|
|
8400
|
-
* @throws {@link
|
|
8725
|
+
* @throws {@link SplitPositionError}
|
|
8401
8726
|
* Thrown on failure.
|
|
8402
8727
|
*/
|
|
8403
8728
|
declare function splitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<TransactionHandle>;
|
|
8404
8729
|
/**
|
|
8405
|
-
* Splits collateral into
|
|
8730
|
+
* Splits collateral into positions.
|
|
8406
8731
|
*
|
|
8407
8732
|
* @throws {@link SplitPositionError}
|
|
8408
8733
|
* Thrown on failure.
|
|
8409
8734
|
*/
|
|
8410
8735
|
declare function splitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
|
|
8736
|
+
type MergePositionsWorkflowRequest = GaslessWorkflowRequest | SendMergePositionsTransactionRequest;
|
|
8737
|
+
type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8738
|
+
type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8739
|
+
declare const PrepareMergePositionsError: {
|
|
8740
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8741
|
+
};
|
|
8411
8742
|
/**
|
|
8412
8743
|
* Parameters for preparing a market position merge.
|
|
8744
|
+
*
|
|
8745
|
+
* @remarks
|
|
8746
|
+
* The condition ID may identify either a CTF or Polymarket V2 market. The SDK
|
|
8747
|
+
* resolves the protocol internally.
|
|
8413
8748
|
*/
|
|
8414
8749
|
type PrepareMergeMarketPositionRequest = {
|
|
8415
8750
|
/** Amount per complementary market position to merge. */
|
|
@@ -8419,24 +8754,12 @@ type PrepareMergeMarketPositionRequest = {
|
|
|
8419
8754
|
/** Optional transaction metadata for workflows that support metadata. */
|
|
8420
8755
|
metadata?: string;
|
|
8421
8756
|
};
|
|
8422
|
-
/**
|
|
8423
|
-
|
|
8424
|
-
*/
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
amount: bigint | 'max';
|
|
8428
|
-
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
8429
|
-
legs: string[] | PositionId[];
|
|
8430
|
-
/** Optional transaction metadata for workflows that support metadata. */
|
|
8431
|
-
metadata?: string;
|
|
8757
|
+
/** @deprecated Use {@link PrepareMergePositionsError}. */
|
|
8758
|
+
type PrepareMergeMarketPositionError = PrepareMergePositionsError;
|
|
8759
|
+
/** @deprecated Use {@link PrepareMergePositionsError}. */
|
|
8760
|
+
declare const PrepareMergeMarketPositionError: {
|
|
8761
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8432
8762
|
};
|
|
8433
|
-
/**
|
|
8434
|
-
* Parameters for preparing either supported position merge workflow.
|
|
8435
|
-
*
|
|
8436
|
-
* @remarks
|
|
8437
|
-
* Provide either a market `conditionId` or combo `legs`.
|
|
8438
|
-
*/
|
|
8439
|
-
type PrepareMergePositionsRequest = PrepareMergeMarketPositionRequest | PrepareMergeComboPositionRequest;
|
|
8440
8763
|
/**
|
|
8441
8764
|
* Starts a workflow to merge complementary positions in a market back into collateral.
|
|
8442
8765
|
*
|
|
@@ -8452,10 +8775,27 @@ type PrepareMergePositionsRequest = PrepareMergeMarketPositionRequest | PrepareM
|
|
|
8452
8775
|
* });
|
|
8453
8776
|
* ```
|
|
8454
8777
|
*
|
|
8455
|
-
* @throws {@link
|
|
8778
|
+
* @throws {@link PrepareMergePositionsError}
|
|
8456
8779
|
* Thrown on failure.
|
|
8457
8780
|
*/
|
|
8458
8781
|
declare function prepareMergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<MergePositionsWorkflow>;
|
|
8782
|
+
/**
|
|
8783
|
+
* Parameters for preparing a combo position merge.
|
|
8784
|
+
*/
|
|
8785
|
+
type PrepareMergeComboPositionRequest = {
|
|
8786
|
+
/** Amount per complementary combo position to merge. */
|
|
8787
|
+
amount: bigint | 'max';
|
|
8788
|
+
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
8789
|
+
legs: string[] | PositionId[];
|
|
8790
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
8791
|
+
metadata?: string;
|
|
8792
|
+
};
|
|
8793
|
+
/** @deprecated Use {@link PrepareMergePositionsError}. */
|
|
8794
|
+
type PrepareMergeComboPositionError = PrepareMergePositionsError;
|
|
8795
|
+
/** @deprecated Use {@link PrepareMergePositionsError}. */
|
|
8796
|
+
declare const PrepareMergeComboPositionError: {
|
|
8797
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8798
|
+
};
|
|
8459
8799
|
/**
|
|
8460
8800
|
* Starts a workflow to merge complementary combo positions back into collateral.
|
|
8461
8801
|
*
|
|
@@ -8470,12 +8810,20 @@ declare function prepareMergeMarketPosition(client: BaseSecureClient, request: P
|
|
|
8470
8810
|
* });
|
|
8471
8811
|
* ```
|
|
8472
8812
|
*
|
|
8473
|
-
* @throws {@link
|
|
8813
|
+
* @throws {@link PrepareMergePositionsError}
|
|
8474
8814
|
* Thrown on failure.
|
|
8475
8815
|
*/
|
|
8476
8816
|
declare function prepareMergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<MergePositionsWorkflow>;
|
|
8477
8817
|
/**
|
|
8478
|
-
*
|
|
8818
|
+
* Parameters for preparing a position merge.
|
|
8819
|
+
*
|
|
8820
|
+
* @remarks
|
|
8821
|
+
* Provide `conditionId` for an existing market condition or `legs` to derive a
|
|
8822
|
+
* Combo condition.
|
|
8823
|
+
*/
|
|
8824
|
+
type PrepareMergePositionsRequest = PrepareMergeMarketPositionRequest | PrepareMergeComboPositionRequest;
|
|
8825
|
+
/**
|
|
8826
|
+
* Starts a position merge workflow.
|
|
8479
8827
|
*
|
|
8480
8828
|
* @throws {@link PrepareMergePositionsError}
|
|
8481
8829
|
* Thrown on failure.
|
|
@@ -8485,43 +8833,57 @@ type MergePositionsError = CancelledSigningError | RateLimitError | RequestRejec
|
|
|
8485
8833
|
declare const MergePositionsError: {
|
|
8486
8834
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8487
8835
|
};
|
|
8836
|
+
/** @deprecated Use {@link MergePositionsError}. */
|
|
8488
8837
|
type MergeMarketPositionError = MergePositionsError;
|
|
8838
|
+
/** @deprecated Use {@link MergePositionsError}. */
|
|
8489
8839
|
declare const MergeMarketPositionError: {
|
|
8490
8840
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8491
8841
|
};
|
|
8492
|
-
type MergeComboPositionError = MergePositionsError;
|
|
8493
|
-
declare const MergeComboPositionError: {
|
|
8494
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8495
|
-
};
|
|
8496
8842
|
/**
|
|
8497
8843
|
* Merges complementary market positions back into collateral.
|
|
8498
8844
|
*
|
|
8499
8845
|
* @remarks
|
|
8500
8846
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8501
8847
|
*
|
|
8502
|
-
* @throws {@link
|
|
8848
|
+
* @throws {@link MergePositionsError}
|
|
8503
8849
|
* Thrown on failure.
|
|
8504
8850
|
*/
|
|
8505
8851
|
declare function mergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<TransactionHandle>;
|
|
8852
|
+
/** @deprecated Use {@link MergePositionsError}. */
|
|
8853
|
+
type MergeComboPositionError = MergePositionsError;
|
|
8854
|
+
/** @deprecated Use {@link MergePositionsError}. */
|
|
8855
|
+
declare const MergeComboPositionError: {
|
|
8856
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8857
|
+
};
|
|
8506
8858
|
/**
|
|
8507
8859
|
* Merges complementary combo positions back into collateral.
|
|
8508
8860
|
*
|
|
8509
8861
|
* @remarks
|
|
8510
8862
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8511
8863
|
*
|
|
8512
|
-
* @throws {@link
|
|
8864
|
+
* @throws {@link MergePositionsError}
|
|
8513
8865
|
* Thrown on failure.
|
|
8514
8866
|
*/
|
|
8515
8867
|
declare function mergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<TransactionHandle>;
|
|
8516
8868
|
/**
|
|
8517
|
-
* Merges complementary
|
|
8869
|
+
* Merges complementary positions back into collateral.
|
|
8518
8870
|
*
|
|
8519
8871
|
* @throws {@link MergePositionsError}
|
|
8520
8872
|
* Thrown on failure.
|
|
8521
8873
|
*/
|
|
8522
8874
|
declare function mergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
|
|
8875
|
+
type RedeemPositionsWorkflowRequest = GaslessWorkflowRequest | SendRedeemPositionsTransactionRequest;
|
|
8876
|
+
type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
8877
|
+
type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8878
|
+
declare const PrepareRedeemPositionsError: {
|
|
8879
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8880
|
+
};
|
|
8523
8881
|
/**
|
|
8524
8882
|
* Parameters for preparing a market position redemption by condition ID.
|
|
8883
|
+
*
|
|
8884
|
+
* @remarks
|
|
8885
|
+
* The condition ID may identify either a CTF or Polymarket V2 market. The SDK
|
|
8886
|
+
* resolves the protocol internally.
|
|
8525
8887
|
*/
|
|
8526
8888
|
type PrepareRedeemMarketPositionsByConditionIdRequest = {
|
|
8527
8889
|
/** Existing market condition ID that identifies the positions to redeem. */
|
|
@@ -8544,25 +8906,13 @@ type PrepareRedeemMarketPositionsByMarketIdRequest = {
|
|
|
8544
8906
|
/** Optional transaction metadata for workflows that support metadata. */
|
|
8545
8907
|
metadata?: string;
|
|
8546
8908
|
};
|
|
8547
|
-
/**
|
|
8548
|
-
* Parameters for preparing a combo position redemption.
|
|
8549
|
-
*/
|
|
8550
|
-
type PrepareRedeemComboPositionRequest = {
|
|
8551
|
-
/** Protocol v2 combo YES/NO position ID to redeem. */
|
|
8552
|
-
positionId: string | PositionId;
|
|
8553
|
-
conditionId?: never;
|
|
8554
|
-
marketId?: never;
|
|
8555
|
-
/** Optional transaction metadata for workflows that support metadata. */
|
|
8556
|
-
metadata?: string;
|
|
8557
|
-
};
|
|
8558
|
-
/**
|
|
8559
|
-
* Parameters for preparing either supported position redemption workflow.
|
|
8560
|
-
*
|
|
8561
|
-
* @remarks
|
|
8562
|
-
* Provide either a market `conditionId` or `marketId`, or a combo `positionId`.
|
|
8563
|
-
*/
|
|
8564
|
-
type PrepareRedeemPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest | PrepareRedeemComboPositionRequest;
|
|
8565
8909
|
type PrepareRedeemMarketPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest;
|
|
8910
|
+
/** @deprecated Use {@link PrepareRedeemPositionsError}. */
|
|
8911
|
+
type PrepareRedeemMarketPositionsError = PrepareRedeemPositionsError;
|
|
8912
|
+
/** @deprecated Use {@link PrepareRedeemPositionsError}. */
|
|
8913
|
+
declare const PrepareRedeemMarketPositionsError: {
|
|
8914
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8915
|
+
};
|
|
8566
8916
|
/**
|
|
8567
8917
|
* Starts a redemption workflow for resolved market positions.
|
|
8568
8918
|
*
|
|
@@ -8584,29 +8934,67 @@ type PrepareRedeemMarketPositionsRequest = PrepareRedeemMarketPositionsByConditi
|
|
|
8584
8934
|
* });
|
|
8585
8935
|
* ```
|
|
8586
8936
|
*
|
|
8587
|
-
* @throws {@link
|
|
8937
|
+
* @throws {@link PrepareRedeemPositionsError}
|
|
8588
8938
|
* Thrown on failure.
|
|
8589
8939
|
*/
|
|
8590
8940
|
declare function prepareRedeemMarketPositions(client: BaseSecureClient, request: PrepareRedeemMarketPositionsRequest): Promise<RedeemPositionsWorkflow>;
|
|
8591
8941
|
/**
|
|
8592
|
-
*
|
|
8942
|
+
* Parameters for preparing a Polymarket V2 position redemption.
|
|
8943
|
+
*/
|
|
8944
|
+
type PrepareRedeemPositionRequest = {
|
|
8945
|
+
/** Polymarket V2 YES/NO position ID to redeem. */
|
|
8946
|
+
positionId: string | PositionId;
|
|
8947
|
+
conditionId?: never;
|
|
8948
|
+
marketId?: never;
|
|
8949
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
8950
|
+
metadata?: string;
|
|
8951
|
+
};
|
|
8952
|
+
/**
|
|
8953
|
+
* Starts a redemption workflow for a resolved Polymarket V2 position.
|
|
8593
8954
|
*
|
|
8594
8955
|
* @remarks
|
|
8595
8956
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8596
8957
|
*
|
|
8597
8958
|
* @example
|
|
8598
8959
|
* ```ts
|
|
8599
|
-
* const workflow = await
|
|
8960
|
+
* const workflow = await prepareRedeemPosition(client, {
|
|
8600
8961
|
* positionId: '123',
|
|
8601
8962
|
* });
|
|
8602
8963
|
* ```
|
|
8603
8964
|
*
|
|
8604
|
-
* @throws {@link
|
|
8965
|
+
* @throws {@link PrepareRedeemPositionsError}
|
|
8966
|
+
* Thrown on failure.
|
|
8967
|
+
*/
|
|
8968
|
+
declare function prepareRedeemPosition(client: BaseSecureClient, request: PrepareRedeemPositionRequest): Promise<RedeemPositionsWorkflow>;
|
|
8969
|
+
/** @deprecated Use {@link PrepareRedeemPositionRequest}. */
|
|
8970
|
+
type PrepareRedeemComboPositionRequest = PrepareRedeemPositionRequest;
|
|
8971
|
+
/** @deprecated Use {@link PrepareRedeemPositionsError}. */
|
|
8972
|
+
type PrepareRedeemComboPositionError = PrepareRedeemPositionsError;
|
|
8973
|
+
/** @deprecated Use {@link PrepareRedeemPositionsError}. */
|
|
8974
|
+
declare const PrepareRedeemComboPositionError: {
|
|
8975
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8976
|
+
};
|
|
8977
|
+
/**
|
|
8978
|
+
* Starts a redemption workflow for a resolved Polymarket V2 position.
|
|
8979
|
+
*
|
|
8980
|
+
* @deprecated Use {@link prepareRedeemPosition}.
|
|
8981
|
+
*
|
|
8982
|
+
* @throws {@link PrepareRedeemPositionsError}
|
|
8605
8983
|
* Thrown on failure.
|
|
8606
8984
|
*/
|
|
8607
8985
|
declare function prepareRedeemComboPosition(client: BaseSecureClient, request: PrepareRedeemComboPositionRequest): Promise<RedeemPositionsWorkflow>;
|
|
8608
8986
|
/**
|
|
8609
|
-
*
|
|
8987
|
+
* Parameters for preparing position redemption for a market or a specific
|
|
8988
|
+
* position.
|
|
8989
|
+
*
|
|
8990
|
+
* @remarks
|
|
8991
|
+
* Use `marketId` or `conditionId` to redeem held positions for a market. Use
|
|
8992
|
+
* `positionId` to redeem a specific position.
|
|
8993
|
+
*/
|
|
8994
|
+
type PrepareRedeemPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest | PrepareRedeemPositionRequest;
|
|
8995
|
+
/**
|
|
8996
|
+
* Starts a redemption workflow for held positions in a market or a specific
|
|
8997
|
+
* position by ID.
|
|
8610
8998
|
*
|
|
8611
8999
|
* @remarks
|
|
8612
9000
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8615,12 +9003,12 @@ declare function prepareRedeemComboPosition(client: BaseSecureClient, request: P
|
|
|
8615
9003
|
* Thrown on failure.
|
|
8616
9004
|
*/
|
|
8617
9005
|
declare function prepareRedeemPositions(client: BaseSecureClient, request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
|
|
8618
|
-
type RedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
9006
|
+
type RedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError | TimeoutError | TransactionFailedError;
|
|
8619
9007
|
declare const RedeemPositionsError: {
|
|
8620
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9008
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
8621
9009
|
};
|
|
8622
9010
|
/**
|
|
8623
|
-
* Redeems
|
|
9011
|
+
* Redeems held positions for a market or a specific position by ID.
|
|
8624
9012
|
*
|
|
8625
9013
|
* @remarks
|
|
8626
9014
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8818,6 +9206,122 @@ declare const FetchSeriesError: {
|
|
|
8818
9206
|
*/
|
|
8819
9207
|
declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest): Promise<Series>;
|
|
8820
9208
|
|
|
9209
|
+
/**
|
|
9210
|
+
* A scoped session key authorized for the Deposit Wallet.
|
|
9211
|
+
*/
|
|
9212
|
+
type SessionKey = {
|
|
9213
|
+
/** Public EVM address of the externally managed session signer. */
|
|
9214
|
+
address: EvmAddress$1;
|
|
9215
|
+
/** Venue scopes granted to the signer. */
|
|
9216
|
+
scopes: SessionSignerScope[];
|
|
9217
|
+
/** Absolute expiry as whole Unix seconds. */
|
|
9218
|
+
validUntil: number;
|
|
9219
|
+
};
|
|
9220
|
+
type FetchSessionKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9221
|
+
declare const FetchSessionKeysError: {
|
|
9222
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9223
|
+
};
|
|
9224
|
+
/**
|
|
9225
|
+
* Fetches the active session keys authorized for the Deposit Wallet.
|
|
9226
|
+
*
|
|
9227
|
+
* @remarks
|
|
9228
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9229
|
+
*
|
|
9230
|
+
* @example
|
|
9231
|
+
* ```ts
|
|
9232
|
+
* const sessionKeys = await fetchSessionKeys(client);
|
|
9233
|
+
* ```
|
|
9234
|
+
*
|
|
9235
|
+
* @throws {@link FetchSessionKeysError}
|
|
9236
|
+
* Thrown on failure.
|
|
9237
|
+
*/
|
|
9238
|
+
declare function fetchSessionKeys(client: BaseSecureClient): Promise<SessionKey[]>;
|
|
9239
|
+
/** Parameters for authorizing a scoped session key. */
|
|
9240
|
+
type AuthorizeSessionKeyRequest = {
|
|
9241
|
+
/** Public EVM address of the externally managed session signer. */
|
|
9242
|
+
address: string;
|
|
9243
|
+
/** Stable key to reuse when retrying the same logical authorization. */
|
|
9244
|
+
idempotencyKey?: string;
|
|
9245
|
+
/** Requested scopes. Defaults to `ALL`, which must appear alone. */
|
|
9246
|
+
scopes?: SessionSignerScope[];
|
|
9247
|
+
/** Absolute expiry as whole future Unix seconds. */
|
|
9248
|
+
validUntil: number;
|
|
9249
|
+
};
|
|
9250
|
+
/** Result of a confirmed session-key authorization. */
|
|
9251
|
+
type AuthorizeSessionKeyResult = {
|
|
9252
|
+
/** Session-key metadata associated with the confirmed authorization. */
|
|
9253
|
+
sessionKey: SessionKey;
|
|
9254
|
+
/** Confirmed transaction that applied the authorization. */
|
|
9255
|
+
transaction: TransactionOutcome;
|
|
9256
|
+
};
|
|
9257
|
+
type AuthorizeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9258
|
+
declare const AuthorizeSessionKeyError: {
|
|
9259
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
9260
|
+
};
|
|
9261
|
+
/**
|
|
9262
|
+
* Authorizes an externally managed signer for selected venues.
|
|
9263
|
+
*
|
|
9264
|
+
* The SDK receives only the public address. The application remains
|
|
9265
|
+
* responsible for generating, storing, and protecting the private key.
|
|
9266
|
+
* When scopes are omitted, authorization defaults to `ALL`.
|
|
9267
|
+
* Requires builder API-key authentication.
|
|
9268
|
+
*
|
|
9269
|
+
* @remarks
|
|
9270
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9271
|
+
*
|
|
9272
|
+
* Resolves after the submitted transaction is confirmed and the session key
|
|
9273
|
+
* appears in the active session-key list.
|
|
9274
|
+
*
|
|
9275
|
+
* @example
|
|
9276
|
+
* ```ts
|
|
9277
|
+
* const authorization = await authorizeSessionKey(client, {
|
|
9278
|
+
* address: sessionAddress,
|
|
9279
|
+
* validUntil: Math.floor(Date.now() / 1_000) + 2 * 60 * 60,
|
|
9280
|
+
* });
|
|
9281
|
+
* ```
|
|
9282
|
+
*
|
|
9283
|
+
* @throws {@link AuthorizeSessionKeyError}
|
|
9284
|
+
* Thrown on failure.
|
|
9285
|
+
*/
|
|
9286
|
+
declare function authorizeSessionKey(client: BaseSecureClient, request: AuthorizeSessionKeyRequest): Promise<AuthorizeSessionKeyResult>;
|
|
9287
|
+
/** Parameters for revoking a session key. */
|
|
9288
|
+
type RevokeSessionKeyRequest = {
|
|
9289
|
+
/** Public EVM address of the session signer to revoke. */
|
|
9290
|
+
address: string;
|
|
9291
|
+
/** Stable key to reuse when retrying the same signed revocation. */
|
|
9292
|
+
idempotencyKey?: string;
|
|
9293
|
+
};
|
|
9294
|
+
/** Result of a confirmed session-key revocation. */
|
|
9295
|
+
type RevokeSessionKeyResult = {
|
|
9296
|
+
/** Confirmed transaction that applied the revocation. */
|
|
9297
|
+
transaction: TransactionOutcome;
|
|
9298
|
+
};
|
|
9299
|
+
type RevokeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9300
|
+
declare const RevokeSessionKeyError: {
|
|
9301
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
9302
|
+
};
|
|
9303
|
+
/**
|
|
9304
|
+
* Revokes a session key authorized for the Deposit Wallet.
|
|
9305
|
+
*
|
|
9306
|
+
* Revocation may take several minutes while existing activity is canceled and
|
|
9307
|
+
* the on-chain revocation is confirmed.
|
|
9308
|
+
* Requires API-key authentication that supports gasless transactions.
|
|
9309
|
+
*
|
|
9310
|
+
* @remarks
|
|
9311
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
9312
|
+
*
|
|
9313
|
+
* @example
|
|
9314
|
+
* ```ts
|
|
9315
|
+
* const revocation = await revokeSessionKey(client, {
|
|
9316
|
+
* address: sessionAddress,
|
|
9317
|
+
* });
|
|
9318
|
+
* ```
|
|
9319
|
+
*
|
|
9320
|
+
* @throws {@link RevokeSessionKeyError}
|
|
9321
|
+
* Thrown on failure.
|
|
9322
|
+
*/
|
|
9323
|
+
declare function revokeSessionKey(client: BaseSecureClient, request: RevokeSessionKeyRequest): Promise<RevokeSessionKeyResult>;
|
|
9324
|
+
|
|
8821
9325
|
type MarketEventType = MarketEvent['type'];
|
|
8822
9326
|
type UserEventType = UserEvent['type'];
|
|
8823
9327
|
type SportsEventType = SportsEvent['type'];
|
|
@@ -8835,7 +9339,18 @@ type PerpsStreamingCandleInterval = Exclude<PerpsKlineInterval, PerpsKlineInterv
|
|
|
8835
9339
|
type PerpsInstrumentIdInput = number;
|
|
8836
9340
|
type MarketSubscription = {
|
|
8837
9341
|
topic: 'market';
|
|
8838
|
-
/**
|
|
9342
|
+
/** Asset identifiers whose market events should be delivered. */
|
|
9343
|
+
assetIds: readonly string[];
|
|
9344
|
+
tokenIds?: never;
|
|
9345
|
+
/**
|
|
9346
|
+
* When `true`, the server additionally emits `MarketBestBidAskEvent`,
|
|
9347
|
+
* `NewMarketEvent`, and `MarketResolvedEvent`.
|
|
9348
|
+
*/
|
|
9349
|
+
customFeatureEnabled?: boolean;
|
|
9350
|
+
} | {
|
|
9351
|
+
topic: 'market';
|
|
9352
|
+
assetIds?: never;
|
|
9353
|
+
/** @deprecated Use `assetIds`. */
|
|
8839
9354
|
tokenIds: readonly string[];
|
|
8840
9355
|
/**
|
|
8841
9356
|
* When `true`, the server additionally emits `MarketBestBidAskEvent`,
|
|
@@ -8974,7 +9489,7 @@ declare const SubscribeError: {
|
|
|
8974
9489
|
* @example
|
|
8975
9490
|
* ```ts
|
|
8976
9491
|
* const handle = await client.subscribe([
|
|
8977
|
-
* { topic: 'market',
|
|
9492
|
+
* { topic: 'market', assetIds: ['123'] },
|
|
8978
9493
|
* ]);
|
|
8979
9494
|
*
|
|
8980
9495
|
* for await (const event of handle) {
|
|
@@ -9329,4 +9844,4 @@ type Signer = {
|
|
|
9329
9844
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
9330
9845
|
};
|
|
9331
9846
|
|
|
9332
|
-
export { FetchClosedOnlyModeError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, ComboPositionSort as D, type ComboQuote as E, type CombosEndpoints as F, ConnectionLostError as G, type ConnectionLostErrorOptions as H, type CreatePerpsSessionRequest as I, CreateSecureClientError as J, type CryptoPricesChainlinkTwapSubscription as K, type DataActions as L, DepositToPerpsError as M, type DepositToPerpsRequest as N, type DisarmPerpsAutoCancelRequest as O, type DiscoveryActions as P, DownloadAccountingSnapshotError as Q, DropNotificationsError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type EnvironmentConfig as V, type EnvironmentConfigFork as W, type EnvironmentContracts as X, EstimateMarketPriceError as Y, ExecuteCollateralReturnPlanError as Z, type ExecuteCollateralReturnPlanRequest as _, type TypedData as a, ListOpenOrdersError as a$, FetchCommentsByIdError as a0, FetchEventError as a1, FetchEventLiveVolumeError as a2, FetchEventTagsError as a3, FetchLastTradePriceError as a4, FetchLastTradePricesError as a5, FetchMarketError as a6, FetchMarketTagsError as a7, FetchMidpointError as a8, FetchMidpointsError as a9, FetchRfqStatusError as aA, type FetchRfqStatusParams as aB, FetchSeriesError as aC, FetchSpreadError as aD, FetchSpreadsError as aE, FetchTagError as aF, FetchTotalEarningsForUserForDayError as aG, FetchTradedMarketCountError as aH, InsufficientLiquidityError as aI, ListAccountTradesError as aJ, ListActivityError as aK, ListBuilderLeaderboardError as aL, ListBuilderTradesError as aM, ListBuilderVolumeError as aN, ListClosedPositionsError as aO, ListComboActivityError as aP, ListComboMarketsError as aQ, ListComboPositionsError as aR, ListCommentsByUserAddressError as aS, ListCommentsError as aT, ListCurrentRewardsError as aU, ListEventsError as aV, ListMarketHoldersError as aW, ListMarketPositionsError as aX, ListMarketRewardsError as aY, ListMarketsError as aZ, ListOpenInterestError as a_, FetchNotificationsError as aa, FetchOrderBookError as ab, FetchOrderBooksError as ac, FetchOrderError as ad, FetchOrderScoringError as ae, FetchOrdersScoringError as af, type FetchPerpsAccountConfigRequest as ag, FetchPerpsBookError as ah, type FetchPerpsBookRequest as ai, FetchPerpsFeesError as aj, FetchPerpsInstrumentsError as ak, type FetchPerpsInstrumentsRequest as al, type FetchPerpsOpenOrdersRequest as am, type FetchPerpsOrdersRequest as an, FetchPerpsTickerError as ao, type FetchPerpsTickerRequest as ap, FetchPerpsTickersError as aq, type FetchPerpsTickersRequest as ar, FetchPortfolioValueError as as, FetchPriceError as at, FetchPriceHistoryError as au, FetchPricesError as av, FetchPublicProfileError as aw, FetchRelatedTagResourcesError as ax, FetchRelatedTagsError as ay, FetchRewardPercentagesError as az, type TransactionCall as b, RedeemPositionsError as b$, ListPerpsCandlesError as b0, type ListPerpsCandlesRequest as b1, type ListPerpsDepositsRequest as b2, type ListPerpsEquityHistoryRequest as b3, type ListPerpsFillsRequest as b4, ListPerpsFundingHistoryError as b5, type ListPerpsFundingHistoryRequest as b6, type ListPerpsFundingPaymentsRequest as b7, type ListPerpsNotificationsRequest as b8, type ListPerpsPnlHistoryRequest as b9, type PerpsPlacedTpSlOrder as bA, type PerpsPlacedTpSlOrders as bB, type PerpsPositionTpSlTrigger as bC, PerpsSession as bD, type PerpsSessionAccountError as bE, type PerpsSessionLifecycleError as bF, type PerpsSessionTradingError as bG, type PerpsTpSlTrigger as bH, type PlacePerpsOrderRequest as bI, type PlacePerpsOrderResult as bJ, type PlacePerpsOrderWithTpSlRequest as bK, type PlacePerpsOrderWithTpSlResult as bL, type PlacePerpsPositionTpSlRequest as bM, type PlacePerpsPositionTpSlResult as bN, PlanCollateralReturnError as bO, PostOrderError as bP, PostOrdersError as bQ, type PostPerpsOrdersRequest as bR, type PublicAccountActions as bS, type PublicActions as bT, type PublicClient as bU, type PublicClientOptions as bV, type PublicPerpsActions as bW, type PublicRewardsActions as bX, type PublicSubscriptionsActions as bY, RateLimitError as bZ, type RateLimitErrorOptions as b_, ListPerpsTradesError as ba, type ListPerpsTradesRequest as bb, type ListPerpsWithdrawalsRequest as bc, ListPositionsError as bd, ListSeriesError as be, ListTagsError as bf, ListTeamsError as bg, ListTraderLeaderboardError as bh, ListTradesError as bi, ListUserEarningsAndMarketsConfigError as bj, ListUserEarningsForDayError as bk, type MarkPerpsNotificationsReadRequest as bl, MergePositionsError as bm, OpenPerpsSessionError as bn, type OpenPerpsSessionRequest as bo, OpenRfqSessionError as bp, type Page as bq, PageSizeSchema as br, type Paginated as bs, type PerpsActions as bt, type PerpsBookDepth as bu, type PerpsEndpoints as bv, type PerpsOrderRequest as bw, type PerpsPlaceFokOrderRequest as bx, type PerpsPlaceGtcOrderRequest as by, type PerpsPlaceIocOrderRequest as bz, AcceptComboQuoteError as c, type TypedDataField as c$, RequestComboQuoteError as c0, type RequestComboQuoteParams as c1, type RequestComboQuoteResult as c2, RequestRejectedError as c3, type RequestRejectedErrorOptions as c4, type RestEndpoint as c5, type ResumePerpsSessionRequest as c6, RevokePerpsCredentialsError as c7, type RevokePerpsCredentialsRequest as c8, type RfqCancelQuoteAck as c9, type SecureDownloadAccountingSnapshotRequest as cA, type SecureFetchPortfolioValueRequest as cB, type SecureFetchTradedMarketCountRequest as cC, type SecureListActivityRequest as cD, type SecureListClosedPositionsRequest as cE, type SecureListComboActivityRequest as cF, type SecureListComboPositionsRequest as cG, type SecureListPositionsRequest as cH, type SecurePerpsActions as cI, type SecureRewardsActions as cJ, type SecureRfqActions as cK, type SecureSubscriptionsActions as cL, type SecureTradingActions as cM, type SecureWalletActions as cN, SetupGaslessWalletError as cO, SetupTradingApprovalsError as cP, type SignerTransactionRequest as cQ, SigningError as cR, SplitPositionError as cS, SubscribeError as cT, TimeoutError as cU, TransactionFailedError as cV, type TransactionHandle as cW, type TransactionOutcome as cX, TransferErc20Error as cY, TransportError as cZ, type TypedDataDomain as c_, RfqCancelQuoteError as ca, RfqCancelQuoteRejectedError as cb, type RfqCancelQuoteRejectedErrorOptions as cc, type RfqConfirmationAck as cd, RfqConfirmationError as ce, RfqConfirmationRejectedError as cf, type RfqConfirmationRequestEvent as cg, type RfqEvent as ch, RfqQuoteError as ci, type RfqQuoteReference as cj, RfqQuoteRejectedError as ck, type RfqQuoteRejectedErrorOptions as cl, type RfqQuoteRequestEvent as cm, type RfqQuoteResponse as cn, type RfqQuoteSource as co, RfqRequestRejectedError as cp, type RfqRequestRejectedErrorOptions as cq, type RfqSession as cr, type RfqStatusResult as cs, type RfqTradeEvent as ct, SearchError as cu, SearchSort as cv, type SecureAccountActions as cw, type SecureActions as cx, type SecureClient as cy, type SecureClientOptions as cz, type AcceptComboQuoteParams as d, type FetchEventRequest as d$, UnexpectedResponseError as d0, UpdatePerpsLeverageError as d1, type UpdatePerpsLeverageRequest as d2, UpdatePerpsMarginError as d3, type UpdatePerpsMarginRequest as d4, WaitForComboFillError as d5, type WaitForComboFillParams as d6, type WaitForComboFillResult as d7, WaitForOrderFillSettlementError as d8, WaitForTransactionError as d9, type CollateralReturnExecutionWorkflow as dA, type CommentsEventType as dB, type CommentsSubscription as dC, type CryptoPricesEventType as dD, type CryptoPricesSubscription as dE, DeployDepositWalletError as dF, type DownloadAccountingSnapshotRequest as dG, type DropNotificationsRequest as dH, type EquityPricesEventType as dI, type EquityPricesSubscription as dJ, type Erc1155ApprovalForAllWorkflow as dK, type Erc1155ApprovalForAllWorkflowRequest as dL, type Erc20ApprovalWorkflow as dM, type Erc20ApprovalWorkflowRequest as dN, type Erc20TransferWorkflow as dO, type Erc20TransferWorkflowRequest as dP, type EstimateMarketBuyPriceRequest as dQ, type EstimateMarketPriceRequest as dR, type EstimateMarketSellPriceRequest as dS, type EventForSubscriptionSpec as dT, type EventForSubscriptionSpecs as dU, FetchBalanceAllowanceError as dV, type FetchBalanceAllowanceRequest as dW, FetchBuilderFeeRatesError as dX, type FetchBuilderFeeRatesRequest as dY, type FetchCommentsByIdRequest as dZ, type FetchEventLiveVolumeRequest as d_, type WalletDerivationConfig as da, type WebSocketCloseCode as db, type WebSocketEndpoint as dc, WebSocketKnownCloseCode as dd, WithdrawFromPerpsError as de, type WithdrawFromPerpsRequest as df, accountActions as dg, allActions as dh, analyticsActions as di, createPublicClient as dj, createSecureClient as dk, dataActions as dl, discoveryActions as dm, forkEnvironmentConfig as dn, makeErrorGuard as dp, perpsActions as dq, production as dr, rewardsActions as ds, rfqActions as dt, subscriptionsActions as du, tradingActions as dv, walletActions as dw, type CancelMarketOrdersRequest as dx, type CancelOrderRequest as dy, type CancelOrdersRequest as dz, type AcceptComboQuoteResult as e, type ListTeamsRequest as e$, type FetchEventTagsRequest as e0, FetchExecuteParamsError as e1, type FetchExecuteParamsRequest as e2, type FetchGaslessTransactionRequest as e3, type FetchLastTradePriceRequest as e4, type FetchLastTradePricesRequest as e5, FetchMarketInfoError as e6, type FetchMarketInfoRequest as e7, type FetchMarketRequest as e8, type FetchMarketTagsRequest as e9, type GaslessWorkflowRequest as eA, IsWalletDeployedError as eB, type IsWalletDeployedRequest as eC, type ListAccountTradesRequest as eD, type ListActivityRequest as eE, type ListBuilderLeaderboardRequest as eF, type ListBuilderTradesRequest as eG, type ListBuilderVolumeRequest as eH, type ListClosedPositionsRequest as eI, type ListComboActivityRequest as eJ, type ListComboMarketsRequest as eK, type ListComboPositionsRequest as eL, type ListCommentsByUserAddressRequest as eM, type ListCommentsRequest as eN, type ListCurrentRewardsRequest as eO, type ListEventsRequest as eP, ListMarketClarificationsError as eQ, type ListMarketClarificationsRequest as eR, type ListMarketHoldersRequest as eS, type ListMarketPositionsRequest as eT, type ListMarketRewardsRequest as eU, type ListMarketsRequest as eV, type ListOpenInterestRequest as eW, type ListOpenOrdersRequest as eX, type ListPositionsRequest as eY, type ListSeriesRequest as eZ, type ListTagsRequest as e_, type FetchMidpointRequest as ea, type FetchMidpointsRequest as eb, FetchNegRiskError as ec, type FetchNegRiskRequest as ed, type FetchOrderBookRequest as ee, type FetchOrderBooksRequest as ef, type FetchOrderRequest as eg, type FetchOrderScoringRequest as eh, type FetchOrdersScoringRequest as ei, type FetchPortfolioValueRequest as ej, type FetchPriceHistoryRequest as ek, type FetchPriceRequest as el, type FetchPricesRequest as em, type FetchPublicProfileRequest as en, type FetchRelatedTagResourcesRequest as eo, type FetchRelatedTagsRequest as ep, type FetchSeriesRequest as eq, type FetchSpreadRequest as er, type FetchSpreadsRequest as es, type FetchTagRequest as et, FetchTickSizeError as eu, type FetchTickSizeRequest as ev, type FetchTotalEarningsForUserForDayRequest as ew, type FetchTradedMarketCountRequest as ex, GaslessTransactionMetadataSchema as ey, type GaslessWorkflow as ez, type AccountIdentity as f, type PublicSubscriptionSpec as f$, type ListTraderLeaderboardRequest as f0, type ListTradesRequest as f1, type ListUserEarningsAndMarketsConfigRequest as f2, type ListUserEarningsForDayRequest as f3, type MarketEventType as f4, type MarketSubscription as f5, MergeComboPositionError as f6, MergeMarketPositionError as f7, type MergePositionsWorkflow as f8, type MergePositionsWorkflowRequest as f9, type PrepareMarketBuyOrderRequest as fA, type PrepareMarketOrderRequest as fB, type PrepareMarketSellOrderRequest as fC, PrepareMergeComboPositionError as fD, type PrepareMergeComboPositionRequest as fE, PrepareMergeMarketPositionError as fF, type PrepareMergeMarketPositionRequest as fG, PrepareMergePositionsError as fH, type PrepareMergePositionsRequest as fI, PreparePerpsDepositError as fJ, PrepareRedeemComboPositionError as fK, type PrepareRedeemComboPositionRequest as fL, type PrepareRedeemMarketPositionsByConditionIdRequest as fM, type PrepareRedeemMarketPositionsByMarketIdRequest as fN, PrepareRedeemMarketPositionsError as fO, type PrepareRedeemMarketPositionsRequest as fP, PrepareRedeemPositionsError as fQ, type PrepareRedeemPositionsRequest as fR, PrepareSplitComboPositionError as fS, type PrepareSplitComboPositionRequest as fT, PrepareSplitMarketPositionError as fU, type PrepareSplitMarketPositionRequest as fV, PrepareSplitPositionError as fW, type PrepareSplitPositionRequest as fX, PrepareTradingApprovalsError as fY, type PublicRealtimeEvent as fZ, type PublicRealtimeTopic as f_, type OrderDraft as fa, type OrderPostingWorkflow as fb, type OrderWorkflow as fc, type OrderWorkflowRequest as fd, type PerpsBboSubscription as fe, type PerpsBookSubscription as ff, type PerpsCandlesSubscription as fg, type PerpsDepositWorkflow as fh, type PerpsDepositWorkflowRequest as fi, type PerpsMarketDataEventType as fj, type PerpsMarketDataSubscription as fk, type PerpsStatisticsSubscription as fl, type PerpsStreamingCandleInterval as fm, type PerpsTickersSubscription as fn, type PerpsTradesSubscription as fo, type PostOrdersRequest as fp, PrepareCollateralReturnExecutionError as fq, PrepareErc1155ApprovalForAllError as fr, type PrepareErc1155ApprovalForAllRequest as fs, PrepareErc20ApprovalError as ft, type PrepareErc20ApprovalRequest as fu, PrepareErc20TransferError as fv, type PrepareErc20TransferRequest as fw, PrepareGaslessTransactionError as fx, type PrepareGaslessTransactionRequest as fy, type PrepareLimitOrderRequest as fz, type AnalyticsActions as g, fetchPerpsBook as g$, type RedeemPositionsWorkflow as g0, type RedeemPositionsWorkflowRequest as g1, ResolveConditionByTokenError as g2, type ResolveConditionByTokenRequest as g3, type RfqConfirmationRejectedErrorOptions as g4, type RfqExecutionUpdateEvent as g5, type SearchRequest as g6, type SearchResults as g7, type SecureRealtimeEvent as g8, type SecureRealtimeTopic as g9, downloadAccountingSnapshot as gA, dropNotifications as gB, estimateMarketPrice as gC, executeCollateralReturnPlan as gD, fetchBalanceAllowance as gE, fetchBuilderFeeRates as gF, fetchBuilderVolume as gG, fetchClosedOnlyMode as gH, fetchCommentsById as gI, fetchEvent as gJ, fetchEventLiveVolume as gK, fetchEventTags as gL, fetchExecuteParams as gM, fetchLastTradePrice as gN, fetchLastTradePrices as gO, fetchMarket as gP, fetchMarketInfo as gQ, fetchMarketTags as gR, fetchMidpoint as gS, fetchMidpoints as gT, fetchNegRisk as gU, fetchNotifications as gV, fetchOrder as gW, fetchOrderBook as gX, fetchOrderBooks as gY, fetchOrderScoring as gZ, fetchOrdersScoring as g_, type SecureSubscriptionSpec as ga, type SignedOrder as gb, SplitComboPositionError as gc, SplitMarketPositionError as gd, type SplitPositionWorkflow as ge, type SplitPositionWorkflowRequest as gf, type SportsEventType as gg, type SportsSubscription as gh, type SubscriptionHandle as gi, type TradingApprovalsWorkflow as gj, type TradingApprovalsWorkflowRequest as gk, UpdateBalanceAllowanceError as gl, type UpdateBalanceAllowanceRequest as gm, type UserEventType as gn, type UserSubscription as go, WaitForGaslessTransactionError as gp, type WaitForOrderFillSettlementRequest as gq, acceptComboQuote as gr, approveErc1155ForAll as gs, approveErc20 as gt, cancelAll as gu, cancelMarketOrders as gv, cancelOrder as gw, cancelOrders as gx, deployDepositWallet as gy, depositToPerps as gz, ApproveErc1155ForAllError as h, prepareErc20Transfer as h$, fetchPerpsFees as h0, fetchPerpsInstruments as h1, fetchPerpsTicker as h2, fetchPerpsTickers as h3, fetchPortfolioValue as h4, fetchPrice as h5, fetchPriceHistory as h6, fetchPrices as h7, fetchPublicProfile as h8, fetchRelatedTagResources as h9, listMarketPositions as hA, listMarketRewards as hB, listMarkets as hC, listOpenInterest as hD, listOpenOrders as hE, listPerpsCandles as hF, listPerpsFundingHistory as hG, listPerpsTrades as hH, listPositions as hI, listSeries as hJ, listTags as hK, listTeams as hL, listTraderLeaderboard as hM, listTrades as hN, listUserEarningsAndMarketsConfig as hO, listUserEarningsForDay as hP, mergeComboPosition as hQ, mergeMarketPosition as hR, mergePositions as hS, openPerpsSession as hT, openRfqSession as hU, planCollateralReturn as hV, postOrder as hW, postOrders as hX, prepareCollateralReturnExecution as hY, prepareErc1155ApprovalForAll as hZ, prepareErc20Approval as h_, fetchRelatedTags as ha, fetchRewardPercentages as hb, fetchRfqStatus as hc, fetchSeries as hd, fetchSpread as he, fetchSpreads as hf, fetchTag as hg, fetchTickSize as hh, fetchTotalEarningsForUserForDay as hi, fetchTradedMarketCount as hj, fetchTransaction as hk, isWalletDeployed as hl, listAccountTrades as hm, listActivity as hn, listBuilderLeaderboard as ho, listBuilderTrades as hp, listClosedPositions as hq, listComboActivity as hr, listComboMarkets as hs, listComboPositions as ht, listComments as hu, listCommentsByUserAddress as hv, listCurrentRewards as hw, listEvents as hx, listMarketClarifications as hy, listMarketHolders as hz, ApproveErc20Error as i, prepareGaslessTransaction as i0, prepareMergeComboPosition as i1, prepareMergeMarketPosition as i2, prepareMergePositions as i3, preparePerpsDeposit as i4, prepareRedeemComboPosition as i5, prepareRedeemMarketPositions as i6, prepareRedeemPositions as i7, prepareSplitComboPosition as i8, prepareSplitMarketPosition as i9, prepareSplitPosition as ia, prepareTradingApprovals as ib, redeemPositions as ic, requestComboQuote as id, resolveConditionByToken as ie, revokePerpsCredentials as ig, search as ih, setupTradingApprovals as ii, splitComboPosition as ij, splitMarketPosition as ik, splitPosition as il, subscribe as im, transferErc20 as io, updateBalanceAllowance as ip, waitForComboFill as iq, waitForOrderFillSettlement as ir, withdrawFromPerps as is, ArmPerpsAutoCancelError as j, type ArmPerpsAutoCancelRequest as k, AutoCancelDailyLimitError as l, BasePublicClient as m, BaseSecureClient as n, type BeginAuthenticationRequest as o, type CancelAllPerpsOrdersRequest as p, CancelMarketOrdersError as q, CancelOrderError as r, CancelOrdersError as s, type CancelPerpsOrderRequest as t, type CancelPerpsOrdersRequest as u, CancelledSigningError as v, type Client as w, type ClientActions as x, type ClientDecorator as y, type ClobEndpoints as z };
|
|
9847
|
+
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, fetchCommentsById as g$, PrepareRedeemComboPositionError as g0, type PrepareRedeemComboPositionRequest as g1, type PrepareRedeemMarketPositionsByConditionIdRequest as g2, type PrepareRedeemMarketPositionsByMarketIdRequest as g3, PrepareRedeemMarketPositionsError as g4, type PrepareRedeemMarketPositionsRequest as g5, type PrepareRedeemPositionRequest as g6, PrepareRedeemPositionsError as g7, type PrepareRedeemPositionsRequest as g8, PrepareSplitComboPositionError as g9, type SubscriptionHandle as gA, type TradingApprovalsWorkflow as gB, type TradingApprovalsWorkflowRequest as gC, UpdateBalanceAllowanceError as gD, type UpdateBalanceAllowanceRequest as gE, type UserEventType as gF, type UserSubscription as gG, WaitForGaslessTransactionError as gH, type WaitForOrderFillSettlementRequest as gI, acceptComboQuote as gJ, approveErc1155ForAll as gK, approveErc20 as gL, authorizeSessionKey as gM, cancelAll as gN, cancelMarketOrders as gO, cancelOrder as gP, cancelOrders as gQ, deployDepositWallet as gR, depositToPerps as gS, downloadAccountingSnapshot as gT, dropNotifications as gU, estimateMarketPrice as gV, executeCollateralReturnPlan as gW, fetchBalanceAllowance as gX, fetchBuilderFeeRates as gY, fetchBuilderVolume as gZ, fetchClosedOnlyMode as g_, type PrepareSplitComboPositionRequest as ga, PrepareSplitMarketPositionError as gb, type PrepareSplitMarketPositionRequest as gc, PrepareSplitPositionError as gd, type PrepareSplitPositionRequest as ge, PrepareTradingApprovalsError as gf, type PublicRealtimeEvent as gg, type PublicRealtimeTopic as gh, type PublicSubscriptionSpec as gi, type RedeemPositionsWorkflow as gj, type RedeemPositionsWorkflowRequest as gk, ResolveConditionByTokenError as gl, type ResolveConditionByTokenRequest as gm, type RfqConfirmationRejectedErrorOptions as gn, type RfqExecutionUpdateEvent as go, type SearchRequest as gp, type SearchResults as gq, type SecureRealtimeEvent as gr, type SecureRealtimeTopic as gs, type SecureSubscriptionSpec as gt, SplitComboPositionError as gu, SplitMarketPositionError as gv, type SplitPositionWorkflow as gw, type SplitPositionWorkflowRequest as gx, type SportsEventType as gy, type SportsSubscription as gz, ApproveErc1155ForAllError as h, listPerpsTrades as h$, fetchEvent as h0, fetchEventLiveVolume as h1, fetchEventTags as h2, fetchExecuteParams as h3, fetchLastTradePrice as h4, fetchLastTradePrices as h5, fetchMarket as h6, fetchMarketInfo as h7, fetchMarketTags as h8, fetchMidpoint as h9, fetchTag as hA, fetchTickSize as hB, fetchTotalEarningsForUserForDay as hC, fetchTradedMarketCount as hD, fetchTransaction as hE, isWalletDeployed as hF, listAccountTrades as hG, listActivity as hH, listBuilderLeaderboard as hI, listBuilderTrades as hJ, listClosedPositions as hK, listComboActivity as hL, listComboMarkets as hM, listComboPositions as hN, listComments as hO, listCommentsByUserAddress as hP, listCurrentRewards as hQ, listEvents as hR, listMarketClarifications as hS, listMarketHolders as hT, listMarketPositions as hU, listMarketRewards as hV, listMarkets as hW, listOpenInterest as hX, listOpenOrders as hY, listPerpsCandles as hZ, listPerpsFundingHistory as h_, fetchMidpoints as ha, fetchNegRisk as hb, fetchNotifications as hc, fetchOrder as hd, fetchOrderBook as he, fetchOrderBooks as hf, fetchOrderScoring as hg, fetchOrdersScoring as hh, fetchPerpsBook as hi, fetchPerpsFees as hj, fetchPerpsInstruments as hk, fetchPerpsTicker as hl, fetchPerpsTickers as hm, fetchPortfolioValue as hn, fetchPrice as ho, fetchPriceHistory as hp, fetchPrices as hq, fetchPublicProfile as hr, fetchRelatedTagResources as hs, fetchRelatedTags as ht, fetchRewardPercentages as hu, fetchRfqStatus as hv, fetchSeries as hw, fetchSessionKeys as hx, fetchSpread as hy, fetchSpreads as hz, ApproveErc20Error as i, listPositions as i0, listSeries as i1, listTags as i2, listTeams as i3, listTraderLeaderboard as i4, listTrades as i5, listUserEarningsAndMarketsConfig as i6, listUserEarningsForDay as i7, mergeComboPosition as i8, mergeMarketPosition as i9, requestComboQuote as iA, resolveConditionByToken as iB, revokePerpsCredentials as iC, revokeSessionKey as iD, search as iE, setupTradingApprovals as iF, splitComboPosition as iG, splitMarketPosition as iH, splitPosition as iI, subscribe as iJ, transferErc20 as iK, updateBalanceAllowance as iL, waitForComboFill as iM, waitForOrderFillSettlement as iN, withdrawFromPerps as iO, mergePositions as ia, openPerpsSession as ib, openRfqSession as ic, planCollateralReturn as id, postOrder as ie, postOrders as ig, prepareCollateralReturnExecution as ih, prepareErc1155ApprovalForAll as ii, prepareErc20Approval as ij, prepareErc20Transfer as ik, prepareGaslessTransaction as il, prepareMergeComboPosition as im, prepareMergeMarketPosition as io, prepareMergePositions as ip, preparePerpsDeposit as iq, prepareRedeemComboPosition as ir, prepareRedeemMarketPositions as is, prepareRedeemPosition as it, prepareRedeemPositions as iu, prepareSplitComboPosition as iv, prepareSplitMarketPosition as iw, prepareSplitPosition as ix, prepareTradingApprovals as iy, redeemPositions 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 };
|