@polymarket/client 0.12.0 → 0.14.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/README.md +177 -0
- package/dist/actions/index.d.ts +12 -12
- package/dist/actions/index.js +1 -1
- package/dist/chunk-IRLMIGOU.js +3 -0
- package/dist/chunk-IRLMIGOU.js.map +1 -0
- package/dist/chunk-U54M5MQK.js +2 -0
- package/dist/chunk-U54M5MQK.js.map +1 -0
- package/dist/chunk-XUX2UYIW.js +6 -0
- package/dist/chunk-XUX2UYIW.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 +51 -10
- 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-CERQxAjR.d.ts → sports-CW4y_VKL.d.ts} +7 -7
- package/dist/{types-B9F4CyS-.d.ts → types-CprSC_sB.d.ts} +1533 -397
- 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-5JHFOBBZ.js +0 -3
- package/dist/chunk-5JHFOBBZ.js.map +0 -1
- package/dist/chunk-6GBGW5CG.js +0 -2
- package/dist/chunk-6GBGW5CG.js.map +0 -1
- package/dist/chunk-VLNLVY4C.js +0 -6
- package/dist/chunk-VLNLVY4C.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
|
-
import { TransactionId, PaginationCursor, DecimalString, OrderSide, BuilderCode, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, EventId, SeriesId, CommentParentEntityType, SessionSignerScope } from '@polymarket/bindings';
|
|
2
|
+
import { GatewayErrorCode, TransactionId, PaginationCursor, DecimalString, OrderSide, BuilderCode, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, EventId, SeriesId, CommentParentEntityType, SessionSignerScope } from '@polymarket/bindings';
|
|
3
3
|
import * as _polymarket_types from '@polymarket/types';
|
|
4
4
|
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, SessionSignerSignature, TxHash as TxHash$1 } from '@polymarket/types';
|
|
5
|
-
import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
5
|
+
import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, ProtocolVersion, MarketClarificationState, MarketResolutionStatus, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
6
6
|
import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
|
|
7
7
|
import { ZodError, z } from 'zod';
|
|
8
|
-
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForAsset, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OpenOrder, ApiKeyCreds, AssetType, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
8
|
+
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForAsset, RebatedFee, RewardMarket, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OrderHeartbeat, OpenOrder, ApiKeyCreds, AssetType, BalanceAllowanceResponse, RewardMarketSort, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
9
9
|
import * as _polymarket_bindings_data from '@polymarket/bindings/data';
|
|
10
|
-
import { Activity, ComboActivity, Trade, PositionStatus, ComboPositionStatus, PortfolioValue, UserPnlSeries, UserStats, UserVolume, ComboPosition, Position, TraderLeaderboardStanding, BuilderStanding, BuilderVolumePoint, TraderLeaderboardEntry, BiggestWinner, LiveVolume, Resolution, PriceHistoryPoint, OpenInterest, MetaHolder, PriceHistoryInterval } from '@polymarket/bindings/data';
|
|
11
|
-
import { PerpsCancelOrderResult, PerpsBuilderStatus, PerpsSortDirection, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsOrder, PerpsOrderId, PerpsCredentials, PerpsBuilderApproval, PerpsBuilderEarning, PerpsBuilderEarningsSummary, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsAutoCancelStatus, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsInternalTransfer, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsNotificationEntry, PerpsPostOrderAck, PerpsUpdateLeverageResult, PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsInternalTransferId, PerpsWithdrawalId, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
10
|
+
import { Activity, ComboActivity, Trade, PositionStatus, ComboPositionStatus, PortfolioValue, UserPnlSeries, UserStats, UserVolume, ComboPosition, Position, TraderLeaderboardStanding, BuilderStanding, BuilderVolumePoint, TraderLeaderboardEntry, BiggestWinner, TokenReference, LiveVolume, Resolution, PriceHistoryPoint, OpenInterest, MetaHolder, PriceHistoryInterval } from '@polymarket/bindings/data';
|
|
11
|
+
import { PerpsCancelOrderResult, PerpsBuilderStatus, PerpsPositionSnapshots, PerpsSortDirection, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsOrder, PerpsOrderId, PerpsCredentials, PerpsBuilderApproval, PerpsBuilderEarning, PerpsBuilderEarningsSummary, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsAutoCancelStatus, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsInternalTransfer, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsNotificationEntry, PerpsPostOrderAck, PerpsUpdateLeverageResult, PerpsUpdateLeverageBatchResult, PerpsChaseAccepted, PerpsChase, PerpsTwapAccepted, PerpsTwap, PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsInternalTransferId, PerpsWithdrawalId, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
12
12
|
import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
|
|
13
13
|
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';
|
|
14
|
-
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, CryptoPricesChainlinkTwapTopic, CryptoPricesChainlinkTwapWindowSeconds, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapEvent, CryptoPriceEvent, CryptoTwapPriceEvent, EquityPriceEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, UserEvent, SportsEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
14
|
+
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, CryptoPricesChainlinkTwapTopic, CryptoPricesChainlinkTwapWindowSeconds, EquityPricesTopic, EquityPricesEvent, PriceProvider, PriceSource, MarketEvent, StandardMarketEvent, CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapEvent, CryptoPriceEvent, CryptoTwapPriceEvent, EquityPriceEvent, EquityTwapPriceEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, UserEvent, SportsEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
15
15
|
import { Hex } from 'ox';
|
|
16
16
|
|
|
17
17
|
/** Independent rate-limit bucket affected by an order or cancellation. */
|
|
@@ -101,6 +101,15 @@ declare class TransportError extends PolymarketError {
|
|
|
101
101
|
constructor(message: string, options?: ErrorOptions);
|
|
102
102
|
static fromError(error: unknown): TransportError;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Error thrown when a caller cancels a read through its AbortSignal.
|
|
106
|
+
*
|
|
107
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
108
|
+
*/
|
|
109
|
+
declare class RequestAbortedError extends PolymarketError {
|
|
110
|
+
name: "RequestAbortedError";
|
|
111
|
+
constructor(message: string, options?: ErrorOptions);
|
|
112
|
+
}
|
|
104
113
|
/**
|
|
105
114
|
* WebSocket close codes defined by RFC 6455 and the IANA WebSocket Close Code
|
|
106
115
|
* Number registry. Codes 4000-4999 are reserved for application use and are
|
|
@@ -160,7 +169,7 @@ type RequestRejectedErrorOptions = {
|
|
|
160
169
|
* Machine-readable error code from the response body, when the service
|
|
161
170
|
* provided one.
|
|
162
171
|
*/
|
|
163
|
-
code?:
|
|
172
|
+
code?: GatewayErrorCode;
|
|
164
173
|
/**
|
|
165
174
|
* Server-requested delay in seconds before retrying, when the response
|
|
166
175
|
* provided one.
|
|
@@ -177,13 +186,13 @@ type RequestRejectedErrorOptions = {
|
|
|
177
186
|
* rate limiting.
|
|
178
187
|
*/
|
|
179
188
|
declare class RequestRejectedError extends PolymarketError {
|
|
180
|
-
name:
|
|
189
|
+
name: 'RequestRejectedError' | 'OrderHeartbeatMismatchError';
|
|
181
190
|
readonly status: number;
|
|
182
191
|
/**
|
|
183
192
|
* Machine-readable error code from the response body, when the service
|
|
184
193
|
* provided one.
|
|
185
194
|
*/
|
|
186
|
-
readonly code?:
|
|
195
|
+
readonly code?: GatewayErrorCode;
|
|
187
196
|
/**
|
|
188
197
|
* Server-requested delay in seconds before retrying, when the response
|
|
189
198
|
* provided one.
|
|
@@ -196,6 +205,16 @@ declare class RequestRejectedError extends PolymarketError {
|
|
|
196
205
|
readonly restriction?: TradingRestriction;
|
|
197
206
|
constructor(message: string, options: ErrorOptions & RequestRejectedErrorOptions);
|
|
198
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* An order heartbeat used a stale ID. Retry explicitly with heartbeatId and retain
|
|
210
|
+
* the new ID from the successful response. A rejected send does not refresh the deadline.
|
|
211
|
+
*/
|
|
212
|
+
declare class OrderHeartbeatMismatchError extends RequestRejectedError {
|
|
213
|
+
name: "OrderHeartbeatMismatchError";
|
|
214
|
+
/** Currently expected ID. It can be empty after a legacy heartbeat. */
|
|
215
|
+
readonly heartbeatId: string;
|
|
216
|
+
constructor(heartbeatId: string);
|
|
217
|
+
}
|
|
199
218
|
type RateLimitErrorOptions = {
|
|
200
219
|
/**
|
|
201
220
|
* Server-requested delay in seconds before retrying, when the response
|
|
@@ -318,6 +337,50 @@ declare function makeErrorGuard<TClasses extends ReadonlyArray<new (...args: any
|
|
|
318
337
|
isError(error: unknown): error is InstanceType<TClasses[number]>;
|
|
319
338
|
};
|
|
320
339
|
|
|
340
|
+
/**
|
|
341
|
+
* A Fetch-compatible function used for SDK HTTP requests.
|
|
342
|
+
*
|
|
343
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
344
|
+
*/
|
|
345
|
+
type Fetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
346
|
+
/**
|
|
347
|
+
* Controls one data read operation, including subsequent pages.
|
|
348
|
+
*
|
|
349
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
350
|
+
*/
|
|
351
|
+
type RequestOptions = {
|
|
352
|
+
/**
|
|
353
|
+
* Cancels this operation's requests and retry waits.
|
|
354
|
+
*
|
|
355
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
356
|
+
*/
|
|
357
|
+
signal?: AbortSignal;
|
|
358
|
+
/**
|
|
359
|
+
* Timeout in milliseconds for each individual HTTP request attempt until
|
|
360
|
+
* response headers arrive, or `false` to disable it. Defaults to 30 seconds.
|
|
361
|
+
* This is not a total deadline for an SDK method. Each underlying request
|
|
362
|
+
* (including each page) and each permitted retry receives a fresh timeout.
|
|
363
|
+
* Multiple requests, retries, and retry backoff can make the SDK operation
|
|
364
|
+
* take longer than this value.
|
|
365
|
+
* The SDK does not retry timeout errors, even when `retries` is greater than 0.
|
|
366
|
+
* The timeout excludes header resolution, hooks, retry waits, and response
|
|
367
|
+
* body download/parsing.
|
|
368
|
+
*
|
|
369
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
370
|
+
*/
|
|
371
|
+
timeout?: number | false;
|
|
372
|
+
/**
|
|
373
|
+
* Optional retries after the first attempt. Must be an integer from 0 to 5.
|
|
374
|
+
* Transport failures and rate limits share this budget for each request;
|
|
375
|
+
* every pagination request gets a fresh budget. Set 0 when the caller owns retries.
|
|
376
|
+
* Workflow recovery is unaffected.
|
|
377
|
+
*
|
|
378
|
+
* @defaultValue 2
|
|
379
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
380
|
+
*/
|
|
381
|
+
retries?: number;
|
|
382
|
+
};
|
|
383
|
+
|
|
321
384
|
type RequestAddressRequest = {
|
|
322
385
|
kind: 'requestAddress';
|
|
323
386
|
};
|
|
@@ -348,6 +411,18 @@ type SignGaslessMessageRequest = {
|
|
|
348
411
|
kind: 'signGaslessMessage';
|
|
349
412
|
payload: HexString;
|
|
350
413
|
};
|
|
414
|
+
type SendConvertTransactionRequest = {
|
|
415
|
+
kind: 'sendConvertTransaction';
|
|
416
|
+
request: SignerTransactionRequest;
|
|
417
|
+
};
|
|
418
|
+
type SendHorizontalSplitTransactionRequest = {
|
|
419
|
+
kind: 'sendHorizontalSplitTransaction';
|
|
420
|
+
request: SignerTransactionRequest;
|
|
421
|
+
};
|
|
422
|
+
type SendHorizontalMergeTransactionRequest = {
|
|
423
|
+
kind: 'sendHorizontalMergeTransaction';
|
|
424
|
+
request: SignerTransactionRequest;
|
|
425
|
+
};
|
|
351
426
|
type SendSplitPositionTransactionRequest = {
|
|
352
427
|
kind: 'sendSplitPositionTransaction';
|
|
353
428
|
request: SignerTransactionRequest;
|
|
@@ -370,9 +445,9 @@ declare const FetchExecuteParamsRequestSchema: z.ZodObject<{
|
|
|
370
445
|
type: z.ZodEnum<typeof RelayerTransactionType>;
|
|
371
446
|
}, z.core.$strip>;
|
|
372
447
|
type FetchExecuteParamsRequest = z.input<typeof FetchExecuteParamsRequestSchema>;
|
|
373
|
-
type FetchExecuteParamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
448
|
+
type FetchExecuteParamsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
374
449
|
declare const FetchExecuteParamsError: {
|
|
375
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
450
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
376
451
|
};
|
|
377
452
|
/**
|
|
378
453
|
* Fetches the parameters needed to prepare a low-level transaction submission.
|
|
@@ -383,7 +458,7 @@ declare const FetchExecuteParamsError: {
|
|
|
383
458
|
* @throws {@link FetchExecuteParamsError}
|
|
384
459
|
* Thrown on failure.
|
|
385
460
|
*/
|
|
386
|
-
declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest): Promise<RelayerExecuteParams>;
|
|
461
|
+
declare function fetchExecuteParams(client: BaseClient, request: FetchExecuteParamsRequest, options?: RequestOptions): Promise<RelayerExecuteParams>;
|
|
387
462
|
declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
|
|
388
463
|
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<TransactionId, string>>;
|
|
389
464
|
}, z.core.$strip>;
|
|
@@ -393,9 +468,9 @@ declare const IsWalletDeployedRequestSchema: z.ZodObject<{
|
|
|
393
468
|
type: z.ZodEnum<typeof WalletType>;
|
|
394
469
|
}, z.core.$strip>;
|
|
395
470
|
type IsWalletDeployedRequest = z.input<typeof IsWalletDeployedRequestSchema>;
|
|
396
|
-
type IsWalletDeployedError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
471
|
+
type IsWalletDeployedError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
397
472
|
declare const IsWalletDeployedError: {
|
|
398
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
473
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
399
474
|
};
|
|
400
475
|
/**
|
|
401
476
|
* Checks whether a wallet is deployed for relayer-backed transactions.
|
|
@@ -416,7 +491,7 @@ declare const IsWalletDeployedError: {
|
|
|
416
491
|
* });
|
|
417
492
|
* ```
|
|
418
493
|
*/
|
|
419
|
-
declare function isWalletDeployed(client: BaseClient, request?: IsWalletDeployedRequest): Promise<boolean>;
|
|
494
|
+
declare function isWalletDeployed(client: BaseClient, request?: IsWalletDeployedRequest, options?: RequestOptions): Promise<boolean>;
|
|
420
495
|
declare const GaslessTransactionMetadataSchema: z.ZodString;
|
|
421
496
|
type DeployDepositWalletError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
422
497
|
declare const DeployDepositWalletError: {
|
|
@@ -432,6 +507,10 @@ declare const DeployDepositWalletError: {
|
|
|
432
507
|
* Thrown on failure.
|
|
433
508
|
*/
|
|
434
509
|
declare function deployDepositWallet(client: BaseSecureClient): Promise<TransactionHandle>;
|
|
510
|
+
type FetchGaslessTransactionError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
511
|
+
declare const FetchGaslessTransactionError: {
|
|
512
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
513
|
+
};
|
|
435
514
|
/**
|
|
436
515
|
* Fetches a submitted transaction.
|
|
437
516
|
*
|
|
@@ -441,7 +520,7 @@ declare function deployDepositWallet(client: BaseSecureClient): Promise<Transact
|
|
|
441
520
|
* @throws {@link FetchGaslessTransactionError}
|
|
442
521
|
* Thrown on failure.
|
|
443
522
|
*/
|
|
444
|
-
declare function fetchTransaction(client: BaseClient, request: FetchGaslessTransactionRequest): Promise<GaslessTransaction>;
|
|
523
|
+
declare function fetchTransaction(client: BaseClient, request: FetchGaslessTransactionRequest, options?: RequestOptions): Promise<GaslessTransaction>;
|
|
445
524
|
declare const PrepareGaslessTransactionRequestSchema: z.ZodObject<{
|
|
446
525
|
calls: z.ZodPipe<z.ZodArray<z.ZodObject<{
|
|
447
526
|
data: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
@@ -494,6 +573,10 @@ type Page<T> = {
|
|
|
494
573
|
* A depth-limited page can report `true` alongside `limitReached`.
|
|
495
574
|
* Automatic iteration stops there; explicitly following its cursor throws
|
|
496
575
|
* {@link PaginationLimitError} before sending a request.
|
|
576
|
+
*
|
|
577
|
+
* Automatic iteration throws {@link UnexpectedResponseError} if a continuing
|
|
578
|
+
* page carries no cursor or repeats one already requested in that walk,
|
|
579
|
+
* after yielding the pages fetched so far.
|
|
497
580
|
*/
|
|
498
581
|
hasMore: boolean;
|
|
499
582
|
/**
|
|
@@ -534,9 +617,9 @@ declare const ListTradesRequestSchema: z.ZodObject<{
|
|
|
534
617
|
}>>>;
|
|
535
618
|
}, z.core.$strip>;
|
|
536
619
|
type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
|
|
537
|
-
type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
620
|
+
type ListTradesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
538
621
|
declare const ListTradesError: {
|
|
539
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
622
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
540
623
|
};
|
|
541
624
|
/**
|
|
542
625
|
* Lists trades for a wallet, market, or event — or the global recent-trades
|
|
@@ -548,7 +631,7 @@ declare const ListTradesError: {
|
|
|
548
631
|
* sent alone. `conditionId` accepts at most 20 distinct ids. `pageSize`
|
|
549
632
|
* defaults to 100 (max 1000). `window: 'full'` requests the complete
|
|
550
633
|
* history; an omitted window serves the recent feed. Transient rate limits
|
|
551
|
-
* are retried
|
|
634
|
+
* are retried by default.
|
|
552
635
|
*
|
|
553
636
|
* @remarks
|
|
554
637
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -585,7 +668,7 @@ declare const ListTradesError: {
|
|
|
585
668
|
* }
|
|
586
669
|
* ```
|
|
587
670
|
*/
|
|
588
|
-
declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade[]>;
|
|
671
|
+
declare function listTrades(client: BaseClient, request?: ListTradesRequest, options?: RequestOptions): Paginated<Trade[]>;
|
|
589
672
|
declare const ListActivityRequestSchema: z.ZodObject<{
|
|
590
673
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
591
674
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -607,19 +690,22 @@ declare const ListActivityRequestSchema: z.ZodObject<{
|
|
|
607
690
|
}>>>;
|
|
608
691
|
}, z.core.$strip>;
|
|
609
692
|
type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
|
|
610
|
-
type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
693
|
+
type ListActivityError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
611
694
|
declare const ListActivityError: {
|
|
612
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
695
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
613
696
|
};
|
|
614
697
|
/**
|
|
615
698
|
* Lists wallet activity, newest-first by default.
|
|
699
|
+
* Trades and redemptions expose available token outcomes. Narrow splits, merges and redemptions on
|
|
700
|
+
* `isCombo` before using market-only metadata; a basket's outcome names its
|
|
701
|
+
* token side, not a selected leg.
|
|
616
702
|
*
|
|
617
703
|
* Every activity type the service serves is included by default — deposits
|
|
618
704
|
* and withdrawals are not filtered out; use the `type` filter to narrow
|
|
619
705
|
* results. `window: 'full'`
|
|
620
706
|
* requests the complete history (an omitted window serves the service's
|
|
621
707
|
* default range — the most recent three years). `pageSize` defaults to 100
|
|
622
|
-
* (max 1000). Transient rate limits are retried
|
|
708
|
+
* (max 1000). Transient rate limits are retried by default.
|
|
623
709
|
*
|
|
624
710
|
* @remarks
|
|
625
711
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -656,7 +742,7 @@ declare const ListActivityError: {
|
|
|
656
742
|
* }
|
|
657
743
|
* ```
|
|
658
744
|
*/
|
|
659
|
-
declare function listActivity(client: BaseClient, request: ListActivityRequest): Paginated<Activity[]>;
|
|
745
|
+
declare function listActivity(client: BaseClient, request: ListActivityRequest, options?: RequestOptions): Paginated<Activity[]>;
|
|
660
746
|
declare const ListComboActivityRequestSchema: z.ZodObject<{
|
|
661
747
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
662
748
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -664,9 +750,9 @@ declare const ListComboActivityRequestSchema: z.ZodObject<{
|
|
|
664
750
|
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ComboConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ComboConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ComboConditionId[], _polymarket_bindings.ComboConditionId[]>>]>>;
|
|
665
751
|
}, z.core.$strip>;
|
|
666
752
|
type ListComboActivityRequest = z.input<typeof ListComboActivityRequestSchema>;
|
|
667
|
-
type ListComboActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
753
|
+
type ListComboActivityError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
668
754
|
declare const ListComboActivityError: {
|
|
669
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
755
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
670
756
|
};
|
|
671
757
|
/**
|
|
672
758
|
* Lists Combo lifecycle activity for a wallet, ordered by on-chain position.
|
|
@@ -674,7 +760,7 @@ declare const ListComboActivityError: {
|
|
|
674
760
|
* Every row carries the Combo position id and its legs enriched with market
|
|
675
761
|
* metadata; redeem rows additionally carry payout semantics. `pageSize`
|
|
676
762
|
* defaults to 100 (max 1000). Transient rate limits are retried
|
|
677
|
-
*
|
|
763
|
+
* by default.
|
|
678
764
|
*
|
|
679
765
|
* @remarks
|
|
680
766
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -698,7 +784,7 @@ declare const ListComboActivityError: {
|
|
|
698
784
|
* }
|
|
699
785
|
* ```
|
|
700
786
|
*/
|
|
701
|
-
declare function listComboActivity(client: BaseClient, request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
787
|
+
declare function listComboActivity(client: BaseClient, request: ListComboActivityRequest, options?: RequestOptions): Paginated<ComboActivity[]>;
|
|
702
788
|
|
|
703
789
|
declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
704
790
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
@@ -707,6 +793,7 @@ declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
|
707
793
|
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>, z.ZodTransform<_polymarket_bindings.ConditionId, _polymarket_bindings.ConditionId>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>]>>;
|
|
708
794
|
status: z.ZodOptional<z.ZodEnum<typeof PositionStatus>>;
|
|
709
795
|
eventId: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>>;
|
|
796
|
+
title: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string | undefined, string>>>;
|
|
710
797
|
filterType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.PositionFilterType>>;
|
|
711
798
|
filterAmount: z.ZodOptional<z.ZodNumber>;
|
|
712
799
|
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -724,9 +811,9 @@ declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
|
724
811
|
}>>>;
|
|
725
812
|
}, z.core.$strip>;
|
|
726
813
|
type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
|
|
727
|
-
type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
814
|
+
type ListPositionsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
728
815
|
declare const ListPositionsError: {
|
|
729
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
816
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
730
817
|
};
|
|
731
818
|
/**
|
|
732
819
|
* Lists positions for a wallet, or a market's holders when anchored on a
|
|
@@ -743,12 +830,20 @@ declare const ListPositionsError: {
|
|
|
743
830
|
* status but CLOSED unless `filterType`/`filterAmount` say otherwise.
|
|
744
831
|
* `conditionId` accepts at most 20 distinct ids (with `user`). `pageSize`
|
|
745
832
|
* defaults to 100 (max 1000). Transient rate limits are retried
|
|
746
|
-
*
|
|
833
|
+
* by default.
|
|
747
834
|
*
|
|
748
835
|
* `REDEEMABLE_LOST` requires `user`. For `MERGEABLE`, provide `user` to
|
|
749
836
|
* filter to mergeable positions; a `conditionId`-only request falls back
|
|
750
837
|
* to the broader `OPEN` listing. `sortBy` defaults to `TOKENS` for
|
|
751
838
|
* `MERGEABLE`, `REALIZED_PNL` for `CLOSED`, and `CURRENT_VALUE` otherwise.
|
|
839
|
+
* For wallet-anchored `CLOSED` listings, `TOKENS`, `CURRENT_VALUE`, `PRICE`
|
|
840
|
+
* and `UNREALIZED_PNL` sort by realized PnL in the requested direction.
|
|
841
|
+
* Keep the original filters and requested sort when resuming a cursor. If
|
|
842
|
+
* an older cursor is rejected with HTTP 400 because the ordering changed,
|
|
843
|
+
* discard it and explicitly fetch a new first page; the paginator does not
|
|
844
|
+
* restart the listing.
|
|
845
|
+
* `title` filters by case-insensitive substring across every status and
|
|
846
|
+
* anchor; the paginator retains it when advancing or resuming.
|
|
752
847
|
*
|
|
753
848
|
* @remarks
|
|
754
849
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -785,7 +880,7 @@ declare const ListPositionsError: {
|
|
|
785
880
|
* }
|
|
786
881
|
* ```
|
|
787
882
|
*/
|
|
788
|
-
declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
|
|
883
|
+
declare function listPositions(client: BaseClient, request: ListPositionsRequest, options?: RequestOptions): Paginated<Position[]>;
|
|
789
884
|
/**
|
|
790
885
|
* One status or a non-empty ordered list of statuses. Pass multiple statuses
|
|
791
886
|
* as an array rather than a comma-separated string.
|
|
@@ -808,9 +903,9 @@ declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
|
808
903
|
type ListComboPositionsRequest = Omit<z.input<typeof ListComboPositionsRequestSchema>, 'status'> & {
|
|
809
904
|
status?: ComboPositionStatusFilter;
|
|
810
905
|
};
|
|
811
|
-
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
906
|
+
type ListComboPositionsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
812
907
|
declare const ListComboPositionsError: {
|
|
813
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
908
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
814
909
|
};
|
|
815
910
|
/**
|
|
816
911
|
* Lists Combo positions for a wallet.
|
|
@@ -820,7 +915,7 @@ declare const ListComboPositionsError: {
|
|
|
820
915
|
* `redeemable` flag is set. Every row carries its legs enriched with market
|
|
821
916
|
* metadata and exact entry economics. `updatedAfter`/`updatedBefore` bound
|
|
822
917
|
* the rows' change watermark for incremental sync. `pageSize` defaults to
|
|
823
|
-
* 100 (max 1000). Transient rate limits are retried
|
|
918
|
+
* 100 (max 1000). Transient rate limits are retried by default.
|
|
824
919
|
*
|
|
825
920
|
* @remarks
|
|
826
921
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -878,15 +973,15 @@ declare const ListComboPositionsError: {
|
|
|
878
973
|
* });
|
|
879
974
|
* ```
|
|
880
975
|
*/
|
|
881
|
-
declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
976
|
+
declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest, options?: RequestOptions): Paginated<ComboPosition[]>;
|
|
882
977
|
declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
|
|
883
978
|
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
884
979
|
conditionIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>>;
|
|
885
980
|
}, z.core.$strip>;
|
|
886
981
|
type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
|
|
887
|
-
type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
982
|
+
type FetchPortfolioValueError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
888
983
|
declare const FetchPortfolioValueError: {
|
|
889
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
984
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
890
985
|
};
|
|
891
986
|
/**
|
|
892
987
|
* Fetches the total value for a wallet's positions.
|
|
@@ -911,14 +1006,14 @@ declare const FetchPortfolioValueError: {
|
|
|
911
1006
|
* // value: PortfolioValue
|
|
912
1007
|
* ```
|
|
913
1008
|
*/
|
|
914
|
-
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
1009
|
+
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest, options?: RequestOptions): Promise<PortfolioValue>;
|
|
915
1010
|
declare const FetchUserStatsRequestSchema: z.ZodObject<{
|
|
916
1011
|
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
917
1012
|
}, z.core.$strip>;
|
|
918
1013
|
type FetchUserStatsRequest = z.input<typeof FetchUserStatsRequestSchema>;
|
|
919
|
-
type FetchUserStatsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
1014
|
+
type FetchUserStatsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
920
1015
|
declare const FetchUserStatsError: {
|
|
921
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
1016
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
922
1017
|
};
|
|
923
1018
|
/**
|
|
924
1019
|
* Fetches profile and lifetime trading statistics for a wallet.
|
|
@@ -943,16 +1038,16 @@ declare const FetchUserStatsError: {
|
|
|
943
1038
|
* // stats: UserStats | null
|
|
944
1039
|
* ```
|
|
945
1040
|
*/
|
|
946
|
-
declare function fetchUserStats(client: BaseClient, request: FetchUserStatsRequest): Promise<UserStats | null>;
|
|
1041
|
+
declare function fetchUserStats(client: BaseClient, request: FetchUserStatsRequest, options?: RequestOptions): Promise<UserStats | null>;
|
|
947
1042
|
declare const FetchUserPnlRequestSchema: z.ZodObject<{
|
|
948
1043
|
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
949
1044
|
interval: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.UserPnlInterval>>;
|
|
950
1045
|
fidelity: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.UserPnlFidelity>>;
|
|
951
1046
|
}, z.core.$strip>;
|
|
952
1047
|
type FetchUserPnlRequest = z.input<typeof FetchUserPnlRequestSchema>;
|
|
953
|
-
type FetchUserPnlError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
1048
|
+
type FetchUserPnlError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
954
1049
|
declare const FetchUserPnlError: {
|
|
955
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
1050
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
956
1051
|
};
|
|
957
1052
|
/**
|
|
958
1053
|
* Fetches a wallet's cumulative PnL series.
|
|
@@ -976,7 +1071,7 @@ declare const FetchUserPnlError: {
|
|
|
976
1071
|
* });
|
|
977
1072
|
* ```
|
|
978
1073
|
*/
|
|
979
|
-
declare function fetchUserPnl(client: BaseClient, request: FetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
1074
|
+
declare function fetchUserPnl(client: BaseClient, request: FetchUserPnlRequest, options?: RequestOptions): Promise<UserPnlSeries>;
|
|
980
1075
|
declare const FetchUserVolumeRequestSchema: z.ZodObject<{
|
|
981
1076
|
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
982
1077
|
window: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodObject<{
|
|
@@ -991,9 +1086,9 @@ declare const FetchUserVolumeRequestSchema: z.ZodObject<{
|
|
|
991
1086
|
}>>>;
|
|
992
1087
|
}, z.core.$strip>;
|
|
993
1088
|
type FetchUserVolumeRequest = z.input<typeof FetchUserVolumeRequestSchema>;
|
|
994
|
-
type FetchUserVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
1089
|
+
type FetchUserVolumeError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
995
1090
|
declare const FetchUserVolumeError: {
|
|
996
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
1091
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
997
1092
|
};
|
|
998
1093
|
/**
|
|
999
1094
|
* Fetches a wallet's trading volume for a time window.
|
|
@@ -1015,14 +1110,14 @@ declare const FetchUserVolumeError: {
|
|
|
1015
1110
|
* });
|
|
1016
1111
|
* ```
|
|
1017
1112
|
*/
|
|
1018
|
-
declare function fetchUserVolume(client: BaseClient, request: FetchUserVolumeRequest): Promise<UserVolume>;
|
|
1113
|
+
declare function fetchUserVolume(client: BaseClient, request: FetchUserVolumeRequest, options?: RequestOptions): Promise<UserVolume>;
|
|
1019
1114
|
declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
|
|
1020
1115
|
user: z.ZodString;
|
|
1021
1116
|
}, z.core.$strip>;
|
|
1022
1117
|
type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
|
|
1023
|
-
type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
1118
|
+
type DownloadAccountingSnapshotError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
1024
1119
|
declare const DownloadAccountingSnapshotError: {
|
|
1025
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
1120
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
1026
1121
|
};
|
|
1027
1122
|
/**
|
|
1028
1123
|
* Downloads an accounting snapshot archive for a wallet.
|
|
@@ -1042,7 +1137,7 @@ declare const DownloadAccountingSnapshotError: {
|
|
|
1042
1137
|
* // snapshot === Blob
|
|
1043
1138
|
* ```
|
|
1044
1139
|
*/
|
|
1045
|
-
declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
|
|
1140
|
+
declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest, options?: RequestOptions): Promise<Blob>;
|
|
1046
1141
|
|
|
1047
1142
|
type DefaultAccountWallet<TRequest extends {
|
|
1048
1143
|
user?: string;
|
|
@@ -1081,6 +1176,15 @@ type PublicAccountActions = Prettify<{
|
|
|
1081
1176
|
*
|
|
1082
1177
|
* `sortBy` defaults to `TOKENS` for `MERGEABLE`, `REALIZED_PNL` for
|
|
1083
1178
|
* `CLOSED`, and `CURRENT_VALUE` for the other statuses.
|
|
1179
|
+
* For wallet-anchored `CLOSED` listings, `TOKENS`, `CURRENT_VALUE`, `PRICE`
|
|
1180
|
+
* and `UNREALIZED_PNL` sort by realized PnL in the requested direction.
|
|
1181
|
+
* Keep the original filters and requested sort when resuming a cursor. If
|
|
1182
|
+
* an older cursor is rejected with HTTP 400 because the ordering changed,
|
|
1183
|
+
* discard it and explicitly fetch a new first page; the paginator does not
|
|
1184
|
+
* restart the listing.
|
|
1185
|
+
* `title` filters by case-insensitive substring (max 200 Unicode characters).
|
|
1186
|
+
* `%` and `_` are wildcards. Blank input is ignored; other patterns are
|
|
1187
|
+
* preserved unchanged on every page, including cursor replay.
|
|
1084
1188
|
*
|
|
1085
1189
|
* @throws {@link ListPositionsError}
|
|
1086
1190
|
* Thrown on failure.
|
|
@@ -1114,7 +1218,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1114
1218
|
* }
|
|
1115
1219
|
* ```
|
|
1116
1220
|
*/
|
|
1117
|
-
listPositions(request: ListPositionsRequest): Paginated<Position[]>;
|
|
1221
|
+
listPositions(request: ListPositionsRequest, options?: RequestOptions): Paginated<Position[]>;
|
|
1118
1222
|
/**
|
|
1119
1223
|
* Lists combo positions for a wallet.
|
|
1120
1224
|
*
|
|
@@ -1145,7 +1249,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1145
1249
|
* });
|
|
1146
1250
|
* ```
|
|
1147
1251
|
*/
|
|
1148
|
-
listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
1252
|
+
listComboPositions(request: ListComboPositionsRequest, options?: RequestOptions): Paginated<ComboPosition[]>;
|
|
1149
1253
|
/**
|
|
1150
1254
|
* Fetches the total value for a wallet's positions.
|
|
1151
1255
|
*
|
|
@@ -1164,7 +1268,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1164
1268
|
* });
|
|
1165
1269
|
* ```
|
|
1166
1270
|
*/
|
|
1167
|
-
fetchPortfolioValue(request: FetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
1271
|
+
fetchPortfolioValue(request: FetchPortfolioValueRequest, options?: RequestOptions): Promise<PortfolioValue>;
|
|
1168
1272
|
/**
|
|
1169
1273
|
* Fetches one trader's standing on both the PnL and volume boards.
|
|
1170
1274
|
*
|
|
@@ -1182,7 +1286,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1182
1286
|
* });
|
|
1183
1287
|
* ```
|
|
1184
1288
|
*/
|
|
1185
|
-
fetchTraderLeaderboardStanding(request: FetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
1289
|
+
fetchTraderLeaderboardStanding(request: FetchTraderLeaderboardStandingRequest, options?: RequestOptions): Promise<TraderLeaderboardStanding | null>;
|
|
1186
1290
|
/**
|
|
1187
1291
|
* Fetches profile and lifetime trading statistics for a wallet.
|
|
1188
1292
|
*
|
|
@@ -1200,7 +1304,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1200
1304
|
* });
|
|
1201
1305
|
* ```
|
|
1202
1306
|
*/
|
|
1203
|
-
fetchUserStats(request: FetchUserStatsRequest): Promise<UserStats | null>;
|
|
1307
|
+
fetchUserStats(request: FetchUserStatsRequest, options?: RequestOptions): Promise<UserStats | null>;
|
|
1204
1308
|
/**
|
|
1205
1309
|
* Fetches a wallet's cumulative PnL series.
|
|
1206
1310
|
*
|
|
@@ -1220,7 +1324,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1220
1324
|
* });
|
|
1221
1325
|
* ```
|
|
1222
1326
|
*/
|
|
1223
|
-
fetchUserPnl(request: FetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
1327
|
+
fetchUserPnl(request: FetchUserPnlRequest, options?: RequestOptions): Promise<UserPnlSeries>;
|
|
1224
1328
|
/**
|
|
1225
1329
|
* Fetches a wallet's trading volume for a time window.
|
|
1226
1330
|
*
|
|
@@ -1238,7 +1342,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1238
1342
|
* });
|
|
1239
1343
|
* ```
|
|
1240
1344
|
*/
|
|
1241
|
-
fetchUserVolume(request: FetchUserVolumeRequest): Promise<UserVolume>;
|
|
1345
|
+
fetchUserVolume(request: FetchUserVolumeRequest, options?: RequestOptions): Promise<UserVolume>;
|
|
1242
1346
|
/**
|
|
1243
1347
|
* Downloads an accounting snapshot archive for a wallet.
|
|
1244
1348
|
*
|
|
@@ -1252,16 +1356,19 @@ type PublicAccountActions = Prettify<{
|
|
|
1252
1356
|
* });
|
|
1253
1357
|
* ```
|
|
1254
1358
|
*/
|
|
1255
|
-
downloadAccountingSnapshot(request: DownloadAccountingSnapshotRequest): Promise<Blob>;
|
|
1359
|
+
downloadAccountingSnapshot(request: DownloadAccountingSnapshotRequest, options?: RequestOptions): Promise<Blob>;
|
|
1256
1360
|
/**
|
|
1257
1361
|
* Lists wallet activity.
|
|
1362
|
+
* Trades and redemptions expose available token outcomes. Narrow splits, merges and redemptions on
|
|
1363
|
+
* `isCombo` before using market-only metadata; a basket's outcome names its
|
|
1364
|
+
* token side, not a selected leg.
|
|
1258
1365
|
*
|
|
1259
1366
|
* Every activity type is included by default, including deposits and
|
|
1260
1367
|
* withdrawals; use the `type` filter to narrow results. An omitted `window`
|
|
1261
1368
|
* serves the most recent three years; `window: 'full'` requests the complete
|
|
1262
1369
|
* history. Window bounds accept Unix epoch seconds or `Date` values. Results
|
|
1263
1370
|
* are newest-first by default. `pageSize` defaults to 100 (max 1000), and
|
|
1264
|
-
* transient rate limits are retried
|
|
1371
|
+
* transient rate limits are retried by default.
|
|
1265
1372
|
*
|
|
1266
1373
|
* @throws {@link ListActivityError}
|
|
1267
1374
|
* Thrown on failure.
|
|
@@ -1295,7 +1402,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1295
1402
|
* }
|
|
1296
1403
|
* ```
|
|
1297
1404
|
*/
|
|
1298
|
-
listActivity(request: ListActivityRequest): Paginated<Activity[]>;
|
|
1405
|
+
listActivity(request: ListActivityRequest, options?: RequestOptions): Paginated<Activity[]>;
|
|
1299
1406
|
/**
|
|
1300
1407
|
* Lists combo lifecycle activity for a wallet.
|
|
1301
1408
|
*
|
|
@@ -1313,7 +1420,7 @@ type PublicAccountActions = Prettify<{
|
|
|
1313
1420
|
* const firstPage = await paginator.firstPage();
|
|
1314
1421
|
* ```
|
|
1315
1422
|
*/
|
|
1316
|
-
listComboActivity(request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
1423
|
+
listComboActivity(request: ListComboActivityRequest, options?: RequestOptions): Paginated<ComboActivity[]>;
|
|
1317
1424
|
}>;
|
|
1318
1425
|
type SecureAccountActions = Prettify<{
|
|
1319
1426
|
/**
|
|
@@ -1334,6 +1441,15 @@ type SecureAccountActions = Prettify<{
|
|
|
1334
1441
|
*
|
|
1335
1442
|
* `sortBy` defaults to `TOKENS` for `MERGEABLE`, `REALIZED_PNL` for
|
|
1336
1443
|
* `CLOSED`, and `CURRENT_VALUE` for the other statuses.
|
|
1444
|
+
* For wallet-anchored `CLOSED` listings, `TOKENS`, `CURRENT_VALUE`, `PRICE`
|
|
1445
|
+
* and `UNREALIZED_PNL` sort by realized PnL in the requested direction.
|
|
1446
|
+
* Keep the original filters and requested sort when resuming a cursor. If
|
|
1447
|
+
* an older cursor is rejected with HTTP 400 because the ordering changed,
|
|
1448
|
+
* discard it and explicitly fetch a new first page; the paginator does not
|
|
1449
|
+
* restart the listing.
|
|
1450
|
+
* `title` filters by case-insensitive substring (max 200 Unicode characters).
|
|
1451
|
+
* `%` and `_` are wildcards. Blank input is ignored; other patterns are
|
|
1452
|
+
* preserved unchanged on every page, including cursor replay.
|
|
1337
1453
|
*
|
|
1338
1454
|
* @throws {@link ListPositionsError}
|
|
1339
1455
|
* Thrown on failure.
|
|
@@ -1348,7 +1464,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1348
1464
|
* const firstPage = await paginator.firstPage();
|
|
1349
1465
|
* ```
|
|
1350
1466
|
*/
|
|
1351
|
-
listPositions(request?: SecureListPositionsRequest): Paginated<Position[]>;
|
|
1467
|
+
listPositions(request?: SecureListPositionsRequest, options?: RequestOptions): Paginated<Position[]>;
|
|
1352
1468
|
/**
|
|
1353
1469
|
* Lists combo positions for a wallet.
|
|
1354
1470
|
*
|
|
@@ -1368,7 +1484,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1368
1484
|
* });
|
|
1369
1485
|
* ```
|
|
1370
1486
|
*/
|
|
1371
|
-
listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
1487
|
+
listComboPositions(request?: SecureListComboPositionsRequest, options?: RequestOptions): Paginated<ComboPosition[]>;
|
|
1372
1488
|
/**
|
|
1373
1489
|
* Fetches the total value for a wallet's positions.
|
|
1374
1490
|
*
|
|
@@ -1381,7 +1497,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1381
1497
|
* @throws {@link FetchPortfolioValueError}
|
|
1382
1498
|
* Thrown on failure.
|
|
1383
1499
|
*/
|
|
1384
|
-
fetchPortfolioValue(request?: SecureFetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
1500
|
+
fetchPortfolioValue(request?: SecureFetchPortfolioValueRequest, options?: RequestOptions): Promise<PortfolioValue>;
|
|
1385
1501
|
/**
|
|
1386
1502
|
* Fetches one trader's standing on both the PnL and volume boards.
|
|
1387
1503
|
*
|
|
@@ -1399,7 +1515,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1399
1515
|
* });
|
|
1400
1516
|
* ```
|
|
1401
1517
|
*/
|
|
1402
|
-
fetchTraderLeaderboardStanding(request?: SecureFetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
1518
|
+
fetchTraderLeaderboardStanding(request?: SecureFetchTraderLeaderboardStandingRequest, options?: RequestOptions): Promise<TraderLeaderboardStanding | null>;
|
|
1403
1519
|
/**
|
|
1404
1520
|
* Fetches profile and lifetime trading statistics for a wallet.
|
|
1405
1521
|
*
|
|
@@ -1411,7 +1527,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1411
1527
|
* @throws {@link FetchUserStatsError}
|
|
1412
1528
|
* Thrown on failure.
|
|
1413
1529
|
*/
|
|
1414
|
-
fetchUserStats(request?: SecureFetchUserStatsRequest): Promise<UserStats | null>;
|
|
1530
|
+
fetchUserStats(request?: SecureFetchUserStatsRequest, options?: RequestOptions): Promise<UserStats | null>;
|
|
1415
1531
|
/**
|
|
1416
1532
|
* Fetches the cumulative PnL series for a wallet.
|
|
1417
1533
|
*
|
|
@@ -1421,7 +1537,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1421
1537
|
* @throws {@link FetchUserPnlError}
|
|
1422
1538
|
* Thrown on failure.
|
|
1423
1539
|
*/
|
|
1424
|
-
fetchUserPnl(request?: SecureFetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
1540
|
+
fetchUserPnl(request?: SecureFetchUserPnlRequest, options?: RequestOptions): Promise<UserPnlSeries>;
|
|
1425
1541
|
/**
|
|
1426
1542
|
* Fetches trading volume for a wallet over a time window.
|
|
1427
1543
|
*
|
|
@@ -1432,7 +1548,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1432
1548
|
* @throws {@link FetchUserVolumeError}
|
|
1433
1549
|
* Thrown on failure.
|
|
1434
1550
|
*/
|
|
1435
|
-
fetchUserVolume(request?: SecureFetchUserVolumeRequest): Promise<UserVolume>;
|
|
1551
|
+
fetchUserVolume(request?: SecureFetchUserVolumeRequest, options?: RequestOptions): Promise<UserVolume>;
|
|
1436
1552
|
/**
|
|
1437
1553
|
* Downloads an accounting snapshot archive for a wallet.
|
|
1438
1554
|
*
|
|
@@ -1441,9 +1557,12 @@ type SecureAccountActions = Prettify<{
|
|
|
1441
1557
|
* @throws {@link DownloadAccountingSnapshotError}
|
|
1442
1558
|
* Thrown on failure.
|
|
1443
1559
|
*/
|
|
1444
|
-
downloadAccountingSnapshot(request?: SecureDownloadAccountingSnapshotRequest): Promise<Blob>;
|
|
1560
|
+
downloadAccountingSnapshot(request?: SecureDownloadAccountingSnapshotRequest, options?: RequestOptions): Promise<Blob>;
|
|
1445
1561
|
/**
|
|
1446
1562
|
* Lists wallet activity.
|
|
1563
|
+
* Trades and redemptions expose available token outcomes. Narrow splits, merges and redemptions on
|
|
1564
|
+
* `isCombo` before using market-only metadata; a basket's outcome names its
|
|
1565
|
+
* token side, not a selected leg.
|
|
1447
1566
|
*
|
|
1448
1567
|
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1449
1568
|
*
|
|
@@ -1452,12 +1571,12 @@ type SecureAccountActions = Prettify<{
|
|
|
1452
1571
|
* serves the most recent three years; `window: 'full'` requests the complete
|
|
1453
1572
|
* history. Window bounds accept Unix epoch seconds or `Date` values. Results
|
|
1454
1573
|
* are newest-first by default. `pageSize` defaults to 100 (max 1000), and
|
|
1455
|
-
* transient rate limits are retried
|
|
1574
|
+
* transient rate limits are retried by default.
|
|
1456
1575
|
*
|
|
1457
1576
|
* @throws {@link ListActivityError}
|
|
1458
1577
|
* Thrown on failure.
|
|
1459
1578
|
*/
|
|
1460
|
-
listActivity(request?: SecureListActivityRequest): Paginated<Activity[]>;
|
|
1579
|
+
listActivity(request?: SecureListActivityRequest, options?: RequestOptions): Paginated<Activity[]>;
|
|
1461
1580
|
/**
|
|
1462
1581
|
* Lists combo lifecycle activity for a wallet.
|
|
1463
1582
|
*
|
|
@@ -1466,7 +1585,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1466
1585
|
* @throws {@link ListComboActivityError}
|
|
1467
1586
|
* Thrown on failure.
|
|
1468
1587
|
*/
|
|
1469
|
-
listComboActivity(request?: SecureListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
1588
|
+
listComboActivity(request?: SecureListComboActivityRequest, options?: RequestOptions): Paginated<ComboActivity[]>;
|
|
1470
1589
|
/**
|
|
1471
1590
|
* Lists trades for the authenticated account across all pages.
|
|
1472
1591
|
*
|
|
@@ -1500,7 +1619,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1500
1619
|
* }
|
|
1501
1620
|
* ```
|
|
1502
1621
|
*/
|
|
1503
|
-
listAccountTrades(request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
|
|
1622
|
+
listAccountTrades(request?: ListAccountTradesRequest, options?: RequestOptions): Paginated<ClobTrade[]>;
|
|
1504
1623
|
/**
|
|
1505
1624
|
* Fetches notifications for the authenticated account.
|
|
1506
1625
|
* Notifications of a kind this SDK version does not recognize are omitted.
|
|
@@ -1513,7 +1632,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1513
1632
|
* const notifications = await client.fetchNotifications();
|
|
1514
1633
|
* ```
|
|
1515
1634
|
*/
|
|
1516
|
-
fetchNotifications(): Promise<NotificationsResponse>;
|
|
1635
|
+
fetchNotifications(options?: RequestOptions): Promise<NotificationsResponse>;
|
|
1517
1636
|
/**
|
|
1518
1637
|
* Drops notifications for the authenticated account.
|
|
1519
1638
|
*
|
|
@@ -1539,7 +1658,7 @@ type SecureAccountActions = Prettify<{
|
|
|
1539
1658
|
* const closedOnly = await client.fetchClosedOnlyMode();
|
|
1540
1659
|
* ```
|
|
1541
1660
|
*/
|
|
1542
|
-
fetchClosedOnlyMode(): Promise<boolean>;
|
|
1661
|
+
fetchClosedOnlyMode(options?: RequestOptions): Promise<boolean>;
|
|
1543
1662
|
}>;
|
|
1544
1663
|
declare function accountActions(client: BasePublicClient): PublicAccountActions;
|
|
1545
1664
|
declare function accountActions(client: BaseSecureClient): SecureAccountActions;
|
|
@@ -1578,14 +1697,14 @@ type AnalyticsActions = {
|
|
|
1578
1697
|
* }
|
|
1579
1698
|
* ```
|
|
1580
1699
|
*/
|
|
1581
|
-
listBuilderTrades(request: ListBuilderTradesRequest): Paginated<BuilderTrade[]>;
|
|
1700
|
+
listBuilderTrades(request: ListBuilderTradesRequest, options?: RequestOptions): Paginated<BuilderTrade[]>;
|
|
1582
1701
|
/**
|
|
1583
1702
|
* Lists builder leaderboard rankings.
|
|
1584
1703
|
*
|
|
1585
1704
|
* Builders are ranked by attributed share volume within `window`, which
|
|
1586
1705
|
* defaults to one day. `builderCode` is the stable identifier; names and
|
|
1587
1706
|
* profile images are display metadata. `pageSize` defaults to 100 (max 1000).
|
|
1588
|
-
* Transient rate limits are retried
|
|
1707
|
+
* Transient rate limits are retried by default.
|
|
1589
1708
|
*
|
|
1590
1709
|
* @throws {@link ListBuilderLeaderboardError}
|
|
1591
1710
|
* Thrown on failure.
|
|
@@ -1619,7 +1738,7 @@ type AnalyticsActions = {
|
|
|
1619
1738
|
* }
|
|
1620
1739
|
* ```
|
|
1621
1740
|
*/
|
|
1622
|
-
listBuilderLeaderboard(request?: ListBuilderLeaderboardRequest): Paginated<BuilderStanding[]>;
|
|
1741
|
+
listBuilderLeaderboard(request?: ListBuilderLeaderboardRequest, options?: RequestOptions): Paginated<BuilderStanding[]>;
|
|
1623
1742
|
/**
|
|
1624
1743
|
* Fetches the per-builder volume time series.
|
|
1625
1744
|
*
|
|
@@ -1627,7 +1746,7 @@ type AnalyticsActions = {
|
|
|
1627
1746
|
* {@link BuilderVolumeInterval.Year} for one bucket per calendar year.
|
|
1628
1747
|
* `bucketLimit` returns that many complete recent buckets (default 30, max 90),
|
|
1629
1748
|
* not that many builder rows. Results are newest bucket first, and volume is
|
|
1630
|
-
* measured in shares. Transient rate limits are retried
|
|
1749
|
+
* measured in shares. Transient rate limits are retried by default.
|
|
1631
1750
|
*
|
|
1632
1751
|
* @throws {@link FetchBuilderVolumeError}
|
|
1633
1752
|
* Thrown on failure.
|
|
@@ -1640,7 +1759,7 @@ type AnalyticsActions = {
|
|
|
1640
1759
|
* });
|
|
1641
1760
|
* ```
|
|
1642
1761
|
*/
|
|
1643
|
-
fetchBuilderVolume(request?: FetchBuilderVolumeRequest): Promise<BuilderVolumePoint[]>;
|
|
1762
|
+
fetchBuilderVolume(request?: FetchBuilderVolumeRequest, options?: RequestOptions): Promise<BuilderVolumePoint[]>;
|
|
1644
1763
|
/**
|
|
1645
1764
|
* Lists trader leaderboard rankings.
|
|
1646
1765
|
*
|
|
@@ -1683,7 +1802,7 @@ type AnalyticsActions = {
|
|
|
1683
1802
|
* }
|
|
1684
1803
|
* ```
|
|
1685
1804
|
*/
|
|
1686
|
-
listTraderLeaderboard(request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
|
|
1805
|
+
listTraderLeaderboard(request?: ListTraderLeaderboardRequest, options?: RequestOptions): Paginated<TraderLeaderboardEntry[]>;
|
|
1687
1806
|
/**
|
|
1688
1807
|
* Lists the largest individual winning positions.
|
|
1689
1808
|
*
|
|
@@ -1709,19 +1828,42 @@ type AnalyticsActions = {
|
|
|
1709
1828
|
* }
|
|
1710
1829
|
* ```
|
|
1711
1830
|
*/
|
|
1712
|
-
listBiggestWinners(request?: ListBiggestWinnersRequest): Paginated<BiggestWinner[]>;
|
|
1831
|
+
listBiggestWinners(request?: ListBiggestWinnersRequest, options?: RequestOptions): Paginated<BiggestWinner[]>;
|
|
1713
1832
|
};
|
|
1714
1833
|
declare function analyticsActions(client: BasePublicClient): AnalyticsActions;
|
|
1715
1834
|
declare function analyticsActions(client: BaseSecureClient): AnalyticsActions;
|
|
1716
1835
|
|
|
1717
1836
|
type DataActions = {
|
|
1837
|
+
/**
|
|
1838
|
+
* Fetches reference and settlement metadata for outcome assets.
|
|
1839
|
+
*
|
|
1840
|
+
* Provide exactly one selector family: up to 50 distinct decimal `assetIds`,
|
|
1841
|
+
* or up to 10 distinct 31-byte or 32-byte hex `conditionIds`. Elements are
|
|
1842
|
+
* trimmed, blanks dropped, and duplicates removed in first-seen order.
|
|
1843
|
+
* Decimal IDs have leading zeros stripped and at most 78 remaining digits.
|
|
1844
|
+
* Conditions are lowercased without changing their width.
|
|
1845
|
+
*
|
|
1846
|
+
* Returns a direct collection. Unknown selectors contribute no rows; asset
|
|
1847
|
+
* lookups retain request order and condition groups retain server order.
|
|
1848
|
+
* Overlapping conditions can repeat assets. Settlement metadata and outcome
|
|
1849
|
+
* labels can lag by up to a minute. Transient rate limits are retried automatically.
|
|
1850
|
+
*
|
|
1851
|
+
* @throws {@link FetchTokenReferencesError}
|
|
1852
|
+
* Thrown on failure.
|
|
1853
|
+
*
|
|
1854
|
+
* @example
|
|
1855
|
+
* ```ts
|
|
1856
|
+
* const references = await client.fetchTokenReferences({ assetIds: ['123'] });
|
|
1857
|
+
* ```
|
|
1858
|
+
*/
|
|
1859
|
+
fetchTokenReferences(request: FetchTokenReferencesRequest, options?: RequestOptions): Promise<TokenReference[]>;
|
|
1718
1860
|
/**
|
|
1719
1861
|
* Fetches cumulative taker volume for one or more events.
|
|
1720
1862
|
*
|
|
1721
1863
|
* Results contain one row per market, ordered by taker volume descending, and
|
|
1722
1864
|
* a total across all returned markets. Volume is measured in shares. Event
|
|
1723
1865
|
* IDs must be positive 32-bit integers. Transient rate limits are retried
|
|
1724
|
-
*
|
|
1866
|
+
* by default.
|
|
1725
1867
|
*
|
|
1726
1868
|
* @throws {@link FetchEventLiveVolumeError}
|
|
1727
1869
|
* Thrown on failure.
|
|
@@ -1733,7 +1875,7 @@ type DataActions = {
|
|
|
1733
1875
|
* });
|
|
1734
1876
|
* ```
|
|
1735
1877
|
*/
|
|
1736
|
-
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume>;
|
|
1878
|
+
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest, options?: RequestOptions): Promise<LiveVolume>;
|
|
1737
1879
|
/**
|
|
1738
1880
|
* Fetches resolution lifecycle rows by question, condition, or event.
|
|
1739
1881
|
*
|
|
@@ -1753,7 +1895,7 @@ type DataActions = {
|
|
|
1753
1895
|
* });
|
|
1754
1896
|
* ```
|
|
1755
1897
|
*/
|
|
1756
|
-
fetchResolutions(request: FetchResolutionsRequest): Promise<Resolution[]>;
|
|
1898
|
+
fetchResolutions(request: FetchResolutionsRequest, options?: RequestOptions): Promise<Resolution[]>;
|
|
1757
1899
|
/**
|
|
1758
1900
|
* Fetches the midpoint price for an exchange asset as a decimal string.
|
|
1759
1901
|
*
|
|
@@ -1765,7 +1907,7 @@ type DataActions = {
|
|
|
1765
1907
|
* const midpoint = await client.fetchMidpoint({ assetId: '0x0122…0000' });
|
|
1766
1908
|
* ```
|
|
1767
1909
|
*/
|
|
1768
|
-
fetchMidpoint(request: FetchMidpointRequest): Promise<DecimalString>;
|
|
1910
|
+
fetchMidpoint(request: FetchMidpointRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
1769
1911
|
/**
|
|
1770
1912
|
* Fetches midpoint prices for multiple exchange assets as an asset ID keyed lookup.
|
|
1771
1913
|
*
|
|
@@ -1777,7 +1919,7 @@ type DataActions = {
|
|
|
1777
1919
|
* const midpoints = await client.fetchMidpoints([{ assetId: '0x0122…0000' }]);
|
|
1778
1920
|
* ```
|
|
1779
1921
|
*/
|
|
1780
|
-
fetchMidpoints(request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
1922
|
+
fetchMidpoints(request: FetchMidpointsRequest, options?: RequestOptions): Promise<Midpoints>;
|
|
1781
1923
|
/**
|
|
1782
1924
|
* Fetches the current quoted price for an exchange asset and side as a decimal string.
|
|
1783
1925
|
*
|
|
@@ -1789,7 +1931,7 @@ type DataActions = {
|
|
|
1789
1931
|
* const price = await client.fetchPrice({ assetId: '0x0122…0000', side: OrderSide.BUY });
|
|
1790
1932
|
* ```
|
|
1791
1933
|
*/
|
|
1792
|
-
fetchPrice(request: FetchPriceRequest): Promise<DecimalString>;
|
|
1934
|
+
fetchPrice(request: FetchPriceRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
1793
1935
|
/**
|
|
1794
1936
|
* Fetches quoted prices for multiple exchange assets as an asset ID keyed lookup.
|
|
1795
1937
|
*
|
|
@@ -1801,7 +1943,7 @@ type DataActions = {
|
|
|
1801
1943
|
* const prices = await client.fetchPrices([{ assetId: '0x0122…0000', side: OrderSide.BUY }]);
|
|
1802
1944
|
* ```
|
|
1803
1945
|
*/
|
|
1804
|
-
fetchPrices(request: FetchPricesRequest): Promise<Prices>;
|
|
1946
|
+
fetchPrices(request: FetchPricesRequest, options?: RequestOptions): Promise<Prices>;
|
|
1805
1947
|
/**
|
|
1806
1948
|
* Fetches the current order book for an exchange asset.
|
|
1807
1949
|
*
|
|
@@ -1813,7 +1955,7 @@ type DataActions = {
|
|
|
1813
1955
|
* const book = await client.fetchOrderBook({ assetId: '0x0122…0000' });
|
|
1814
1956
|
* ```
|
|
1815
1957
|
*/
|
|
1816
|
-
fetchOrderBook(request: FetchOrderBookRequest): Promise<OrderBook>;
|
|
1958
|
+
fetchOrderBook(request: FetchOrderBookRequest, options?: RequestOptions): Promise<OrderBook>;
|
|
1817
1959
|
/**
|
|
1818
1960
|
* Fetches order books for multiple exchange assets.
|
|
1819
1961
|
*
|
|
@@ -1825,7 +1967,7 @@ type DataActions = {
|
|
|
1825
1967
|
* const books = await client.fetchOrderBooks([{ assetId: '0x0122…0000' }]);
|
|
1826
1968
|
* ```
|
|
1827
1969
|
*/
|
|
1828
|
-
fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
1970
|
+
fetchOrderBooks(request: FetchOrderBooksRequest, options?: RequestOptions): Promise<OrderBook[]>;
|
|
1829
1971
|
/**
|
|
1830
1972
|
* Fetches the spread for an exchange asset as a decimal string.
|
|
1831
1973
|
*
|
|
@@ -1837,7 +1979,7 @@ type DataActions = {
|
|
|
1837
1979
|
* const spread = await client.fetchSpread({ assetId: '0x0122…0000' });
|
|
1838
1980
|
* ```
|
|
1839
1981
|
*/
|
|
1840
|
-
fetchSpread(request: FetchSpreadRequest): Promise<DecimalString>;
|
|
1982
|
+
fetchSpread(request: FetchSpreadRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
1841
1983
|
/**
|
|
1842
1984
|
* Fetches spreads for multiple exchange assets as an asset ID keyed lookup.
|
|
1843
1985
|
*
|
|
@@ -1849,7 +1991,7 @@ type DataActions = {
|
|
|
1849
1991
|
* const spreads = await client.fetchSpreads([{ assetId: '0x0122…0000' }]);
|
|
1850
1992
|
* ```
|
|
1851
1993
|
*/
|
|
1852
|
-
fetchSpreads(request: FetchSpreadsRequest): Promise<Spreads>;
|
|
1994
|
+
fetchSpreads(request: FetchSpreadsRequest, options?: RequestOptions): Promise<Spreads>;
|
|
1853
1995
|
/**
|
|
1854
1996
|
* Fetches the last traded price for an exchange asset.
|
|
1855
1997
|
*
|
|
@@ -1865,7 +2007,7 @@ type DataActions = {
|
|
|
1865
2007
|
* // trade === LastTradePrice | null
|
|
1866
2008
|
* ```
|
|
1867
2009
|
*/
|
|
1868
|
-
fetchLastTradePrice(request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
|
|
2010
|
+
fetchLastTradePrice(request: FetchLastTradePriceRequest, options?: RequestOptions): Promise<LastTradePrice | null>;
|
|
1869
2011
|
/**
|
|
1870
2012
|
* Fetches last traded prices for multiple exchange assets.
|
|
1871
2013
|
*
|
|
@@ -1881,7 +2023,7 @@ type DataActions = {
|
|
|
1881
2023
|
* const trade = trades.find((candidate) => candidate.assetId === '0x0122…0000');
|
|
1882
2024
|
* ```
|
|
1883
2025
|
*/
|
|
1884
|
-
fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
2026
|
+
fetchLastTradePrices(request: FetchLastTradePricesRequest, options?: RequestOptions): Promise<LastTradePriceForAsset[]>;
|
|
1885
2027
|
/**
|
|
1886
2028
|
* Lists historical price observations for an exchange asset.
|
|
1887
2029
|
*
|
|
@@ -1895,7 +2037,7 @@ type DataActions = {
|
|
|
1895
2037
|
* strings and returned timestamps are Unix epoch milliseconds. Series pages
|
|
1896
2038
|
* are ordered oldest first; an `asOf` request returns at most one item. Series
|
|
1897
2039
|
* page sizes default to and are capped at 10,000 points. Transient rate limits
|
|
1898
|
-
* are retried
|
|
2040
|
+
* are retried by default.
|
|
1899
2041
|
*
|
|
1900
2042
|
* @throws {@link ListPriceHistoryError}
|
|
1901
2043
|
* Thrown on failure.
|
|
@@ -1913,7 +2055,7 @@ type DataActions = {
|
|
|
1913
2055
|
* }
|
|
1914
2056
|
* ```
|
|
1915
2057
|
*/
|
|
1916
|
-
listPriceHistory(request: ListPriceHistoryRequest): Paginated<PriceHistoryPoint[]>;
|
|
2058
|
+
listPriceHistory(request: ListPriceHistoryRequest, options?: RequestOptions): Paginated<PriceHistoryPoint[]>;
|
|
1917
2059
|
/**
|
|
1918
2060
|
* Estimates the price level a market order would cross at current book depth.
|
|
1919
2061
|
*
|
|
@@ -1932,7 +2074,7 @@ type DataActions = {
|
|
|
1932
2074
|
* });
|
|
1933
2075
|
* ```
|
|
1934
2076
|
*/
|
|
1935
|
-
estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
|
|
2077
|
+
estimateMarketPrice(request: EstimateMarketPriceRequest, options?: RequestOptions): Promise<number>;
|
|
1936
2078
|
/**
|
|
1937
2079
|
* Fetches priced gross open interest for selected markets or globally.
|
|
1938
2080
|
*
|
|
@@ -1940,7 +2082,7 @@ type DataActions = {
|
|
|
1940
2082
|
* the global aggregate, whose `conditionId` is `null`. A requested servable
|
|
1941
2083
|
* market with no holdings has a zero value; an absent row means the market
|
|
1942
2084
|
* is not servable. Values are in USDC. Transient rate limits are retried
|
|
1943
|
-
*
|
|
2085
|
+
* by default.
|
|
1944
2086
|
*
|
|
1945
2087
|
* @throws {@link FetchOpenInterestError}
|
|
1946
2088
|
* Thrown on failure.
|
|
@@ -1952,7 +2094,7 @@ type DataActions = {
|
|
|
1952
2094
|
* });
|
|
1953
2095
|
* ```
|
|
1954
2096
|
*/
|
|
1955
|
-
fetchOpenInterest(request?: FetchOpenInterestRequest): Promise<OpenInterest[]>;
|
|
2097
|
+
fetchOpenInterest(request?: FetchOpenInterestRequest, options?: RequestOptions): Promise<OpenInterest[]>;
|
|
1956
2098
|
/**
|
|
1957
2099
|
* Lists top holders grouped by outcome for one or more markets.
|
|
1958
2100
|
*
|
|
@@ -1963,7 +2105,7 @@ type DataActions = {
|
|
|
1963
2105
|
* equivalent to 1,000,000 base units.
|
|
1964
2106
|
* Amounts are net holdings by default. `includePnl` switches to per-outcome
|
|
1965
2107
|
* gross holdings and adds position economics; it requires one condition ID and
|
|
1966
|
-
* a page size of at most 100. Transient rate limits are retried
|
|
2108
|
+
* a page size of at most 100. Transient rate limits are retried by default.
|
|
1967
2109
|
*
|
|
1968
2110
|
* @throws {@link ListMarketHoldersError}
|
|
1969
2111
|
* Thrown on failure.
|
|
@@ -1980,7 +2122,7 @@ type DataActions = {
|
|
|
1980
2122
|
* }
|
|
1981
2123
|
* ```
|
|
1982
2124
|
*/
|
|
1983
|
-
listMarketHolders(request: ListMarketHoldersRequest): Paginated<MetaHolder[]>;
|
|
2125
|
+
listMarketHolders(request: ListMarketHoldersRequest, options?: RequestOptions): Paginated<MetaHolder[]>;
|
|
1984
2126
|
/**
|
|
1985
2127
|
* Lists trades for a wallet, market, or event — or the global recent-trades
|
|
1986
2128
|
* feed when no filter is given.
|
|
@@ -1992,7 +2134,7 @@ type DataActions = {
|
|
|
1992
2134
|
* defaults to 100 (max 1000). `window: 'full'` requests the complete
|
|
1993
2135
|
* history; an omitted window serves the recent feed. Window bounds accept
|
|
1994
2136
|
* Unix epoch seconds or `Date` values. Transient rate limits are retried
|
|
1995
|
-
*
|
|
2137
|
+
* by default.
|
|
1996
2138
|
*
|
|
1997
2139
|
* @throws {@link ListTradesError}
|
|
1998
2140
|
* Thrown on failure.
|
|
@@ -2026,7 +2168,7 @@ type DataActions = {
|
|
|
2026
2168
|
* }
|
|
2027
2169
|
* ```
|
|
2028
2170
|
*/
|
|
2029
|
-
listTrades(request?: ListTradesRequest): Paginated<Trade[]>;
|
|
2171
|
+
listTrades(request?: ListTradesRequest, options?: RequestOptions): Paginated<Trade[]>;
|
|
2030
2172
|
};
|
|
2031
2173
|
declare function dataActions(client: BasePublicClient): DataActions;
|
|
2032
2174
|
declare function dataActions(client: BaseSecureClient): DataActions;
|
|
@@ -2035,7 +2177,12 @@ type DiscoveryActions = {
|
|
|
2035
2177
|
/**
|
|
2036
2178
|
* Lists events.
|
|
2037
2179
|
*
|
|
2038
|
-
* Defaults to open events. Pass `closed: true`
|
|
2180
|
+
* Defaults to open events. Pass `closed: true` for closed events or
|
|
2181
|
+
* `closed: 'any'` for either state; no identifier filter is required.
|
|
2182
|
+
* Optionally filter by protocol with `version: ProtocolVersion.V1` or
|
|
2183
|
+
* `ProtocolVersion.V2`, or pass both in an array to include both protocols.
|
|
2184
|
+
* Arrays accept one or two values. Omitting `version` uses the current server
|
|
2185
|
+
* default of CTF events (v1).
|
|
2039
2186
|
*
|
|
2040
2187
|
* @remarks
|
|
2041
2188
|
* Cursors continue the exact query they were minted for and are rejected for
|
|
@@ -2072,7 +2219,7 @@ type DiscoveryActions = {
|
|
|
2072
2219
|
* }
|
|
2073
2220
|
* ```
|
|
2074
2221
|
*/
|
|
2075
|
-
listEvents(request?: ListEventsRequest): Paginated<Event[]>;
|
|
2222
|
+
listEvents(request?: ListEventsRequest, options?: RequestOptions): Paginated<Event[]>;
|
|
2076
2223
|
/**
|
|
2077
2224
|
* Fetches an event.
|
|
2078
2225
|
*
|
|
@@ -2094,7 +2241,7 @@ type DiscoveryActions = {
|
|
|
2094
2241
|
* });
|
|
2095
2242
|
* ```
|
|
2096
2243
|
*/
|
|
2097
|
-
fetchEvent(request: FetchEventRequest): Promise<Event>;
|
|
2244
|
+
fetchEvent(request: FetchEventRequest, options?: RequestOptions): Promise<Event>;
|
|
2098
2245
|
/**
|
|
2099
2246
|
* Fetches an event's tags.
|
|
2100
2247
|
*
|
|
@@ -2108,14 +2255,24 @@ type DiscoveryActions = {
|
|
|
2108
2255
|
* });
|
|
2109
2256
|
* ```
|
|
2110
2257
|
*/
|
|
2111
|
-
fetchEventTags(request: FetchEventTagsRequest): Promise<TagReference[]>;
|
|
2258
|
+
fetchEventTags(request: FetchEventTagsRequest, options?: RequestOptions): Promise<TagReference[]>;
|
|
2112
2259
|
/**
|
|
2113
2260
|
* Lists markets.
|
|
2114
2261
|
*
|
|
2262
|
+
* Defaults to open markets. Pass `closed: true` for closed markets or
|
|
2263
|
+
* `closed: 'any'` for either state. The latter requires a non-empty `ids`,
|
|
2264
|
+
* `slug`, `clobTokenIds`, `positionIds`, `conditionIds`, or `questionIds` filter.
|
|
2265
|
+
*
|
|
2115
2266
|
* @remarks
|
|
2116
2267
|
* Legacy multi-outcome markets cannot be represented by the binary
|
|
2117
2268
|
* {@link Market} model and are omitted from results.
|
|
2118
2269
|
*
|
|
2270
|
+
* Select one protocol with `version`, or pass both protocol versions in an array.
|
|
2271
|
+
* Arrays accept one or two values. Omitting `version` uses the current server
|
|
2272
|
+
* default of CTF markets (v1). Filter v2 markets by `resolutionStatus`, `requestIds`, or
|
|
2273
|
+
* `onchainEventIds`. Each ID filter accepts at most 100 values. V1 markets
|
|
2274
|
+
* use the separate `umaResolutionStatus` filter.
|
|
2275
|
+
*
|
|
2119
2276
|
* @throws {@link ListMarketsError}
|
|
2120
2277
|
* Thrown on failure.
|
|
2121
2278
|
*
|
|
@@ -2148,7 +2305,7 @@ type DiscoveryActions = {
|
|
|
2148
2305
|
* }
|
|
2149
2306
|
* ```
|
|
2150
2307
|
*/
|
|
2151
|
-
listMarkets(request?: ListMarketsRequest): Paginated<Market[]>;
|
|
2308
|
+
listMarkets(request?: ListMarketsRequest, options?: RequestOptions): Paginated<Market[]>;
|
|
2152
2309
|
/**
|
|
2153
2310
|
* Lists markets available for Combos.
|
|
2154
2311
|
*
|
|
@@ -2191,7 +2348,7 @@ type DiscoveryActions = {
|
|
|
2191
2348
|
* });
|
|
2192
2349
|
* ```
|
|
2193
2350
|
*/
|
|
2194
|
-
listComboMarkets(request?: ListComboMarketsRequest): Paginated<ComboMarket[]>;
|
|
2351
|
+
listComboMarkets(request?: ListComboMarketsRequest, options?: RequestOptions): Paginated<ComboMarket[]>;
|
|
2195
2352
|
/**
|
|
2196
2353
|
* Fetches a market.
|
|
2197
2354
|
*
|
|
@@ -2218,7 +2375,7 @@ type DiscoveryActions = {
|
|
|
2218
2375
|
* });
|
|
2219
2376
|
* ```
|
|
2220
2377
|
*/
|
|
2221
|
-
fetchMarket(request: FetchMarketRequest): Promise<Market>;
|
|
2378
|
+
fetchMarket(request: FetchMarketRequest, options?: RequestOptions): Promise<Market>;
|
|
2222
2379
|
/**
|
|
2223
2380
|
* Fetches a market's tags.
|
|
2224
2381
|
*
|
|
@@ -2232,7 +2389,7 @@ type DiscoveryActions = {
|
|
|
2232
2389
|
* });
|
|
2233
2390
|
* ```
|
|
2234
2391
|
*/
|
|
2235
|
-
fetchMarketTags(request: FetchMarketTagsRequest): Promise<TagReference[]>;
|
|
2392
|
+
fetchMarketTags(request: FetchMarketTagsRequest, options?: RequestOptions): Promise<TagReference[]>;
|
|
2236
2393
|
/**
|
|
2237
2394
|
* Lists series.
|
|
2238
2395
|
*
|
|
@@ -2266,7 +2423,7 @@ type DiscoveryActions = {
|
|
|
2266
2423
|
* }
|
|
2267
2424
|
* ```
|
|
2268
2425
|
*/
|
|
2269
|
-
listSeries(request?: ListSeriesRequest): Paginated<Series[]>;
|
|
2426
|
+
listSeries(request?: ListSeriesRequest, options?: RequestOptions): Paginated<Series[]>;
|
|
2270
2427
|
/**
|
|
2271
2428
|
* Fetches a series.
|
|
2272
2429
|
*
|
|
@@ -2280,7 +2437,7 @@ type DiscoveryActions = {
|
|
|
2280
2437
|
* });
|
|
2281
2438
|
* ```
|
|
2282
2439
|
*/
|
|
2283
|
-
fetchSeries(request: FetchSeriesRequest): Promise<Series>;
|
|
2440
|
+
fetchSeries(request: FetchSeriesRequest, options?: RequestOptions): Promise<Series>;
|
|
2284
2441
|
/**
|
|
2285
2442
|
* Lists market clarifications — notes that resolve ambiguity in how a market
|
|
2286
2443
|
* settles.
|
|
@@ -2299,7 +2456,7 @@ type DiscoveryActions = {
|
|
|
2299
2456
|
* }
|
|
2300
2457
|
* ```
|
|
2301
2458
|
*/
|
|
2302
|
-
listMarketClarifications(request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
|
|
2459
|
+
listMarketClarifications(request?: ListMarketClarificationsRequest, options?: RequestOptions): Paginated<MarketClarification[]>;
|
|
2303
2460
|
/**
|
|
2304
2461
|
* Lists tags.
|
|
2305
2462
|
*
|
|
@@ -2333,7 +2490,7 @@ type DiscoveryActions = {
|
|
|
2333
2490
|
* }
|
|
2334
2491
|
* ```
|
|
2335
2492
|
*/
|
|
2336
|
-
listTags(request?: ListTagsRequest): Paginated<Tag[]>;
|
|
2493
|
+
listTags(request?: ListTagsRequest, options?: RequestOptions): Paginated<Tag[]>;
|
|
2337
2494
|
/**
|
|
2338
2495
|
* Fetches a tag by id or slug.
|
|
2339
2496
|
*
|
|
@@ -2347,7 +2504,7 @@ type DiscoveryActions = {
|
|
|
2347
2504
|
* });
|
|
2348
2505
|
* ```
|
|
2349
2506
|
*/
|
|
2350
|
-
fetchTag(request: FetchTagRequest): Promise<Tag>;
|
|
2507
|
+
fetchTag(request: FetchTagRequest, options?: RequestOptions): Promise<Tag>;
|
|
2351
2508
|
/**
|
|
2352
2509
|
* Fetches related tag relationships by id or slug.
|
|
2353
2510
|
*
|
|
@@ -2361,7 +2518,7 @@ type DiscoveryActions = {
|
|
|
2361
2518
|
* });
|
|
2362
2519
|
* ```
|
|
2363
2520
|
*/
|
|
2364
|
-
fetchRelatedTags(request: FetchRelatedTagsRequest): Promise<RelatedTag[]>;
|
|
2521
|
+
fetchRelatedTags(request: FetchRelatedTagsRequest, options?: RequestOptions): Promise<RelatedTag[]>;
|
|
2365
2522
|
/**
|
|
2366
2523
|
* Fetches resources linked from related tag relationships by id or slug.
|
|
2367
2524
|
*
|
|
@@ -2375,7 +2532,7 @@ type DiscoveryActions = {
|
|
|
2375
2532
|
* });
|
|
2376
2533
|
* ```
|
|
2377
2534
|
*/
|
|
2378
|
-
fetchRelatedTagResources(request: FetchRelatedTagResourcesRequest): Promise<Tag[]>;
|
|
2535
|
+
fetchRelatedTagResources(request: FetchRelatedTagResourcesRequest, options?: RequestOptions): Promise<Tag[]>;
|
|
2379
2536
|
/**
|
|
2380
2537
|
* Runs a public full-text search.
|
|
2381
2538
|
*
|
|
@@ -2408,7 +2565,7 @@ type DiscoveryActions = {
|
|
|
2408
2565
|
* }
|
|
2409
2566
|
* ```
|
|
2410
2567
|
*/
|
|
2411
|
-
search(request: SearchRequest): Paginated<SearchResults>;
|
|
2568
|
+
search(request: SearchRequest, options?: RequestOptions): Paginated<SearchResults>;
|
|
2412
2569
|
/**
|
|
2413
2570
|
* Lists available sports metadata.
|
|
2414
2571
|
*
|
|
@@ -2420,7 +2577,7 @@ type DiscoveryActions = {
|
|
|
2420
2577
|
* const sports = await client.listSports();
|
|
2421
2578
|
* ```
|
|
2422
2579
|
*/
|
|
2423
|
-
listSports(): Promise<SportsMetadata[]>;
|
|
2580
|
+
listSports(options?: RequestOptions): Promise<SportsMetadata[]>;
|
|
2424
2581
|
/**
|
|
2425
2582
|
* Fetches the available market types grouped by sport.
|
|
2426
2583
|
*
|
|
@@ -2432,7 +2589,7 @@ type DiscoveryActions = {
|
|
|
2432
2589
|
* const marketTypes = await client.fetchSportsMarketTypes();
|
|
2433
2590
|
* ```
|
|
2434
2591
|
*/
|
|
2435
|
-
fetchSportsMarketTypes(): Promise<SportsMarketTypesResponse>;
|
|
2592
|
+
fetchSportsMarketTypes(options?: RequestOptions): Promise<SportsMarketTypesResponse>;
|
|
2436
2593
|
/**
|
|
2437
2594
|
* Lists teams.
|
|
2438
2595
|
*
|
|
@@ -2466,7 +2623,7 @@ type DiscoveryActions = {
|
|
|
2466
2623
|
* }
|
|
2467
2624
|
* ```
|
|
2468
2625
|
*/
|
|
2469
|
-
listTeams(request?: ListTeamsRequest): Paginated<Team[]>;
|
|
2626
|
+
listTeams(request?: ListTeamsRequest, options?: RequestOptions): Paginated<Team[]>;
|
|
2470
2627
|
/**
|
|
2471
2628
|
* Fetches a public profile by wallet address.
|
|
2472
2629
|
*
|
|
@@ -2480,7 +2637,7 @@ type DiscoveryActions = {
|
|
|
2480
2637
|
* });
|
|
2481
2638
|
* ```
|
|
2482
2639
|
*/
|
|
2483
|
-
fetchPublicProfile(request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
|
|
2640
|
+
fetchPublicProfile(request: FetchPublicProfileRequest, options?: RequestOptions): Promise<PublicProfile | null>;
|
|
2484
2641
|
/**
|
|
2485
2642
|
* Lists comments for an event or series.
|
|
2486
2643
|
*
|
|
@@ -2537,7 +2694,7 @@ type DiscoveryActions = {
|
|
|
2537
2694
|
* }
|
|
2538
2695
|
* ```
|
|
2539
2696
|
*/
|
|
2540
|
-
listComments(request: ListCommentsRequest): Paginated<Comment[]>;
|
|
2697
|
+
listComments(request: ListCommentsRequest, options?: RequestOptions): Paginated<Comment[]>;
|
|
2541
2698
|
/**
|
|
2542
2699
|
* Fetches a comment thread by comment id.
|
|
2543
2700
|
*
|
|
@@ -2552,7 +2709,7 @@ type DiscoveryActions = {
|
|
|
2552
2709
|
* });
|
|
2553
2710
|
* ```
|
|
2554
2711
|
*/
|
|
2555
|
-
fetchCommentsById(request: FetchCommentsByIdRequest): Promise<Comment[]>;
|
|
2712
|
+
fetchCommentsById(request: FetchCommentsByIdRequest, options?: RequestOptions): Promise<Comment[]>;
|
|
2556
2713
|
/**
|
|
2557
2714
|
* Lists comments written by a wallet address.
|
|
2558
2715
|
*
|
|
@@ -2601,7 +2758,7 @@ type DiscoveryActions = {
|
|
|
2601
2758
|
* }
|
|
2602
2759
|
* ```
|
|
2603
2760
|
*/
|
|
2604
|
-
listCommentsByUserAddress(request: ListCommentsByUserAddressRequest): Paginated<Comment[]>;
|
|
2761
|
+
listCommentsByUserAddress(request: ListCommentsByUserAddressRequest, options?: RequestOptions): Paginated<Comment[]>;
|
|
2605
2762
|
};
|
|
2606
2763
|
declare function discoveryActions(client: BasePublicClient): DiscoveryActions;
|
|
2607
2764
|
declare function discoveryActions(client: BaseSecureClient): DiscoveryActions;
|
|
@@ -2616,12 +2773,12 @@ type FetchPerpsBuilderStatusRequest = {
|
|
|
2616
2773
|
/**
|
|
2617
2774
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2618
2775
|
*/
|
|
2619
|
-
type FetchPerpsBuilderStatusError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2776
|
+
type FetchPerpsBuilderStatusError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2620
2777
|
/**
|
|
2621
2778
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2622
2779
|
*/
|
|
2623
2780
|
declare const FetchPerpsBuilderStatusError: {
|
|
2624
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2781
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
2625
2782
|
};
|
|
2626
2783
|
/**
|
|
2627
2784
|
* Fetches public builder availability and the platform fee cap.
|
|
@@ -2631,7 +2788,7 @@ declare const FetchPerpsBuilderStatusError: {
|
|
|
2631
2788
|
*
|
|
2632
2789
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2633
2790
|
*/
|
|
2634
|
-
declare function fetchPerpsBuilderStatus(client: BaseClient, request: FetchPerpsBuilderStatusRequest): Promise<PerpsBuilderStatus>;
|
|
2791
|
+
declare function fetchPerpsBuilderStatus(client: BaseClient, request: FetchPerpsBuilderStatusRequest, options?: RequestOptions): Promise<PerpsBuilderStatus>;
|
|
2635
2792
|
/**
|
|
2636
2793
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2637
2794
|
*/
|
|
@@ -2652,14 +2809,180 @@ declare const ApprovePerpsBuilderFeeError: {
|
|
|
2652
2809
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2653
2810
|
};
|
|
2654
2811
|
|
|
2812
|
+
/** A historical fill key. Trade IDs remain decimal strings, including above 2^53.
|
|
2813
|
+
* @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2814
|
+
type PerpsPositionSnapshotFill = {
|
|
2815
|
+
instrumentId: number;
|
|
2816
|
+
tradeId: string;
|
|
2817
|
+
timestamp: number;
|
|
2818
|
+
};
|
|
2819
|
+
/** Select up to 20 active instruments and 4 historical fills, with at least one selection.
|
|
2820
|
+
* @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2821
|
+
type PerpsPositionSnapshotSelection = {
|
|
2822
|
+
activeInstrumentIds?: readonly number[];
|
|
2823
|
+
historyFills?: readonly PerpsPositionSnapshotFill[];
|
|
2824
|
+
};
|
|
2825
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2826
|
+
type FetchPerpsPositionSnapshotsRequest = PerpsPositionSnapshotSelection & {
|
|
2827
|
+
address: string;
|
|
2828
|
+
};
|
|
2829
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2830
|
+
type FetchPerpsPositionSnapshotsError = RateLimitError | RequestAbortedError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2831
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2832
|
+
declare const FetchPerpsPositionSnapshotsError: {
|
|
2833
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
2834
|
+
};
|
|
2835
|
+
/** Fetches ordered position snapshots anonymously, including on secure clients.
|
|
2836
|
+
* Use session.fetchPositionSnapshots for owner-only leverage and PnL percentage.
|
|
2837
|
+
* This direct batch read does not paginate or retry item statuses.
|
|
2838
|
+
* @throws {@link FetchPerpsPositionSnapshotsError} Thrown on failure.
|
|
2839
|
+
* @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2840
|
+
declare function fetchPerpsPositionSnapshots(client: BaseClient, request: FetchPerpsPositionSnapshotsRequest, options?: RequestOptions): Promise<PerpsPositionSnapshots>;
|
|
2841
|
+
|
|
2842
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2843
|
+
type FetchPerpsRegistrationRequest = {
|
|
2844
|
+
/** Address whose Perps account registration should be checked. */
|
|
2845
|
+
address: string;
|
|
2846
|
+
};
|
|
2847
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2848
|
+
type FetchPerpsRegistrationError = RateLimitError | RequestAbortedError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2849
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
2850
|
+
declare const FetchPerpsRegistrationError: {
|
|
2851
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
2852
|
+
};
|
|
2853
|
+
/**
|
|
2854
|
+
* Fetches whether an address has a Perps account without authentication.
|
|
2855
|
+
* Registration is permanent; a false result may be cached for up to ten seconds.
|
|
2856
|
+
*
|
|
2857
|
+
* @throws {@link FetchPerpsRegistrationError} Thrown on failure.
|
|
2858
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2859
|
+
*/
|
|
2860
|
+
declare function fetchPerpsRegistration(client: BaseClient, request: FetchPerpsRegistrationRequest, options?: RequestOptions): Promise<boolean>;
|
|
2861
|
+
|
|
2862
|
+
type ServiceRequestMethod = 'DELETE' | 'GET' | 'PATCH' | 'POST';
|
|
2655
2863
|
type ServiceRequest = {
|
|
2656
|
-
|
|
2864
|
+
signal?: AbortSignal;
|
|
2865
|
+
method: ServiceRequestMethod;
|
|
2657
2866
|
path: string;
|
|
2658
2867
|
body?: string;
|
|
2659
2868
|
headers?: HeadersInit;
|
|
2660
2869
|
json?: unknown;
|
|
2661
2870
|
params?: URLSearchParams;
|
|
2662
2871
|
};
|
|
2872
|
+
type RequestHeadersResolver = (request: ServiceRequest) => Promise<HeadersInit>;
|
|
2873
|
+
type ServiceClientConfig = {
|
|
2874
|
+
fetch?: Fetch;
|
|
2875
|
+
/** Omit the endpoint root to create an empty client whose requests reject with UserInputError. */
|
|
2876
|
+
root?: string;
|
|
2877
|
+
headers?: HeadersInit;
|
|
2878
|
+
resolveHeaders?: RequestHeadersResolver;
|
|
2879
|
+
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
2880
|
+
};
|
|
2881
|
+
/**
|
|
2882
|
+
* Timeout in milliseconds for each individual HTTP request attempt until response
|
|
2883
|
+
* headers arrive, or `false` to disable it. Defaults to 30 seconds.
|
|
2884
|
+
* This is not a total SDK method deadline: each permitted retry receives a fresh
|
|
2885
|
+
* timeout, so multiple requests, retries, and backoff can take longer in total.
|
|
2886
|
+
* Timeout errors are not retried. Excludes header resolution, hooks, retry waits,
|
|
2887
|
+
* and response body download/parsing.
|
|
2888
|
+
*/
|
|
2889
|
+
type ServiceClientTimeout = number | false;
|
|
2890
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2891
|
+
type ServiceClientResponseType = 'json' | 'blob' | 'arrayBuffer' | 'text' | 'empty' | 'raw';
|
|
2892
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2893
|
+
type ServiceClientNonJsonResponseType = Exclude<ServiceClientResponseType, 'json'>;
|
|
2894
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2895
|
+
type ServiceClientResponse<TResponse extends ServiceClientResponseType> = TResponse extends 'blob' ? Blob : TResponse extends 'arrayBuffer' ? ArrayBuffer : TResponse extends 'text' ? string : TResponse extends 'empty' ? void : TResponse extends 'raw' ? Response : unknown;
|
|
2896
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2897
|
+
type ServiceClientJsonResponseOptions<T = unknown> = {
|
|
2898
|
+
responseType?: 'json';
|
|
2899
|
+
schema?: z.ZodType<T>;
|
|
2900
|
+
};
|
|
2901
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2902
|
+
type ServiceClientNonJsonResponseOptions<TResponse extends ServiceClientNonJsonResponseType = ServiceClientNonJsonResponseType> = {
|
|
2903
|
+
responseType: TResponse;
|
|
2904
|
+
schema?: never;
|
|
2905
|
+
};
|
|
2906
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2907
|
+
type ServiceClientResponseOptions<T = unknown> = ServiceClientJsonResponseOptions<T> | ServiceClientNonJsonResponseOptions;
|
|
2908
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2909
|
+
type ServiceClientRequestOptions<T = unknown> = ServiceClientResponseOptions<T> & {
|
|
2910
|
+
signal?: AbortSignal;
|
|
2911
|
+
timeout?: ServiceClientTimeout;
|
|
2912
|
+
};
|
|
2913
|
+
type ServiceClientMutationOptions<T = unknown> = ServiceClientRequestOptions<T> & {
|
|
2914
|
+
/** Disable transport retries for commands whose outcome may be uncertain. */
|
|
2915
|
+
retry?: false;
|
|
2916
|
+
};
|
|
2917
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2918
|
+
type ServiceClientGetOptions<T = unknown> = ServiceClientRequestOptions<T> & RequestOptions & {
|
|
2919
|
+
headers?: HeadersInit;
|
|
2920
|
+
params?: URLSearchParams;
|
|
2921
|
+
};
|
|
2922
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2923
|
+
type ServiceClientPostOptions<T = unknown> = ServiceClientMutationOptions<T> & {
|
|
2924
|
+
headers?: HeadersInit;
|
|
2925
|
+
json?: unknown;
|
|
2926
|
+
};
|
|
2927
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2928
|
+
type ServiceClientPatchOptions<T = unknown> = ServiceClientMutationOptions<T> & {
|
|
2929
|
+
headers?: HeadersInit;
|
|
2930
|
+
json?: unknown;
|
|
2931
|
+
};
|
|
2932
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2933
|
+
type ServiceClientDeleteOptions<T = unknown> = ServiceClientMutationOptions<T> & {
|
|
2934
|
+
headers?: HeadersInit;
|
|
2935
|
+
json?: unknown;
|
|
2936
|
+
params?: URLSearchParams;
|
|
2937
|
+
};
|
|
2938
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2939
|
+
type ServiceClientRequestError = RateLimitError | RequestAbortedError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2940
|
+
/** @experimental See {@link ServiceClient}. */
|
|
2941
|
+
declare const ServiceClientRequestError: {
|
|
2942
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
2943
|
+
};
|
|
2944
|
+
/**
|
|
2945
|
+
* Sends requests and consumes and validates their responses.
|
|
2946
|
+
*
|
|
2947
|
+
* Raw mode resolves at response headers for every status, including 4xx and
|
|
2948
|
+
* 5xx responses, so callers can inspect error bodies. Status checks and body
|
|
2949
|
+
* consumption belong to the caller. The operation signal remains attached to
|
|
2950
|
+
* the underlying fetch.
|
|
2951
|
+
*
|
|
2952
|
+
* @experimental For the polymarket.com UI. External consumers should not adopt this API. Breaking changes may occur in any release, including patch releases.
|
|
2953
|
+
*/
|
|
2954
|
+
declare class ServiceClient {
|
|
2955
|
+
#private;
|
|
2956
|
+
constructor(config: ServiceClientConfig);
|
|
2957
|
+
/**
|
|
2958
|
+
* Sends a GET request. JSON is parsed by default; a schema validates and transforms it.
|
|
2959
|
+
* @throws {@link ServiceClientRequestError} Thrown on request, response or cancellation failure.
|
|
2960
|
+
*/
|
|
2961
|
+
get<T = unknown>(path: string, options?: ServiceClientGetOptions<T> & ServiceClientJsonResponseOptions<T>): Promise<T>;
|
|
2962
|
+
get<TResponse extends ServiceClientNonJsonResponseType>(path: string, options: ServiceClientGetOptions & ServiceClientNonJsonResponseOptions<TResponse>): Promise<ServiceClientResponse<TResponse>>;
|
|
2963
|
+
get(path: string, options: ServiceClientGetOptions): Promise<unknown>;
|
|
2964
|
+
/**
|
|
2965
|
+
* Sends a POST request. JSON is parsed by default; a schema validates and transforms it.
|
|
2966
|
+
* @throws {@link ServiceClientRequestError} Thrown on request, response or cancellation failure.
|
|
2967
|
+
*/
|
|
2968
|
+
post<T = unknown>(path: string, options?: ServiceClientPostOptions<T> & ServiceClientJsonResponseOptions<T>): Promise<T>;
|
|
2969
|
+
post<TResponse extends ServiceClientNonJsonResponseType>(path: string, options: ServiceClientPostOptions & ServiceClientNonJsonResponseOptions<TResponse>): Promise<ServiceClientResponse<TResponse>>;
|
|
2970
|
+
post(path: string, options: ServiceClientPostOptions): Promise<unknown>;
|
|
2971
|
+
/**
|
|
2972
|
+
* Sends a PATCH request. JSON is parsed by default; a schema validates and transforms it.
|
|
2973
|
+
* @throws {@link ServiceClientRequestError} Thrown on request, response or cancellation failure.
|
|
2974
|
+
*/
|
|
2975
|
+
patch<T = unknown>(path: string, options?: ServiceClientPatchOptions<T> & ServiceClientJsonResponseOptions<T>): Promise<T>;
|
|
2976
|
+
patch<TResponse extends ServiceClientNonJsonResponseType>(path: string, options: ServiceClientPatchOptions & ServiceClientNonJsonResponseOptions<TResponse>): Promise<ServiceClientResponse<TResponse>>;
|
|
2977
|
+
patch(path: string, options: ServiceClientPatchOptions): Promise<unknown>;
|
|
2978
|
+
/**
|
|
2979
|
+
* Sends a DELETE request. JSON is parsed by default; a schema validates and transforms it.
|
|
2980
|
+
* @throws {@link ServiceClientRequestError} Thrown on request, response or cancellation failure.
|
|
2981
|
+
*/
|
|
2982
|
+
del<T = unknown>(path: string, options?: ServiceClientDeleteOptions<T> & ServiceClientJsonResponseOptions<T>): Promise<T>;
|
|
2983
|
+
del<TResponse extends ServiceClientNonJsonResponseType>(path: string, options: ServiceClientDeleteOptions & ServiceClientNonJsonResponseOptions<TResponse>): Promise<ServiceClientResponse<TResponse>>;
|
|
2984
|
+
del(path: string, options: ServiceClientDeleteOptions): Promise<unknown>;
|
|
2985
|
+
}
|
|
2663
2986
|
|
|
2664
2987
|
/**
|
|
2665
2988
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
@@ -2694,6 +3017,8 @@ type FetchPerpsOrdersRequest = {
|
|
|
2694
3017
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2695
3018
|
*/
|
|
2696
3019
|
type ListPerpsFillsRequest = {
|
|
3020
|
+
/** Only fills for this instrument; an unsigned 32-bit identifier. */
|
|
3021
|
+
instrumentId?: number;
|
|
2697
3022
|
/** Inclusive start timestamp in milliseconds. */
|
|
2698
3023
|
start?: number;
|
|
2699
3024
|
/** Inclusive end timestamp in milliseconds. */
|
|
@@ -2912,6 +3237,43 @@ declare const FetchPerpsBuilderEarningsSummaryError: {
|
|
|
2912
3237
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2913
3238
|
};
|
|
2914
3239
|
|
|
3240
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3241
|
+
type CreatePerpsChaseRequest = {
|
|
3242
|
+
instrumentId: number;
|
|
3243
|
+
side: OrderSide;
|
|
3244
|
+
quantity: PerpsDecimalInput;
|
|
3245
|
+
/** Highest buy price or lowest sell price. Zero or omission disables this bound. */ limitPrice?: PerpsDecimalInput;
|
|
3246
|
+
/** Maximum distance from the first price at which a child rests or fills. Zero or omission disables this bound. */ maxDistance?: PerpsDecimalInput;
|
|
3247
|
+
/** 1 to 1000 bps. Omit to disable; cannot combine with positive maxDistance. */ maxDistanceBps?: number;
|
|
3248
|
+
/** Refuse children that cross. Defaults to true. */ postOnly?: boolean;
|
|
3249
|
+
reduceOnly?: boolean;
|
|
3250
|
+
/** Retain this identity when reconciling an uncertain submission. */ clientOrderId?: string;
|
|
3251
|
+
/** Command deadline in Unix milliseconds; does not end the chase. */ expiresAt?: number;
|
|
3252
|
+
};
|
|
3253
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3254
|
+
type CreatePerpsChaseError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3255
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3256
|
+
declare const CreatePerpsChaseError: {
|
|
3257
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3258
|
+
};
|
|
3259
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3260
|
+
type FetchPerpsChasesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
3261
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3262
|
+
declare const FetchPerpsChasesError: {
|
|
3263
|
+
isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3264
|
+
};
|
|
3265
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3266
|
+
type CancelPerpsChaseRequest = {
|
|
3267
|
+
chaseId: number;
|
|
3268
|
+
/** Command deadline in Unix milliseconds. */ expiresAt?: number;
|
|
3269
|
+
};
|
|
3270
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3271
|
+
type CancelPerpsChaseError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3272
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3273
|
+
declare const CancelPerpsChaseError: {
|
|
3274
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3275
|
+
};
|
|
3276
|
+
|
|
2915
3277
|
/**
|
|
2916
3278
|
* Good-til-cancelled Perps order.
|
|
2917
3279
|
*
|
|
@@ -2928,6 +3290,32 @@ type PerpsPlaceGtcOrderRequest = {
|
|
|
2928
3290
|
quantity: PerpsDecimalInput;
|
|
2929
3291
|
/** Good-til-cancelled execution. */
|
|
2930
3292
|
timeInForce: PerpsTimeInForce.GTC;
|
|
3293
|
+
gtdExpiry?: never;
|
|
3294
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
3295
|
+
postOnly?: boolean;
|
|
3296
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
3297
|
+
reduceOnly?: boolean;
|
|
3298
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
3299
|
+
clientOrderId?: string;
|
|
3300
|
+
};
|
|
3301
|
+
/**
|
|
3302
|
+
* Good-till-date Perps order.
|
|
3303
|
+
*
|
|
3304
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3305
|
+
*/
|
|
3306
|
+
type PerpsPlaceGtdOrderRequest = {
|
|
3307
|
+
/** Perps instrument identifier to trade. */
|
|
3308
|
+
instrumentId: number;
|
|
3309
|
+
/** Trade direction. */
|
|
3310
|
+
side: OrderSide;
|
|
3311
|
+
/** Limit price. */
|
|
3312
|
+
price: PerpsDecimalInput;
|
|
3313
|
+
/** Order quantity. */
|
|
3314
|
+
quantity: PerpsDecimalInput;
|
|
3315
|
+
/** Good-till-date execution. */
|
|
3316
|
+
timeInForce: PerpsTimeInForce.GTD;
|
|
3317
|
+
/** Order expiration in Unix milliseconds, strictly future and at most 18446744073709. Separate from the command deadline. */
|
|
3318
|
+
gtdExpiry: number;
|
|
2931
3319
|
/** Whether the order must rest instead of taking liquidity. */
|
|
2932
3320
|
postOnly?: boolean;
|
|
2933
3321
|
/** Whether the order may only reduce or close an existing position. */
|
|
@@ -2951,6 +3339,7 @@ type PerpsPlaceIocOrderRequest = {
|
|
|
2951
3339
|
quantity: PerpsDecimalInput;
|
|
2952
3340
|
/** Immediate-or-cancel execution. */
|
|
2953
3341
|
timeInForce: PerpsTimeInForce.IOC;
|
|
3342
|
+
gtdExpiry?: never;
|
|
2954
3343
|
postOnly?: never;
|
|
2955
3344
|
/** Whether the order may only reduce or close an existing position. */
|
|
2956
3345
|
reduceOnly?: boolean;
|
|
@@ -2973,6 +3362,7 @@ type PerpsPlaceFokOrderRequest = {
|
|
|
2973
3362
|
quantity: PerpsDecimalInput;
|
|
2974
3363
|
/** Fill-or-kill execution. */
|
|
2975
3364
|
timeInForce: PerpsTimeInForce.FOK;
|
|
3365
|
+
gtdExpiry?: never;
|
|
2976
3366
|
postOnly?: never;
|
|
2977
3367
|
/** Whether the order may only reduce or close an existing position. */
|
|
2978
3368
|
reduceOnly?: boolean;
|
|
@@ -2984,19 +3374,53 @@ type PerpsPlaceFokOrderRequest = {
|
|
|
2984
3374
|
*
|
|
2985
3375
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2986
3376
|
*/
|
|
2987
|
-
type PerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
|
|
3377
|
+
type PerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceGtdOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
|
|
2988
3378
|
/**
|
|
2989
3379
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2990
3380
|
*/
|
|
2991
3381
|
type PerpsTpSlTrigger = {
|
|
2992
3382
|
triggerPrice: PerpsDecimalInput;
|
|
2993
3383
|
limitPrice?: PerpsDecimalInput;
|
|
3384
|
+
gtdExpiry?: never;
|
|
3385
|
+
trailingBps?: never;
|
|
3386
|
+
activationPrice?: never;
|
|
2994
3387
|
};
|
|
2995
3388
|
/**
|
|
2996
3389
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2997
3390
|
*/
|
|
2998
3391
|
type PerpsPositionTpSlTrigger = {
|
|
2999
3392
|
triggerPrice: PerpsDecimalInput;
|
|
3393
|
+
trailingBps?: never;
|
|
3394
|
+
activationPrice?: never;
|
|
3395
|
+
gtdExpiry?: never;
|
|
3396
|
+
/**
|
|
3397
|
+
* Positive fixed close quantity, clamped to the live position at trigger time.
|
|
3398
|
+
* Omit to close the full position. Use a fixed-point string for exact precision;
|
|
3399
|
+
* exponent notation, more than 28 decimal places, and coefficients exceeding
|
|
3400
|
+
* 96 bits are rejected before submission.
|
|
3401
|
+
*/
|
|
3402
|
+
quantity?: PerpsDecimalInput;
|
|
3403
|
+
};
|
|
3404
|
+
/**
|
|
3405
|
+
* A market stop loss that follows favorable marks after activation.
|
|
3406
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3407
|
+
*/
|
|
3408
|
+
type PerpsTrailingStop = {
|
|
3409
|
+
/** Pullback in basis points, an integer from 10 through 2000. */
|
|
3410
|
+
trailingBps: number;
|
|
3411
|
+
/** Positive activation mark. Omit to start trailing when the leg arms. */
|
|
3412
|
+
activationPrice?: PerpsDecimalInput;
|
|
3413
|
+
triggerPrice?: never;
|
|
3414
|
+
limitPrice?: never;
|
|
3415
|
+
gtdExpiry?: never;
|
|
3416
|
+
};
|
|
3417
|
+
/**
|
|
3418
|
+
* A trailing market stop loss protecting an open position.
|
|
3419
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3420
|
+
*/
|
|
3421
|
+
type PerpsPositionTrailingStop = PerpsTrailingStop & {
|
|
3422
|
+
/** Positive, exactly representable close quantity. Omit to close the full position. */
|
|
3423
|
+
quantity?: PerpsDecimalInput;
|
|
3000
3424
|
};
|
|
3001
3425
|
/**
|
|
3002
3426
|
* Request parameters for posting one or more Perps orders.
|
|
@@ -3013,6 +3437,29 @@ type PostPerpsOrdersRequest = {
|
|
|
3013
3437
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3014
3438
|
*/
|
|
3015
3439
|
type PlacePerpsOrderRequest = {
|
|
3440
|
+
/** Perps instrument identifier to trade. */
|
|
3441
|
+
instrumentId: number;
|
|
3442
|
+
/** Trade direction. */
|
|
3443
|
+
side: OrderSide;
|
|
3444
|
+
/** Limit price. */
|
|
3445
|
+
price: PerpsDecimalInput;
|
|
3446
|
+
/** Order quantity. */
|
|
3447
|
+
quantity: PerpsDecimalInput;
|
|
3448
|
+
/** Good-till-date execution. */
|
|
3449
|
+
timeInForce: PerpsTimeInForce.GTD;
|
|
3450
|
+
/** Order expiration in Unix milliseconds, strictly future and at most 18446744073709. Separate from expiresAt. */
|
|
3451
|
+
gtdExpiry: number;
|
|
3452
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
3453
|
+
postOnly?: boolean;
|
|
3454
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
3455
|
+
reduceOnly?: boolean;
|
|
3456
|
+
/** Optional caller-supplied idempotency identifier. Generated when omitted. */
|
|
3457
|
+
clientOrderId?: string;
|
|
3458
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
3459
|
+
expiresAt?: number;
|
|
3460
|
+
takeProfit?: never;
|
|
3461
|
+
stopLoss?: never;
|
|
3462
|
+
} | {
|
|
3016
3463
|
/** Perps instrument identifier to trade. */
|
|
3017
3464
|
instrumentId: number;
|
|
3018
3465
|
/** Trade direction. */
|
|
@@ -3023,6 +3470,7 @@ type PlacePerpsOrderRequest = {
|
|
|
3023
3470
|
quantity: PerpsDecimalInput;
|
|
3024
3471
|
/** Good-til-cancelled execution. */
|
|
3025
3472
|
timeInForce: PerpsTimeInForce.GTC;
|
|
3473
|
+
gtdExpiry?: never;
|
|
3026
3474
|
/** Whether the order must rest instead of taking liquidity. */
|
|
3027
3475
|
postOnly?: boolean;
|
|
3028
3476
|
/** Whether the order may only reduce or close an existing position. */
|
|
@@ -3044,6 +3492,7 @@ type PlacePerpsOrderRequest = {
|
|
|
3044
3492
|
quantity: PerpsDecimalInput;
|
|
3045
3493
|
/** Immediate-or-cancel execution. */
|
|
3046
3494
|
timeInForce: PerpsTimeInForce.IOC;
|
|
3495
|
+
gtdExpiry?: never;
|
|
3047
3496
|
postOnly?: never;
|
|
3048
3497
|
/** Whether the order may only reduce or close an existing position. */
|
|
3049
3498
|
reduceOnly?: boolean;
|
|
@@ -3064,6 +3513,7 @@ type PlacePerpsOrderRequest = {
|
|
|
3064
3513
|
quantity: PerpsDecimalInput;
|
|
3065
3514
|
/** Fill-or-kill execution. */
|
|
3066
3515
|
timeInForce: PerpsTimeInForce.FOK;
|
|
3516
|
+
gtdExpiry?: never;
|
|
3067
3517
|
postOnly?: never;
|
|
3068
3518
|
/** Whether the order may only reduce or close an existing position. */
|
|
3069
3519
|
reduceOnly?: boolean;
|
|
@@ -3078,6 +3528,56 @@ type PlacePerpsOrderRequest = {
|
|
|
3078
3528
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3079
3529
|
*/
|
|
3080
3530
|
type PlacePerpsOrderWithTpSlRequest = {
|
|
3531
|
+
/** Perps instrument identifier to trade. */
|
|
3532
|
+
instrumentId: number;
|
|
3533
|
+
/** Trade direction. */
|
|
3534
|
+
side: OrderSide;
|
|
3535
|
+
/** Limit price. */
|
|
3536
|
+
price: PerpsDecimalInput;
|
|
3537
|
+
/** Order quantity. */
|
|
3538
|
+
quantity: PerpsDecimalInput;
|
|
3539
|
+
/** Good-till-date execution. */
|
|
3540
|
+
timeInForce: PerpsTimeInForce.GTD;
|
|
3541
|
+
/** Order expiration in Unix milliseconds, strictly future and at most 18446744073709. Separate from expiresAt. */
|
|
3542
|
+
gtdExpiry: number;
|
|
3543
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
3544
|
+
postOnly?: boolean;
|
|
3545
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
3546
|
+
reduceOnly?: boolean;
|
|
3547
|
+
/** Optional caller-supplied idempotency identifier. Generated when omitted. */
|
|
3548
|
+
clientOrderId?: string;
|
|
3549
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
3550
|
+
expiresAt?: number;
|
|
3551
|
+
/** Optional take-profit trigger to place with the entry order. */
|
|
3552
|
+
takeProfit?: PerpsTpSlTrigger;
|
|
3553
|
+
/** Stop-loss trigger to place with the entry order. */
|
|
3554
|
+
stopLoss: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3555
|
+
} | {
|
|
3556
|
+
/** Perps instrument identifier to trade. */
|
|
3557
|
+
instrumentId: number;
|
|
3558
|
+
/** Trade direction. */
|
|
3559
|
+
side: OrderSide;
|
|
3560
|
+
/** Limit price. */
|
|
3561
|
+
price: PerpsDecimalInput;
|
|
3562
|
+
/** Order quantity. */
|
|
3563
|
+
quantity: PerpsDecimalInput;
|
|
3564
|
+
/** Good-till-date execution. */
|
|
3565
|
+
timeInForce: PerpsTimeInForce.GTD;
|
|
3566
|
+
/** Order expiration in Unix milliseconds, strictly future and at most 18446744073709. Separate from expiresAt. */
|
|
3567
|
+
gtdExpiry: number;
|
|
3568
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
3569
|
+
postOnly?: boolean;
|
|
3570
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
3571
|
+
reduceOnly?: boolean;
|
|
3572
|
+
/** Optional caller-supplied idempotency identifier. Generated when omitted. */
|
|
3573
|
+
clientOrderId?: string;
|
|
3574
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
3575
|
+
expiresAt?: number;
|
|
3576
|
+
/** Take-profit trigger to place with the entry order. */
|
|
3577
|
+
takeProfit: PerpsTpSlTrigger;
|
|
3578
|
+
/** Optional stop-loss trigger to place with the entry order. */
|
|
3579
|
+
stopLoss?: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3580
|
+
} | {
|
|
3081
3581
|
/** Perps instrument identifier to trade. */
|
|
3082
3582
|
instrumentId: number;
|
|
3083
3583
|
/** Trade direction. */
|
|
@@ -3088,6 +3588,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3088
3588
|
quantity: PerpsDecimalInput;
|
|
3089
3589
|
/** Good-til-cancelled execution. */
|
|
3090
3590
|
timeInForce: PerpsTimeInForce.GTC;
|
|
3591
|
+
gtdExpiry?: never;
|
|
3091
3592
|
/** Whether the order must rest instead of taking liquidity. */
|
|
3092
3593
|
postOnly?: boolean;
|
|
3093
3594
|
/** Whether the order may only reduce or close an existing position. */
|
|
@@ -3099,7 +3600,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3099
3600
|
/** Take-profit trigger to place with the entry order. */
|
|
3100
3601
|
takeProfit: PerpsTpSlTrigger;
|
|
3101
3602
|
/** Optional stop-loss trigger to place with the entry order. */
|
|
3102
|
-
stopLoss?: PerpsTpSlTrigger;
|
|
3603
|
+
stopLoss?: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3103
3604
|
} | {
|
|
3104
3605
|
/** Perps instrument identifier to trade. */
|
|
3105
3606
|
instrumentId: number;
|
|
@@ -3111,6 +3612,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3111
3612
|
quantity: PerpsDecimalInput;
|
|
3112
3613
|
/** Good-til-cancelled execution. */
|
|
3113
3614
|
timeInForce: PerpsTimeInForce.GTC;
|
|
3615
|
+
gtdExpiry?: never;
|
|
3114
3616
|
/** Whether the order must rest instead of taking liquidity. */
|
|
3115
3617
|
postOnly?: boolean;
|
|
3116
3618
|
/** Whether the order may only reduce or close an existing position. */
|
|
@@ -3122,7 +3624,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3122
3624
|
/** Optional take-profit trigger to place with the entry order. */
|
|
3123
3625
|
takeProfit?: PerpsTpSlTrigger;
|
|
3124
3626
|
/** Stop-loss trigger to place with the entry order. */
|
|
3125
|
-
stopLoss: PerpsTpSlTrigger;
|
|
3627
|
+
stopLoss: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3126
3628
|
} | {
|
|
3127
3629
|
/** Perps instrument identifier to trade. */
|
|
3128
3630
|
instrumentId: number;
|
|
@@ -3134,6 +3636,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3134
3636
|
quantity: PerpsDecimalInput;
|
|
3135
3637
|
/** Immediate-or-cancel execution. */
|
|
3136
3638
|
timeInForce: PerpsTimeInForce.IOC;
|
|
3639
|
+
gtdExpiry?: never;
|
|
3137
3640
|
postOnly?: never;
|
|
3138
3641
|
/** Whether the order may only reduce or close an existing position. */
|
|
3139
3642
|
reduceOnly?: boolean;
|
|
@@ -3144,7 +3647,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3144
3647
|
/** Take-profit trigger to place with the entry order. */
|
|
3145
3648
|
takeProfit: PerpsTpSlTrigger;
|
|
3146
3649
|
/** Optional stop-loss trigger to place with the entry order. */
|
|
3147
|
-
stopLoss?: PerpsTpSlTrigger;
|
|
3650
|
+
stopLoss?: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3148
3651
|
} | {
|
|
3149
3652
|
/** Perps instrument identifier to trade. */
|
|
3150
3653
|
instrumentId: number;
|
|
@@ -3156,6 +3659,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3156
3659
|
quantity: PerpsDecimalInput;
|
|
3157
3660
|
/** Immediate-or-cancel execution. */
|
|
3158
3661
|
timeInForce: PerpsTimeInForce.IOC;
|
|
3662
|
+
gtdExpiry?: never;
|
|
3159
3663
|
postOnly?: never;
|
|
3160
3664
|
/** Whether the order may only reduce or close an existing position. */
|
|
3161
3665
|
reduceOnly?: boolean;
|
|
@@ -3166,7 +3670,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3166
3670
|
/** Optional take-profit trigger to place with the entry order. */
|
|
3167
3671
|
takeProfit?: PerpsTpSlTrigger;
|
|
3168
3672
|
/** Stop-loss trigger to place with the entry order. */
|
|
3169
|
-
stopLoss: PerpsTpSlTrigger;
|
|
3673
|
+
stopLoss: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3170
3674
|
} | {
|
|
3171
3675
|
/** Perps instrument identifier to trade. */
|
|
3172
3676
|
instrumentId: number;
|
|
@@ -3178,6 +3682,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3178
3682
|
quantity: PerpsDecimalInput;
|
|
3179
3683
|
/** Fill-or-kill execution. */
|
|
3180
3684
|
timeInForce: PerpsTimeInForce.FOK;
|
|
3685
|
+
gtdExpiry?: never;
|
|
3181
3686
|
postOnly?: never;
|
|
3182
3687
|
/** Whether the order may only reduce or close an existing position. */
|
|
3183
3688
|
reduceOnly?: boolean;
|
|
@@ -3188,7 +3693,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3188
3693
|
/** Take-profit trigger to place with the entry order. */
|
|
3189
3694
|
takeProfit: PerpsTpSlTrigger;
|
|
3190
3695
|
/** Optional stop-loss trigger to place with the entry order. */
|
|
3191
|
-
stopLoss?: PerpsTpSlTrigger;
|
|
3696
|
+
stopLoss?: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3192
3697
|
} | {
|
|
3193
3698
|
/** Perps instrument identifier to trade. */
|
|
3194
3699
|
instrumentId: number;
|
|
@@ -3200,6 +3705,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3200
3705
|
quantity: PerpsDecimalInput;
|
|
3201
3706
|
/** Fill-or-kill execution. */
|
|
3202
3707
|
timeInForce: PerpsTimeInForce.FOK;
|
|
3708
|
+
gtdExpiry?: never;
|
|
3203
3709
|
postOnly?: never;
|
|
3204
3710
|
/** Whether the order may only reduce or close an existing position. */
|
|
3205
3711
|
reduceOnly?: boolean;
|
|
@@ -3210,7 +3716,7 @@ type PlacePerpsOrderWithTpSlRequest = {
|
|
|
3210
3716
|
/** Optional take-profit trigger to place with the entry order. */
|
|
3211
3717
|
takeProfit?: PerpsTpSlTrigger;
|
|
3212
3718
|
/** Stop-loss trigger to place with the entry order. */
|
|
3213
|
-
stopLoss: PerpsTpSlTrigger;
|
|
3719
|
+
stopLoss: PerpsTpSlTrigger | PerpsTrailingStop;
|
|
3214
3720
|
};
|
|
3215
3721
|
/**
|
|
3216
3722
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
@@ -3246,7 +3752,7 @@ type PlacePerpsPositionTpSlRequest = {
|
|
|
3246
3752
|
/** Take-profit trigger to place for the current position. */
|
|
3247
3753
|
takeProfit: PerpsPositionTpSlTrigger;
|
|
3248
3754
|
/** Optional stop-loss trigger to place alongside the take-profit. */
|
|
3249
|
-
stopLoss?: PerpsPositionTpSlTrigger;
|
|
3755
|
+
stopLoss?: PerpsPositionTpSlTrigger | PerpsPositionTrailingStop;
|
|
3250
3756
|
/** Optional command expiration timestamp in milliseconds. */
|
|
3251
3757
|
expiresAt?: number;
|
|
3252
3758
|
} | {
|
|
@@ -3255,7 +3761,7 @@ type PlacePerpsPositionTpSlRequest = {
|
|
|
3255
3761
|
/** Optional take-profit trigger to place alongside the stop-loss. */
|
|
3256
3762
|
takeProfit?: PerpsPositionTpSlTrigger;
|
|
3257
3763
|
/** Stop-loss trigger to place for the current position. */
|
|
3258
|
-
stopLoss: PerpsPositionTpSlTrigger;
|
|
3764
|
+
stopLoss: PerpsPositionTpSlTrigger | PerpsPositionTrailingStop;
|
|
3259
3765
|
/** Optional command expiration timestamp in milliseconds. */
|
|
3260
3766
|
expiresAt?: number;
|
|
3261
3767
|
};
|
|
@@ -3383,6 +3889,26 @@ type UpdatePerpsLeverageError = RequestRejectedError | SigningError | TransportE
|
|
|
3383
3889
|
declare const UpdatePerpsLeverageError: {
|
|
3384
3890
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | RequestRejectedError;
|
|
3385
3891
|
};
|
|
3892
|
+
/**
|
|
3893
|
+
* Request parameters for updating leverage and margin mode for one or more
|
|
3894
|
+
* Perps instruments.
|
|
3895
|
+
*
|
|
3896
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3897
|
+
*/
|
|
3898
|
+
type UpdatePerpsLeveragesRequest = {
|
|
3899
|
+
/** One to 100 updates with unique instrument identifiers. */
|
|
3900
|
+
updates: UpdatePerpsLeverageRequest[];
|
|
3901
|
+
};
|
|
3902
|
+
/**
|
|
3903
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3904
|
+
*/
|
|
3905
|
+
type UpdatePerpsLeveragesError = RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3906
|
+
/**
|
|
3907
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3908
|
+
*/
|
|
3909
|
+
declare const UpdatePerpsLeveragesError: {
|
|
3910
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
3911
|
+
};
|
|
3386
3912
|
/**
|
|
3387
3913
|
* Request parameters for adjusting isolated margin on a Perps position.
|
|
3388
3914
|
*
|
|
@@ -3405,6 +3931,67 @@ declare const UpdatePerpsMarginError: {
|
|
|
3405
3931
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | RequestRejectedError;
|
|
3406
3932
|
};
|
|
3407
3933
|
|
|
3934
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3935
|
+
type CreatePerpsTwapRequest = {
|
|
3936
|
+
instrumentId: number;
|
|
3937
|
+
side: OrderSide;
|
|
3938
|
+
quantity: PerpsDecimalInput;
|
|
3939
|
+
/** Run duration in milliseconds, from five minutes to 24 hours. */ durationMs: number;
|
|
3940
|
+
/** Omit or set zero to derive cadence. Otherwise at least 30000 and an exact divisor of durationMs. */ intervalMs?: number;
|
|
3941
|
+
/** Jitter slice quantities by up to 20%. Defaults to false. */ randomize?: boolean;
|
|
3942
|
+
/** 0 uses the venue default (300 bps). Maximum 10000. */ slippageBps?: number;
|
|
3943
|
+
/** Zero or omission disables this lower mark-price bound. */ minPrice?: PerpsDecimalInput;
|
|
3944
|
+
/** Zero or omission disables this upper mark-price bound. */ maxPrice?: PerpsDecimalInput;
|
|
3945
|
+
reduceOnly?: boolean;
|
|
3946
|
+
/** Retain this identity to reconcile an uncertain create. */ clientOrderId?: string;
|
|
3947
|
+
/** Command deadline in Unix milliseconds, distinct from run duration. */ expiresAt?: number;
|
|
3948
|
+
};
|
|
3949
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3950
|
+
type CreatePerpsTwapError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3951
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3952
|
+
declare const CreatePerpsTwapError: {
|
|
3953
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3954
|
+
};
|
|
3955
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3956
|
+
type FetchPerpsTwapsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
3957
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3958
|
+
declare const FetchPerpsTwapsError: {
|
|
3959
|
+
isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3960
|
+
};
|
|
3961
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3962
|
+
type PausePerpsTwapRequest = {
|
|
3963
|
+
twapId: number /** Command deadline in Unix milliseconds. */;
|
|
3964
|
+
expiresAt?: number;
|
|
3965
|
+
};
|
|
3966
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3967
|
+
type PausePerpsTwapError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3968
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3969
|
+
declare const PausePerpsTwapError: {
|
|
3970
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3971
|
+
};
|
|
3972
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3973
|
+
type ResumePerpsTwapRequest = {
|
|
3974
|
+
twapId: number /** Command deadline in Unix milliseconds. */;
|
|
3975
|
+
expiresAt?: number;
|
|
3976
|
+
};
|
|
3977
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3978
|
+
type ResumePerpsTwapError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3979
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3980
|
+
declare const ResumePerpsTwapError: {
|
|
3981
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3982
|
+
};
|
|
3983
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3984
|
+
type CancelPerpsTwapRequest = {
|
|
3985
|
+
twapId: number /** Command deadline in Unix milliseconds. */;
|
|
3986
|
+
expiresAt?: number;
|
|
3987
|
+
};
|
|
3988
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3989
|
+
type CancelPerpsTwapError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3990
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3991
|
+
declare const CancelPerpsTwapError: {
|
|
3992
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3993
|
+
};
|
|
3994
|
+
|
|
3408
3995
|
/**
|
|
3409
3996
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3410
3997
|
*/
|
|
@@ -3413,6 +4000,8 @@ type PerpsSessionOptions = {
|
|
|
3413
4000
|
builderAttribution?: string | PerpsBuilderTermsInput;
|
|
3414
4001
|
chainId: number;
|
|
3415
4002
|
credentials: PerpsCredentials;
|
|
4003
|
+
/** Fetch implementation for session HTTP requests. */
|
|
4004
|
+
fetch?: Fetch;
|
|
3416
4005
|
headers?: Record<string, string>;
|
|
3417
4006
|
/**
|
|
3418
4007
|
* Include this authenticated account's builder receipts in the session iterator.
|
|
@@ -3571,6 +4160,13 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3571
4160
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3572
4161
|
*/
|
|
3573
4162
|
fetchPortfolio(): Promise<PerpsPortfolio>;
|
|
4163
|
+
/** Fetches snapshots for this session's authenticated account. Owner-only
|
|
4164
|
+
* leverage and PnL percentage remain null when historical values are unavailable.
|
|
4165
|
+
* This direct batch read does not paginate or retry item statuses.
|
|
4166
|
+
* @throws {@link FetchPerpsPositionSnapshotsError} Thrown on failure.
|
|
4167
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4168
|
+
*/
|
|
4169
|
+
fetchPositionSnapshots(request: PerpsPositionSnapshotSelection): Promise<PerpsPositionSnapshots>;
|
|
3574
4170
|
/**
|
|
3575
4171
|
* Fetches account-level Perps statistics for the authenticated account.
|
|
3576
4172
|
*
|
|
@@ -3619,11 +4215,14 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3619
4215
|
*/
|
|
3620
4216
|
fetchOrders(request?: FetchPerpsOrdersRequest): Promise<PerpsOrder[]>;
|
|
3621
4217
|
/**
|
|
3622
|
-
* Lists Perps fills
|
|
4218
|
+
* Lists Perps fills for the authenticated account, optionally by instrument.
|
|
3623
4219
|
*
|
|
3624
4220
|
* @remarks
|
|
3625
4221
|
* Fills are returned newest first by default; set `sort` to change the
|
|
3626
4222
|
* time direction. Page cursors are opaque values forwarded to the API.
|
|
4223
|
+
* An `instrumentId` filter is retained on every page, including when resuming
|
|
4224
|
+
* from a cursor. Fill `adl` marks auto-deleveraging; optional
|
|
4225
|
+
* `liquidationDetails.mark` is separate from the accounting fill price.
|
|
3627
4226
|
*
|
|
3628
4227
|
* @throws {@link PerpsSessionAccountError}
|
|
3629
4228
|
* Thrown on failure.
|
|
@@ -3755,6 +4354,8 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3755
4354
|
markNotificationsRead(request: MarkPerpsNotificationsReadRequest): Promise<void>;
|
|
3756
4355
|
/**
|
|
3757
4356
|
* Places one Perps order and resolves with the first matching orders update.
|
|
4357
|
+
* GTD orders require a limit price and gtdExpiry in Unix milliseconds.
|
|
4358
|
+
* The order expiry is separate from the expiresAt command deadline.
|
|
3758
4359
|
*
|
|
3759
4360
|
* @example
|
|
3760
4361
|
* ```ts
|
|
@@ -3806,7 +4407,9 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3806
4407
|
*
|
|
3807
4408
|
* @remarks
|
|
3808
4409
|
* The exit side is inferred from the current position for the requested
|
|
3809
|
-
* instrument.
|
|
4410
|
+
* instrument. Each trigger may specify a positive `quantity` for a partial
|
|
4411
|
+
* close; omission closes the full position at trigger time. A partial fill
|
|
4412
|
+
* leaves the other trigger armed while a same-side position remains.
|
|
3810
4413
|
*
|
|
3811
4414
|
* @example
|
|
3812
4415
|
* ```ts
|
|
@@ -3950,6 +4553,33 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3950
4553
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3951
4554
|
*/
|
|
3952
4555
|
updateLeverage(request: UpdatePerpsLeverageRequest): Promise<PerpsUpdateLeverageResult>;
|
|
4556
|
+
/**
|
|
4557
|
+
* Updates Perps leverage and margin mode for one or more instruments.
|
|
4558
|
+
*
|
|
4559
|
+
* @remarks
|
|
4560
|
+
* The batch must contain one to 100 unique instruments. Updates are
|
|
4561
|
+
* processed sequentially and are not atomic. Results preserve request
|
|
4562
|
+
* order. Per-instrument rejections, including `internal_error`, are returned
|
|
4563
|
+
* as data; `internal_error` may represent an unknown application outcome for
|
|
4564
|
+
* that instrument. A whole-request `internal_error` also has an unknown
|
|
4565
|
+
* application outcome; reconcile account state before retrying the batch.
|
|
4566
|
+
*
|
|
4567
|
+
* @example
|
|
4568
|
+
* ```ts
|
|
4569
|
+
* const results = await session.updateLeverages({
|
|
4570
|
+
* updates: [
|
|
4571
|
+
* { crossMargin: false, instrumentId: 1, leverage: 5 },
|
|
4572
|
+
* { crossMargin: true, instrumentId: 2, leverage: 10 },
|
|
4573
|
+
* ],
|
|
4574
|
+
* });
|
|
4575
|
+
* ```
|
|
4576
|
+
*
|
|
4577
|
+
* @throws {@link UpdatePerpsLeveragesError}
|
|
4578
|
+
* Thrown when the complete request is rejected, cannot be sent, or returns inconsistent results.
|
|
4579
|
+
*
|
|
4580
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4581
|
+
*/
|
|
4582
|
+
updateLeverages(request: UpdatePerpsLeveragesRequest): Promise<PerpsUpdateLeverageBatchResult[]>;
|
|
3953
4583
|
/**
|
|
3954
4584
|
* Adjusts isolated margin for an instrument position.
|
|
3955
4585
|
*
|
|
@@ -3970,18 +4600,72 @@ declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
|
3970
4600
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3971
4601
|
*/
|
|
3972
4602
|
updateMargin(request: UpdatePerpsMarginRequest): Promise<void>;
|
|
4603
|
+
/** Create a chase using this session. Reconcile uncertain submissions before trying again.
|
|
4604
|
+
* @throws {@link CreatePerpsChaseError} Thrown on failure.
|
|
4605
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4606
|
+
*/
|
|
4607
|
+
createChase(request: CreatePerpsChaseRequest): Promise<PerpsChaseAccepted>;
|
|
4608
|
+
/** End a chase and cancel its resting child; completed fills remain.
|
|
4609
|
+
* @throws {@link CancelPerpsChaseError} Thrown on failure.
|
|
4610
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4611
|
+
*/
|
|
4612
|
+
cancelChase(request: CancelPerpsChaseRequest): Promise<void>;
|
|
4613
|
+
/** Fetch all running chases without pagination. Ended chases are absent.
|
|
4614
|
+
* @throws {@link FetchPerpsChasesError} Thrown on failure.
|
|
4615
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4616
|
+
*/
|
|
4617
|
+
fetchChases(): Promise<PerpsChase[]>;
|
|
4618
|
+
/** Create a TWAP using this session's credentials.
|
|
4619
|
+
* @throws {@link CreatePerpsTwapError} Thrown on failure.
|
|
4620
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4621
|
+
*/
|
|
4622
|
+
createTwap(request: CreatePerpsTwapRequest): Promise<PerpsTwapAccepted>;
|
|
4623
|
+
/** Pause a TWAP using this session's credentials.
|
|
4624
|
+
* @throws {@link PausePerpsTwapError} Thrown on failure.
|
|
4625
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4626
|
+
*/
|
|
4627
|
+
pauseTwap(request: PausePerpsTwapRequest): Promise<void>;
|
|
4628
|
+
/** Resume a TWAP using this session's credentials.
|
|
4629
|
+
* @throws {@link ResumePerpsTwapError} Thrown on failure.
|
|
4630
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4631
|
+
*/
|
|
4632
|
+
resumeTwap(request: ResumePerpsTwapRequest): Promise<void>;
|
|
4633
|
+
/** Cancel a TWAP using this session's credentials.
|
|
4634
|
+
* @throws {@link CancelPerpsTwapError} Thrown on failure.
|
|
4635
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4636
|
+
*/
|
|
4637
|
+
cancelTwap(request: CancelPerpsTwapRequest): Promise<void>;
|
|
4638
|
+
/** Fetch all active TWAPs. Ended runs are absent; no pagination.
|
|
4639
|
+
* @throws {@link FetchPerpsTwapsError} Thrown on failure.
|
|
4640
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4641
|
+
*/
|
|
4642
|
+
fetchTwaps(): Promise<PerpsTwap[]>;
|
|
3973
4643
|
}
|
|
3974
4644
|
|
|
3975
4645
|
/**
|
|
3976
4646
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3977
4647
|
*/
|
|
3978
4648
|
type PublicPerpsActions = {
|
|
4649
|
+
/** Fetches ordered snapshots anonymously, including on secure clients. Use
|
|
4650
|
+
* session.fetchPositionSnapshots for owner-only leverage and PnL percentage.
|
|
4651
|
+
* No pagination or automatic retries of item statuses.
|
|
4652
|
+
* @throws {@link FetchPerpsPositionSnapshotsError} Thrown on failure.
|
|
4653
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4654
|
+
*/
|
|
4655
|
+
fetchPerpsPositionSnapshots(request: FetchPerpsPositionSnapshotsRequest, options?: RequestOptions): Promise<PerpsPositionSnapshots>;
|
|
4656
|
+
/**
|
|
4657
|
+
* Fetches whether an address has a Perps account without authentication.
|
|
4658
|
+
* Registration is permanent; a false result may be cached for up to ten seconds.
|
|
4659
|
+
* @throws {@link FetchPerpsRegistrationError} Thrown on failure.
|
|
4660
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4661
|
+
*/
|
|
4662
|
+
fetchPerpsRegistration(request: FetchPerpsRegistrationRequest, options?: RequestOptions): Promise<boolean>;
|
|
3979
4663
|
/**
|
|
3980
4664
|
* Fetches public builder availability and the platform fee cap.
|
|
3981
4665
|
* @throws {@link FetchPerpsBuilderStatusError} Thrown on failure.
|
|
3982
4666
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3983
4667
|
*/
|
|
3984
|
-
fetchPerpsBuilderStatus(request: FetchPerpsBuilderStatusRequest): Promise<PerpsBuilderStatus>;
|
|
4668
|
+
fetchPerpsBuilderStatus(request: FetchPerpsBuilderStatusRequest, options?: RequestOptions): Promise<PerpsBuilderStatus>;
|
|
3985
4669
|
/**
|
|
3986
4670
|
* Fetches Perps instruments.
|
|
3987
4671
|
*
|
|
@@ -3995,7 +4679,7 @@ type PublicPerpsActions = {
|
|
|
3995
4679
|
*
|
|
3996
4680
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3997
4681
|
*/
|
|
3998
|
-
fetchPerpsInstruments(request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
4682
|
+
fetchPerpsInstruments(request?: FetchPerpsInstrumentsRequest, options?: RequestOptions): Promise<PerpsInstrument[]>;
|
|
3999
4683
|
/**
|
|
4000
4684
|
* Fetches the current Perps ticker for an instrument.
|
|
4001
4685
|
*
|
|
@@ -4009,7 +4693,7 @@ type PublicPerpsActions = {
|
|
|
4009
4693
|
*
|
|
4010
4694
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4011
4695
|
*/
|
|
4012
|
-
fetchPerpsTicker(request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
4696
|
+
fetchPerpsTicker(request: FetchPerpsTickerRequest, options?: RequestOptions): Promise<PerpsTicker>;
|
|
4013
4697
|
/**
|
|
4014
4698
|
* Fetches current Perps tickers.
|
|
4015
4699
|
*
|
|
@@ -4023,7 +4707,7 @@ type PublicPerpsActions = {
|
|
|
4023
4707
|
*
|
|
4024
4708
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4025
4709
|
*/
|
|
4026
|
-
fetchPerpsTickers(request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
4710
|
+
fetchPerpsTickers(request?: FetchPerpsTickersRequest, options?: RequestOptions): Promise<PerpsTicker[]>;
|
|
4027
4711
|
/**
|
|
4028
4712
|
* Fetches a Perps order book.
|
|
4029
4713
|
*
|
|
@@ -4037,7 +4721,7 @@ type PublicPerpsActions = {
|
|
|
4037
4721
|
*
|
|
4038
4722
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4039
4723
|
*/
|
|
4040
|
-
fetchPerpsBook(request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
4724
|
+
fetchPerpsBook(request: FetchPerpsBookRequest, options?: RequestOptions): Promise<PerpsBook>;
|
|
4041
4725
|
/**
|
|
4042
4726
|
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
4043
4727
|
*
|
|
@@ -4056,7 +4740,7 @@ type PublicPerpsActions = {
|
|
|
4056
4740
|
*
|
|
4057
4741
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4058
4742
|
*/
|
|
4059
|
-
listPerpsCandles(request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
4743
|
+
listPerpsCandles(request: ListPerpsCandlesRequest, options?: RequestOptions): Paginated<PerpsCandle[]>;
|
|
4060
4744
|
/**
|
|
4061
4745
|
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
4062
4746
|
*
|
|
@@ -4074,7 +4758,7 @@ type PublicPerpsActions = {
|
|
|
4074
4758
|
*
|
|
4075
4759
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4076
4760
|
*/
|
|
4077
|
-
listPerpsFundingHistory(request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
4761
|
+
listPerpsFundingHistory(request: ListPerpsFundingHistoryRequest, options?: RequestOptions): Paginated<PerpsFundingRate[]>;
|
|
4078
4762
|
/**
|
|
4079
4763
|
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
4080
4764
|
*
|
|
@@ -4090,7 +4774,7 @@ type PublicPerpsActions = {
|
|
|
4090
4774
|
*
|
|
4091
4775
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4092
4776
|
*/
|
|
4093
|
-
listPerpsTrades(request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
4777
|
+
listPerpsTrades(request: ListPerpsTradesRequest, options?: RequestOptions): Paginated<PerpsPublicTrade[]>;
|
|
4094
4778
|
/**
|
|
4095
4779
|
* Fetches the Perps fee schedule.
|
|
4096
4780
|
*
|
|
@@ -4104,7 +4788,7 @@ type PublicPerpsActions = {
|
|
|
4104
4788
|
*
|
|
4105
4789
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4106
4790
|
*/
|
|
4107
|
-
fetchPerpsFees(): Promise<PerpsFeeScheduleEntry[]>;
|
|
4791
|
+
fetchPerpsFees(options?: RequestOptions): Promise<PerpsFeeScheduleEntry[]>;
|
|
4108
4792
|
};
|
|
4109
4793
|
/**
|
|
4110
4794
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
@@ -4224,6 +4908,30 @@ declare function perpsActions(client: BasePublicClient): PublicPerpsActions;
|
|
|
4224
4908
|
declare function perpsActions(client: BaseSecureClient): SecurePerpsActions;
|
|
4225
4909
|
|
|
4226
4910
|
type PublicRewardsActions = {
|
|
4911
|
+
/**
|
|
4912
|
+
* Fetches maker fee rebates for a calendar day as a direct collection.
|
|
4913
|
+
* Amounts are decimal strings in USDC units. No authentication is required.
|
|
4914
|
+
* Returns an empty array when the maker has no rebates for the date.
|
|
4915
|
+
* @throws {@link FetchCurrentRebatesError} Thrown on failure.
|
|
4916
|
+
* @example
|
|
4917
|
+
* ```ts
|
|
4918
|
+
* const rebates = await client.fetchCurrentRebates({ date: '2026-10-06', makerAddress });
|
|
4919
|
+
* ```
|
|
4920
|
+
*/
|
|
4921
|
+
fetchCurrentRebates(request: FetchCurrentRebatesRequest, options?: RequestOptions): Promise<RebatedFee[]>;
|
|
4922
|
+
/**
|
|
4923
|
+
* Lists active markets with reward configurations and discovery metadata.
|
|
4924
|
+
* Configurations may be empty. Positive ranges are min-exclusive and max-inclusive; zero disables a bound.
|
|
4925
|
+
* Pages default to 100 items (maximum 500). With orderBy, sortDirection defaults to ASC; otherwise order is unspecified.
|
|
4926
|
+
* @throws {@link ListRewardMarketsError} Thrown on failure.
|
|
4927
|
+
* @example
|
|
4928
|
+
* ```ts
|
|
4929
|
+
* for await (const page of client.listRewardMarkets({ query: 'sports' })) {
|
|
4930
|
+
* console.log(page.items);
|
|
4931
|
+
* }
|
|
4932
|
+
* ```
|
|
4933
|
+
*/
|
|
4934
|
+
listRewardMarkets(request?: ListRewardMarketsRequest, options?: RequestOptions): Paginated<RewardMarket[]>;
|
|
4227
4935
|
/**
|
|
4228
4936
|
* Lists current active market rewards.
|
|
4229
4937
|
*
|
|
@@ -4253,7 +4961,7 @@ type PublicRewardsActions = {
|
|
|
4253
4961
|
* }
|
|
4254
4962
|
* ```
|
|
4255
4963
|
*/
|
|
4256
|
-
listCurrentRewards(request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
|
|
4964
|
+
listCurrentRewards(request?: ListCurrentRewardsRequest, options?: RequestOptions): Paginated<CurrentReward[]>;
|
|
4257
4965
|
/**
|
|
4258
4966
|
* Lists reward configurations for a market.
|
|
4259
4967
|
*
|
|
@@ -4289,7 +4997,7 @@ type PublicRewardsActions = {
|
|
|
4289
4997
|
* }
|
|
4290
4998
|
* ```
|
|
4291
4999
|
*/
|
|
4292
|
-
listMarketRewards(request: ListMarketRewardsRequest): Paginated<MarketReward[]>;
|
|
5000
|
+
listMarketRewards(request: ListMarketRewardsRequest, options?: RequestOptions): Paginated<MarketReward[]>;
|
|
4293
5001
|
};
|
|
4294
5002
|
type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
4295
5003
|
/**
|
|
@@ -4305,7 +5013,7 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4305
5013
|
* });
|
|
4306
5014
|
* ```
|
|
4307
5015
|
*/
|
|
4308
|
-
fetchOrderScoring(request: FetchOrderScoringRequest): Promise<boolean>;
|
|
5016
|
+
fetchOrderScoring(request: FetchOrderScoringRequest, options?: RequestOptions): Promise<boolean>;
|
|
4309
5017
|
/**
|
|
4310
5018
|
* Fetches scoring state for multiple orders.
|
|
4311
5019
|
*
|
|
@@ -4319,7 +5027,7 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4319
5027
|
* });
|
|
4320
5028
|
* ```
|
|
4321
5029
|
*/
|
|
4322
|
-
fetchOrdersScoring(request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
|
|
5030
|
+
fetchOrdersScoring(request: FetchOrdersScoringRequest, options?: RequestOptions): Promise<OrdersScoringResponse>;
|
|
4323
5031
|
/**
|
|
4324
5032
|
* Lists per-market earnings for the authenticated account on a given day.
|
|
4325
5033
|
*
|
|
@@ -4353,9 +5061,12 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4353
5061
|
* }
|
|
4354
5062
|
* ```
|
|
4355
5063
|
*/
|
|
4356
|
-
listUserEarningsForDay(request: ListUserEarningsForDayRequest): Paginated<UserEarning[]>;
|
|
5064
|
+
listUserEarningsForDay(request: ListUserEarningsForDayRequest, options?: RequestOptions): Paginated<UserEarning[]>;
|
|
4357
5065
|
/**
|
|
4358
5066
|
* Fetches total earnings for the authenticated account on a given day.
|
|
5067
|
+
* Set `sponsored: true` to include sponsored rewards and the native/sponsored
|
|
5068
|
+
* breakdown. Omitted or false returns native rewards only; absent breakdown
|
|
5069
|
+
* fields remain undefined.
|
|
4359
5070
|
*
|
|
4360
5071
|
* @throws {@link FetchTotalEarningsForUserForDayError}
|
|
4361
5072
|
* Thrown on failure.
|
|
@@ -4367,7 +5078,7 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4367
5078
|
* });
|
|
4368
5079
|
* ```
|
|
4369
5080
|
*/
|
|
4370
|
-
fetchTotalEarningsForUserForDay(request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
5081
|
+
fetchTotalEarningsForUserForDay(request: FetchTotalEarningsForUserForDayRequest, options?: RequestOptions): Promise<TotalUserEarning[]>;
|
|
4371
5082
|
/**
|
|
4372
5083
|
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
4373
5084
|
*
|
|
@@ -4401,7 +5112,7 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4401
5112
|
* }
|
|
4402
5113
|
* ```
|
|
4403
5114
|
*/
|
|
4404
|
-
listUserEarningsAndMarketsConfig(request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning[]>;
|
|
5115
|
+
listUserEarningsAndMarketsConfig(request: ListUserEarningsAndMarketsConfigRequest, options?: RequestOptions): Paginated<UserRewardsEarning[]>;
|
|
4405
5116
|
/**
|
|
4406
5117
|
* Fetches reward percentages for the authenticated account.
|
|
4407
5118
|
*
|
|
@@ -4413,7 +5124,7 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
4413
5124
|
* const percentages = await client.fetchRewardPercentages();
|
|
4414
5125
|
* ```
|
|
4415
5126
|
*/
|
|
4416
|
-
fetchRewardPercentages(): Promise<RewardsPercentages>;
|
|
5127
|
+
fetchRewardPercentages(options?: RequestOptions): Promise<RewardsPercentages>;
|
|
4417
5128
|
}>;
|
|
4418
5129
|
declare function rewardsActions(client: BasePublicClient): PublicRewardsActions;
|
|
4419
5130
|
declare function rewardsActions(client: BaseSecureClient): SecureRewardsActions;
|
|
@@ -4953,9 +5664,9 @@ type FetchRfqStatusParams = {
|
|
|
4953
5664
|
* {@link RfqExecutionStatus} values surface alongside the RFQ lifecycle.
|
|
4954
5665
|
*/
|
|
4955
5666
|
type RfqStatusResult = BuilderRfqStatusResponse;
|
|
4956
|
-
type FetchRfqStatusError = RateLimitError | RfqRequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5667
|
+
type FetchRfqStatusError = RequestAbortedError | RateLimitError | RfqRequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4957
5668
|
declare const FetchRfqStatusError: {
|
|
4958
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RateLimitError | RfqRequestRejectedError;
|
|
5669
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RateLimitError | RfqRequestRejectedError;
|
|
4959
5670
|
};
|
|
4960
5671
|
/**
|
|
4961
5672
|
* Fetches the status of an accepted RFQ.
|
|
@@ -4972,7 +5683,7 @@ declare const FetchRfqStatusError: {
|
|
|
4972
5683
|
* const status = await fetchRfqStatus(client, { rfqId });
|
|
4973
5684
|
* ```
|
|
4974
5685
|
*/
|
|
4975
|
-
declare function fetchRfqStatus(client: BaseSecureClient, params: FetchRfqStatusParams): Promise<RfqStatusResult>;
|
|
5686
|
+
declare function fetchRfqStatus(client: BaseSecureClient, params: FetchRfqStatusParams, options?: RequestOptions): Promise<RfqStatusResult>;
|
|
4976
5687
|
|
|
4977
5688
|
type SecureRfqActions = {
|
|
4978
5689
|
/**
|
|
@@ -5243,7 +5954,7 @@ type SessionKeyActions = {
|
|
|
5243
5954
|
* @throws {@link FetchSessionKeysError}
|
|
5244
5955
|
* Thrown on failure.
|
|
5245
5956
|
*/
|
|
5246
|
-
fetchSessionKeys(): Promise<SessionKey[]>;
|
|
5957
|
+
fetchSessionKeys(options?: RequestOptions): Promise<SessionKey[]>;
|
|
5247
5958
|
/**
|
|
5248
5959
|
* Revokes a session key authorized for the Deposit Wallet.
|
|
5249
5960
|
*
|
|
@@ -5289,9 +6000,20 @@ type SecureSubscriptionsActions = {
|
|
|
5289
6000
|
/**
|
|
5290
6001
|
* Starts one or more realtime subscriptions on this client.
|
|
5291
6002
|
*
|
|
5292
|
-
* The
|
|
6003
|
+
* The `prices.crypto`, `prices.crypto.twap`, `prices.equity`, and
|
|
6004
|
+
* `prices.equity.twap` topics
|
|
5293
6005
|
* require explicit filters and include history snapshots and live updates.
|
|
5294
6006
|
* Legacy source-named topics retain their existing filter and event behavior.
|
|
6007
|
+
* These four topics include `source`, identifying the source of the update
|
|
6008
|
+
* or entire history batch, including empty batches. Unknown source names remain
|
|
6009
|
+
* strings. Crypto sources are constant; equity sources may change across
|
|
6010
|
+
* reconnects. Cached history starts fresh whenever the source changes.
|
|
6011
|
+
* These four topics accept an optional `provider` pin. Omit it to follow the
|
|
6012
|
+
* default. A pin may fall back or be ignored when selection is disabled;
|
|
6013
|
+
* `source` always identifies the actual producer. Different provider choices,
|
|
6014
|
+
* including omission, use separate connections, even if they serve the same source.
|
|
6015
|
+
* An optional `onSubscribed` callback reports the provider the server confirms,
|
|
6016
|
+
* on acceptance and after every reconnect.
|
|
5295
6017
|
* Event `seq` values are scoped to one channel on one WebSocket connection
|
|
5296
6018
|
* and reset after reconnecting. Subscriptions with more than 64 filters use
|
|
5297
6019
|
* multiple connections, so their sequence values may interleave.
|
|
@@ -5486,9 +6208,9 @@ type EstimateMarketSellPriceRequest = {
|
|
|
5486
6208
|
orderType?: OrderType.FAK | OrderType.FOK;
|
|
5487
6209
|
};
|
|
5488
6210
|
type EstimateMarketPriceRequest = EstimateMarketBuyPriceRequest | EstimateMarketSellPriceRequest;
|
|
5489
|
-
type EstimateMarketPriceError = InsufficientLiquidityError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6211
|
+
type EstimateMarketPriceError = RequestAbortedError | InsufficientLiquidityError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5490
6212
|
declare const EstimateMarketPriceError: {
|
|
5491
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | InsufficientLiquidityError;
|
|
6213
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError | InsufficientLiquidityError;
|
|
5492
6214
|
};
|
|
5493
6215
|
/**
|
|
5494
6216
|
* Estimates the price level a market order would cross at current book depth.
|
|
@@ -5520,7 +6242,7 @@ declare const EstimateMarketPriceError: {
|
|
|
5520
6242
|
* @throws {@link EstimateMarketPriceError}
|
|
5521
6243
|
* Thrown on failure.
|
|
5522
6244
|
*/
|
|
5523
|
-
declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
|
|
6245
|
+
declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest, options?: RequestOptions): Promise<number>;
|
|
5524
6246
|
|
|
5525
6247
|
type PrepareMarketBuyOrderRequest = {
|
|
5526
6248
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
@@ -5761,6 +6483,28 @@ declare const WaitForOrderFillSettlementError: {
|
|
|
5761
6483
|
declare function waitForOrderFillSettlement(client: BaseSecureClient, order: AcceptedOrderResponse, request?: WaitForOrderFillSettlementRequest): Promise<TxHash[]>;
|
|
5762
6484
|
|
|
5763
6485
|
type SecureTradingActions = {
|
|
6486
|
+
/**
|
|
6487
|
+
* Sends one authenticated order heartbeat and returns the next heartbeat ID.
|
|
6488
|
+
* The first accepted send enables timeout cancellation for ALL open orders owned
|
|
6489
|
+
* by this API key, across markets and processes. Only start when you can keep
|
|
6490
|
+
* sending every five seconds. After ten seconds without an accepted send, the
|
|
6491
|
+
* server attempts cancel-all; cancellation timing and success are not guaranteed.
|
|
6492
|
+
* Start with an empty ID, serialize sends per key, and retain every returned ID.
|
|
6493
|
+
* No timer or automatic retry is started. A mismatch does not refresh the deadline;
|
|
6494
|
+
* retry explicitly with OrderHeartbeatMismatchError.heartbeatId. A lost response
|
|
6495
|
+
* may follow an accepted send, so failure does not prove registration is inactive.
|
|
6496
|
+
* There is no disarm operation. Stopping sends or closing the client leaves the
|
|
6497
|
+
* deadline active. On shutdown, stop placing orders and explicitly cancel/verify
|
|
6498
|
+
* orders you intend to remove. Expiry removes the registration; a later accepted
|
|
6499
|
+
* send registers again. This is separate from WebSocket connection keepalive.
|
|
6500
|
+
* @throws {@link SendOrderHeartbeatError} Thrown on failure.
|
|
6501
|
+
* @example
|
|
6502
|
+
* ```ts
|
|
6503
|
+
* const heartbeat = await client.sendOrderHeartbeat();
|
|
6504
|
+
* const next = await client.sendOrderHeartbeat({ heartbeatId: heartbeat.heartbeatId });
|
|
6505
|
+
* ```
|
|
6506
|
+
*/
|
|
6507
|
+
sendOrderHeartbeat(request?: SendOrderHeartbeatRequest): Promise<OrderHeartbeat>;
|
|
5764
6508
|
/**
|
|
5765
6509
|
* Creates a signed market order for the authenticated account.
|
|
5766
6510
|
*
|
|
@@ -6050,7 +6794,7 @@ type SecureTradingActions = {
|
|
|
6050
6794
|
* }
|
|
6051
6795
|
* ```
|
|
6052
6796
|
*/
|
|
6053
|
-
listOpenOrders(request?: ListOpenOrdersRequest): Paginated<OpenOrder[]>;
|
|
6797
|
+
listOpenOrders(request?: ListOpenOrdersRequest, options?: RequestOptions): Paginated<OpenOrder[]>;
|
|
6054
6798
|
/**
|
|
6055
6799
|
* Fetches a single order for the authenticated account.
|
|
6056
6800
|
*
|
|
@@ -6062,7 +6806,7 @@ type SecureTradingActions = {
|
|
|
6062
6806
|
* const order = await client.fetchOrder({ orderId: '123' });
|
|
6063
6807
|
* ```
|
|
6064
6808
|
*/
|
|
6065
|
-
fetchOrder(request: FetchOrderRequest): Promise<OpenOrder>;
|
|
6809
|
+
fetchOrder(request: FetchOrderRequest, options?: RequestOptions): Promise<OpenOrder>;
|
|
6066
6810
|
};
|
|
6067
6811
|
declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
|
|
6068
6812
|
|
|
@@ -6070,8 +6814,9 @@ type PublicWalletActions = {
|
|
|
6070
6814
|
/**
|
|
6071
6815
|
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
6072
6816
|
*
|
|
6073
|
-
*
|
|
6074
|
-
*
|
|
6817
|
+
* Reads the wallet's current approval state. Recent grants and revocations
|
|
6818
|
+
* may take time to appear. It does not require a signer or submit
|
|
6819
|
+
* transactions. Trading setup re-checks approvals before preparing them.
|
|
6075
6820
|
*
|
|
6076
6821
|
* @throws {@link FetchTradingApprovalsStateError}
|
|
6077
6822
|
* Thrown on failure.
|
|
@@ -6083,14 +6828,65 @@ type PublicWalletActions = {
|
|
|
6083
6828
|
* });
|
|
6084
6829
|
* ```
|
|
6085
6830
|
*/
|
|
6086
|
-
fetchTradingApprovalsState(request: FetchTradingApprovalsStateRequest): Promise<TradingApprovalsState>;
|
|
6831
|
+
fetchTradingApprovalsState(request: FetchTradingApprovalsStateRequest, options?: RequestOptions): Promise<TradingApprovalsState>;
|
|
6087
6832
|
};
|
|
6088
6833
|
type SecureWalletActions = {
|
|
6834
|
+
/**
|
|
6835
|
+
* Converts NO into YES for all other conditions.
|
|
6836
|
+
* Derives the event and NO condition index from the market's condition ID.
|
|
6837
|
+
* Includes Other unless converting NO(Other).
|
|
6838
|
+
* Requires PositionManager operator approval for the Router; approvals are not submitted automatically.
|
|
6839
|
+
* Signs and submits; call the returned handle's wait() to confirm.
|
|
6840
|
+
* @throws {@link ConvertError} Thrown on failure.
|
|
6841
|
+
*/
|
|
6842
|
+
convert(request: PrepareConvertRequest): Promise<TransactionHandle>;
|
|
6843
|
+
/**
|
|
6844
|
+
* Prepares a workflow: Converts NO into YES for all other conditions.
|
|
6845
|
+
* Derives the event and NO condition index from the market's condition ID.
|
|
6846
|
+
* Includes Other unless converting NO(Other).
|
|
6847
|
+
* Requires PositionManager operator approval for the Router; approvals are not submitted automatically.
|
|
6848
|
+
* Preparing does not sign or submit; advance the workflow to execute it.
|
|
6849
|
+
* @throws {@link PrepareConvertError} Thrown on failure.
|
|
6850
|
+
*/
|
|
6851
|
+
prepareConvert(request: PrepareConvertRequest): Promise<ConvertWorkflow>;
|
|
6852
|
+
/**
|
|
6853
|
+
* Splits pUSD into YES for every condition, including Other.
|
|
6854
|
+
* Uses the event containing the supplied market condition.
|
|
6855
|
+
* Requires pUSD spending approval for the Router; approvals are not submitted automatically.
|
|
6856
|
+
* Signs and submits; call the returned handle's wait() to confirm.
|
|
6857
|
+
* @throws {@link HorizontalSplitError} Thrown on failure.
|
|
6858
|
+
*/
|
|
6859
|
+
horizontalSplit(request: PrepareHorizontalSplitRequest): Promise<TransactionHandle>;
|
|
6860
|
+
/**
|
|
6861
|
+
* Prepares a workflow: Splits pUSD into YES for every condition, including Other.
|
|
6862
|
+
* Uses the event containing the supplied market condition.
|
|
6863
|
+
* Requires pUSD spending approval for the Router; approvals are not submitted automatically.
|
|
6864
|
+
* Preparing does not sign or submit; advance the workflow to execute it.
|
|
6865
|
+
* @throws {@link PrepareHorizontalSplitError} Thrown on failure.
|
|
6866
|
+
*/
|
|
6867
|
+
prepareHorizontalSplit(request: PrepareHorizontalSplitRequest): Promise<HorizontalSplitWorkflow>;
|
|
6868
|
+
/**
|
|
6869
|
+
* Merges equal YES amounts from every condition, including Other, into pUSD.
|
|
6870
|
+
* Uses the event containing the supplied market condition.
|
|
6871
|
+
* Requires PositionManager operator approval for the Router; approvals are not submitted automatically.
|
|
6872
|
+
* Signs and submits; call the returned handle's wait() to confirm.
|
|
6873
|
+
* @throws {@link HorizontalMergeError} Thrown on failure.
|
|
6874
|
+
*/
|
|
6875
|
+
horizontalMerge(request: PrepareHorizontalMergeRequest): Promise<TransactionHandle>;
|
|
6876
|
+
/**
|
|
6877
|
+
* Prepares a workflow: Merges equal YES amounts from every condition, including Other, into pUSD.
|
|
6878
|
+
* Uses the event containing the supplied market condition.
|
|
6879
|
+
* Requires PositionManager operator approval for the Router; approvals are not submitted automatically.
|
|
6880
|
+
* Preparing does not sign or submit; advance the workflow to execute it.
|
|
6881
|
+
* @throws {@link PrepareHorizontalMergeError} Thrown on failure.
|
|
6882
|
+
*/
|
|
6883
|
+
prepareHorizontalMerge(request: PrepareHorizontalMergeRequest): Promise<HorizontalMergeWorkflow>;
|
|
6089
6884
|
/**
|
|
6090
6885
|
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
6091
6886
|
*
|
|
6092
|
-
*
|
|
6093
|
-
*
|
|
6887
|
+
* Reads the authenticated account's wallet approval state. Recent grants
|
|
6888
|
+
* and revocations may take time to appear. It does not submit transactions.
|
|
6889
|
+
* Trading setup re-checks approvals before preparing them.
|
|
6094
6890
|
*
|
|
6095
6891
|
* @throws {@link FetchTradingApprovalsStateError}
|
|
6096
6892
|
* Thrown on failure.
|
|
@@ -6100,7 +6896,7 @@ type SecureWalletActions = {
|
|
|
6100
6896
|
* const state = await client.fetchTradingApprovalsState();
|
|
6101
6897
|
* ```
|
|
6102
6898
|
*/
|
|
6103
|
-
fetchTradingApprovalsState(): Promise<TradingApprovalsState>;
|
|
6899
|
+
fetchTradingApprovalsState(options?: RequestOptions): Promise<TradingApprovalsState>;
|
|
6104
6900
|
/**
|
|
6105
6901
|
* Sets up the approvals required for trading and supported position lifecycle workflows.
|
|
6106
6902
|
*
|
|
@@ -6395,6 +7191,7 @@ type EnvironmentConfigFork = {
|
|
|
6395
7191
|
rpc?: string;
|
|
6396
7192
|
walletDerivation?: Partial<WalletDerivationConfig>;
|
|
6397
7193
|
contracts?: Partial<EnvironmentContracts>;
|
|
7194
|
+
predictions?: Partial<RestEndpoint>;
|
|
6398
7195
|
clob?: Partial<RestEndpoint> & {
|
|
6399
7196
|
market?: Partial<WebSocketEndpoint>;
|
|
6400
7197
|
user?: Partial<WebSocketEndpoint>;
|
|
@@ -6456,6 +7253,13 @@ declare abstract class AbstractClient<TContext extends PublicContext> {
|
|
|
6456
7253
|
#private;
|
|
6457
7254
|
protected get context(): TContext;
|
|
6458
7255
|
protected get decorators(): readonly ClientDecorator[];
|
|
7256
|
+
/**
|
|
7257
|
+
* Service client for prediction requests using the configured endpoint.
|
|
7258
|
+
* Requests return promises with parsed response data.
|
|
7259
|
+
*
|
|
7260
|
+
* @experimental For the polymarket.com UI. External consumers should not adopt this API. Breaking changes may occur in any release, including patch releases.
|
|
7261
|
+
*/
|
|
7262
|
+
get predictions(): ServiceClient;
|
|
6459
7263
|
constructor(context: TContext);
|
|
6460
7264
|
protected resolveClobHeaders(request: ServiceRequest): Promise<HeadersInit>;
|
|
6461
7265
|
protected resolveRelayerHeaders(request: ServiceRequest): Promise<HeadersInit>;
|
|
@@ -6485,6 +7289,7 @@ type BeginAuthenticationRequest = {
|
|
|
6485
7289
|
credentials?: ApiKeyCreds;
|
|
6486
7290
|
};
|
|
6487
7291
|
type PublicClientConfig = {
|
|
7292
|
+
fetch?: Fetch;
|
|
6488
7293
|
environment: EnvironmentConfig;
|
|
6489
7294
|
apiKey?: ApiKeyAuthorization;
|
|
6490
7295
|
onRateLimitUpdate?: RateLimitUpdateListener;
|
|
@@ -6620,6 +7425,12 @@ type SecureClient<TPublicActions extends ClientActions = PublicActions, TSecureA
|
|
|
6620
7425
|
type BaseClient<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = BasePublicClient<TPublicActions, TSecureActions> | BaseSecureClient<TPublicActions, TSecureActions>;
|
|
6621
7426
|
type Client<TPublicActions extends ClientActions = ClientActions, TSecureActions extends ClientActions = TPublicActions> = PublicClient<TPublicActions, TSecureActions> | SecureClient<TPublicActions, TSecureActions>;
|
|
6622
7427
|
type PublicClientOptions = {
|
|
7428
|
+
/**
|
|
7429
|
+
* Fetch-compatible implementation for SDK-owned HTTP requests. Defaults to native fetch.
|
|
7430
|
+
*
|
|
7431
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7432
|
+
*/
|
|
7433
|
+
fetch?: Fetch;
|
|
6623
7434
|
/**
|
|
6624
7435
|
* The environment configuration used by the client.
|
|
6625
7436
|
*
|
|
@@ -6703,9 +7514,9 @@ declare const SetupGaslessWalletError: {
|
|
|
6703
7514
|
*/
|
|
6704
7515
|
declare function createSecureClient(options: SecureClientOptions): Promise<SecureClient<PublicActions, SecureActions>>;
|
|
6705
7516
|
|
|
6706
|
-
type FetchClosedOnlyModeError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
7517
|
+
type FetchClosedOnlyModeError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6707
7518
|
declare const FetchClosedOnlyModeError: {
|
|
6708
|
-
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7519
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6709
7520
|
};
|
|
6710
7521
|
/**
|
|
6711
7522
|
* Fetches whether the account is restricted to closed-only trading.
|
|
@@ -6720,7 +7531,7 @@ declare const FetchClosedOnlyModeError: {
|
|
|
6720
7531
|
* const closedOnly = await fetchClosedOnlyMode(client);
|
|
6721
7532
|
* ```
|
|
6722
7533
|
*/
|
|
6723
|
-
declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
|
|
7534
|
+
declare function fetchClosedOnlyMode(client: BaseSecureClient, options?: RequestOptions): Promise<boolean>;
|
|
6724
7535
|
type ListOpenOrdersRequest = {
|
|
6725
7536
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
6726
7537
|
assetId?: string;
|
|
@@ -6736,9 +7547,9 @@ type ListOpenOrdersRequest = {
|
|
|
6736
7547
|
id?: string;
|
|
6737
7548
|
market?: string;
|
|
6738
7549
|
};
|
|
6739
|
-
type ListOpenOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7550
|
+
type ListOpenOrdersError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6740
7551
|
declare const ListOpenOrdersError: {
|
|
6741
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7552
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6742
7553
|
};
|
|
6743
7554
|
/**
|
|
6744
7555
|
* Lists open orders for the authenticated account across all pages.
|
|
@@ -6775,14 +7586,14 @@ declare const ListOpenOrdersError: {
|
|
|
6775
7586
|
* }
|
|
6776
7587
|
* ```
|
|
6777
7588
|
*/
|
|
6778
|
-
declare function listOpenOrders(client: BaseSecureClient, request?: ListOpenOrdersRequest): Paginated<OpenOrder[]>;
|
|
7589
|
+
declare function listOpenOrders(client: BaseSecureClient, request?: ListOpenOrdersRequest, options?: RequestOptions): Paginated<OpenOrder[]>;
|
|
6779
7590
|
declare const FetchOrderRequestSchema: z.ZodObject<{
|
|
6780
7591
|
orderId: z.ZodString;
|
|
6781
7592
|
}, z.core.$strip>;
|
|
6782
7593
|
type FetchOrderRequest = z.input<typeof FetchOrderRequestSchema>;
|
|
6783
|
-
type FetchOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7594
|
+
type FetchOrderError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6784
7595
|
declare const FetchOrderError: {
|
|
6785
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7596
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6786
7597
|
};
|
|
6787
7598
|
/**
|
|
6788
7599
|
* Fetches a single order for the authenticated account.
|
|
@@ -6799,7 +7610,7 @@ declare const FetchOrderError: {
|
|
|
6799
7610
|
* });
|
|
6800
7611
|
* ```
|
|
6801
7612
|
*/
|
|
6802
|
-
declare function fetchOrder(client: BaseSecureClient, request: FetchOrderRequest): Promise<OpenOrder>;
|
|
7613
|
+
declare function fetchOrder(client: BaseSecureClient, request: FetchOrderRequest, options?: RequestOptions): Promise<OpenOrder>;
|
|
6803
7614
|
type ListAccountTradesRequest = {
|
|
6804
7615
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
6805
7616
|
assetId?: string;
|
|
@@ -6821,9 +7632,9 @@ type ListAccountTradesRequest = {
|
|
|
6821
7632
|
makerAddress?: string;
|
|
6822
7633
|
market?: string;
|
|
6823
7634
|
};
|
|
6824
|
-
type ListAccountTradesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7635
|
+
type ListAccountTradesError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6825
7636
|
declare const ListAccountTradesError: {
|
|
6826
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7637
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6827
7638
|
};
|
|
6828
7639
|
/**
|
|
6829
7640
|
* Lists trades for the authenticated account across all pages.
|
|
@@ -6860,10 +7671,10 @@ declare const ListAccountTradesError: {
|
|
|
6860
7671
|
* }
|
|
6861
7672
|
* ```
|
|
6862
7673
|
*/
|
|
6863
|
-
declare function listAccountTrades(client: BaseSecureClient, request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
|
|
6864
|
-
type FetchNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
7674
|
+
declare function listAccountTrades(client: BaseSecureClient, request?: ListAccountTradesRequest, options?: RequestOptions): Paginated<ClobTrade[]>;
|
|
7675
|
+
type FetchNotificationsError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6865
7676
|
declare const FetchNotificationsError: {
|
|
6866
|
-
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7677
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6867
7678
|
};
|
|
6868
7679
|
declare const DropNotificationsRequestSchema: z.ZodObject<{
|
|
6869
7680
|
ids: z.ZodArray<z.ZodString>;
|
|
@@ -6883,7 +7694,7 @@ type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
|
|
|
6883
7694
|
* const notifications = await fetchNotifications(client);
|
|
6884
7695
|
* ```
|
|
6885
7696
|
*/
|
|
6886
|
-
declare function fetchNotifications(client: BaseSecureClient): Promise<NotificationsResponse>;
|
|
7697
|
+
declare function fetchNotifications(client: BaseSecureClient, options?: RequestOptions): Promise<NotificationsResponse>;
|
|
6887
7698
|
type DropNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6888
7699
|
declare const DropNotificationsError: {
|
|
6889
7700
|
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -6916,9 +7727,9 @@ type FetchBalanceAllowanceRequest = {
|
|
|
6916
7727
|
tokenId?: string;
|
|
6917
7728
|
assetType: AssetType;
|
|
6918
7729
|
};
|
|
6919
|
-
type FetchBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7730
|
+
type FetchBalanceAllowanceError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6920
7731
|
declare const FetchBalanceAllowanceError: {
|
|
6921
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7732
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6922
7733
|
};
|
|
6923
7734
|
/**
|
|
6924
7735
|
* Fetches balance and allowance for the authenticated account.
|
|
@@ -6936,7 +7747,7 @@ declare const FetchBalanceAllowanceError: {
|
|
|
6936
7747
|
* });
|
|
6937
7748
|
* ```
|
|
6938
7749
|
*/
|
|
6939
|
-
declare function fetchBalanceAllowance(client: BaseSecureClient, request: FetchBalanceAllowanceRequest): Promise<BalanceAllowanceResponse>;
|
|
7750
|
+
declare function fetchBalanceAllowance(client: BaseSecureClient, request: FetchBalanceAllowanceRequest, options?: RequestOptions): Promise<BalanceAllowanceResponse>;
|
|
6940
7751
|
type UpdateBalanceAllowanceRequest = {
|
|
6941
7752
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
6942
7753
|
assetId?: string;
|
|
@@ -6973,9 +7784,9 @@ declare const FetchOrderScoringRequestSchema: z.ZodObject<{
|
|
|
6973
7784
|
orderId: z.ZodString;
|
|
6974
7785
|
}, z.core.$strip>;
|
|
6975
7786
|
type FetchOrderScoringRequest = z.input<typeof FetchOrderScoringRequestSchema>;
|
|
6976
|
-
type FetchOrderScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7787
|
+
type FetchOrderScoringError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6977
7788
|
declare const FetchOrderScoringError: {
|
|
6978
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7789
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
6979
7790
|
};
|
|
6980
7791
|
/**
|
|
6981
7792
|
* Fetches whether a single order is currently scoring.
|
|
@@ -6992,14 +7803,14 @@ declare const FetchOrderScoringError: {
|
|
|
6992
7803
|
* });
|
|
6993
7804
|
* ```
|
|
6994
7805
|
*/
|
|
6995
|
-
declare function fetchOrderScoring(client: BaseSecureClient, request: FetchOrderScoringRequest): Promise<boolean>;
|
|
7806
|
+
declare function fetchOrderScoring(client: BaseSecureClient, request: FetchOrderScoringRequest, options?: RequestOptions): Promise<boolean>;
|
|
6996
7807
|
declare const FetchOrdersScoringRequestSchema: z.ZodObject<{
|
|
6997
7808
|
orderIds: z.ZodArray<z.ZodString>;
|
|
6998
7809
|
}, z.core.$strip>;
|
|
6999
7810
|
type FetchOrdersScoringRequest = z.input<typeof FetchOrdersScoringRequestSchema>;
|
|
7000
|
-
type FetchOrdersScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7811
|
+
type FetchOrdersScoringError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7001
7812
|
declare const FetchOrdersScoringError: {
|
|
7002
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7813
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7003
7814
|
};
|
|
7004
7815
|
/**
|
|
7005
7816
|
* Fetches scoring state for multiple orders.
|
|
@@ -7016,15 +7827,15 @@ declare const FetchOrdersScoringError: {
|
|
|
7016
7827
|
* });
|
|
7017
7828
|
* ```
|
|
7018
7829
|
*/
|
|
7019
|
-
declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
|
|
7830
|
+
declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest, options?: RequestOptions): Promise<OrdersScoringResponse>;
|
|
7020
7831
|
declare const ListUserEarningsForDayRequestSchema: z.ZodObject<{
|
|
7021
7832
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7022
7833
|
date: z.ZodString;
|
|
7023
7834
|
}, z.core.$strip>;
|
|
7024
7835
|
type ListUserEarningsForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
|
|
7025
|
-
type ListUserEarningsForDayError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7836
|
+
type ListUserEarningsForDayError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7026
7837
|
declare const ListUserEarningsForDayError: {
|
|
7027
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7838
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7028
7839
|
};
|
|
7029
7840
|
/**
|
|
7030
7841
|
* Lists per-market earnings for the authenticated account on a given day.
|
|
@@ -7061,14 +7872,22 @@ declare const ListUserEarningsForDayError: {
|
|
|
7061
7872
|
* }
|
|
7062
7873
|
* ```
|
|
7063
7874
|
*/
|
|
7064
|
-
declare function listUserEarningsForDay(client: BaseSecureClient, request: ListUserEarningsForDayRequest): Paginated<UserEarning[]>;
|
|
7065
|
-
|
|
7066
|
-
|
|
7875
|
+
declare function listUserEarningsForDay(client: BaseSecureClient, request: ListUserEarningsForDayRequest, options?: RequestOptions): Paginated<UserEarning[]>;
|
|
7876
|
+
declare const FetchTotalEarningsForUserForDayRequestSchema: z.ZodObject<{
|
|
7877
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7878
|
+
date: z.ZodString;
|
|
7879
|
+
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
7880
|
+
}, z.core.$strip>;
|
|
7881
|
+
type FetchTotalEarningsForUserForDayRequest = z.input<typeof FetchTotalEarningsForUserForDayRequestSchema>;
|
|
7882
|
+
type FetchTotalEarningsForUserForDayError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7067
7883
|
declare const FetchTotalEarningsForUserForDayError: {
|
|
7068
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7884
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7069
7885
|
};
|
|
7070
7886
|
/**
|
|
7071
7887
|
* Fetches total earnings for the authenticated account on a given day.
|
|
7888
|
+
* Set `sponsored: true` to include sponsored rewards and the native/sponsored
|
|
7889
|
+
* breakdown. Omitted or false returns native rewards only; absent breakdown
|
|
7890
|
+
* fields remain undefined.
|
|
7072
7891
|
*
|
|
7073
7892
|
* @remarks
|
|
7074
7893
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -7082,7 +7901,7 @@ declare const FetchTotalEarningsForUserForDayError: {
|
|
|
7082
7901
|
* });
|
|
7083
7902
|
* ```
|
|
7084
7903
|
*/
|
|
7085
|
-
declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
7904
|
+
declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest, options?: RequestOptions): Promise<TotalUserEarning[]>;
|
|
7086
7905
|
declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
|
|
7087
7906
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7088
7907
|
date: z.ZodString;
|
|
@@ -7092,9 +7911,9 @@ declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
|
|
|
7092
7911
|
position: z.ZodOptional<z.ZodString>;
|
|
7093
7912
|
}, z.core.$strip>;
|
|
7094
7913
|
type ListUserEarningsAndMarketsConfigRequest = z.input<typeof ListUserEarningsAndMarketsConfigRequestSchema>;
|
|
7095
|
-
type ListUserEarningsAndMarketsConfigError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7914
|
+
type ListUserEarningsAndMarketsConfigError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7096
7915
|
declare const ListUserEarningsAndMarketsConfigError: {
|
|
7097
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7916
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7098
7917
|
};
|
|
7099
7918
|
/**
|
|
7100
7919
|
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
@@ -7131,10 +7950,10 @@ declare const ListUserEarningsAndMarketsConfigError: {
|
|
|
7131
7950
|
* }
|
|
7132
7951
|
* ```
|
|
7133
7952
|
*/
|
|
7134
|
-
declare function listUserEarningsAndMarketsConfig(client: BaseSecureClient, request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning[]>;
|
|
7135
|
-
type FetchRewardPercentagesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
7953
|
+
declare function listUserEarningsAndMarketsConfig(client: BaseSecureClient, request: ListUserEarningsAndMarketsConfigRequest, options?: RequestOptions): Paginated<UserRewardsEarning[]>;
|
|
7954
|
+
type FetchRewardPercentagesError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7136
7955
|
declare const FetchRewardPercentagesError: {
|
|
7137
|
-
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7956
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7138
7957
|
};
|
|
7139
7958
|
/**
|
|
7140
7959
|
* Fetches reward percentages for the authenticated account.
|
|
@@ -7149,7 +7968,7 @@ declare const FetchRewardPercentagesError: {
|
|
|
7149
7968
|
* const percentages = await fetchRewardPercentages(client);
|
|
7150
7969
|
* ```
|
|
7151
7970
|
*/
|
|
7152
|
-
declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
|
|
7971
|
+
declare function fetchRewardPercentages(client: BaseSecureClient, options?: RequestOptions): Promise<RewardsPercentages>;
|
|
7153
7972
|
|
|
7154
7973
|
type Erc20ApprovalWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest;
|
|
7155
7974
|
type Erc20ApprovalWorkflow = AsyncGenerator<Erc20ApprovalWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
|
|
@@ -7283,15 +8102,16 @@ type TradingApprovalsState = {
|
|
|
7283
8102
|
/** Approvals the wallet must grant to become fully approved. */
|
|
7284
8103
|
missing: TradingApprovalRequirements;
|
|
7285
8104
|
};
|
|
7286
|
-
type FetchTradingApprovalsStateError = RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8105
|
+
type FetchTradingApprovalsStateError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7287
8106
|
declare const FetchTradingApprovalsStateError: {
|
|
7288
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
8107
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7289
8108
|
};
|
|
7290
8109
|
/**
|
|
7291
8110
|
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
7292
8111
|
*
|
|
7293
|
-
*
|
|
7294
|
-
*
|
|
8112
|
+
* Reads the wallet's current approval state. Recent grants and revocations
|
|
8113
|
+
* may take time to appear. It does not require a signer or submit
|
|
8114
|
+
* transactions. Trading setup re-checks approvals before preparing them.
|
|
7295
8115
|
*
|
|
7296
8116
|
* @example
|
|
7297
8117
|
* ```ts
|
|
@@ -7307,7 +8127,7 @@ declare const FetchTradingApprovalsStateError: {
|
|
|
7307
8127
|
* @throws {@link FetchTradingApprovalsStateError}
|
|
7308
8128
|
* Thrown on failure.
|
|
7309
8129
|
*/
|
|
7310
|
-
declare function fetchTradingApprovalsState(client: BaseClient, request: FetchTradingApprovalsStateRequest): Promise<TradingApprovalsState>;
|
|
8130
|
+
declare function fetchTradingApprovalsState(client: BaseClient, request: FetchTradingApprovalsStateRequest, options?: RequestOptions): Promise<TradingApprovalsState>;
|
|
7311
8131
|
/**
|
|
7312
8132
|
* Starts a trading-setup approval workflow.
|
|
7313
8133
|
*
|
|
@@ -7359,9 +8179,9 @@ type ListBuilderTradesRequest = {
|
|
|
7359
8179
|
id?: string;
|
|
7360
8180
|
market?: string;
|
|
7361
8181
|
};
|
|
7362
|
-
type ListBuilderTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8182
|
+
type ListBuilderTradesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7363
8183
|
declare const ListBuilderTradesError: {
|
|
7364
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8184
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7365
8185
|
};
|
|
7366
8186
|
/**
|
|
7367
8187
|
* Lists builder-attributed trades.
|
|
@@ -7395,7 +8215,7 @@ declare const ListBuilderTradesError: {
|
|
|
7395
8215
|
* }
|
|
7396
8216
|
* ```
|
|
7397
8217
|
*/
|
|
7398
|
-
declare function listBuilderTrades(client: BaseClient, request: ListBuilderTradesRequest): Paginated<BuilderTrade[]>;
|
|
8218
|
+
declare function listBuilderTrades(client: BaseClient, request: ListBuilderTradesRequest, options?: RequestOptions): Paginated<BuilderTrade[]>;
|
|
7399
8219
|
|
|
7400
8220
|
type FetchMidpointRequest = {
|
|
7401
8221
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
@@ -7406,9 +8226,9 @@ type FetchMidpointRequest = {
|
|
|
7406
8226
|
/** @deprecated Use `assetId`. */
|
|
7407
8227
|
tokenId: string;
|
|
7408
8228
|
};
|
|
7409
|
-
type FetchMidpointError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8229
|
+
type FetchMidpointError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7410
8230
|
declare const FetchMidpointError: {
|
|
7411
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8231
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7412
8232
|
};
|
|
7413
8233
|
/**
|
|
7414
8234
|
* Fetches the midpoint price for an exchange asset as a decimal string.
|
|
@@ -7429,7 +8249,7 @@ declare const FetchMidpointError: {
|
|
|
7429
8249
|
* ```
|
|
7430
8250
|
*
|
|
7431
8251
|
*/
|
|
7432
|
-
declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<DecimalString>;
|
|
8252
|
+
declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
7433
8253
|
type FetchMidpointsRequest = Array<{
|
|
7434
8254
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7435
8255
|
assetId: string;
|
|
@@ -7439,9 +8259,9 @@ type FetchMidpointsRequest = Array<{
|
|
|
7439
8259
|
/** @deprecated Use `assetId`. */
|
|
7440
8260
|
tokenId: string;
|
|
7441
8261
|
}>;
|
|
7442
|
-
type FetchMidpointsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8262
|
+
type FetchMidpointsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7443
8263
|
declare const FetchMidpointsError: {
|
|
7444
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8264
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7445
8265
|
};
|
|
7446
8266
|
/**
|
|
7447
8267
|
* Fetches midpoint prices for multiple exchange assets as an asset ID keyed lookup.
|
|
@@ -7464,7 +8284,7 @@ declare const FetchMidpointsError: {
|
|
|
7464
8284
|
* ```
|
|
7465
8285
|
*
|
|
7466
8286
|
*/
|
|
7467
|
-
declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
8287
|
+
declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest, options?: RequestOptions): Promise<Midpoints>;
|
|
7468
8288
|
type FetchTickSizeRequest = {
|
|
7469
8289
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7470
8290
|
assetId: string;
|
|
@@ -7474,9 +8294,9 @@ type FetchTickSizeRequest = {
|
|
|
7474
8294
|
/** @deprecated Use `assetId`. */
|
|
7475
8295
|
tokenId: string;
|
|
7476
8296
|
};
|
|
7477
|
-
type FetchTickSizeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8297
|
+
type FetchTickSizeError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7478
8298
|
declare const FetchTickSizeError: {
|
|
7479
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8299
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7480
8300
|
};
|
|
7481
8301
|
/**
|
|
7482
8302
|
* Fetches the minimum price tick size for an exchange asset's order book.
|
|
@@ -7496,7 +8316,7 @@ declare const FetchTickSizeError: {
|
|
|
7496
8316
|
* // tickSize === 0.01
|
|
7497
8317
|
* ```
|
|
7498
8318
|
*/
|
|
7499
|
-
declare function fetchTickSize(client: BaseClient, request: FetchTickSizeRequest): Promise<TickSizeValue>;
|
|
8319
|
+
declare function fetchTickSize(client: BaseClient, request: FetchTickSizeRequest, options?: RequestOptions): Promise<TickSizeValue>;
|
|
7500
8320
|
type FetchNegRiskRequest = {
|
|
7501
8321
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7502
8322
|
assetId: string;
|
|
@@ -7506,9 +8326,9 @@ type FetchNegRiskRequest = {
|
|
|
7506
8326
|
/** @deprecated Use `assetId`. */
|
|
7507
8327
|
tokenId: string;
|
|
7508
8328
|
};
|
|
7509
|
-
type FetchNegRiskError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8329
|
+
type FetchNegRiskError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7510
8330
|
declare const FetchNegRiskError: {
|
|
7511
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8331
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7512
8332
|
};
|
|
7513
8333
|
/**
|
|
7514
8334
|
* Fetches whether an exchange asset is in a negative-risk market.
|
|
@@ -7528,7 +8348,7 @@ declare const FetchNegRiskError: {
|
|
|
7528
8348
|
* // negRisk === false
|
|
7529
8349
|
* ```
|
|
7530
8350
|
*/
|
|
7531
|
-
declare function fetchNegRisk(client: BaseClient, request: FetchNegRiskRequest): Promise<boolean>;
|
|
8351
|
+
declare function fetchNegRisk(client: BaseClient, request: FetchNegRiskRequest, options?: RequestOptions): Promise<boolean>;
|
|
7532
8352
|
type ResolveConditionByTokenRequest = {
|
|
7533
8353
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7534
8354
|
assetId: string;
|
|
@@ -7538,9 +8358,9 @@ type ResolveConditionByTokenRequest = {
|
|
|
7538
8358
|
/** @deprecated Use `assetId`. */
|
|
7539
8359
|
tokenId: string;
|
|
7540
8360
|
};
|
|
7541
|
-
type ResolveConditionByTokenError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8361
|
+
type ResolveConditionByTokenError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7542
8362
|
declare const ResolveConditionByTokenError: {
|
|
7543
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8363
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7544
8364
|
};
|
|
7545
8365
|
/**
|
|
7546
8366
|
* Resolves the condition ID for an exchange asset.
|
|
@@ -7551,14 +8371,14 @@ declare const ResolveConditionByTokenError: {
|
|
|
7551
8371
|
* @throws {@link ResolveConditionByTokenError}
|
|
7552
8372
|
* Thrown on failure.
|
|
7553
8373
|
*/
|
|
7554
|
-
declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest): Promise<ConditionId>;
|
|
8374
|
+
declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest, options?: RequestOptions): Promise<ConditionId>;
|
|
7555
8375
|
declare const FetchMarketInfoRequestSchema: z.ZodObject<{
|
|
7556
8376
|
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
|
|
7557
8377
|
}, z.core.$strip>;
|
|
7558
8378
|
type FetchMarketInfoRequest = z.input<typeof FetchMarketInfoRequestSchema>;
|
|
7559
|
-
type FetchMarketInfoError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8379
|
+
type FetchMarketInfoError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7560
8380
|
declare const FetchMarketInfoError: {
|
|
7561
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8381
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7562
8382
|
};
|
|
7563
8383
|
/**
|
|
7564
8384
|
* Fetches market-level metadata for a condition.
|
|
@@ -7569,14 +8389,14 @@ declare const FetchMarketInfoError: {
|
|
|
7569
8389
|
* @throws {@link FetchMarketInfoError}
|
|
7570
8390
|
* Thrown on failure.
|
|
7571
8391
|
*/
|
|
7572
|
-
declare function fetchMarketInfo(client: BaseClient, request: FetchMarketInfoRequest): Promise<MarketInfo>;
|
|
8392
|
+
declare function fetchMarketInfo(client: BaseClient, request: FetchMarketInfoRequest, options?: RequestOptions): Promise<MarketInfo>;
|
|
7573
8393
|
declare const FetchBuilderFeeRatesRequestSchema: z.ZodObject<{
|
|
7574
8394
|
builderCode: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.BuilderCode, string>>;
|
|
7575
8395
|
}, z.core.$strip>;
|
|
7576
8396
|
type FetchBuilderFeeRatesRequest = z.input<typeof FetchBuilderFeeRatesRequestSchema>;
|
|
7577
|
-
type FetchBuilderFeeRatesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8397
|
+
type FetchBuilderFeeRatesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7578
8398
|
declare const FetchBuilderFeeRatesError: {
|
|
7579
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8399
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7580
8400
|
};
|
|
7581
8401
|
/**
|
|
7582
8402
|
* Fetches builder maker and taker fee rates.
|
|
@@ -7587,7 +8407,7 @@ declare const FetchBuilderFeeRatesError: {
|
|
|
7587
8407
|
* @throws {@link FetchBuilderFeeRatesError}
|
|
7588
8408
|
* Thrown on failure.
|
|
7589
8409
|
*/
|
|
7590
|
-
declare function fetchBuilderFeeRates(client: BaseClient, request: FetchBuilderFeeRatesRequest): Promise<BuilderFeeRates>;
|
|
8410
|
+
declare function fetchBuilderFeeRates(client: BaseClient, request: FetchBuilderFeeRatesRequest, options?: RequestOptions): Promise<BuilderFeeRates>;
|
|
7591
8411
|
type FetchPriceRequest = {
|
|
7592
8412
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7593
8413
|
assetId: string;
|
|
@@ -7599,9 +8419,9 @@ type FetchPriceRequest = {
|
|
|
7599
8419
|
tokenId: string;
|
|
7600
8420
|
side: OrderSide;
|
|
7601
8421
|
};
|
|
7602
|
-
type FetchPriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8422
|
+
type FetchPriceError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7603
8423
|
declare const FetchPriceError: {
|
|
7604
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8424
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7605
8425
|
};
|
|
7606
8426
|
/**
|
|
7607
8427
|
* Fetches the current quoted price for an exchange asset and side as a decimal string.
|
|
@@ -7623,7 +8443,7 @@ declare const FetchPriceError: {
|
|
|
7623
8443
|
* ```
|
|
7624
8444
|
*
|
|
7625
8445
|
*/
|
|
7626
|
-
declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<DecimalString>;
|
|
8446
|
+
declare function fetchPrice(client: BaseClient, request: FetchPriceRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
7627
8447
|
type FetchPricesRequest = Array<{
|
|
7628
8448
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7629
8449
|
assetId: string;
|
|
@@ -7635,9 +8455,9 @@ type FetchPricesRequest = Array<{
|
|
|
7635
8455
|
tokenId: string;
|
|
7636
8456
|
side: OrderSide;
|
|
7637
8457
|
}>;
|
|
7638
|
-
type FetchPricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8458
|
+
type FetchPricesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7639
8459
|
declare const FetchPricesError: {
|
|
7640
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8460
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7641
8461
|
};
|
|
7642
8462
|
/**
|
|
7643
8463
|
* Fetches quoted prices for multiple exchange assets as an asset ID keyed lookup.
|
|
@@ -7661,7 +8481,7 @@ declare const FetchPricesError: {
|
|
|
7661
8481
|
* ```
|
|
7662
8482
|
*
|
|
7663
8483
|
*/
|
|
7664
|
-
declare function fetchPrices(client: BaseClient, request: FetchPricesRequest): Promise<Prices>;
|
|
8484
|
+
declare function fetchPrices(client: BaseClient, request: FetchPricesRequest, options?: RequestOptions): Promise<Prices>;
|
|
7665
8485
|
type FetchOrderBookRequest = {
|
|
7666
8486
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7667
8487
|
assetId: string;
|
|
@@ -7671,9 +8491,9 @@ type FetchOrderBookRequest = {
|
|
|
7671
8491
|
/** @deprecated Use `assetId`. */
|
|
7672
8492
|
tokenId: string;
|
|
7673
8493
|
};
|
|
7674
|
-
type FetchOrderBookError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8494
|
+
type FetchOrderBookError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7675
8495
|
declare const FetchOrderBookError: {
|
|
7676
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8496
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7677
8497
|
};
|
|
7678
8498
|
/**
|
|
7679
8499
|
* Fetches the current order book for an exchange asset.
|
|
@@ -7693,7 +8513,7 @@ declare const FetchOrderBookError: {
|
|
|
7693
8513
|
* // orderBook.bids / orderBook.asks
|
|
7694
8514
|
* ```
|
|
7695
8515
|
*/
|
|
7696
|
-
declare function fetchOrderBook(client: BaseClient, request: FetchOrderBookRequest): Promise<OrderBook>;
|
|
8516
|
+
declare function fetchOrderBook(client: BaseClient, request: FetchOrderBookRequest, options?: RequestOptions): Promise<OrderBook>;
|
|
7697
8517
|
type FetchOrderBooksRequest = Array<{
|
|
7698
8518
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7699
8519
|
assetId: string;
|
|
@@ -7703,9 +8523,9 @@ type FetchOrderBooksRequest = Array<{
|
|
|
7703
8523
|
/** @deprecated Use `assetId`. */
|
|
7704
8524
|
tokenId: string;
|
|
7705
8525
|
}>;
|
|
7706
|
-
type FetchOrderBooksError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8526
|
+
type FetchOrderBooksError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7707
8527
|
declare const FetchOrderBooksError: {
|
|
7708
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8528
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7709
8529
|
};
|
|
7710
8530
|
/**
|
|
7711
8531
|
* Fetches order books for multiple exchange assets.
|
|
@@ -7727,7 +8547,7 @@ declare const FetchOrderBooksError: {
|
|
|
7727
8547
|
* // books: OrderBook[]
|
|
7728
8548
|
* ```
|
|
7729
8549
|
*/
|
|
7730
|
-
declare function fetchOrderBooks(client: BaseClient, request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
8550
|
+
declare function fetchOrderBooks(client: BaseClient, request: FetchOrderBooksRequest, options?: RequestOptions): Promise<OrderBook[]>;
|
|
7731
8551
|
type FetchSpreadRequest = {
|
|
7732
8552
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7733
8553
|
assetId: string;
|
|
@@ -7737,9 +8557,9 @@ type FetchSpreadRequest = {
|
|
|
7737
8557
|
/** @deprecated Use `assetId`. */
|
|
7738
8558
|
tokenId: string;
|
|
7739
8559
|
};
|
|
7740
|
-
type FetchSpreadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8560
|
+
type FetchSpreadError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7741
8561
|
declare const FetchSpreadError: {
|
|
7742
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8562
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7743
8563
|
};
|
|
7744
8564
|
/**
|
|
7745
8565
|
* Fetches the spread for an exchange asset as a decimal string.
|
|
@@ -7760,7 +8580,7 @@ declare const FetchSpreadError: {
|
|
|
7760
8580
|
* ```
|
|
7761
8581
|
*
|
|
7762
8582
|
*/
|
|
7763
|
-
declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<DecimalString>;
|
|
8583
|
+
declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest, options?: RequestOptions): Promise<DecimalString>;
|
|
7764
8584
|
type FetchSpreadsRequest = Array<{
|
|
7765
8585
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7766
8586
|
assetId: string;
|
|
@@ -7770,9 +8590,9 @@ type FetchSpreadsRequest = Array<{
|
|
|
7770
8590
|
/** @deprecated Use `assetId`. */
|
|
7771
8591
|
tokenId: string;
|
|
7772
8592
|
}>;
|
|
7773
|
-
type FetchSpreadsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8593
|
+
type FetchSpreadsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7774
8594
|
declare const FetchSpreadsError: {
|
|
7775
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8595
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7776
8596
|
};
|
|
7777
8597
|
/**
|
|
7778
8598
|
* Fetches spreads for multiple exchange assets as an asset ID keyed lookup.
|
|
@@ -7795,7 +8615,7 @@ declare const FetchSpreadsError: {
|
|
|
7795
8615
|
* ```
|
|
7796
8616
|
*
|
|
7797
8617
|
*/
|
|
7798
|
-
declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Spreads>;
|
|
8618
|
+
declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest, options?: RequestOptions): Promise<Spreads>;
|
|
7799
8619
|
type FetchLastTradePriceRequest = {
|
|
7800
8620
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7801
8621
|
assetId: string;
|
|
@@ -7805,9 +8625,9 @@ type FetchLastTradePriceRequest = {
|
|
|
7805
8625
|
/** @deprecated Use `assetId`. */
|
|
7806
8626
|
tokenId: string;
|
|
7807
8627
|
};
|
|
7808
|
-
type FetchLastTradePriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8628
|
+
type FetchLastTradePriceError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7809
8629
|
declare const FetchLastTradePriceError: {
|
|
7810
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8630
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7811
8631
|
};
|
|
7812
8632
|
/**
|
|
7813
8633
|
* Fetches the last traded price for an exchange asset.
|
|
@@ -7830,7 +8650,7 @@ declare const FetchLastTradePriceError: {
|
|
|
7830
8650
|
* ```
|
|
7831
8651
|
*
|
|
7832
8652
|
*/
|
|
7833
|
-
declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest): Promise<LastTradePrice | null>;
|
|
8653
|
+
declare function fetchLastTradePrice(client: BaseClient, request: FetchLastTradePriceRequest, options?: RequestOptions): Promise<LastTradePrice | null>;
|
|
7834
8654
|
type FetchLastTradePricesRequest = Array<{
|
|
7835
8655
|
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
7836
8656
|
assetId: string;
|
|
@@ -7840,9 +8660,9 @@ type FetchLastTradePricesRequest = Array<{
|
|
|
7840
8660
|
/** @deprecated Use `assetId`. */
|
|
7841
8661
|
tokenId: string;
|
|
7842
8662
|
}>;
|
|
7843
|
-
type FetchLastTradePricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8663
|
+
type FetchLastTradePricesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7844
8664
|
declare const FetchLastTradePricesError: {
|
|
7845
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8665
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7846
8666
|
};
|
|
7847
8667
|
/**
|
|
7848
8668
|
* Fetches last traded prices for multiple exchange assets.
|
|
@@ -7864,15 +8684,15 @@ declare const FetchLastTradePricesError: {
|
|
|
7864
8684
|
* ```
|
|
7865
8685
|
*
|
|
7866
8686
|
*/
|
|
7867
|
-
declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
8687
|
+
declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest, options?: RequestOptions): Promise<LastTradePriceForAsset[]>;
|
|
7868
8688
|
declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
7869
8689
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7870
8690
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
7871
8691
|
}, z.core.$strip>>;
|
|
7872
8692
|
type ListCurrentRewardsRequest = z.input<typeof ListCurrentRewardsRequestSchema>;
|
|
7873
|
-
type ListCurrentRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8693
|
+
type ListCurrentRewardsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7874
8694
|
declare const ListCurrentRewardsError: {
|
|
7875
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8695
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7876
8696
|
};
|
|
7877
8697
|
/**
|
|
7878
8698
|
* Lists current active market rewards.
|
|
@@ -7906,16 +8726,16 @@ declare const ListCurrentRewardsError: {
|
|
|
7906
8726
|
* }
|
|
7907
8727
|
* ```
|
|
7908
8728
|
*/
|
|
7909
|
-
declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
|
|
8729
|
+
declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest, options?: RequestOptions): Paginated<CurrentReward[]>;
|
|
7910
8730
|
declare const ListMarketRewardsRequestSchema: z.ZodObject<{
|
|
7911
8731
|
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<ConditionId, string>>;
|
|
7912
8732
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7913
8733
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
7914
8734
|
}, z.core.$strip>;
|
|
7915
8735
|
type ListMarketRewardsRequest = z.input<typeof ListMarketRewardsRequestSchema>;
|
|
7916
|
-
type ListMarketRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8736
|
+
type ListMarketRewardsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7917
8737
|
declare const ListMarketRewardsError: {
|
|
7918
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8738
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
7919
8739
|
};
|
|
7920
8740
|
/**
|
|
7921
8741
|
* Lists reward configurations for a market.
|
|
@@ -7955,7 +8775,62 @@ declare const ListMarketRewardsError: {
|
|
|
7955
8775
|
* }
|
|
7956
8776
|
* ```
|
|
7957
8777
|
*/
|
|
7958
|
-
declare function listMarketRewards(client: BaseClient, request: ListMarketRewardsRequest): Paginated<MarketReward[]>;
|
|
8778
|
+
declare function listMarketRewards(client: BaseClient, request: ListMarketRewardsRequest, options?: RequestOptions): Paginated<MarketReward[]>;
|
|
8779
|
+
declare const ListRewardMarketsRequestSchema: z.ZodObject<{
|
|
8780
|
+
query: z.ZodOptional<z.ZodString>;
|
|
8781
|
+
tagSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8782
|
+
marketId: z.ZodOptional<z.ZodNumber>;
|
|
8783
|
+
eventIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
8784
|
+
eventTitle: z.ZodOptional<z.ZodString>;
|
|
8785
|
+
orderBy: z.ZodOptional<z.ZodEnum<typeof RewardMarketSort>>;
|
|
8786
|
+
sortDirection: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.SortDirection>>;
|
|
8787
|
+
minVolume24hr: z.ZodOptional<z.ZodNumber>;
|
|
8788
|
+
maxVolume24hr: z.ZodOptional<z.ZodNumber>;
|
|
8789
|
+
minSpread: z.ZodOptional<z.ZodNumber>;
|
|
8790
|
+
maxSpread: z.ZodOptional<z.ZodNumber>;
|
|
8791
|
+
minPrice: z.ZodOptional<z.ZodNumber>;
|
|
8792
|
+
maxPrice: z.ZodOptional<z.ZodNumber>;
|
|
8793
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
8794
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
8795
|
+
}, z.core.$strip>;
|
|
8796
|
+
type ListRewardMarketsRequest = z.input<typeof ListRewardMarketsRequestSchema>;
|
|
8797
|
+
type ListRewardMarketsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8798
|
+
declare const ListRewardMarketsError: {
|
|
8799
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8800
|
+
};
|
|
8801
|
+
/**
|
|
8802
|
+
* Lists active markets with reward configurations and discovery metadata.
|
|
8803
|
+
* Configurations may be empty. Positive range bounds are min-exclusive and max-inclusive; zero disables a bound.
|
|
8804
|
+
* Pages default to 100 items, with a maximum of 500. Without orderBy the order is unspecified; with it sortDirection defaults to ASC.
|
|
8805
|
+
* @throws {@link ListRewardMarketsError} Thrown on failure.
|
|
8806
|
+
* @example
|
|
8807
|
+
* ```ts
|
|
8808
|
+
* for await (const page of listRewardMarkets(client, { query: 'sports' })) {
|
|
8809
|
+
* console.log(page.items);
|
|
8810
|
+
* }
|
|
8811
|
+
* ```
|
|
8812
|
+
*/
|
|
8813
|
+
declare function listRewardMarkets(client: BaseClient, request?: ListRewardMarketsRequest, options?: RequestOptions): Paginated<RewardMarket[]>;
|
|
8814
|
+
declare const FetchCurrentRebatesRequestSchema: z.ZodObject<{
|
|
8815
|
+
date: z.ZodISODate;
|
|
8816
|
+
makerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
8817
|
+
}, z.core.$strip>;
|
|
8818
|
+
type FetchCurrentRebatesRequest = z.input<typeof FetchCurrentRebatesRequestSchema>;
|
|
8819
|
+
type FetchCurrentRebatesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8820
|
+
declare const FetchCurrentRebatesError: {
|
|
8821
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8822
|
+
};
|
|
8823
|
+
/**
|
|
8824
|
+
* Fetches maker fee rebates for a calendar day as a direct collection.
|
|
8825
|
+
* Amounts are decimal strings in USDC units. No authentication is required.
|
|
8826
|
+
* Returns an empty array when the maker has no rebates for the date.
|
|
8827
|
+
* @throws {@link FetchCurrentRebatesError} Thrown on failure.
|
|
8828
|
+
* @example
|
|
8829
|
+
* ```ts
|
|
8830
|
+
* const rebates = await fetchCurrentRebates(client, { date: '2026-10-06', makerAddress });
|
|
8831
|
+
* ```
|
|
8832
|
+
*/
|
|
8833
|
+
declare function fetchCurrentRebates(client: BaseClient, request: FetchCurrentRebatesRequest, options?: RequestOptions): Promise<RebatedFee[]>;
|
|
7959
8834
|
|
|
7960
8835
|
type PlanCollateralReturnError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
7961
8836
|
declare const PlanCollateralReturnError: {
|
|
@@ -8043,9 +8918,9 @@ declare const ListCommentsByUserAddressRequestSchema: z.ZodObject<{
|
|
|
8043
8918
|
type ListCommentsRequest = z.input<typeof ListCommentsRequestSchema>;
|
|
8044
8919
|
type FetchCommentsByIdRequest = z.input<typeof FetchCommentsByIdRequestSchema>;
|
|
8045
8920
|
type ListCommentsByUserAddressRequest = z.input<typeof ListCommentsByUserAddressRequestSchema>;
|
|
8046
|
-
type ListCommentsError = PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8921
|
+
type ListCommentsError = RequestAbortedError | PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8047
8922
|
declare const ListCommentsError: {
|
|
8048
|
-
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8923
|
+
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8049
8924
|
};
|
|
8050
8925
|
/**
|
|
8051
8926
|
* Lists comments for an event or series.
|
|
@@ -8105,10 +8980,10 @@ declare const ListCommentsError: {
|
|
|
8105
8980
|
* }
|
|
8106
8981
|
* ```
|
|
8107
8982
|
*/
|
|
8108
|
-
declare function listComments(client: BaseClient, request: ListCommentsRequest): Paginated<Comment[]>;
|
|
8109
|
-
type FetchCommentsByIdError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8983
|
+
declare function listComments(client: BaseClient, request: ListCommentsRequest, options?: RequestOptions): Paginated<Comment[]>;
|
|
8984
|
+
type FetchCommentsByIdError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8110
8985
|
declare const FetchCommentsByIdError: {
|
|
8111
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
8986
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8112
8987
|
};
|
|
8113
8988
|
/**
|
|
8114
8989
|
* Fetches a comment thread by comment id.
|
|
@@ -8129,10 +9004,10 @@ declare const FetchCommentsByIdError: {
|
|
|
8129
9004
|
* // thread: Comment[]
|
|
8130
9005
|
* ```
|
|
8131
9006
|
*/
|
|
8132
|
-
declare function fetchCommentsById(client: BaseClient, request: FetchCommentsByIdRequest): Promise<Comment[]>;
|
|
8133
|
-
type ListCommentsByUserAddressError = PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9007
|
+
declare function fetchCommentsById(client: BaseClient, request: FetchCommentsByIdRequest, options?: RequestOptions): Promise<Comment[]>;
|
|
9008
|
+
type ListCommentsByUserAddressError = RequestAbortedError | PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8134
9009
|
declare const ListCommentsByUserAddressError: {
|
|
8135
|
-
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9010
|
+
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8136
9011
|
};
|
|
8137
9012
|
/**
|
|
8138
9013
|
* Lists comments written by a wallet address.
|
|
@@ -8184,11 +9059,11 @@ declare const ListCommentsByUserAddressError: {
|
|
|
8184
9059
|
* }
|
|
8185
9060
|
* ```
|
|
8186
9061
|
*/
|
|
8187
|
-
declare function listCommentsByUserAddress(client: BaseClient, request: ListCommentsByUserAddressRequest): Paginated<Comment[]>;
|
|
9062
|
+
declare function listCommentsByUserAddress(client: BaseClient, request: ListCommentsByUserAddressRequest, options?: RequestOptions): Paginated<Comment[]>;
|
|
8188
9063
|
|
|
8189
9064
|
declare const ListEventsRequestSchema: z.ZodObject<{
|
|
8190
9065
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
8191
|
-
closed: z.ZodDefault<z.ZodBoolean
|
|
9066
|
+
closed: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"any">]>>;
|
|
8192
9067
|
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
8193
9068
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
8194
9069
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -8232,6 +9107,7 @@ declare const ListEventsRequestSchema: z.ZodObject<{
|
|
|
8232
9107
|
}>>;
|
|
8233
9108
|
tagSlug: z.ZodOptional<z.ZodString>;
|
|
8234
9109
|
titleSearch: z.ZodOptional<z.ZodString>;
|
|
9110
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ProtocolVersion>, z.ZodArray<z.ZodEnum<typeof ProtocolVersion>>]>>;
|
|
8235
9111
|
volumeMax: z.ZodOptional<z.ZodNumber>;
|
|
8236
9112
|
volumeMin: z.ZodOptional<z.ZodNumber>;
|
|
8237
9113
|
}, z.core.$strip>;
|
|
@@ -8260,14 +9136,19 @@ declare const FetchEventTagsRequestSchema: z.ZodObject<{
|
|
|
8260
9136
|
id: z.ZodString;
|
|
8261
9137
|
}, z.core.$strip>;
|
|
8262
9138
|
type FetchEventTagsRequest = z.input<typeof FetchEventTagsRequestSchema>;
|
|
8263
|
-
type ListEventsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9139
|
+
type ListEventsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8264
9140
|
declare const ListEventsError: {
|
|
8265
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9141
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8266
9142
|
};
|
|
8267
9143
|
/**
|
|
8268
9144
|
* Lists events.
|
|
8269
9145
|
*
|
|
8270
|
-
* Defaults to open events. Pass `closed: true`
|
|
9146
|
+
* Defaults to open events. Pass `closed: true` for closed events or
|
|
9147
|
+
* `closed: 'any'` for either state; no identifier filter is required.
|
|
9148
|
+
* Optionally filter by protocol with `version: ProtocolVersion.V1` or
|
|
9149
|
+
* `ProtocolVersion.V2`, or pass both in an array to include both protocols.
|
|
9150
|
+
* Arrays accept one or two values. Omitting `version` uses the current server
|
|
9151
|
+
* default of CTF events (v1).
|
|
8271
9152
|
*
|
|
8272
9153
|
* @remarks
|
|
8273
9154
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8308,10 +9189,10 @@ declare const ListEventsError: {
|
|
|
8308
9189
|
* }
|
|
8309
9190
|
* ```
|
|
8310
9191
|
*/
|
|
8311
|
-
declare function listEvents(client: BaseClient, request?: ListEventsRequest): Paginated<Event[]>;
|
|
8312
|
-
type FetchEventError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9192
|
+
declare function listEvents(client: BaseClient, request?: ListEventsRequest, options?: RequestOptions): Paginated<Event[]>;
|
|
9193
|
+
type FetchEventError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8313
9194
|
declare const FetchEventError: {
|
|
8314
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9195
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8315
9196
|
};
|
|
8316
9197
|
/**
|
|
8317
9198
|
* Fetches an event.
|
|
@@ -8339,10 +9220,10 @@ declare const FetchEventError: {
|
|
|
8339
9220
|
* // event === Event
|
|
8340
9221
|
* ```
|
|
8341
9222
|
*/
|
|
8342
|
-
declare function fetchEvent(client: BaseClient, request: FetchEventRequest): Promise<Event>;
|
|
8343
|
-
type FetchEventTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9223
|
+
declare function fetchEvent(client: BaseClient, request: FetchEventRequest, options?: RequestOptions): Promise<Event>;
|
|
9224
|
+
type FetchEventTagsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8344
9225
|
declare const FetchEventTagsError: {
|
|
8345
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9226
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8346
9227
|
};
|
|
8347
9228
|
/**
|
|
8348
9229
|
* Fetches an event's tags.
|
|
@@ -8362,7 +9243,7 @@ declare const FetchEventTagsError: {
|
|
|
8362
9243
|
* // tags: TagReference[]
|
|
8363
9244
|
* ```
|
|
8364
9245
|
*/
|
|
8365
|
-
declare function fetchEventTags(client: BaseClient, request: FetchEventTagsRequest): Promise<TagReference[]>;
|
|
9246
|
+
declare function fetchEventTags(client: BaseClient, request: FetchEventTagsRequest, options?: RequestOptions): Promise<TagReference[]>;
|
|
8366
9247
|
type FetchResolutionsByQuestionRequest = {
|
|
8367
9248
|
questionId: string;
|
|
8368
9249
|
conditionIds?: never;
|
|
@@ -8379,9 +9260,9 @@ type FetchResolutionsByEventRequest = {
|
|
|
8379
9260
|
eventIds: Array<number | string>;
|
|
8380
9261
|
};
|
|
8381
9262
|
type FetchResolutionsRequest = FetchResolutionsByQuestionRequest | FetchResolutionsByConditionRequest | FetchResolutionsByEventRequest;
|
|
8382
|
-
type FetchResolutionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9263
|
+
type FetchResolutionsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8383
9264
|
declare const FetchResolutionsError: {
|
|
8384
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9265
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8385
9266
|
};
|
|
8386
9267
|
/**
|
|
8387
9268
|
* Fetches resolution lifecycle rows by question, condition, or event.
|
|
@@ -8407,14 +9288,14 @@ declare const FetchResolutionsError: {
|
|
|
8407
9288
|
* // resolutions: Resolution[]
|
|
8408
9289
|
* ```
|
|
8409
9290
|
*/
|
|
8410
|
-
declare function fetchResolutions(client: BaseClient, request: FetchResolutionsRequest): Promise<Resolution[]>;
|
|
9291
|
+
declare function fetchResolutions(client: BaseClient, request: FetchResolutionsRequest, options?: RequestOptions): Promise<Resolution[]>;
|
|
8411
9292
|
declare const FetchEventLiveVolumeRequestSchema: z.ZodObject<{
|
|
8412
9293
|
eventIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>, z.ZodTransform<_polymarket_bindings.EventId[], _polymarket_bindings.EventId[]>>;
|
|
8413
9294
|
}, z.core.$strip>;
|
|
8414
9295
|
type FetchEventLiveVolumeRequest = z.input<typeof FetchEventLiveVolumeRequestSchema>;
|
|
8415
|
-
type FetchEventLiveVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9296
|
+
type FetchEventLiveVolumeError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8416
9297
|
declare const FetchEventLiveVolumeError: {
|
|
8417
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9298
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8418
9299
|
};
|
|
8419
9300
|
/**
|
|
8420
9301
|
* Fetches cumulative taker volume for one or more events.
|
|
@@ -8422,7 +9303,7 @@ declare const FetchEventLiveVolumeError: {
|
|
|
8422
9303
|
* Results contain one row per market, ordered by taker volume descending, and
|
|
8423
9304
|
* a total across all returned markets. Volume is measured in shares. Event IDs
|
|
8424
9305
|
* must be positive 32-bit integers. Transient rate limits are retried
|
|
8425
|
-
*
|
|
9306
|
+
* by default.
|
|
8426
9307
|
*
|
|
8427
9308
|
* @remarks
|
|
8428
9309
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8439,7 +9320,7 @@ declare const FetchEventLiveVolumeError: {
|
|
|
8439
9320
|
* // volume: LiveVolume
|
|
8440
9321
|
* ```
|
|
8441
9322
|
*/
|
|
8442
|
-
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume>;
|
|
9323
|
+
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest, options?: RequestOptions): Promise<LiveVolume>;
|
|
8443
9324
|
|
|
8444
9325
|
declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
8445
9326
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
@@ -8447,9 +9328,9 @@ declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
8447
9328
|
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
8448
9329
|
}, z.core.$strip>;
|
|
8449
9330
|
type ListBuilderLeaderboardRequest = z.input<typeof ListBuilderLeaderboardRequestSchema>;
|
|
8450
|
-
type ListBuilderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9331
|
+
type ListBuilderLeaderboardError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8451
9332
|
declare const ListBuilderLeaderboardError: {
|
|
8452
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9333
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8453
9334
|
};
|
|
8454
9335
|
/**
|
|
8455
9336
|
* Lists builder leaderboard rankings.
|
|
@@ -8457,7 +9338,7 @@ declare const ListBuilderLeaderboardError: {
|
|
|
8457
9338
|
* Builders are ranked by attributed share volume within `window`, which
|
|
8458
9339
|
* defaults to one day. `builderCode` is the stable identifier; names and
|
|
8459
9340
|
* profile images are display metadata. `pageSize` defaults to 100 (max 1000).
|
|
8460
|
-
* Transient rate limits are retried
|
|
9341
|
+
* Transient rate limits are retried by default.
|
|
8461
9342
|
*
|
|
8462
9343
|
* @remarks
|
|
8463
9344
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8494,15 +9375,15 @@ declare const ListBuilderLeaderboardError: {
|
|
|
8494
9375
|
* }
|
|
8495
9376
|
* ```
|
|
8496
9377
|
*/
|
|
8497
|
-
declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest): Paginated<BuilderStanding[]>;
|
|
9378
|
+
declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest, options?: RequestOptions): Paginated<BuilderStanding[]>;
|
|
8498
9379
|
declare const FetchBuilderVolumeRequestSchema: z.ZodObject<{
|
|
8499
9380
|
interval: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.BuilderVolumeInterval>>;
|
|
8500
9381
|
bucketLimit: z.ZodOptional<z.ZodNumber>;
|
|
8501
9382
|
}, z.core.$strip>;
|
|
8502
9383
|
type FetchBuilderVolumeRequest = z.input<typeof FetchBuilderVolumeRequestSchema>;
|
|
8503
|
-
type FetchBuilderVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9384
|
+
type FetchBuilderVolumeError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8504
9385
|
declare const FetchBuilderVolumeError: {
|
|
8505
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9386
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8506
9387
|
};
|
|
8507
9388
|
/**
|
|
8508
9389
|
* Fetches the per-builder volume time series.
|
|
@@ -8511,7 +9392,7 @@ declare const FetchBuilderVolumeError: {
|
|
|
8511
9392
|
* {@link BuilderVolumeInterval.Year} for one bucket per calendar year.
|
|
8512
9393
|
* `bucketLimit` returns that many complete recent buckets (default 30, max 90),
|
|
8513
9394
|
* not that many builder rows. Results are newest bucket first, and volume is
|
|
8514
|
-
* measured in shares. Transient rate limits are retried
|
|
9395
|
+
* measured in shares. Transient rate limits are retried by default.
|
|
8515
9396
|
*
|
|
8516
9397
|
* @remarks
|
|
8517
9398
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8529,7 +9410,7 @@ declare const FetchBuilderVolumeError: {
|
|
|
8529
9410
|
* // volume: BuilderVolumePoint[]
|
|
8530
9411
|
* ```
|
|
8531
9412
|
*/
|
|
8532
|
-
declare function fetchBuilderVolume(client: BaseClient, request?: FetchBuilderVolumeRequest): Promise<BuilderVolumePoint[]>;
|
|
9413
|
+
declare function fetchBuilderVolume(client: BaseClient, request?: FetchBuilderVolumeRequest, options?: RequestOptions): Promise<BuilderVolumePoint[]>;
|
|
8533
9414
|
declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
8534
9415
|
category: z.ZodOptional<z.ZodString>;
|
|
8535
9416
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
@@ -8538,9 +9419,9 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
8538
9419
|
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
8539
9420
|
}, z.core.$strip>;
|
|
8540
9421
|
type ListTraderLeaderboardRequest = z.input<typeof ListTraderLeaderboardRequestSchema>;
|
|
8541
|
-
type ListTraderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9422
|
+
type ListTraderLeaderboardError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8542
9423
|
declare const ListTraderLeaderboardError: {
|
|
8543
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9424
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8544
9425
|
};
|
|
8545
9426
|
/**
|
|
8546
9427
|
* Lists trader leaderboard rankings.
|
|
@@ -8587,16 +9468,16 @@ declare const ListTraderLeaderboardError: {
|
|
|
8587
9468
|
* }
|
|
8588
9469
|
* ```
|
|
8589
9470
|
*/
|
|
8590
|
-
declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
|
|
9471
|
+
declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest, options?: RequestOptions): Paginated<TraderLeaderboardEntry[]>;
|
|
8591
9472
|
declare const FetchTraderLeaderboardStandingRequestSchema: z.ZodObject<{
|
|
8592
9473
|
category: z.ZodOptional<z.ZodString>;
|
|
8593
9474
|
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
8594
9475
|
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
8595
9476
|
}, z.core.$strip>;
|
|
8596
9477
|
type FetchTraderLeaderboardStandingRequest = z.input<typeof FetchTraderLeaderboardStandingRequestSchema>;
|
|
8597
|
-
type FetchTraderLeaderboardStandingError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9478
|
+
type FetchTraderLeaderboardStandingError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8598
9479
|
declare const FetchTraderLeaderboardStandingError: {
|
|
8599
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9480
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8600
9481
|
};
|
|
8601
9482
|
/**
|
|
8602
9483
|
* Fetches one trader's standing on both the PnL and volume boards.
|
|
@@ -8620,7 +9501,7 @@ declare const FetchTraderLeaderboardStandingError: {
|
|
|
8620
9501
|
* // standing: TraderLeaderboardStanding | null
|
|
8621
9502
|
* ```
|
|
8622
9503
|
*/
|
|
8623
|
-
declare function fetchTraderLeaderboardStanding(client: BaseClient, request: FetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
9504
|
+
declare function fetchTraderLeaderboardStanding(client: BaseClient, request: FetchTraderLeaderboardStandingRequest, options?: RequestOptions): Promise<TraderLeaderboardStanding | null>;
|
|
8624
9505
|
declare const ListBiggestWinnersRequestSchema: z.ZodObject<{
|
|
8625
9506
|
category: z.ZodOptional<z.ZodString>;
|
|
8626
9507
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
@@ -8628,9 +9509,9 @@ declare const ListBiggestWinnersRequestSchema: z.ZodObject<{
|
|
|
8628
9509
|
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
8629
9510
|
}, z.core.$strip>;
|
|
8630
9511
|
type ListBiggestWinnersRequest = z.input<typeof ListBiggestWinnersRequestSchema>;
|
|
8631
|
-
type ListBiggestWinnersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9512
|
+
type ListBiggestWinnersError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8632
9513
|
declare const ListBiggestWinnersError: {
|
|
8633
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9514
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8634
9515
|
};
|
|
8635
9516
|
/**
|
|
8636
9517
|
* Lists the largest individual winning positions.
|
|
@@ -8660,7 +9541,7 @@ declare const ListBiggestWinnersError: {
|
|
|
8660
9541
|
* }
|
|
8661
9542
|
* ```
|
|
8662
9543
|
*/
|
|
8663
|
-
declare function listBiggestWinners(client: BaseClient, request?: ListBiggestWinnersRequest): Paginated<BiggestWinner[]>;
|
|
9544
|
+
declare function listBiggestWinners(client: BaseClient, request?: ListBiggestWinnersRequest, options?: RequestOptions): Paginated<BiggestWinner[]>;
|
|
8664
9545
|
|
|
8665
9546
|
declare const ListMarketClarificationsRequestSchema: z.ZodObject<{
|
|
8666
9547
|
marketId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
@@ -8675,9 +9556,9 @@ declare const ListMarketClarificationsRequestSchema: z.ZodObject<{
|
|
|
8675
9556
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
8676
9557
|
}, z.core.$strip>;
|
|
8677
9558
|
type ListMarketClarificationsRequest = z.input<typeof ListMarketClarificationsRequestSchema>;
|
|
8678
|
-
type ListMarketClarificationsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9559
|
+
type ListMarketClarificationsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8679
9560
|
declare const ListMarketClarificationsError: {
|
|
8680
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9561
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8681
9562
|
};
|
|
8682
9563
|
/**
|
|
8683
9564
|
* Lists market clarifications — official notes that resolve ambiguity in how a
|
|
@@ -8717,11 +9598,11 @@ declare const ListMarketClarificationsError: {
|
|
|
8717
9598
|
* }
|
|
8718
9599
|
* ```
|
|
8719
9600
|
*/
|
|
8720
|
-
declare function listMarketClarifications(client: BaseClient, request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
|
|
9601
|
+
declare function listMarketClarifications(client: BaseClient, request?: ListMarketClarificationsRequest, options?: RequestOptions): Paginated<MarketClarification[]>;
|
|
8721
9602
|
|
|
8722
9603
|
declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
8723
9604
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
8724
|
-
closed: z.ZodOptional<z.ZodBoolean
|
|
9605
|
+
closed: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"any">]>>;
|
|
8725
9606
|
clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8726
9607
|
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
8727
9608
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -8737,9 +9618,12 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
8737
9618
|
liquidityNumMin: z.ZodOptional<z.ZodNumber>;
|
|
8738
9619
|
locale: z.ZodOptional<z.ZodString>;
|
|
8739
9620
|
order: z.ZodOptional<z.ZodString>;
|
|
9621
|
+
onchainEventIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8740
9622
|
positionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>>;
|
|
8741
9623
|
questionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8742
9624
|
relatedTags: z.ZodOptional<z.ZodBoolean>;
|
|
9625
|
+
requestIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9626
|
+
resolutionStatus: z.ZodOptional<z.ZodEnum<typeof MarketResolutionStatus>>;
|
|
8743
9627
|
rfqEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
8744
9628
|
rewardsMinSize: z.ZodOptional<z.ZodNumber>;
|
|
8745
9629
|
slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -8752,6 +9636,7 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
8752
9636
|
all: "all";
|
|
8753
9637
|
}>>;
|
|
8754
9638
|
umaResolutionStatus: z.ZodOptional<z.ZodString>;
|
|
9639
|
+
version: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ProtocolVersion>, z.ZodArray<z.ZodEnum<typeof ProtocolVersion>>]>>;
|
|
8755
9640
|
volumeNumMax: z.ZodOptional<z.ZodNumber>;
|
|
8756
9641
|
volumeNumMin: z.ZodOptional<z.ZodNumber>;
|
|
8757
9642
|
}, z.core.$strip>;
|
|
@@ -8774,19 +9659,29 @@ declare const FetchMarketTagsRequestSchema: z.ZodObject<{
|
|
|
8774
9659
|
id: z.ZodString;
|
|
8775
9660
|
}, z.core.$strip>;
|
|
8776
9661
|
type FetchMarketTagsRequest = z.input<typeof FetchMarketTagsRequestSchema>;
|
|
8777
|
-
type ListMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9662
|
+
type ListMarketsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8778
9663
|
declare const ListMarketsError: {
|
|
8779
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9664
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8780
9665
|
};
|
|
8781
9666
|
/**
|
|
8782
9667
|
* Lists markets.
|
|
8783
9668
|
*
|
|
9669
|
+
* Defaults to open markets. Pass `closed: true` for closed markets or
|
|
9670
|
+
* `closed: 'any'` for either state. The latter requires a non-empty `ids`,
|
|
9671
|
+
* `slug`, `clobTokenIds`, `positionIds`, `conditionIds`, or `questionIds` filter.
|
|
9672
|
+
*
|
|
8784
9673
|
* @remarks
|
|
8785
9674
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
8786
9675
|
*
|
|
8787
9676
|
* Legacy multi-outcome markets cannot be represented by the binary
|
|
8788
9677
|
* {@link Market} model and are omitted from results.
|
|
8789
9678
|
*
|
|
9679
|
+
* Select one protocol with `version`, or pass both protocol versions in an array.
|
|
9680
|
+
* Arrays accept one or two values. Omitting `version` uses the current server
|
|
9681
|
+
* default of CTF markets (v1). Filter v2 markets by `resolutionStatus`, `requestIds`, or
|
|
9682
|
+
* `onchainEventIds`. Each ID filter accepts at most 100 values. V1 markets
|
|
9683
|
+
* use the separate `umaResolutionStatus` filter.
|
|
9684
|
+
*
|
|
8790
9685
|
* @throws {@link ListMarketsError}
|
|
8791
9686
|
* Thrown on failure.
|
|
8792
9687
|
*
|
|
@@ -8819,16 +9714,16 @@ declare const ListMarketsError: {
|
|
|
8819
9714
|
* }
|
|
8820
9715
|
* ```
|
|
8821
9716
|
*/
|
|
8822
|
-
declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market[]>;
|
|
9717
|
+
declare function listMarkets(client: BaseClient, request?: ListMarketsRequest, options?: RequestOptions): Paginated<Market[]>;
|
|
8823
9718
|
declare const ListComboMarketsRequestSchema: z.ZodObject<{
|
|
8824
9719
|
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
8825
9720
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
8826
9721
|
exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>>>;
|
|
8827
9722
|
}, z.core.$strip>;
|
|
8828
9723
|
type ListComboMarketsRequest = z.input<typeof ListComboMarketsRequestSchema>;
|
|
8829
|
-
type ListComboMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9724
|
+
type ListComboMarketsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8830
9725
|
declare const ListComboMarketsError: {
|
|
8831
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9726
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8832
9727
|
};
|
|
8833
9728
|
/**
|
|
8834
9729
|
* Lists markets available for Combos.
|
|
@@ -8863,10 +9758,10 @@ declare const ListComboMarketsError: {
|
|
|
8863
9758
|
* });
|
|
8864
9759
|
* ```
|
|
8865
9760
|
*/
|
|
8866
|
-
declare function listComboMarkets(client: BaseClient, request?: ListComboMarketsRequest): Paginated<ComboMarket[]>;
|
|
8867
|
-
type FetchMarketError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9761
|
+
declare function listComboMarkets(client: BaseClient, request?: ListComboMarketsRequest, options?: RequestOptions): Paginated<ComboMarket[]>;
|
|
9762
|
+
type FetchMarketError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8868
9763
|
declare const FetchMarketError: {
|
|
8869
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9764
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8870
9765
|
};
|
|
8871
9766
|
/**
|
|
8872
9767
|
* Fetches a market.
|
|
@@ -8898,10 +9793,10 @@ declare const FetchMarketError: {
|
|
|
8898
9793
|
* // market === Market
|
|
8899
9794
|
* ```
|
|
8900
9795
|
*/
|
|
8901
|
-
declare function fetchMarket(client: BaseClient, request: FetchMarketRequest): Promise<Market>;
|
|
8902
|
-
type FetchMarketTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9796
|
+
declare function fetchMarket(client: BaseClient, request: FetchMarketRequest, options?: RequestOptions): Promise<Market>;
|
|
9797
|
+
type FetchMarketTagsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8903
9798
|
declare const FetchMarketTagsError: {
|
|
8904
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9799
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8905
9800
|
};
|
|
8906
9801
|
/**
|
|
8907
9802
|
* Fetches a market's tags.
|
|
@@ -8921,7 +9816,7 @@ declare const FetchMarketTagsError: {
|
|
|
8921
9816
|
* // tags: TagReference[]
|
|
8922
9817
|
* ```
|
|
8923
9818
|
*/
|
|
8924
|
-
declare function fetchMarketTags(client: BaseClient, request: FetchMarketTagsRequest): Promise<TagReference[]>;
|
|
9819
|
+
declare function fetchMarketTags(client: BaseClient, request: FetchMarketTagsRequest, options?: RequestOptions): Promise<TagReference[]>;
|
|
8925
9820
|
declare const ListMarketHoldersRequestSchema: z.ZodObject<{
|
|
8926
9821
|
conditionIds: z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>;
|
|
8927
9822
|
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
@@ -8930,9 +9825,9 @@ declare const ListMarketHoldersRequestSchema: z.ZodObject<{
|
|
|
8930
9825
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
8931
9826
|
}, z.core.$strip>;
|
|
8932
9827
|
type ListMarketHoldersRequest = z.input<typeof ListMarketHoldersRequestSchema>;
|
|
8933
|
-
type ListMarketHoldersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9828
|
+
type ListMarketHoldersError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8934
9829
|
declare const ListMarketHoldersError: {
|
|
8935
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9830
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8936
9831
|
};
|
|
8937
9832
|
/**
|
|
8938
9833
|
* Lists top holders grouped by outcome for one or more markets.
|
|
@@ -8944,7 +9839,7 @@ declare const ListMarketHoldersError: {
|
|
|
8944
9839
|
* equivalent to 1,000,000 base units.
|
|
8945
9840
|
* Amounts are net holdings by default. `includePnl` switches to per-outcome
|
|
8946
9841
|
* gross holdings and adds position economics; it requires one condition ID and
|
|
8947
|
-
* a page size of at most 100. Transient rate limits are retried
|
|
9842
|
+
* a page size of at most 100. Transient rate limits are retried by default.
|
|
8948
9843
|
*
|
|
8949
9844
|
* @remarks
|
|
8950
9845
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -8964,7 +9859,7 @@ declare const ListMarketHoldersError: {
|
|
|
8964
9859
|
* }
|
|
8965
9860
|
* ```
|
|
8966
9861
|
*/
|
|
8967
|
-
declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest): Paginated<MetaHolder[]>;
|
|
9862
|
+
declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest, options?: RequestOptions): Paginated<MetaHolder[]>;
|
|
8968
9863
|
type ListPriceHistoryRequest = {
|
|
8969
9864
|
assetId: string;
|
|
8970
9865
|
interval: PriceHistoryInterval;
|
|
@@ -8993,9 +9888,9 @@ type ListPriceHistoryRequest = {
|
|
|
8993
9888
|
cursor?: never;
|
|
8994
9889
|
pageSize?: never;
|
|
8995
9890
|
};
|
|
8996
|
-
type ListPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9891
|
+
type ListPriceHistoryError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
8997
9892
|
declare const ListPriceHistoryError: {
|
|
8998
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9893
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
8999
9894
|
};
|
|
9000
9895
|
/**
|
|
9001
9896
|
* Lists historical price observations for an exchange asset.
|
|
@@ -9010,7 +9905,7 @@ declare const ListPriceHistoryError: {
|
|
|
9010
9905
|
* strings and returned timestamps are Unix epoch milliseconds. Series pages
|
|
9011
9906
|
* are ordered oldest first; an `asOf` request returns at most one item. Series
|
|
9012
9907
|
* page sizes default to and are capped at 10,000 points. Transient rate limits
|
|
9013
|
-
* are retried
|
|
9908
|
+
* are retried by default.
|
|
9014
9909
|
*
|
|
9015
9910
|
* @remarks
|
|
9016
9911
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -9031,14 +9926,14 @@ declare const ListPriceHistoryError: {
|
|
|
9031
9926
|
* }
|
|
9032
9927
|
* ```
|
|
9033
9928
|
*/
|
|
9034
|
-
declare function listPriceHistory(client: BaseClient, request: ListPriceHistoryRequest): Paginated<PriceHistoryPoint[]>;
|
|
9929
|
+
declare function listPriceHistory(client: BaseClient, request: ListPriceHistoryRequest, options?: RequestOptions): Paginated<PriceHistoryPoint[]>;
|
|
9035
9930
|
declare const FetchOpenInterestRequestSchema: z.ZodObject<{
|
|
9036
9931
|
conditionIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>>;
|
|
9037
9932
|
}, z.core.$strip>;
|
|
9038
9933
|
type FetchOpenInterestRequest = z.input<typeof FetchOpenInterestRequestSchema>;
|
|
9039
|
-
type FetchOpenInterestError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9934
|
+
type FetchOpenInterestError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9040
9935
|
declare const FetchOpenInterestError: {
|
|
9041
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9936
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9042
9937
|
};
|
|
9043
9938
|
/**
|
|
9044
9939
|
* Fetches priced gross open interest for selected markets or globally.
|
|
@@ -9047,7 +9942,7 @@ declare const FetchOpenInterestError: {
|
|
|
9047
9942
|
* the global aggregate, whose `conditionId` is `null`. A requested servable
|
|
9048
9943
|
* market with no holdings has a zero value; an absent row means the market is
|
|
9049
9944
|
* not servable. Values are in USDC. Transient rate limits are retried
|
|
9050
|
-
*
|
|
9945
|
+
* by default.
|
|
9051
9946
|
*
|
|
9052
9947
|
* @remarks
|
|
9053
9948
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -9064,12 +9959,150 @@ declare const FetchOpenInterestError: {
|
|
|
9064
9959
|
* // openInterest: OpenInterest[]
|
|
9065
9960
|
* ```
|
|
9066
9961
|
*/
|
|
9067
|
-
declare function fetchOpenInterest(client: BaseClient, request?: FetchOpenInterestRequest): Promise<OpenInterest[]>;
|
|
9962
|
+
declare function fetchOpenInterest(client: BaseClient, request?: FetchOpenInterestRequest, options?: RequestOptions): Promise<OpenInterest[]>;
|
|
9068
9963
|
|
|
9069
|
-
|
|
9070
|
-
|
|
9964
|
+
/** A neg-risk operation yields an EOA transaction or the wallet's gasless signing steps. */
|
|
9965
|
+
type NegRiskWorkflow = AsyncGenerator<GaslessWorkflowRequest | SendConvertTransactionRequest | SendHorizontalSplitTransactionRequest | SendHorizontalMergeTransactionRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
9966
|
+
/** Signing steps for a neg-risk conversion. */
|
|
9967
|
+
type ConvertWorkflow = AsyncGenerator<GaslessWorkflowRequest | SendConvertTransactionRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
9968
|
+
type PrepareConvertRequest = {
|
|
9969
|
+
/** Market's protocol V2 neg-risk condition ID: bytes31 or zero-padded bytes32. */
|
|
9970
|
+
conditionId: string;
|
|
9971
|
+
/** Positive explicit amount in six-decimal base units (1_000_000n = one unit). */
|
|
9972
|
+
amount: bigint;
|
|
9973
|
+
/** Optional transaction metadata for gasless wallets. */
|
|
9974
|
+
metadata?: string;
|
|
9975
|
+
};
|
|
9976
|
+
type PrepareConvertError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9977
|
+
declare const PrepareConvertError: {
|
|
9978
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9979
|
+
};
|
|
9980
|
+
/**
|
|
9981
|
+
* Prepares a workflow: Converts NO into YES for all other conditions.
|
|
9982
|
+
* Derives the event and NO condition index from the market's condition ID.
|
|
9983
|
+
* Includes Other unless converting NO(Other).
|
|
9984
|
+
* Requires PositionManager operator approval for the Router. No approvals are submitted automatically.
|
|
9985
|
+
* Preparing does not sign or submit; advance the returned workflow to execute it.
|
|
9986
|
+
* @throws {@link PrepareConvertError} Thrown on failure, including while advancing the workflow.
|
|
9987
|
+
*/
|
|
9988
|
+
declare function prepareConvert(client: BaseSecureClient, request: PrepareConvertRequest): Promise<ConvertWorkflow>;
|
|
9989
|
+
type ConvertError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9990
|
+
declare const ConvertError: {
|
|
9991
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9992
|
+
};
|
|
9993
|
+
/**
|
|
9994
|
+
* Converts NO into YES for all other conditions.
|
|
9995
|
+
* Derives the event and NO condition index from the market's condition ID.
|
|
9996
|
+
* Includes Other unless converting NO(Other).
|
|
9997
|
+
* Requires PositionManager operator approval for the Router. No approvals are submitted automatically.
|
|
9998
|
+
* Signs and submits using the authenticated wallet; call the returned handle's wait() to confirm.
|
|
9999
|
+
* @throws {@link ConvertError} Thrown on failure.
|
|
10000
|
+
*/
|
|
10001
|
+
declare function convert(client: BaseSecureClient, request: PrepareConvertRequest): Promise<TransactionHandle>;
|
|
10002
|
+
/** Signing steps for a horizontal split. */
|
|
10003
|
+
type HorizontalSplitWorkflow = AsyncGenerator<GaslessWorkflowRequest | SendHorizontalSplitTransactionRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
10004
|
+
type PrepareHorizontalSplitRequest = {
|
|
10005
|
+
/** Any market condition in the protocol V2 neg-risk event: bytes31 or zero-padded bytes32. */
|
|
10006
|
+
conditionId: string;
|
|
10007
|
+
/** Positive explicit amount in six-decimal base units (1_000_000n = one unit). */
|
|
10008
|
+
amount: bigint;
|
|
10009
|
+
/** Optional transaction metadata for gasless wallets. */
|
|
10010
|
+
metadata?: string;
|
|
10011
|
+
};
|
|
10012
|
+
type PrepareHorizontalSplitError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10013
|
+
declare const PrepareHorizontalSplitError: {
|
|
10014
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10015
|
+
};
|
|
10016
|
+
/**
|
|
10017
|
+
* Prepares a workflow: Splits pUSD into YES for every condition, including Other.
|
|
10018
|
+
* Uses the event containing the supplied market condition.
|
|
10019
|
+
* Requires pUSD spending approval for the Router. No approvals are submitted automatically.
|
|
10020
|
+
* Preparing does not sign or submit; advance the returned workflow to execute it.
|
|
10021
|
+
* @throws {@link PrepareHorizontalSplitError} Thrown on failure, including while advancing the workflow.
|
|
10022
|
+
*/
|
|
10023
|
+
declare function prepareHorizontalSplit(client: BaseSecureClient, request: PrepareHorizontalSplitRequest): Promise<HorizontalSplitWorkflow>;
|
|
10024
|
+
type HorizontalSplitError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10025
|
+
declare const HorizontalSplitError: {
|
|
10026
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10027
|
+
};
|
|
10028
|
+
/**
|
|
10029
|
+
* Splits pUSD into YES for every condition, including Other.
|
|
10030
|
+
* Uses the event containing the supplied market condition.
|
|
10031
|
+
* Requires pUSD spending approval for the Router. No approvals are submitted automatically.
|
|
10032
|
+
* Signs and submits using the authenticated wallet; call the returned handle's wait() to confirm.
|
|
10033
|
+
* @throws {@link HorizontalSplitError} Thrown on failure.
|
|
10034
|
+
*/
|
|
10035
|
+
declare function horizontalSplit(client: BaseSecureClient, request: PrepareHorizontalSplitRequest): Promise<TransactionHandle>;
|
|
10036
|
+
/** Signing steps for a horizontal merge. */
|
|
10037
|
+
type HorizontalMergeWorkflow = AsyncGenerator<GaslessWorkflowRequest | SendHorizontalMergeTransactionRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
10038
|
+
type PrepareHorizontalMergeRequest = {
|
|
10039
|
+
/** Any market condition in the protocol V2 neg-risk event: bytes31 or zero-padded bytes32. */
|
|
10040
|
+
conditionId: string;
|
|
10041
|
+
/** Positive explicit amount in six-decimal base units (1_000_000n = one unit). */
|
|
10042
|
+
amount: bigint;
|
|
10043
|
+
/** Optional transaction metadata for gasless wallets. */
|
|
10044
|
+
metadata?: string;
|
|
10045
|
+
};
|
|
10046
|
+
type PrepareHorizontalMergeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10047
|
+
declare const PrepareHorizontalMergeError: {
|
|
9071
10048
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
9072
10049
|
};
|
|
10050
|
+
/**
|
|
10051
|
+
* Prepares a workflow: Merges equal YES amounts from every condition, including Other, into pUSD.
|
|
10052
|
+
* Uses the event containing the supplied market condition.
|
|
10053
|
+
* Requires PositionManager operator approval for the Router. No approvals are submitted automatically.
|
|
10054
|
+
* Preparing does not sign or submit; advance the returned workflow to execute it.
|
|
10055
|
+
* @throws {@link PrepareHorizontalMergeError} Thrown on failure, including while advancing the workflow.
|
|
10056
|
+
*/
|
|
10057
|
+
declare function prepareHorizontalMerge(client: BaseSecureClient, request: PrepareHorizontalMergeRequest): Promise<HorizontalMergeWorkflow>;
|
|
10058
|
+
type HorizontalMergeError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10059
|
+
declare const HorizontalMergeError: {
|
|
10060
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10061
|
+
};
|
|
10062
|
+
/**
|
|
10063
|
+
* Merges equal YES amounts from every condition, including Other, into pUSD.
|
|
10064
|
+
* Uses the event containing the supplied market condition.
|
|
10065
|
+
* Requires PositionManager operator approval for the Router. No approvals are submitted automatically.
|
|
10066
|
+
* Signs and submits using the authenticated wallet; call the returned handle's wait() to confirm.
|
|
10067
|
+
* @throws {@link HorizontalMergeError} Thrown on failure.
|
|
10068
|
+
*/
|
|
10069
|
+
declare function horizontalMerge(client: BaseSecureClient, request: PrepareHorizontalMergeRequest): Promise<TransactionHandle>;
|
|
10070
|
+
|
|
10071
|
+
declare const SendOrderHeartbeatRequestSchema: z.ZodObject<{
|
|
10072
|
+
heartbeatId: z.ZodDefault<z.ZodString>;
|
|
10073
|
+
}, z.core.$strip>;
|
|
10074
|
+
type SendOrderHeartbeatRequest = z.input<typeof SendOrderHeartbeatRequestSchema>;
|
|
10075
|
+
type SendOrderHeartbeatError = OrderHeartbeatMismatchError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10076
|
+
declare const SendOrderHeartbeatError: {
|
|
10077
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | OrderHeartbeatMismatchError | RateLimitError;
|
|
10078
|
+
};
|
|
10079
|
+
/**
|
|
10080
|
+
* Sends one authenticated order heartbeat and returns the next heartbeat ID.
|
|
10081
|
+
* The first accepted send enables timeout cancellation for ALL open orders owned
|
|
10082
|
+
* by this API key, across markets and processes. Only start when you can keep
|
|
10083
|
+
* sending every five seconds. After ten seconds without an accepted send, the
|
|
10084
|
+
* server attempts cancel-all; cancellation timing and success are not guaranteed.
|
|
10085
|
+
* Start with an empty ID, serialize sends per key, and retain every returned ID.
|
|
10086
|
+
* No timer or automatic retry is started. A mismatch does not refresh the deadline;
|
|
10087
|
+
* retry explicitly with OrderHeartbeatMismatchError.heartbeatId. A lost response
|
|
10088
|
+
* may follow an accepted send, so failure does not prove registration is inactive.
|
|
10089
|
+
* There is no disarm operation. Stopping sends or closing the client leaves the
|
|
10090
|
+
* deadline active. On shutdown, stop placing orders and explicitly cancel/verify
|
|
10091
|
+
* orders you intend to remove. Expiry removes the registration; a later accepted
|
|
10092
|
+
* send registers again. This is separate from WebSocket connection keepalive.
|
|
10093
|
+
* @throws {@link SendOrderHeartbeatError} Thrown on failure.
|
|
10094
|
+
* @example
|
|
10095
|
+
* ```ts
|
|
10096
|
+
* const heartbeat = await sendOrderHeartbeat(client);
|
|
10097
|
+
* const next = await sendOrderHeartbeat(client, { heartbeatId: heartbeat.heartbeatId });
|
|
10098
|
+
* ```
|
|
10099
|
+
*/
|
|
10100
|
+
declare function sendOrderHeartbeat(client: BaseSecureClient, request?: SendOrderHeartbeatRequest): Promise<OrderHeartbeat>;
|
|
10101
|
+
|
|
10102
|
+
type PerpsPublicReadError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10103
|
+
declare const PerpsPublicReadError: {
|
|
10104
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10105
|
+
};
|
|
9073
10106
|
/**
|
|
9074
10107
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9075
10108
|
*/
|
|
@@ -9087,7 +10120,7 @@ type FetchPerpsInstrumentsError = PerpsPublicReadError;
|
|
|
9087
10120
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9088
10121
|
*/
|
|
9089
10122
|
declare const FetchPerpsInstrumentsError: {
|
|
9090
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10123
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9091
10124
|
};
|
|
9092
10125
|
/**
|
|
9093
10126
|
* Fetches Perps instruments.
|
|
@@ -9100,7 +10133,7 @@ declare const FetchPerpsInstrumentsError: {
|
|
|
9100
10133
|
*
|
|
9101
10134
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9102
10135
|
*/
|
|
9103
|
-
declare function fetchPerpsInstruments(client: BaseClient, request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
10136
|
+
declare function fetchPerpsInstruments(client: BaseClient, request?: FetchPerpsInstrumentsRequest, options?: RequestOptions): Promise<PerpsInstrument[]>;
|
|
9104
10137
|
/**
|
|
9105
10138
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9106
10139
|
*/
|
|
@@ -9116,7 +10149,7 @@ type FetchPerpsTickerError = PerpsPublicReadError;
|
|
|
9116
10149
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9117
10150
|
*/
|
|
9118
10151
|
declare const FetchPerpsTickerError: {
|
|
9119
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10152
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9120
10153
|
};
|
|
9121
10154
|
/**
|
|
9122
10155
|
* Fetches the current Perps ticker for an instrument.
|
|
@@ -9129,7 +10162,7 @@ declare const FetchPerpsTickerError: {
|
|
|
9129
10162
|
*
|
|
9130
10163
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9131
10164
|
*/
|
|
9132
|
-
declare function fetchPerpsTicker(client: BaseClient, request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
10165
|
+
declare function fetchPerpsTicker(client: BaseClient, request: FetchPerpsTickerRequest, options?: RequestOptions): Promise<PerpsTicker>;
|
|
9133
10166
|
/**
|
|
9134
10167
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9135
10168
|
*/
|
|
@@ -9145,7 +10178,7 @@ type FetchPerpsTickersError = PerpsPublicReadError;
|
|
|
9145
10178
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9146
10179
|
*/
|
|
9147
10180
|
declare const FetchPerpsTickersError: {
|
|
9148
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10181
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9149
10182
|
};
|
|
9150
10183
|
/**
|
|
9151
10184
|
* Fetches current Perps tickers.
|
|
@@ -9158,7 +10191,7 @@ declare const FetchPerpsTickersError: {
|
|
|
9158
10191
|
*
|
|
9159
10192
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9160
10193
|
*/
|
|
9161
|
-
declare function fetchPerpsTickers(client: BaseClient, request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
10194
|
+
declare function fetchPerpsTickers(client: BaseClient, request?: FetchPerpsTickersRequest, options?: RequestOptions): Promise<PerpsTicker[]>;
|
|
9162
10195
|
/**
|
|
9163
10196
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9164
10197
|
*/
|
|
@@ -9180,7 +10213,7 @@ type FetchPerpsBookError = PerpsPublicReadError;
|
|
|
9180
10213
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9181
10214
|
*/
|
|
9182
10215
|
declare const FetchPerpsBookError: {
|
|
9183
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10216
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9184
10217
|
};
|
|
9185
10218
|
/**
|
|
9186
10219
|
* Fetches a Perps order book.
|
|
@@ -9193,7 +10226,7 @@ declare const FetchPerpsBookError: {
|
|
|
9193
10226
|
*
|
|
9194
10227
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9195
10228
|
*/
|
|
9196
|
-
declare function fetchPerpsBook(client: BaseClient, request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
10229
|
+
declare function fetchPerpsBook(client: BaseClient, request: FetchPerpsBookRequest, options?: RequestOptions): Promise<PerpsBook>;
|
|
9197
10230
|
/**
|
|
9198
10231
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9199
10232
|
*/
|
|
@@ -9220,7 +10253,7 @@ type ListPerpsCandlesError = PerpsPublicReadError;
|
|
|
9220
10253
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9221
10254
|
*/
|
|
9222
10255
|
declare const ListPerpsCandlesError: {
|
|
9223
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10256
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9224
10257
|
};
|
|
9225
10258
|
/**
|
|
9226
10259
|
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
@@ -9233,7 +10266,7 @@ declare const ListPerpsCandlesError: {
|
|
|
9233
10266
|
*
|
|
9234
10267
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9235
10268
|
*/
|
|
9236
|
-
declare function listPerpsCandles(client: BaseClient, request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
10269
|
+
declare function listPerpsCandles(client: BaseClient, request: ListPerpsCandlesRequest, options?: RequestOptions): Paginated<PerpsCandle[]>;
|
|
9237
10270
|
/**
|
|
9238
10271
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9239
10272
|
*/
|
|
@@ -9258,7 +10291,7 @@ type ListPerpsFundingHistoryError = PerpsPublicReadError;
|
|
|
9258
10291
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9259
10292
|
*/
|
|
9260
10293
|
declare const ListPerpsFundingHistoryError: {
|
|
9261
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10294
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9262
10295
|
};
|
|
9263
10296
|
/**
|
|
9264
10297
|
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
@@ -9271,7 +10304,7 @@ declare const ListPerpsFundingHistoryError: {
|
|
|
9271
10304
|
*
|
|
9272
10305
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9273
10306
|
*/
|
|
9274
|
-
declare function listPerpsFundingHistory(client: BaseClient, request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
10307
|
+
declare function listPerpsFundingHistory(client: BaseClient, request: ListPerpsFundingHistoryRequest, options?: RequestOptions): Paginated<PerpsFundingRate[]>;
|
|
9275
10308
|
/**
|
|
9276
10309
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9277
10310
|
*/
|
|
@@ -9296,7 +10329,7 @@ type ListPerpsTradesError = PerpsPublicReadError;
|
|
|
9296
10329
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9297
10330
|
*/
|
|
9298
10331
|
declare const ListPerpsTradesError: {
|
|
9299
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10332
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9300
10333
|
};
|
|
9301
10334
|
/**
|
|
9302
10335
|
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
@@ -9309,16 +10342,16 @@ declare const ListPerpsTradesError: {
|
|
|
9309
10342
|
*
|
|
9310
10343
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9311
10344
|
*/
|
|
9312
|
-
declare function listPerpsTrades(client: BaseClient, request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
10345
|
+
declare function listPerpsTrades(client: BaseClient, request: ListPerpsTradesRequest, options?: RequestOptions): Paginated<PerpsPublicTrade[]>;
|
|
9313
10346
|
/**
|
|
9314
10347
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9315
10348
|
*/
|
|
9316
|
-
type FetchPerpsFeesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
10349
|
+
type FetchPerpsFeesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9317
10350
|
/**
|
|
9318
10351
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9319
10352
|
*/
|
|
9320
10353
|
declare const FetchPerpsFeesError: {
|
|
9321
|
-
isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
10354
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9322
10355
|
};
|
|
9323
10356
|
/**
|
|
9324
10357
|
* Fetches the Perps fee schedule.
|
|
@@ -9331,7 +10364,7 @@ declare const FetchPerpsFeesError: {
|
|
|
9331
10364
|
*
|
|
9332
10365
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9333
10366
|
*/
|
|
9334
|
-
declare function fetchPerpsFees(client: BaseClient): Promise<PerpsFeeScheduleEntry[]>;
|
|
10367
|
+
declare function fetchPerpsFees(client: BaseClient, options?: RequestOptions): Promise<PerpsFeeScheduleEntry[]>;
|
|
9335
10368
|
/**
|
|
9336
10369
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
9337
10370
|
*/
|
|
@@ -9980,9 +11013,9 @@ declare const FetchPublicProfileRequestSchema: z.ZodObject<{
|
|
|
9980
11013
|
address: z.ZodString;
|
|
9981
11014
|
}, z.core.$strip>;
|
|
9982
11015
|
type FetchPublicProfileRequest = z.input<typeof FetchPublicProfileRequestSchema>;
|
|
9983
|
-
type FetchPublicProfileError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11016
|
+
type FetchPublicProfileError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9984
11017
|
declare const FetchPublicProfileError: {
|
|
9985
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11018
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
9986
11019
|
};
|
|
9987
11020
|
/**
|
|
9988
11021
|
* Fetches a public profile by wallet address.
|
|
@@ -10002,7 +11035,7 @@ declare const FetchPublicProfileError: {
|
|
|
10002
11035
|
* // profile === PublicProfile | null
|
|
10003
11036
|
* ```
|
|
10004
11037
|
*/
|
|
10005
|
-
declare function fetchPublicProfile(client: BaseClient, request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
|
|
11038
|
+
declare function fetchPublicProfile(client: BaseClient, request: FetchPublicProfileRequest, options?: RequestOptions): Promise<PublicProfile | null>;
|
|
10006
11039
|
|
|
10007
11040
|
declare enum SearchSort {
|
|
10008
11041
|
Volume = "volume",
|
|
@@ -10040,9 +11073,9 @@ type SearchResults = {
|
|
|
10040
11073
|
profiles: Profile[];
|
|
10041
11074
|
tags: SearchTag[];
|
|
10042
11075
|
};
|
|
10043
|
-
type SearchError = PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11076
|
+
type SearchError = RequestAbortedError | PaginationLimitError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10044
11077
|
declare const SearchError: {
|
|
10045
|
-
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11078
|
+
isError(error: unknown): error is TransportError | UserInputError | PaginationLimitError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10046
11079
|
};
|
|
10047
11080
|
/**
|
|
10048
11081
|
* Runs a public full-text search.
|
|
@@ -10078,7 +11111,7 @@ declare const SearchError: {
|
|
|
10078
11111
|
* }
|
|
10079
11112
|
* ```
|
|
10080
11113
|
*/
|
|
10081
|
-
declare function search(client: BaseClient, request: SearchRequest): Paginated<SearchResults>;
|
|
11114
|
+
declare function search(client: BaseClient, request: SearchRequest, options?: RequestOptions): Paginated<SearchResults>;
|
|
10082
11115
|
|
|
10083
11116
|
declare const ListSeriesRequestSchema: z.ZodObject<{
|
|
10084
11117
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -10101,9 +11134,9 @@ declare const FetchSeriesRequestSchema: z.ZodObject<{
|
|
|
10101
11134
|
}, z.core.$strip>;
|
|
10102
11135
|
type ListSeriesRequest = z.input<typeof ListSeriesRequestSchema>;
|
|
10103
11136
|
type FetchSeriesRequest = z.input<typeof FetchSeriesRequestSchema>;
|
|
10104
|
-
type ListSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11137
|
+
type ListSeriesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10105
11138
|
declare const ListSeriesError: {
|
|
10106
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11139
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10107
11140
|
};
|
|
10108
11141
|
/**
|
|
10109
11142
|
* Lists series.
|
|
@@ -10143,10 +11176,10 @@ declare const ListSeriesError: {
|
|
|
10143
11176
|
* }
|
|
10144
11177
|
* ```
|
|
10145
11178
|
*/
|
|
10146
|
-
declare function listSeries(client: BaseClient, request?: ListSeriesRequest): Paginated<Series[]>;
|
|
10147
|
-
type FetchSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11179
|
+
declare function listSeries(client: BaseClient, request?: ListSeriesRequest, options?: RequestOptions): Paginated<Series[]>;
|
|
11180
|
+
type FetchSeriesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10148
11181
|
declare const FetchSeriesError: {
|
|
10149
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11182
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10150
11183
|
};
|
|
10151
11184
|
/**
|
|
10152
11185
|
* Fetches a series.
|
|
@@ -10167,7 +11200,7 @@ declare const FetchSeriesError: {
|
|
|
10167
11200
|
* // series === Series
|
|
10168
11201
|
* ```
|
|
10169
11202
|
*/
|
|
10170
|
-
declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest): Promise<Series>;
|
|
11203
|
+
declare function fetchSeries(client: BaseClient, request: FetchSeriesRequest, options?: RequestOptions): Promise<Series>;
|
|
10171
11204
|
|
|
10172
11205
|
/**
|
|
10173
11206
|
* A scoped session key authorized for the Deposit Wallet.
|
|
@@ -10180,9 +11213,9 @@ type SessionKey = {
|
|
|
10180
11213
|
/** Absolute expiry as whole Unix seconds. */
|
|
10181
11214
|
validUntil: number;
|
|
10182
11215
|
};
|
|
10183
|
-
type FetchSessionKeysError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11216
|
+
type FetchSessionKeysError = RequestAbortedError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10184
11217
|
declare const FetchSessionKeysError: {
|
|
10185
|
-
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11218
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10186
11219
|
};
|
|
10187
11220
|
/**
|
|
10188
11221
|
* Fetches the active session keys authorized for the Deposit Wallet.
|
|
@@ -10198,7 +11231,7 @@ declare const FetchSessionKeysError: {
|
|
|
10198
11231
|
* @throws {@link FetchSessionKeysError}
|
|
10199
11232
|
* Thrown on failure.
|
|
10200
11233
|
*/
|
|
10201
|
-
declare function fetchSessionKeys(client: BaseSecureClient): Promise<SessionKey[]>;
|
|
11234
|
+
declare function fetchSessionKeys(client: BaseSecureClient, options?: RequestOptions): Promise<SessionKey[]>;
|
|
10202
11235
|
/** Parameters for authorizing a scoped session key. */
|
|
10203
11236
|
type AuthorizeSessionKeyRequest = {
|
|
10204
11237
|
/** Public EVM address of the externally managed session signer. */
|
|
@@ -10480,6 +11513,16 @@ type PerpsStatisticsSubscription = {
|
|
|
10480
11513
|
*/
|
|
10481
11514
|
type PerpsMarketDataSubscription = PerpsTradesSubscription | PerpsBboSubscription | PerpsBookSubscription | PerpsCandlesSubscription | PerpsTickersSubscription | PerpsStatisticsSubscription;
|
|
10482
11515
|
type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | CryptoPricesChainlinkTwapSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
|
|
11516
|
+
/** Confirmation of one price subscription, refreshed after every reconnect. */
|
|
11517
|
+
type PriceSubscriptionConfirmation = {
|
|
11518
|
+
/** Canonical lowercase symbol the confirmation is for. */
|
|
11519
|
+
symbol: string;
|
|
11520
|
+
/**
|
|
11521
|
+
* The provider actually served, including fallback. Undefined when the
|
|
11522
|
+
* server does not confirm provider selection; never inferred from the pin.
|
|
11523
|
+
*/
|
|
11524
|
+
provider?: PriceSource;
|
|
11525
|
+
};
|
|
10483
11526
|
/**
|
|
10484
11527
|
* Symbol-filtered cryptocurrency updates and recent history. Requires a secure
|
|
10485
11528
|
* client and canonical lowercase USD pairs such as `btcusd`.
|
|
@@ -10488,6 +11531,14 @@ type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | Comments
|
|
|
10488
11531
|
type CryptoPriceSubscription = {
|
|
10489
11532
|
topic: 'prices.crypto';
|
|
10490
11533
|
symbols: readonly string[];
|
|
11534
|
+
/** Requested vendor. Omit to follow the default; an unavailable pin may fall back. */
|
|
11535
|
+
provider?: PriceProvider;
|
|
11536
|
+
/**
|
|
11537
|
+
* Called once per symbol on acceptance and every reconnect, or immediately
|
|
11538
|
+
* when joining an accepted subscription. A thrown error or rejected promise
|
|
11539
|
+
* ends this handle with TransportError.
|
|
11540
|
+
*/
|
|
11541
|
+
onSubscribed?: (confirmation: PriceSubscriptionConfirmation) => void | Promise<void>;
|
|
10491
11542
|
};
|
|
10492
11543
|
/**
|
|
10493
11544
|
* 60-second time-weighted prices and recent history. Requires a secure client
|
|
@@ -10497,23 +11548,57 @@ type CryptoPriceSubscription = {
|
|
|
10497
11548
|
type CryptoTwapPriceSubscription = {
|
|
10498
11549
|
topic: 'prices.crypto.twap';
|
|
10499
11550
|
symbols: readonly string[];
|
|
11551
|
+
/** Requested vendor. Omit to follow the default; an unavailable pin may fall back. */
|
|
11552
|
+
provider?: PriceProvider;
|
|
11553
|
+
/**
|
|
11554
|
+
* Called once per symbol on acceptance and every reconnect, or immediately
|
|
11555
|
+
* when joining an accepted subscription. A thrown error or rejected promise
|
|
11556
|
+
* ends this handle with TransportError.
|
|
11557
|
+
*/
|
|
11558
|
+
onSubscribed?: (confirmation: PriceSubscriptionConfirmation) => void | Promise<void>;
|
|
10500
11559
|
};
|
|
10501
11560
|
/** Equity updates and recent history. Requires a secure client. */
|
|
10502
11561
|
type EquityPriceSubscription = {
|
|
10503
11562
|
topic: 'prices.equity';
|
|
10504
11563
|
symbol: string;
|
|
10505
11564
|
types?: readonly ('subscribe' | 'update')[];
|
|
11565
|
+
/** Requested vendor. Omit to follow the default; an unavailable pin may fall back. */
|
|
11566
|
+
provider?: PriceProvider;
|
|
11567
|
+
/**
|
|
11568
|
+
* Called once per symbol on acceptance and every reconnect, or immediately
|
|
11569
|
+
* when joining an accepted subscription. A thrown error or rejected promise
|
|
11570
|
+
* ends this handle with TransportError.
|
|
11571
|
+
*/
|
|
11572
|
+
onSubscribed?: (confirmation: PriceSubscriptionConfirmation) => void | Promise<void>;
|
|
10506
11573
|
};
|
|
10507
|
-
|
|
11574
|
+
/**
|
|
11575
|
+
* 60-second time-weighted equity prices and recent history. Requires a secure
|
|
11576
|
+
* client. Symbols such as `eurusd` and `usdjpy` are case-insensitive; prices
|
|
11577
|
+
* use the symbol's quote currency. Returned events include `windowSeconds: 60`.
|
|
11578
|
+
*/
|
|
11579
|
+
type EquityTwapPriceSubscription = {
|
|
11580
|
+
topic: 'prices.equity.twap';
|
|
11581
|
+
symbol: string;
|
|
11582
|
+
/** Requested vendor. Omit to follow the default; an unavailable pin may fall back. */
|
|
11583
|
+
provider?: PriceProvider;
|
|
11584
|
+
/**
|
|
11585
|
+
* Called once per symbol on acceptance and every reconnect, or immediately
|
|
11586
|
+
* when joining an accepted subscription. A thrown error or rejected promise
|
|
11587
|
+
* ends this handle with TransportError.
|
|
11588
|
+
*/
|
|
11589
|
+
onSubscribed?: (confirmation: PriceSubscriptionConfirmation) => void | Promise<void>;
|
|
11590
|
+
};
|
|
11591
|
+
type PriceSubscription = CryptoPriceSubscription | CryptoTwapPriceSubscription | EquityPriceSubscription | EquityTwapPriceSubscription;
|
|
10508
11592
|
type SecureSubscriptionSpec = PublicSubscriptionSpec | UserSubscription | PriceSubscription;
|
|
10509
11593
|
type PublicRealtimeEvent = MarketEvent | SportsEvent | CommentsEvent | CryptoPricesEvent | EquityPricesEvent | PerpsMarketDataEvent;
|
|
10510
|
-
type SecureRealtimeEvent = PublicRealtimeEvent | UserEvent | CryptoPriceEvent | CryptoTwapPriceEvent | EquityPriceEvent;
|
|
11594
|
+
type SecureRealtimeEvent = PublicRealtimeEvent | UserEvent | CryptoPriceEvent | CryptoTwapPriceEvent | EquityPriceEvent | EquityTwapPriceEvent;
|
|
10511
11595
|
type PublicRealtimeTopic = Prettify<PublicRealtimeEvent['topic']>;
|
|
10512
11596
|
type SecureRealtimeTopic = Prettify<SecureRealtimeEvent['topic']>;
|
|
10513
11597
|
type EventByTopic = {
|
|
10514
11598
|
'prices.crypto': CryptoPriceEvent;
|
|
10515
11599
|
'prices.crypto.twap': CryptoTwapPriceEvent;
|
|
10516
11600
|
'prices.equity': EquityPriceEvent;
|
|
11601
|
+
'prices.equity.twap': EquityTwapPriceEvent;
|
|
10517
11602
|
comments: CommentsEvent;
|
|
10518
11603
|
'prices.crypto.binance': CryptoPricesBinanceEvent;
|
|
10519
11604
|
'prices.crypto.chainlink': CryptoPricesChainlinkEvent;
|
|
@@ -10553,9 +11638,20 @@ declare const SubscribeError: {
|
|
|
10553
11638
|
/**
|
|
10554
11639
|
* Starts one or more realtime subscriptions on this client.
|
|
10555
11640
|
*
|
|
10556
|
-
* The
|
|
11641
|
+
* The `prices.crypto`, `prices.crypto.twap`, `prices.equity`, and
|
|
11642
|
+
* `prices.equity.twap` topics
|
|
10557
11643
|
* require a secure client and explicit filters, and include history snapshots
|
|
10558
11644
|
* and live updates. Legacy source-named topics retain their existing behavior.
|
|
11645
|
+
* These four topics include `source`, identifying the source of the update
|
|
11646
|
+
* or entire history batch, including empty batches. Unknown source names remain
|
|
11647
|
+
* strings. Crypto sources are constant; equity sources may change across
|
|
11648
|
+
* reconnects. Cached history starts fresh whenever the source changes.
|
|
11649
|
+
* These four topics accept an optional `provider` pin. Omit it to follow the
|
|
11650
|
+
* default. A pin may fall back or be ignored when selection is disabled;
|
|
11651
|
+
* `source` always identifies the actual producer. Different provider choices,
|
|
11652
|
+
* including omission, use separate connections, even if they serve the same source.
|
|
11653
|
+
* An optional `onSubscribed` callback reports the provider the server confirms,
|
|
11654
|
+
* on acceptance and after every reconnect.
|
|
10559
11655
|
* Event `seq` values are scoped to one channel on one WebSocket connection and
|
|
10560
11656
|
* reset after reconnecting. Subscriptions with more than 64 filters use
|
|
10561
11657
|
* multiple connections, so their sequence values may interleave.
|
|
@@ -10633,9 +11729,9 @@ type ListTagsRequest = z.input<typeof ListTagsRequestSchema>;
|
|
|
10633
11729
|
type FetchTagRequest = z.input<typeof FetchTagRequestSchema>;
|
|
10634
11730
|
type FetchRelatedTagsRequest = z.input<typeof RelatedTagsByIdRequestSchema> | z.input<typeof RelatedTagsBySlugRequestSchema>;
|
|
10635
11731
|
type FetchRelatedTagResourcesRequest = z.input<typeof RelatedTagResourcesByIdRequestSchema> | z.input<typeof RelatedTagResourcesBySlugRequestSchema>;
|
|
10636
|
-
type ListTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11732
|
+
type ListTagsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10637
11733
|
declare const ListTagsError: {
|
|
10638
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11734
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10639
11735
|
};
|
|
10640
11736
|
/**
|
|
10641
11737
|
* Lists tags.
|
|
@@ -10675,10 +11771,10 @@ declare const ListTagsError: {
|
|
|
10675
11771
|
* }
|
|
10676
11772
|
* ```
|
|
10677
11773
|
*/
|
|
10678
|
-
declare function listTags(client: BaseClient, request?: ListTagsRequest): Paginated<Tag[]>;
|
|
10679
|
-
type FetchTagError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11774
|
+
declare function listTags(client: BaseClient, request?: ListTagsRequest, options?: RequestOptions): Paginated<Tag[]>;
|
|
11775
|
+
type FetchTagError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10680
11776
|
declare const FetchTagError: {
|
|
10681
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11777
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10682
11778
|
};
|
|
10683
11779
|
/**
|
|
10684
11780
|
* Fetches a tag by id or slug.
|
|
@@ -10699,10 +11795,10 @@ declare const FetchTagError: {
|
|
|
10699
11795
|
* // tag === Tag
|
|
10700
11796
|
* ```
|
|
10701
11797
|
*/
|
|
10702
|
-
declare function fetchTag(client: BaseClient, request: FetchTagRequest): Promise<Tag>;
|
|
10703
|
-
type FetchRelatedTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11798
|
+
declare function fetchTag(client: BaseClient, request: FetchTagRequest, options?: RequestOptions): Promise<Tag>;
|
|
11799
|
+
type FetchRelatedTagsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10704
11800
|
declare const FetchRelatedTagsError: {
|
|
10705
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11801
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10706
11802
|
};
|
|
10707
11803
|
/**
|
|
10708
11804
|
* Fetches related tag relationships by id or slug.
|
|
@@ -10724,10 +11820,10 @@ declare const FetchRelatedTagsError: {
|
|
|
10724
11820
|
* // relatedTags: RelatedTag[]
|
|
10725
11821
|
* ```
|
|
10726
11822
|
*/
|
|
10727
|
-
declare function fetchRelatedTags(client: BaseClient, request: FetchRelatedTagsRequest): Promise<RelatedTag[]>;
|
|
10728
|
-
type FetchRelatedTagResourcesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11823
|
+
declare function fetchRelatedTags(client: BaseClient, request: FetchRelatedTagsRequest, options?: RequestOptions): Promise<RelatedTag[]>;
|
|
11824
|
+
type FetchRelatedTagResourcesError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10729
11825
|
declare const FetchRelatedTagResourcesError: {
|
|
10730
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11826
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10731
11827
|
};
|
|
10732
11828
|
/**
|
|
10733
11829
|
* Fetches resources linked from related tag relationships by id or slug.
|
|
@@ -10749,7 +11845,7 @@ declare const FetchRelatedTagResourcesError: {
|
|
|
10749
11845
|
* // relatedResources: Tag[]
|
|
10750
11846
|
* ```
|
|
10751
11847
|
*/
|
|
10752
|
-
declare function fetchRelatedTagResources(client: BaseClient, request: FetchRelatedTagResourcesRequest): Promise<Tag[]>;
|
|
11848
|
+
declare function fetchRelatedTagResources(client: BaseClient, request: FetchRelatedTagResourcesRequest, options?: RequestOptions): Promise<Tag[]>;
|
|
10753
11849
|
|
|
10754
11850
|
declare const ListTeamsRequestSchema: z.ZodObject<{
|
|
10755
11851
|
abbreviation: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -10762,9 +11858,9 @@ declare const ListTeamsRequestSchema: z.ZodObject<{
|
|
|
10762
11858
|
providerId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
10763
11859
|
}, z.core.$strip>;
|
|
10764
11860
|
type ListTeamsRequest = z.input<typeof ListTeamsRequestSchema>;
|
|
10765
|
-
type ListTeamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11861
|
+
type ListTeamsError = RequestAbortedError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
10766
11862
|
declare const ListTeamsError: {
|
|
10767
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
11863
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
10768
11864
|
};
|
|
10769
11865
|
/**
|
|
10770
11866
|
* Lists teams.
|
|
@@ -10804,7 +11900,47 @@ declare const ListTeamsError: {
|
|
|
10804
11900
|
* }
|
|
10805
11901
|
* ```
|
|
10806
11902
|
*/
|
|
10807
|
-
declare function listTeams(client: BaseClient, request?: ListTeamsRequest): Paginated<Team[]>;
|
|
11903
|
+
declare function listTeams(client: BaseClient, request?: ListTeamsRequest, options?: RequestOptions): Paginated<Team[]>;
|
|
11904
|
+
|
|
11905
|
+
/** Select outcome assets by decimal IDs or by condition selectors. */
|
|
11906
|
+
type FetchTokenReferencesRequest = {
|
|
11907
|
+
assetIds: string[];
|
|
11908
|
+
conditionIds?: never;
|
|
11909
|
+
} | {
|
|
11910
|
+
assetIds?: never;
|
|
11911
|
+
conditionIds: string[];
|
|
11912
|
+
};
|
|
11913
|
+
type FetchTokenReferencesError = RateLimitError | RequestAbortedError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
11914
|
+
declare const FetchTokenReferencesError: {
|
|
11915
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestAbortedError | RequestRejectedError | RateLimitError;
|
|
11916
|
+
};
|
|
11917
|
+
/**
|
|
11918
|
+
* Fetches reference and settlement metadata for outcome assets.
|
|
11919
|
+
*
|
|
11920
|
+
* Provide exactly one selector family: up to 50 distinct decimal `assetIds`,
|
|
11921
|
+
* or up to 10 distinct `conditionIds` containing 31-byte or 32-byte hex values.
|
|
11922
|
+
* Elements are trimmed, blanks dropped, and duplicates removed in first-seen
|
|
11923
|
+
* order. Decimal IDs have leading zeros stripped and at most 78 remaining
|
|
11924
|
+
* digits. Conditions are lowercased without changing their width.
|
|
11925
|
+
*
|
|
11926
|
+
* Returns a direct collection. Unknown selectors contribute no rows; asset
|
|
11927
|
+
* lookups retain request order and condition groups retain server order.
|
|
11928
|
+
* Overlapping condition selectors can repeat assets. Settlement metadata and
|
|
11929
|
+
* outcome labels can lag by up to a minute. Transient rate limits are retried
|
|
11930
|
+
* automatically.
|
|
11931
|
+
*
|
|
11932
|
+
* @remarks
|
|
11933
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
11934
|
+
*
|
|
11935
|
+
* @throws {@link FetchTokenReferencesError}
|
|
11936
|
+
* Thrown on failure.
|
|
11937
|
+
*
|
|
11938
|
+
* @example
|
|
11939
|
+
* ```ts
|
|
11940
|
+
* const references = await fetchTokenReferences(client, { assetIds: ['123'] });
|
|
11941
|
+
* ```
|
|
11942
|
+
*/
|
|
11943
|
+
declare function fetchTokenReferences(client: BaseClient, request: FetchTokenReferencesRequest, options?: RequestOptions): Promise<TokenReference[]>;
|
|
10808
11944
|
|
|
10809
11945
|
type Erc20TransferWorkflowRequest = GaslessWorkflowRequest | SendErc20TransferTransactionRequest;
|
|
10810
11946
|
type Erc20TransferWorkflow = AsyncGenerator<Erc20TransferWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
|
|
@@ -10924,4 +12060,4 @@ type Signer = {
|
|
|
10924
12060
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
10925
12061
|
};
|
|
10926
12062
|
|
|
10927
|
-
export { type DiscoveryActions as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, CancelledSigningError as D, type Client as E, type ClientActions as F, type ClientDecorator as G, type ClobEndpoints as H, type ComboPositionStatusFilter as I, type ComboQuote as J, type CombosEndpoints as K, type CommentsSubscription as L, ConnectionLostError as M, type ConnectionLostErrorOptions as N, type CreatePerpsSessionRequest as O, CreateSecureClientError as P, type CryptoPriceSubscription as Q, type CryptoPricesChainlinkTwapSubscription as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type CryptoPricesSubscription as V, type CryptoTwapPriceSubscription as W, type DataActions as X, DepositToPerpsError as Y, type DepositToPerpsRequest as Z, type DisarmPerpsAutoCancelRequest as _, type TypedData as a, FetchTagError as a$, DownloadAccountingSnapshotError as a0, DropNotificationsError as a1, type EnvironmentConfig as a2, type EnvironmentConfigFork as a3, type EnvironmentContracts as a4, type EquityPriceSubscription as a5, type EquityPricesSubscription as a6, type Erc1155TradingApproval as a7, type Erc20TradingApproval as a8, EstimateMarketPriceError as a9, FetchPerpsBuilderEarningsSummaryError as aA, type FetchPerpsBuilderEarningsSummaryRequest as aB, FetchPerpsBuilderStatusError as aC, type FetchPerpsBuilderStatusRequest as aD, FetchPerpsFeesError as aE, FetchPerpsInstrumentsError as aF, type FetchPerpsInstrumentsRequest as aG, type FetchPerpsOpenOrdersRequest as aH, type FetchPerpsOrdersRequest as aI, FetchPerpsTickerError as aJ, type FetchPerpsTickerRequest as aK, FetchPerpsTickersError as aL, type FetchPerpsTickersRequest as aM, FetchPortfolioValueError as aN, FetchPriceError as aO, FetchPricesError as aP, FetchPublicProfileError as aQ, FetchRelatedTagResourcesError as aR, FetchRelatedTagsError as aS, FetchResolutionsError as aT, FetchRewardPercentagesError as aU, FetchRfqStatusError as aV, type FetchRfqStatusParams as aW, FetchSeriesError as aX, FetchSessionKeysError as aY, FetchSpreadError as aZ, FetchSpreadsError as a_, ExecuteCollateralReturnPlanError as aa, type ExecuteCollateralReturnPlanRequest as ab, FetchBuilderVolumeError as ac, FetchClosedOnlyModeError as ad, FetchCommentsByIdError as ae, FetchEventError as af, FetchEventLiveVolumeError as ag, FetchEventTagsError as ah, FetchLastTradePriceError as ai, FetchLastTradePricesError as aj, FetchMarketError as ak, FetchMarketTagsError as al, FetchMidpointError as am, FetchMidpointsError as an, FetchNotificationsError as ao, FetchOpenInterestError as ap, FetchOrderBookError as aq, FetchOrderBooksError as ar, FetchOrderError as as, FetchOrderScoringError as at, FetchOrdersScoringError as au, type FetchPerpsAccountConfigRequest as av, FetchPerpsBookError as aw, type FetchPerpsBookRequest as ax, FetchPerpsBuilderApprovalsError as ay, type FetchPerpsBuilderApprovalsRequest as az, type TransactionCall as b, type PerpsCancelOptions as b$, FetchTotalEarningsForUserForDayError as b0, FetchTraderLeaderboardStandingError as b1, FetchTradingApprovalsStateError as b2, type FetchTradingApprovalsStateRequest as b3, FetchUserPnlError as b4, FetchUserStatsError as b5, FetchUserVolumeError as b6, InsufficientLiquidityError as b7, ListAccountTradesError as b8, ListActivityError as b9, type ListPerpsPnlHistoryRequest as bA, ListPerpsTradesError as bB, type ListPerpsTradesRequest as bC, type ListPerpsWithdrawalsRequest as bD, ListPositionsError as bE, ListPriceHistoryError as bF, ListSeriesError as bG, ListTagsError as bH, ListTeamsError as bI, ListTraderLeaderboardError as bJ, ListTradesError as bK, ListUserEarningsAndMarketsConfigError as bL, ListUserEarningsForDayError as bM, type MarkPerpsNotificationsReadRequest as bN, MergePositionsError as bO, OpenPerpsSessionError as bP, type OpenPerpsSessionRequest as bQ, OpenRfqSessionError as bR, OperationAbortedError as bS, type OrderSignature as bT, type Page as bU, PageSizeSchema as bV, type Paginated as bW, PaginationLimitError as bX, type PerpsActions as bY, type PerpsBookDepth as bZ, type PerpsBuilderTermsInput as b_, ListBiggestWinnersError as ba, ListBuilderLeaderboardError as bb, ListBuilderTradesError as bc, ListComboActivityError as bd, ListComboMarketsError as be, ListComboPositionsError as bf, ListCommentsByUserAddressError as bg, ListCommentsError as bh, ListCurrentRewardsError as bi, ListEventsError as bj, ListMarketHoldersError as bk, ListMarketRewardsError as bl, ListMarketsError as bm, ListOpenOrdersError as bn, ListPerpsBuilderEarningsError as bo, type ListPerpsBuilderEarningsRequest as bp, ListPerpsCandlesError as bq, type ListPerpsCandlesRequest as br, type ListPerpsDepositsRequest as bs, type ListPerpsEquityHistoryRequest as bt, type ListPerpsFillsRequest as bu, ListPerpsFundingHistoryError as bv, type ListPerpsFundingHistoryRequest as bw, type ListPerpsFundingPaymentsRequest as bx, type ListPerpsInternalTransfersRequest as by, type ListPerpsNotificationsRequest as bz, AcceptComboQuoteError as c, type RfqQuoteReference as c$, PerpsCancelRetryError as c0, type PerpsCancelRetryErrorOptions as c1, type PerpsCancelRetryOptions as c2, type PerpsEndpoints as c3, type PerpsOrderRequest as c4, type PerpsPlaceFokOrderRequest as c5, type PerpsPlaceGtcOrderRequest as c6, type PerpsPlaceIocOrderRequest as c7, type PerpsPlacedTpSlOrder as c8, type PerpsPlacedTpSlOrders as c9, RateLimitError as cA, type RateLimitErrorOptions as cB, type RateLimitUpdate as cC, type RateLimitUpdateListener as cD, RedeemPositionsError as cE, RequestComboQuoteError as cF, type RequestComboQuoteParams as cG, type RequestComboQuoteResult as cH, RequestRejectedError as cI, type RequestRejectedErrorOptions as cJ, type RestEndpoint as cK, type ResumePerpsSessionRequest as cL, RevokePerpsBuilderFeeError as cM, RevokePerpsCredentialsError as cN, type RevokePerpsCredentialsRequest as cO, RevokeSessionKeyError as cP, type RevokeSessionKeyRequest as cQ, type RfqCancelQuoteAck as cR, RfqCancelQuoteError as cS, RfqCancelQuoteRejectedError as cT, type RfqCancelQuoteRejectedErrorOptions as cU, type RfqConfirmationAck as cV, RfqConfirmationError as cW, RfqConfirmationRejectedError as cX, type RfqConfirmationRequestEvent as cY, type RfqEvent as cZ, RfqQuoteError as c_, type PerpsPositionTpSlTrigger as ca, PerpsSession as cb, type PerpsSessionAccountError as cc, type PerpsSessionLifecycleError as cd, type PerpsSessionTradingError as ce, type PerpsTpSlTrigger as cf, type PlacePerpsOrderRequest as cg, type PlacePerpsOrderResult as ch, type PlacePerpsOrderWithTpSlRequest as ci, type PlacePerpsOrderWithTpSlResult as cj, type PlacePerpsPositionTpSlRequest as ck, type PlacePerpsPositionTpSlResult as cl, PlanCollateralReturnError as cm, PostOrderError as cn, PostOrdersError as co, type PostPerpsOrdersRequest as cp, type PriceSubscription as cq, type PublicAccountActions as cr, type PublicActions as cs, type PublicClient as ct, type PublicClientOptions as cu, type PublicPerpsActions as cv, type PublicRewardsActions as cw, type PublicSubscriptionsActions as cx, type PublicWalletActions as cy, type RateLimitBucket as cz, type AcceptComboQuoteParams as d, type WaitForComboFillParams as d$, RfqQuoteRejectedError as d0, type RfqQuoteRejectedErrorOptions as d1, type RfqQuoteRequestEvent as d2, type RfqQuoteResponse as d3, type RfqQuoteSource as d4, RfqRequestRejectedError as d5, type RfqRequestRejectedErrorOptions as d6, type RfqSession as d7, type RfqStatusResult as d8, type RfqTradeEvent as d9, SetupTradingApprovalsError as dA, type SignedOrder as dB, type SignerTransactionRequest as dC, SignerType as dD, SigningError as dE, SplitPositionError as dF, SubscribeError as dG, type SubscriptionHandle as dH, TimeoutError as dI, type TradingApprovalRequirements as dJ, type TradingApprovalsState as dK, TradingRestriction as dL, TransactionFailedError as dM, type TransactionHandle as dN, type TransactionOutcome as dO, TransferErc20Error as dP, TransferPerpsCollateralError as dQ, type TransferPerpsCollateralRequest as dR, TransportError as dS, type TypedDataDomain as dT, type TypedDataField as dU, UnexpectedResponseError as dV, UpdatePerpsLeverageError as dW, type UpdatePerpsLeverageRequest as dX, UpdatePerpsMarginError as dY, type UpdatePerpsMarginRequest as dZ, WaitForComboFillError as d_, SearchError as da, SearchSort as db, type SecureAccountActions as dc, type SecureActions as dd, type SecureClient as de, type SecureClientOptions as df, type SecureDownloadAccountingSnapshotRequest as dg, type SecureFetchPortfolioValueRequest as dh, type SecureFetchTraderLeaderboardStandingRequest as di, type SecureFetchUserPnlRequest as dj, type SecureFetchUserStatsRequest as dk, type SecureFetchUserVolumeRequest as dl, type SecureListActivityRequest as dm, type SecureListComboActivityRequest as dn, type SecureListComboPositionsRequest as dp, type SecureListPositionsRequest as dq, type SecurePerpsActions as dr, type SecureRewardsActions as ds, type SecureRfqActions as dt, type SecureSubscriptionsActions as du, type SecureTradingActions as dv, type SecureWalletActions as dw, type SessionKey as dx, type SessionKeyActions as dy, SetupGaslessWalletError as dz, type AcceptComboQuoteResult as e, type FetchMarketRequest as e$, type WaitForComboFillResult as e0, WaitForOrderFillSettlementError as e1, WaitForTransactionError as e2, type WalletDerivationConfig as e3, type WebSocketCloseCode as e4, type WebSocketEndpoint as e5, WebSocketKnownCloseCode as e6, WithdrawFromPerpsError as e7, type WithdrawFromPerpsRequest as e8, accountActions as e9, type Erc1155ApprovalForAllWorkflow as eA, type Erc1155ApprovalForAllWorkflowRequest as eB, type Erc20ApprovalWorkflow as eC, type Erc20ApprovalWorkflowRequest as eD, type Erc20TransferWorkflow as eE, type Erc20TransferWorkflowRequest as eF, type EstimateMarketBuyPriceRequest as eG, type EstimateMarketPriceRequest as eH, type EstimateMarketSellPriceRequest as eI, type EventForSubscriptionSpec as eJ, type EventForSubscriptionSpecs as eK, FetchBalanceAllowanceError as eL, type FetchBalanceAllowanceRequest as eM, FetchBuilderFeeRatesError as eN, type FetchBuilderFeeRatesRequest as eO, type FetchBuilderVolumeRequest as eP, type FetchCommentsByIdRequest as eQ, type FetchEventLiveVolumeRequest as eR, type FetchEventRequest as eS, type FetchEventTagsRequest as eT, FetchExecuteParamsError as eU, type FetchExecuteParamsRequest as eV, type FetchGaslessTransactionRequest as eW, type FetchLastTradePriceRequest as eX, type FetchLastTradePricesRequest as eY, FetchMarketInfoError as eZ, type FetchMarketInfoRequest as e_, allActions as ea, analyticsActions as eb, createPublicClient as ec, createSecureClient as ed, dataActions as ee, discoveryActions as ef, forkEnvironmentConfig as eg, makeErrorGuard as eh, perpsActions as ei, production as ej, rewardsActions as ek, rfqActions as el, sessionKeyActions as em, subscriptionsActions as en, tradingActions as eo, walletActions as ep, type CancelMarketOrdersRequest as eq, type CancelOrderRequest as er, type CancelOrdersRequest as es, type CollateralReturnExecutionWorkflow as et, type CommentsEventType as eu, type CryptoPricesEventType as ev, DeployDepositWalletError as ew, type DownloadAccountingSnapshotRequest as ex, type DropNotificationsRequest as ey, type EquityPricesEventType as ez, type AccountIdentity as f, type ListUserEarningsForDayRequest as f$, type FetchMarketTagsRequest as f0, type FetchMidpointRequest as f1, type FetchMidpointsRequest as f2, FetchNegRiskError as f3, type FetchNegRiskRequest as f4, type FetchOpenInterestRequest as f5, type FetchOrderBookRequest as f6, type FetchOrderBooksRequest as f7, type FetchOrderRequest as f8, type FetchOrderScoringRequest as f9, type IsWalletDeployedRequest as fA, type ListAccountTradesRequest as fB, type ListActivityRequest as fC, type ListBiggestWinnersRequest as fD, type ListBuilderLeaderboardRequest as fE, type ListBuilderTradesRequest as fF, type ListComboActivityRequest as fG, type ListComboMarketsRequest as fH, type ListComboPositionsRequest as fI, type ListCommentsByUserAddressRequest as fJ, type ListCommentsRequest as fK, type ListCurrentRewardsRequest as fL, type ListEventsRequest as fM, ListMarketClarificationsError as fN, type ListMarketClarificationsRequest as fO, type ListMarketHoldersRequest as fP, type ListMarketRewardsRequest as fQ, type ListMarketsRequest as fR, type ListOpenOrdersRequest as fS, type ListPositionsRequest as fT, type ListPriceHistoryRequest as fU, type ListSeriesRequest as fV, type ListTagsRequest as fW, type ListTeamsRequest as fX, type ListTraderLeaderboardRequest as fY, type ListTradesRequest as fZ, type ListUserEarningsAndMarketsConfigRequest as f_, type FetchOrdersScoringRequest as fa, type FetchPortfolioValueRequest as fb, type FetchPriceRequest as fc, type FetchPricesRequest as fd, type FetchPublicProfileRequest as fe, type FetchRelatedTagResourcesRequest as ff, type FetchRelatedTagsRequest as fg, type FetchResolutionsByConditionRequest as fh, type FetchResolutionsByEventRequest as fi, type FetchResolutionsByQuestionRequest as fj, type FetchResolutionsRequest as fk, type FetchSeriesRequest as fl, type FetchSpreadRequest as fm, type FetchSpreadsRequest as fn, type FetchTagRequest as fo, FetchTickSizeError as fp, type FetchTickSizeRequest as fq, type FetchTotalEarningsForUserForDayRequest as fr, type FetchTraderLeaderboardStandingRequest as fs, type FetchUserPnlRequest as ft, type FetchUserStatsRequest as fu, type FetchUserVolumeRequest as fv, GaslessTransactionMetadataSchema as fw, type GaslessWorkflow as fx, type GaslessWorkflowRequest as fy, IsWalletDeployedError as fz, type AnalyticsActions as g, type ResolveConditionByTokenRequest as g$, type MarketEventType as g0, type MarketSubscription as g1, MergeComboPositionError as g2, MergeMarketPositionError as g3, type MergePositionsWorkflow as g4, type MergePositionsWorkflowRequest as g5, type OrderPostingWorkflow as g6, type OrderWorkflow as g7, type OrderWorkflowRequest as g8, type PerpsBboSubscription as g9, PrepareMergeMarketPositionError as gA, type PrepareMergeMarketPositionRequest as gB, PrepareMergePositionsError as gC, type PrepareMergePositionsRequest as gD, PreparePerpsDepositError as gE, PrepareRedeemComboPositionError as gF, type PrepareRedeemComboPositionRequest as gG, type PrepareRedeemMarketPositionsByConditionIdRequest as gH, type PrepareRedeemMarketPositionsByMarketIdRequest as gI, PrepareRedeemMarketPositionsError as gJ, type PrepareRedeemMarketPositionsRequest as gK, type PrepareRedeemPositionRequest as gL, PrepareRedeemPositionsError as gM, type PrepareRedeemPositionsRequest as gN, PrepareSplitComboPositionError as gO, type PrepareSplitComboPositionRequest as gP, PrepareSplitMarketPositionError as gQ, type PrepareSplitMarketPositionRequest as gR, PrepareSplitPositionError as gS, type PrepareSplitPositionRequest as gT, PrepareTradingApprovalsError as gU, type PublicRealtimeEvent as gV, type PublicRealtimeTopic as gW, type PublicSubscriptionSpec as gX, type RedeemPositionsWorkflow as gY, type RedeemPositionsWorkflowRequest as gZ, ResolveConditionByTokenError as g_, type PerpsBookSubscription as ga, type PerpsCandlesSubscription as gb, type PerpsDepositWorkflow as gc, type PerpsDepositWorkflowRequest as gd, type PerpsMarketDataEventType as ge, type PerpsMarketDataSubscription as gf, type PerpsStatisticsSubscription as gg, type PerpsStreamingCandleInterval as gh, type PerpsTickersSubscription as gi, type PerpsTradesSubscription as gj, type PostOrdersRequest as gk, PrepareCollateralReturnExecutionError as gl, PrepareErc1155ApprovalForAllError as gm, type PrepareErc1155ApprovalForAllRequest as gn, PrepareErc20ApprovalError as go, type PrepareErc20ApprovalRequest as gp, PrepareErc20TransferError as gq, type PrepareErc20TransferRequest as gr, PrepareGaslessTransactionError as gs, type PrepareGaslessTransactionRequest as gt, type PrepareLimitOrderRequest as gu, type PrepareMarketBuyOrderRequest as gv, type PrepareMarketOrderRequest as gw, type PrepareMarketSellOrderRequest as gx, PrepareMergeComboPositionError as gy, type PrepareMergeComboPositionRequest as gz, ApproveErc1155ForAllError as h, fetchPerpsTicker as h$, type RfqConfirmationRejectedErrorOptions as h0, type RfqExecutionUpdateEvent as h1, type SearchRequest as h2, type SearchResults as h3, type SecureRealtimeEvent as h4, type SecureRealtimeTopic as h5, type SecureSubscriptionSpec as h6, SplitComboPositionError as h7, SplitMarketPositionError as h8, type SplitPositionWorkflow as h9, fetchBuilderFeeRates as hA, fetchBuilderVolume as hB, fetchClosedOnlyMode as hC, fetchCommentsById as hD, fetchEvent as hE, fetchEventLiveVolume as hF, fetchEventTags as hG, fetchExecuteParams as hH, fetchLastTradePrice as hI, fetchLastTradePrices as hJ, fetchMarket as hK, fetchMarketInfo as hL, fetchMarketTags as hM, fetchMidpoint as hN, fetchMidpoints as hO, fetchNegRisk as hP, fetchNotifications as hQ, fetchOpenInterest as hR, fetchOrder as hS, fetchOrderBook as hT, fetchOrderBooks as hU, fetchOrderScoring as hV, fetchOrdersScoring as hW, fetchPerpsBook as hX, fetchPerpsBuilderStatus as hY, fetchPerpsFees as hZ, fetchPerpsInstruments as h_, type SplitPositionWorkflowRequest as ha, type SportsEventType as hb, type SportsSubscription as hc, type TradingApprovalsWorkflow as hd, type TradingApprovalsWorkflowRequest as he, UpdateBalanceAllowanceError as hf, type UpdateBalanceAllowanceRequest as hg, type UserEventType as hh, type UserSubscription as hi, WaitForGaslessTransactionError as hj, type WaitForOrderFillSettlementRequest as hk, acceptComboQuote as hl, approveErc1155ForAll as hm, approveErc20 as hn, authorizeSessionKey as ho, cancelAll as hp, cancelMarketOrders as hq, cancelOrder as hr, cancelOrders as hs, deployDepositWallet as ht, depositToPerps as hu, downloadAccountingSnapshot as hv, dropNotifications as hw, estimateMarketPrice as hx, executeCollateralReturnPlan as hy, fetchBalanceAllowance as hz, ApproveErc20Error as i, prepareCollateralReturnExecution as i$, fetchPerpsTickers as i0, fetchPortfolioValue as i1, fetchPrice as i2, fetchPrices as i3, fetchPublicProfile as i4, fetchRelatedTagResources as i5, fetchRelatedTags as i6, fetchResolutions as i7, fetchRewardPercentages as i8, fetchRfqStatus as i9, listCurrentRewards as iA, listEvents as iB, listMarketClarifications as iC, listMarketHolders as iD, listMarketRewards as iE, listMarkets as iF, listOpenOrders as iG, listPerpsCandles as iH, listPerpsFundingHistory as iI, listPerpsTrades as iJ, listPositions as iK, listPriceHistory as iL, listSeries as iM, listTags as iN, listTeams as iO, listTraderLeaderboard as iP, listTrades as iQ, listUserEarningsAndMarketsConfig as iR, listUserEarningsForDay as iS, mergeComboPosition as iT, mergeMarketPosition as iU, mergePositions as iV, openPerpsSession as iW, openRfqSession as iX, planCollateralReturn as iY, postOrder as iZ, postOrders as i_, fetchSeries as ia, fetchSessionKeys as ib, fetchSpread as ic, fetchSpreads as id, fetchTag as ie, fetchTickSize as ig, fetchTotalEarningsForUserForDay as ih, fetchTraderLeaderboardStanding as ii, fetchTradingApprovalsState as ij, fetchTransaction as ik, fetchUserPnl as il, fetchUserStats as im, fetchUserVolume as io, isWalletDeployed as ip, listAccountTrades as iq, listActivity as ir, listBiggestWinners as is, listBuilderLeaderboard as it, listBuilderTrades as iu, listComboActivity as iv, listComboMarkets as iw, listComboPositions as ix, listComments as iy, listCommentsByUserAddress as iz, ApprovePerpsBuilderFeeError as j, prepareErc1155ApprovalForAll as j0, prepareErc20Approval as j1, prepareErc20Transfer as j2, prepareGaslessTransaction as j3, prepareMergeComboPosition as j4, prepareMergeMarketPosition as j5, prepareMergePositions as j6, preparePerpsDeposit as j7, prepareRedeemComboPosition as j8, prepareRedeemMarketPositions as j9, prepareRedeemPosition as ja, prepareRedeemPositions as jb, prepareSplitComboPosition as jc, prepareSplitMarketPosition as jd, prepareSplitPosition as je, prepareTradingApprovals as jf, redeemPositions as jg, requestComboQuote as jh, resolveConditionByToken as ji, revokePerpsCredentials as jj, revokeSessionKey as jk, search as jl, setupTradingApprovals as jm, splitComboPosition as jn, splitMarketPosition as jo, splitPosition as jp, subscribe as jq, transferErc20 as jr, transferPerpsCollateral as js, updateBalanceAllowance as jt, waitForComboFill as ju, waitForOrderFillSettlement as jv, withdrawFromPerps as jw, type ApprovePerpsBuilderFeeRequest as k, ArmPerpsAutoCancelError as l, type ArmPerpsAutoCancelRequest as m, AuthorizeSessionKeyError as n, type AuthorizeSessionKeyRequest as o, type AuthorizeSessionKeyResult as p, AutoCancelDailyLimitError as q, BasePublicClient as r, BaseSecureClient as s, type BeginAuthenticationRequest as t, type CancelAllPerpsOrdersRequest as u, CancelMarketOrdersError as v, CancelOrderError as w, CancelOrdersError as x, type CancelPerpsOrderRequest as y, type CancelPerpsOrdersRequest as z };
|
|
12063
|
+
export { CreatePerpsTwapError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type CancelPerpsChaseRequest as D, type CancelPerpsOrderRequest as E, type CancelPerpsOrdersRequest as F, CancelPerpsTwapError as G, type CancelPerpsTwapRequest as H, CancelledSigningError as I, type Client as J, type ClientActions as K, type ClientDecorator as L, type ClobEndpoints as M, type ComboPositionStatusFilter as N, type ComboQuote as O, type CombosEndpoints as P, type CommentsSubscription as Q, ConnectionLostError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type ConnectionLostErrorOptions as V, ConvertError as W, type ConvertWorkflow as X, CreatePerpsChaseError as Y, type CreatePerpsChaseRequest as Z, type CreatePerpsSessionRequest as _, type TypedData as a, FetchPerpsRegistrationError as a$, type CreatePerpsTwapRequest as a0, CreateSecureClientError as a1, type CryptoPriceSubscription as a2, type CryptoPricesChainlinkTwapSubscription as a3, type CryptoPricesSubscription as a4, type CryptoTwapPriceSubscription as a5, type DataActions as a6, DepositToPerpsError as a7, type DepositToPerpsRequest as a8, type DisarmPerpsAutoCancelRequest as a9, FetchMarketTagsError as aA, FetchMidpointError as aB, FetchMidpointsError as aC, FetchNotificationsError as aD, FetchOpenInterestError 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, FetchPerpsBuilderApprovalsError as aN, type FetchPerpsBuilderApprovalsRequest as aO, FetchPerpsBuilderEarningsSummaryError as aP, type FetchPerpsBuilderEarningsSummaryRequest as aQ, FetchPerpsBuilderStatusError as aR, type FetchPerpsBuilderStatusRequest as aS, FetchPerpsChasesError as aT, FetchPerpsFeesError as aU, FetchPerpsInstrumentsError as aV, type FetchPerpsInstrumentsRequest as aW, type FetchPerpsOpenOrdersRequest as aX, type FetchPerpsOrdersRequest as aY, FetchPerpsPositionSnapshotsError as aZ, type FetchPerpsPositionSnapshotsRequest as a_, type DiscoveryActions as aa, DownloadAccountingSnapshotError as ab, DropNotificationsError as ac, type EnvironmentConfig as ad, type EnvironmentConfigFork as ae, type EnvironmentContracts as af, type EquityPriceSubscription as ag, type EquityPricesSubscription as ah, type EquityTwapPriceSubscription as ai, type Erc1155TradingApproval as aj, type Erc20TradingApproval as ak, EstimateMarketPriceError as al, ExecuteCollateralReturnPlanError as am, type ExecuteCollateralReturnPlanRequest as an, type Fetch as ao, FetchBuilderVolumeError as ap, FetchClosedOnlyModeError as aq, FetchCommentsByIdError as ar, FetchCurrentRebatesError as as, type FetchCurrentRebatesRequest as at, FetchEventError as au, FetchEventLiveVolumeError as av, FetchEventTagsError as aw, FetchLastTradePriceError as ax, FetchLastTradePricesError as ay, FetchMarketError as az, type TransactionCall as b, type ListPerpsPnlHistoryRequest as b$, type FetchPerpsRegistrationRequest as b0, FetchPerpsTickerError as b1, type FetchPerpsTickerRequest as b2, FetchPerpsTickersError as b3, type FetchPerpsTickersRequest as b4, FetchPerpsTwapsError as b5, FetchPortfolioValueError as b6, FetchPriceError as b7, FetchPricesError as b8, FetchPublicProfileError as b9, ListActivityError as bA, ListBiggestWinnersError as bB, ListBuilderLeaderboardError as bC, ListBuilderTradesError as bD, ListComboActivityError as bE, ListComboMarketsError as bF, ListComboPositionsError as bG, ListCommentsByUserAddressError as bH, ListCommentsError as bI, ListCurrentRewardsError as bJ, ListEventsError as bK, ListMarketHoldersError as bL, ListMarketRewardsError as bM, ListMarketsError as bN, ListOpenOrdersError as bO, ListPerpsBuilderEarningsError as bP, type ListPerpsBuilderEarningsRequest as bQ, ListPerpsCandlesError as bR, type ListPerpsCandlesRequest as bS, type ListPerpsDepositsRequest as bT, type ListPerpsEquityHistoryRequest as bU, type ListPerpsFillsRequest as bV, ListPerpsFundingHistoryError as bW, type ListPerpsFundingHistoryRequest as bX, type ListPerpsFundingPaymentsRequest as bY, type ListPerpsInternalTransfersRequest as bZ, type ListPerpsNotificationsRequest as b_, FetchRelatedTagResourcesError as ba, FetchRelatedTagsError as bb, FetchResolutionsError as bc, FetchRewardPercentagesError as bd, FetchRfqStatusError as be, type FetchRfqStatusParams as bf, FetchSeriesError as bg, FetchSessionKeysError as bh, FetchSpreadError as bi, FetchSpreadsError as bj, FetchTagError as bk, FetchTokenReferencesError as bl, type FetchTokenReferencesRequest as bm, FetchTotalEarningsForUserForDayError as bn, FetchTraderLeaderboardStandingError as bo, FetchTradingApprovalsStateError as bp, type FetchTradingApprovalsStateRequest as bq, FetchUserPnlError as br, FetchUserStatsError as bs, FetchUserVolumeError as bt, HorizontalMergeError as bu, type HorizontalMergeWorkflow as bv, HorizontalSplitError as bw, type HorizontalSplitWorkflow as bx, InsufficientLiquidityError as by, ListAccountTradesError as bz, ServiceClient as c, type PostPerpsOrdersRequest as c$, ListPerpsTradesError as c0, type ListPerpsTradesRequest as c1, type ListPerpsWithdrawalsRequest as c2, ListPositionsError as c3, ListPriceHistoryError as c4, ListRewardMarketsError as c5, type ListRewardMarketsRequest as c6, ListSeriesError as c7, ListTagsError as c8, ListTeamsError as c9, type PerpsEndpoints as cA, type PerpsOrderRequest as cB, type PerpsPlaceFokOrderRequest as cC, type PerpsPlaceGtcOrderRequest as cD, type PerpsPlaceGtdOrderRequest as cE, type PerpsPlaceIocOrderRequest as cF, type PerpsPlacedTpSlOrder as cG, type PerpsPlacedTpSlOrders as cH, type PerpsPositionSnapshotFill as cI, type PerpsPositionSnapshotSelection as cJ, type PerpsPositionTpSlTrigger as cK, type PerpsPositionTrailingStop as cL, PerpsSession as cM, type PerpsSessionAccountError as cN, type PerpsSessionLifecycleError as cO, type PerpsSessionTradingError as cP, type PerpsTpSlTrigger as cQ, type PerpsTrailingStop as cR, type PlacePerpsOrderRequest as cS, type PlacePerpsOrderResult as cT, type PlacePerpsOrderWithTpSlRequest as cU, type PlacePerpsOrderWithTpSlResult as cV, type PlacePerpsPositionTpSlRequest as cW, type PlacePerpsPositionTpSlResult as cX, PlanCollateralReturnError as cY, PostOrderError as cZ, PostOrdersError as c_, ListTraderLeaderboardError as ca, ListTradesError as cb, ListUserEarningsAndMarketsConfigError as cc, ListUserEarningsForDayError as cd, type MarkPerpsNotificationsReadRequest as ce, MergePositionsError as cf, type NegRiskWorkflow as cg, OpenPerpsSessionError as ch, type OpenPerpsSessionRequest as ci, OpenRfqSessionError as cj, OperationAbortedError as ck, OrderHeartbeatMismatchError as cl, type OrderSignature as cm, type Page as cn, PageSizeSchema as co, type Paginated as cp, PaginationLimitError as cq, PausePerpsTwapError as cr, type PausePerpsTwapRequest as cs, type PerpsActions as ct, type PerpsBookDepth as cu, type PerpsBuilderTermsInput as cv, type PerpsCancelOptions as cw, PerpsCancelRetryError as cx, type PerpsCancelRetryErrorOptions as cy, type PerpsCancelRetryOptions as cz, AcceptComboQuoteError as d, type SecureActions as d$, PrepareConvertError as d0, type PrepareConvertRequest as d1, PrepareHorizontalMergeError as d2, type PrepareHorizontalMergeRequest as d3, PrepareHorizontalSplitError as d4, type PrepareHorizontalSplitRequest as d5, type PriceSubscription as d6, type PriceSubscriptionConfirmation as d7, type PublicAccountActions as d8, type PublicActions as d9, type RevokePerpsCredentialsRequest as dA, RevokeSessionKeyError as dB, type RevokeSessionKeyRequest as dC, type RfqCancelQuoteAck as dD, RfqCancelQuoteError as dE, RfqCancelQuoteRejectedError as dF, type RfqCancelQuoteRejectedErrorOptions as dG, type RfqConfirmationAck as dH, RfqConfirmationError as dI, RfqConfirmationRejectedError as dJ, type RfqConfirmationRequestEvent as dK, type RfqEvent as dL, RfqQuoteError as dM, type RfqQuoteReference as dN, RfqQuoteRejectedError as dO, type RfqQuoteRejectedErrorOptions as dP, type RfqQuoteRequestEvent as dQ, type RfqQuoteResponse as dR, type RfqQuoteSource as dS, RfqRequestRejectedError as dT, type RfqRequestRejectedErrorOptions as dU, type RfqSession as dV, type RfqStatusResult as dW, type RfqTradeEvent as dX, SearchError as dY, SearchSort as dZ, type SecureAccountActions as d_, type PublicClient as da, type PublicClientOptions as db, type PublicPerpsActions as dc, type PublicRewardsActions as dd, type PublicSubscriptionsActions as de, type PublicWalletActions as df, type RateLimitBucket as dg, RateLimitError as dh, type RateLimitErrorOptions as di, type RateLimitUpdate as dj, type RateLimitUpdateListener as dk, RedeemPositionsError as dl, RequestAbortedError as dm, RequestComboQuoteError as dn, type RequestComboQuoteParams as dp, type RequestComboQuoteResult as dq, type RequestOptions as dr, RequestRejectedError as ds, type RequestRejectedErrorOptions as dt, type RestEndpoint as du, type ResumePerpsSessionRequest as dv, ResumePerpsTwapError as dw, type ResumePerpsTwapRequest as dx, RevokePerpsBuilderFeeError as dy, RevokePerpsCredentialsError as dz, type AcceptComboQuoteParams as e, WaitForComboFillError as e$, type SecureClient as e0, type SecureClientOptions as e1, type SecureDownloadAccountingSnapshotRequest as e2, type SecureFetchPortfolioValueRequest as e3, type SecureFetchTraderLeaderboardStandingRequest as e4, type SecureFetchUserPnlRequest as e5, type SecureFetchUserStatsRequest as e6, type SecureFetchUserVolumeRequest as e7, type SecureListActivityRequest as e8, type SecureListComboActivityRequest as e9, type SignedOrder as eA, type SignerTransactionRequest as eB, SignerType as eC, SigningError as eD, SplitPositionError as eE, SubscribeError as eF, type SubscriptionHandle as eG, TimeoutError as eH, type TradingApprovalRequirements as eI, type TradingApprovalsState as eJ, TradingRestriction as eK, TransactionFailedError as eL, type TransactionHandle as eM, type TransactionOutcome as eN, TransferErc20Error as eO, TransferPerpsCollateralError as eP, type TransferPerpsCollateralRequest as eQ, TransportError as eR, type TypedDataDomain as eS, type TypedDataField as eT, UnexpectedResponseError as eU, UpdatePerpsLeverageError as eV, type UpdatePerpsLeverageRequest as eW, UpdatePerpsLeveragesError as eX, type UpdatePerpsLeveragesRequest as eY, UpdatePerpsMarginError as eZ, type UpdatePerpsMarginRequest as e_, type SecureListComboPositionsRequest as ea, type SecureListPositionsRequest as eb, type SecurePerpsActions as ec, type SecureRewardsActions as ed, type SecureRfqActions as ee, type SecureSubscriptionsActions as ef, type SecureTradingActions as eg, type SecureWalletActions as eh, SendOrderHeartbeatError as ei, type SendOrderHeartbeatRequest as ej, type ServiceClientDeleteOptions as ek, type ServiceClientGetOptions as el, type ServiceClientJsonResponseOptions as em, type ServiceClientNonJsonResponseOptions as en, type ServiceClientNonJsonResponseType as eo, type ServiceClientPatchOptions as ep, type ServiceClientPostOptions as eq, ServiceClientRequestError as er, type ServiceClientRequestOptions as es, type ServiceClientResponse as et, type ServiceClientResponseOptions as eu, type ServiceClientResponseType as ev, type SessionKey as ew, type SessionKeyActions as ex, SetupGaslessWalletError as ey, SetupTradingApprovalsError as ez, type AcceptComboQuoteResult as f, FetchMarketInfoError as f$, type WaitForComboFillParams as f0, type WaitForComboFillResult as f1, WaitForOrderFillSettlementError as f2, WaitForTransactionError as f3, type WalletDerivationConfig as f4, type WebSocketCloseCode as f5, type WebSocketEndpoint as f6, WebSocketKnownCloseCode as f7, WithdrawFromPerpsError as f8, type WithdrawFromPerpsRequest as f9, type EquityPricesEventType as fA, type Erc1155ApprovalForAllWorkflow as fB, type Erc1155ApprovalForAllWorkflowRequest as fC, type Erc20ApprovalWorkflow as fD, type Erc20ApprovalWorkflowRequest as fE, type Erc20TransferWorkflow as fF, type Erc20TransferWorkflowRequest as fG, type EstimateMarketBuyPriceRequest as fH, type EstimateMarketPriceRequest as fI, type EstimateMarketSellPriceRequest as fJ, type EventForSubscriptionSpec as fK, type EventForSubscriptionSpecs as fL, FetchBalanceAllowanceError as fM, type FetchBalanceAllowanceRequest as fN, FetchBuilderFeeRatesError as fO, type FetchBuilderFeeRatesRequest as fP, type FetchBuilderVolumeRequest as fQ, type FetchCommentsByIdRequest as fR, type FetchEventLiveVolumeRequest as fS, type FetchEventRequest as fT, type FetchEventTagsRequest as fU, FetchExecuteParamsError as fV, type FetchExecuteParamsRequest as fW, FetchGaslessTransactionError as fX, type FetchGaslessTransactionRequest as fY, type FetchLastTradePriceRequest as fZ, type FetchLastTradePricesRequest as f_, accountActions as fa, allActions as fb, analyticsActions as fc, createPublicClient as fd, createSecureClient as fe, dataActions as ff, discoveryActions as fg, forkEnvironmentConfig as fh, makeErrorGuard as fi, perpsActions as fj, production as fk, rewardsActions as fl, rfqActions as fm, sessionKeyActions as fn, subscriptionsActions as fo, tradingActions as fp, walletActions as fq, type CancelMarketOrdersRequest as fr, type CancelOrderRequest as fs, type CancelOrdersRequest as ft, type CollateralReturnExecutionWorkflow as fu, type CommentsEventType as fv, type CryptoPricesEventType as fw, DeployDepositWalletError as fx, type DownloadAccountingSnapshotRequest as fy, type DropNotificationsRequest as fz, type AccountIdentity as g, type ListTradesRequest as g$, type FetchMarketInfoRequest as g0, type FetchMarketRequest as g1, type FetchMarketTagsRequest as g2, type FetchMidpointRequest as g3, type FetchMidpointsRequest as g4, FetchNegRiskError as g5, type FetchNegRiskRequest as g6, type FetchOpenInterestRequest as g7, type FetchOrderBookRequest as g8, type FetchOrderBooksRequest as g9, type GaslessWorkflowRequest as gA, IsWalletDeployedError as gB, type IsWalletDeployedRequest as gC, type ListAccountTradesRequest as gD, type ListActivityRequest as gE, type ListBiggestWinnersRequest as gF, type ListBuilderLeaderboardRequest as gG, type ListBuilderTradesRequest as gH, type ListComboActivityRequest as gI, type ListComboMarketsRequest as gJ, type ListComboPositionsRequest as gK, type ListCommentsByUserAddressRequest as gL, type ListCommentsRequest as gM, type ListCurrentRewardsRequest as gN, type ListEventsRequest as gO, ListMarketClarificationsError as gP, type ListMarketClarificationsRequest as gQ, type ListMarketHoldersRequest as gR, type ListMarketRewardsRequest as gS, type ListMarketsRequest as gT, type ListOpenOrdersRequest as gU, type ListPositionsRequest as gV, type ListPriceHistoryRequest as gW, type ListSeriesRequest as gX, type ListTagsRequest as gY, type ListTeamsRequest as gZ, type ListTraderLeaderboardRequest as g_, type FetchOrderRequest as ga, type FetchOrderScoringRequest as gb, type FetchOrdersScoringRequest as gc, type FetchPortfolioValueRequest as gd, type FetchPriceRequest as ge, type FetchPricesRequest as gf, type FetchPublicProfileRequest as gg, type FetchRelatedTagResourcesRequest as gh, type FetchRelatedTagsRequest as gi, type FetchResolutionsByConditionRequest as gj, type FetchResolutionsByEventRequest as gk, type FetchResolutionsByQuestionRequest as gl, type FetchResolutionsRequest as gm, type FetchSeriesRequest as gn, type FetchSpreadRequest as go, type FetchSpreadsRequest as gp, type FetchTagRequest as gq, FetchTickSizeError as gr, type FetchTickSizeRequest as gs, type FetchTotalEarningsForUserForDayRequest as gt, type FetchTraderLeaderboardStandingRequest as gu, type FetchUserPnlRequest as gv, type FetchUserStatsRequest as gw, type FetchUserVolumeRequest as gx, GaslessTransactionMetadataSchema as gy, type GaslessWorkflow as gz, type AnalyticsActions as h, type RedeemPositionsWorkflowRequest as h$, type ListUserEarningsAndMarketsConfigRequest as h0, type ListUserEarningsForDayRequest as h1, type MarketEventType as h2, type MarketSubscription as h3, MergeComboPositionError as h4, MergeMarketPositionError as h5, type MergePositionsWorkflow as h6, type MergePositionsWorkflowRequest as h7, type OrderPostingWorkflow as h8, type OrderWorkflow as h9, PrepareMergeComboPositionError as hA, type PrepareMergeComboPositionRequest as hB, PrepareMergeMarketPositionError as hC, type PrepareMergeMarketPositionRequest as hD, PrepareMergePositionsError as hE, type PrepareMergePositionsRequest as hF, PreparePerpsDepositError as hG, PrepareRedeemComboPositionError as hH, type PrepareRedeemComboPositionRequest as hI, type PrepareRedeemMarketPositionsByConditionIdRequest as hJ, type PrepareRedeemMarketPositionsByMarketIdRequest as hK, PrepareRedeemMarketPositionsError as hL, type PrepareRedeemMarketPositionsRequest as hM, type PrepareRedeemPositionRequest as hN, PrepareRedeemPositionsError as hO, type PrepareRedeemPositionsRequest as hP, PrepareSplitComboPositionError as hQ, type PrepareSplitComboPositionRequest as hR, PrepareSplitMarketPositionError as hS, type PrepareSplitMarketPositionRequest as hT, PrepareSplitPositionError as hU, type PrepareSplitPositionRequest as hV, PrepareTradingApprovalsError as hW, type PublicRealtimeEvent as hX, type PublicRealtimeTopic as hY, type PublicSubscriptionSpec as hZ, type RedeemPositionsWorkflow as h_, type OrderWorkflowRequest as ha, type PerpsBboSubscription as hb, type PerpsBookSubscription as hc, type PerpsCandlesSubscription as hd, type PerpsDepositWorkflow as he, type PerpsDepositWorkflowRequest as hf, type PerpsMarketDataEventType as hg, type PerpsMarketDataSubscription as hh, type PerpsStatisticsSubscription as hi, type PerpsStreamingCandleInterval as hj, type PerpsTickersSubscription as hk, type PerpsTradesSubscription as hl, type PostOrdersRequest as hm, PrepareCollateralReturnExecutionError as hn, PrepareErc1155ApprovalForAllError as ho, type PrepareErc1155ApprovalForAllRequest as hp, PrepareErc20ApprovalError as hq, type PrepareErc20ApprovalRequest as hr, PrepareErc20TransferError as hs, type PrepareErc20TransferRequest as ht, PrepareGaslessTransactionError as hu, type PrepareGaslessTransactionRequest as hv, type PrepareLimitOrderRequest as hw, type PrepareMarketBuyOrderRequest as hx, type PrepareMarketOrderRequest as hy, type PrepareMarketSellOrderRequest as hz, ApproveErc1155ForAllError as i, fetchOrderScoring as i$, ResolveConditionByTokenError as i0, type ResolveConditionByTokenRequest as i1, type RfqConfirmationRejectedErrorOptions as i2, type RfqExecutionUpdateEvent as i3, type SearchRequest as i4, type SearchResults as i5, type SecureRealtimeEvent as i6, type SecureRealtimeTopic as i7, type SecureSubscriptionSpec as i8, SplitComboPositionError as i9, downloadAccountingSnapshot as iA, dropNotifications as iB, estimateMarketPrice as iC, executeCollateralReturnPlan as iD, fetchBalanceAllowance as iE, fetchBuilderFeeRates as iF, fetchBuilderVolume as iG, fetchClosedOnlyMode as iH, fetchCommentsById as iI, fetchCurrentRebates as iJ, fetchEvent as iK, fetchEventLiveVolume as iL, fetchEventTags as iM, fetchExecuteParams as iN, fetchLastTradePrice as iO, fetchLastTradePrices as iP, fetchMarket as iQ, fetchMarketInfo as iR, fetchMarketTags as iS, fetchMidpoint as iT, fetchMidpoints as iU, fetchNegRisk as iV, fetchNotifications as iW, fetchOpenInterest as iX, fetchOrder as iY, fetchOrderBook as iZ, fetchOrderBooks as i_, SplitMarketPositionError as ia, type SplitPositionWorkflow as ib, type SplitPositionWorkflowRequest as ic, type SportsEventType as id, type SportsSubscription as ie, type TradingApprovalsWorkflow as ig, type TradingApprovalsWorkflowRequest as ih, UpdateBalanceAllowanceError as ii, type UpdateBalanceAllowanceRequest as ij, type UserEventType as ik, type UserSubscription as il, WaitForGaslessTransactionError as im, type WaitForOrderFillSettlementRequest as io, acceptComboQuote as ip, approveErc1155ForAll as iq, approveErc20 as ir, authorizeSessionKey as is, cancelAll as it, cancelMarketOrders as iu, cancelOrder as iv, cancelOrders as iw, convert as ix, deployDepositWallet as iy, depositToPerps as iz, ApproveErc20Error as j, listUserEarningsAndMarketsConfig as j$, fetchOrdersScoring as j0, fetchPerpsBook as j1, fetchPerpsBuilderStatus as j2, fetchPerpsFees as j3, fetchPerpsInstruments as j4, fetchPerpsPositionSnapshots as j5, fetchPerpsRegistration as j6, fetchPerpsTicker as j7, fetchPerpsTickers as j8, fetchPortfolioValue as j9, listActivity as jA, listBiggestWinners as jB, listBuilderLeaderboard as jC, listBuilderTrades as jD, listComboActivity as jE, listComboMarkets as jF, listComboPositions as jG, listComments as jH, listCommentsByUserAddress as jI, listCurrentRewards as jJ, listEvents as jK, listMarketClarifications as jL, listMarketHolders as jM, listMarketRewards as jN, listMarkets as jO, listOpenOrders as jP, listPerpsCandles as jQ, listPerpsFundingHistory as jR, listPerpsTrades as jS, listPositions as jT, listPriceHistory as jU, listRewardMarkets as jV, listSeries as jW, listTags as jX, listTeams as jY, listTraderLeaderboard as jZ, listTrades as j_, fetchPrice as ja, fetchPrices as jb, fetchPublicProfile as jc, fetchRelatedTagResources as jd, fetchRelatedTags as je, fetchResolutions as jf, fetchRewardPercentages as jg, fetchRfqStatus as jh, fetchSeries as ji, fetchSessionKeys as jj, fetchSpread as jk, fetchSpreads as jl, fetchTag as jm, fetchTickSize as jn, fetchTokenReferences as jo, fetchTotalEarningsForUserForDay as jp, fetchTraderLeaderboardStanding as jq, fetchTradingApprovalsState as jr, fetchTransaction as js, fetchUserPnl as jt, fetchUserStats as ju, fetchUserVolume as jv, horizontalMerge as jw, horizontalSplit as jx, isWalletDeployed as jy, listAccountTrades as jz, ApprovePerpsBuilderFeeError as k, listUserEarningsForDay as k0, mergeComboPosition as k1, mergeMarketPosition as k2, mergePositions as k3, openPerpsSession as k4, openRfqSession as k5, planCollateralReturn as k6, postOrder as k7, postOrders as k8, prepareCollateralReturnExecution as k9, setupTradingApprovals as kA, splitComboPosition as kB, splitMarketPosition as kC, splitPosition as kD, subscribe as kE, transferErc20 as kF, transferPerpsCollateral as kG, updateBalanceAllowance as kH, waitForComboFill as kI, waitForOrderFillSettlement as kJ, withdrawFromPerps as kK, prepareConvert as ka, prepareErc1155ApprovalForAll as kb, prepareErc20Approval as kc, prepareErc20Transfer as kd, prepareGaslessTransaction as ke, prepareHorizontalMerge as kf, prepareHorizontalSplit as kg, prepareMergeComboPosition as kh, prepareMergeMarketPosition as ki, prepareMergePositions as kj, preparePerpsDeposit as kk, prepareRedeemComboPosition as kl, prepareRedeemMarketPositions as km, prepareRedeemPosition as kn, prepareRedeemPositions as ko, prepareSplitComboPosition as kp, prepareSplitMarketPosition as kq, prepareSplitPosition as kr, prepareTradingApprovals as ks, redeemPositions as kt, requestComboQuote as ku, resolveConditionByToken as kv, revokePerpsCredentials as kw, revokeSessionKey as kx, search as ky, sendOrderHeartbeat as kz, type ApprovePerpsBuilderFeeRequest as l, ArmPerpsAutoCancelError as m, type ArmPerpsAutoCancelRequest as n, AuthorizeSessionKeyError as o, type AuthorizeSessionKeyRequest as p, type AuthorizeSessionKeyResult as q, AutoCancelDailyLimitError as r, BasePublicClient as s, BaseSecureClient as t, type BeginAuthenticationRequest as u, type CancelAllPerpsOrdersRequest as v, CancelMarketOrdersError as w, CancelOrderError as x, CancelOrdersError as y, CancelPerpsChaseError as z };
|