@polymarket/client 0.1.0-beta.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/actions/index.d.ts +14 -14
- package/dist/actions/index.js +1 -1
- package/dist/chunk-3GYPYD7Z.js +2 -0
- package/dist/chunk-3GYPYD7Z.js.map +1 -0
- package/dist/chunk-TYJAXA3Y.js +6 -0
- package/dist/chunk-TYJAXA3Y.js.map +1 -0
- package/dist/chunk-Z6CZB4WP.js +2 -0
- package/dist/chunk-Z6CZB4WP.js.map +1 -0
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/ethers-v5.js +1 -1
- package/dist/index.d.ts +15 -7
- 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-_kLx9-gD.d.ts → sports-Dm3yiYAe.d.ts} +13 -13
- package/dist/{types-5uGoLhNm.d.ts → types-CgIv7KE4.d.ts} +1782 -782
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-E2CLUN5M.js +0 -6
- package/dist/chunk-E2CLUN5M.js.map +0 -1
- package/dist/chunk-GZWA532J.js +0 -2
- package/dist/chunk-GZWA532J.js.map +0 -1
- package/dist/chunk-NTEPEJZK.js +0 -2
- package/dist/chunk-NTEPEJZK.js.map +0 -1
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
|
-
import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { WalletType, Event, TagReference, Market, Series, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
2
|
+
import { PaginationCursor, DecimalString, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue, PositionId, TransactionId } from '@polymarket/bindings';
|
|
3
|
+
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, TxHash } from '@polymarket/types';
|
|
4
|
+
import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
6
5
|
import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
|
|
7
6
|
import { ZodError, z } from 'zod';
|
|
8
7
|
import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
|
|
9
|
-
import { ClobTrade, NotificationsResponse, BuilderTrade, Prices, OrderBook, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
8
|
+
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForToken, PriceHistoryPoint, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, OpenOrder, ApiKeyCreds, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
10
9
|
import * as _polymarket_bindings_data from '@polymarket/bindings/data';
|
|
11
|
-
import { Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition,
|
|
10
|
+
import { Activity, ComboActivity, Trade, Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder } from '@polymarket/bindings/data';
|
|
12
11
|
import { ComboMarket, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId } from '@polymarket/bindings/rfq';
|
|
13
|
-
import
|
|
14
|
-
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsInstrumentId, PerpsDepositStatusSchema, PerpsWithdrawalStatusSchema, PerpsPnlIntervalSchema, PerpsTimeInForce, PerpsOrderId, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsOrderCommandAck, PerpsCommandAck, PerpsKlineInterval, PerpsInstrumentIdSchema } from '@polymarket/bindings/perps';
|
|
12
|
+
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsOrderId, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
15
13
|
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
16
14
|
import { Hex } from 'ox';
|
|
17
15
|
|
|
@@ -46,6 +44,48 @@ declare class TransportError extends PolymarketError {
|
|
|
46
44
|
constructor(message: string, options?: ErrorOptions);
|
|
47
45
|
static fromError(error: unknown): TransportError;
|
|
48
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* WebSocket close codes defined by RFC 6455 and the IANA WebSocket Close Code
|
|
49
|
+
* Number registry. Codes 4000-4999 are reserved for application use and are
|
|
50
|
+
* intentionally not modeled here.
|
|
51
|
+
*/
|
|
52
|
+
declare enum WebSocketKnownCloseCode {
|
|
53
|
+
NormalClosure = 1000,
|
|
54
|
+
GoingAway = 1001,
|
|
55
|
+
ProtocolError = 1002,
|
|
56
|
+
UnsupportedData = 1003,
|
|
57
|
+
/** Synthesized locally when the peer closed without a status code. */
|
|
58
|
+
NoStatusReceived = 1005,
|
|
59
|
+
/** Synthesized locally when the connection dropped without a close frame. */
|
|
60
|
+
AbnormalClosure = 1006,
|
|
61
|
+
InvalidFramePayload = 1007,
|
|
62
|
+
PolicyViolation = 1008,
|
|
63
|
+
MessageTooBig = 1009,
|
|
64
|
+
InternalError = 1011,
|
|
65
|
+
ServiceRestart = 1012,
|
|
66
|
+
TryAgainLater = 1013
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A WebSocket close code. Codes enumerated in
|
|
70
|
+
* {@link WebSocketKnownCloseCode} are defined by RFC 6455; other values, such
|
|
71
|
+
* as application-defined 4000-4999 codes, flow through as plain numbers.
|
|
72
|
+
*/
|
|
73
|
+
type WebSocketCloseCode = WebSocketKnownCloseCode | (number & {});
|
|
74
|
+
type ConnectionLostErrorOptions = {
|
|
75
|
+
/** WebSocket close code reported for the lost connection. */
|
|
76
|
+
code: WebSocketCloseCode;
|
|
77
|
+
/** Close reason provided by the peer. Empty when none was sent. */
|
|
78
|
+
reason: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Error thrown when a live connection ends without the SDK requesting it.
|
|
82
|
+
*/
|
|
83
|
+
declare class ConnectionLostError extends PolymarketError {
|
|
84
|
+
name: "ConnectionLostError";
|
|
85
|
+
readonly code: WebSocketCloseCode;
|
|
86
|
+
readonly reason: string;
|
|
87
|
+
constructor(message: string, options: ErrorOptions & ConnectionLostErrorOptions);
|
|
88
|
+
}
|
|
49
89
|
type RequestRejectedErrorOptions = {
|
|
50
90
|
status: number;
|
|
51
91
|
};
|
|
@@ -123,6 +163,9 @@ type SendErc20TransferTransactionRequest = {
|
|
|
123
163
|
kind: 'sendErc20TransferTransaction';
|
|
124
164
|
request: SignerTransactionRequest;
|
|
125
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
168
|
+
*/
|
|
126
169
|
type SendPerpsDepositTransactionRequest = {
|
|
127
170
|
kind: 'sendPerpsDepositTransaction';
|
|
128
171
|
request: SignerTransactionRequest;
|
|
@@ -159,7 +202,7 @@ declare const FetchExecuteParamsRequestSchema: z.ZodObject<{
|
|
|
159
202
|
type FetchExecuteParamsRequest = z.input<typeof FetchExecuteParamsRequestSchema>;
|
|
160
203
|
type FetchExecuteParamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
161
204
|
declare const FetchExecuteParamsError: {
|
|
162
|
-
isError(error: unknown): error is
|
|
205
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
163
206
|
};
|
|
164
207
|
/**
|
|
165
208
|
* Fetches the parameters needed to prepare a low-level transaction submission.
|
|
@@ -182,7 +225,7 @@ declare const IsWalletDeployedRequestSchema: z.ZodObject<{
|
|
|
182
225
|
type IsWalletDeployedRequest = z.input<typeof IsWalletDeployedRequestSchema>;
|
|
183
226
|
type IsWalletDeployedError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
184
227
|
declare const IsWalletDeployedError: {
|
|
185
|
-
isError(error: unknown): error is
|
|
228
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
186
229
|
};
|
|
187
230
|
/**
|
|
188
231
|
* Checks whether a wallet is deployed for relayer-backed transactions.
|
|
@@ -207,7 +250,7 @@ declare function isWalletDeployed(client: BaseClient, request?: IsWalletDeployed
|
|
|
207
250
|
declare const GaslessTransactionMetadataSchema: z.ZodString;
|
|
208
251
|
type DeployDepositWalletError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
209
252
|
declare const DeployDepositWalletError: {
|
|
210
|
-
isError(error: unknown): error is
|
|
253
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
211
254
|
};
|
|
212
255
|
/**
|
|
213
256
|
* Deploys a Deposit Wallet for the authenticated signer.
|
|
@@ -250,7 +293,7 @@ type GaslessWorkflowRequest = RequestAddressRequest | SignGaslessMessageRequest
|
|
|
250
293
|
type GaslessWorkflow = AsyncGenerator<GaslessWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
251
294
|
type PrepareGaslessTransactionError = ExecuteGaslessError | FetchExecuteParamsError | UserInputError;
|
|
252
295
|
declare const PrepareGaslessTransactionError: {
|
|
253
|
-
isError(error: unknown): error is
|
|
296
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
254
297
|
};
|
|
255
298
|
/**
|
|
256
299
|
* Starts preparing a low-level transaction workflow from one or more calls.
|
|
@@ -265,7 +308,7 @@ declare function prepareGaslessTransaction(client: BaseSecureClient, request: Pr
|
|
|
265
308
|
type ExecuteGaslessError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
266
309
|
type WaitForGaslessTransactionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | TimeoutError | TransactionFailedError;
|
|
267
310
|
declare const WaitForGaslessTransactionError: {
|
|
268
|
-
isError(error: unknown): error is
|
|
311
|
+
isError(error: unknown): error is TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
269
312
|
};
|
|
270
313
|
|
|
271
314
|
declare const PageSizeSchema: z.ZodNumber;
|
|
@@ -280,78 +323,211 @@ type Paginated<T> = AsyncIterable<Page<T>> & {
|
|
|
280
323
|
from(cursor?: PaginationCursor): Paginated<T>;
|
|
281
324
|
};
|
|
282
325
|
|
|
283
|
-
declare const
|
|
284
|
-
cursor: z.ZodOptional<z.
|
|
285
|
-
|
|
326
|
+
declare const ListTradesRequestSchema: z.ZodObject<{
|
|
327
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
328
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
329
|
+
takerOnly: z.ZodOptional<z.ZodBoolean>;
|
|
330
|
+
filterType: z.ZodOptional<z.ZodEnum<{
|
|
331
|
+
CASH: "CASH";
|
|
332
|
+
TOKENS: "TOKENS";
|
|
333
|
+
}>>;
|
|
334
|
+
filterAmount: z.ZodOptional<z.ZodNumber>;
|
|
286
335
|
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
336
|
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
337
|
+
user: z.ZodOptional<z.ZodString>;
|
|
338
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
BUY: "BUY";
|
|
340
|
+
SELL: "SELL";
|
|
341
|
+
}>>;
|
|
342
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
|
|
346
|
+
type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
347
|
+
declare const ListTradesError: {
|
|
348
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Lists trades for a wallet, market, or event.
|
|
352
|
+
*
|
|
353
|
+
* @remarks
|
|
354
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
355
|
+
*
|
|
356
|
+
* @throws {@link ListTradesError}
|
|
357
|
+
* Thrown on failure.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* Fetch the first page of results:
|
|
361
|
+
* ```ts
|
|
362
|
+
* const result = listTrades(client, {
|
|
363
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
364
|
+
* pageSize: 10,
|
|
365
|
+
* });
|
|
366
|
+
*
|
|
367
|
+
* const firstPage = await result.firstPage();
|
|
368
|
+
*
|
|
369
|
+
* // Optionally, fetch additional pages:
|
|
370
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
371
|
+
* // page.items: Trade[]
|
|
372
|
+
* }
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* Loop through all pages with `for await`:
|
|
377
|
+
* ```ts
|
|
378
|
+
* const result = listTrades(client, {
|
|
379
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
380
|
+
* pageSize: 10,
|
|
381
|
+
* });
|
|
382
|
+
*
|
|
383
|
+
* for await (const page of result) {
|
|
384
|
+
* // page.items: Trade[]
|
|
385
|
+
* }
|
|
386
|
+
* ```
|
|
387
|
+
*/
|
|
388
|
+
declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade[]>;
|
|
389
|
+
declare const ListActivityRequestSchema: z.ZodObject<{
|
|
390
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
291
391
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
392
|
+
user: z.ZodString;
|
|
393
|
+
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
394
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
395
|
+
type: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof _polymarket_bindings_data.ActivityType>>>;
|
|
396
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
397
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
292
398
|
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
293
|
-
|
|
294
|
-
INITIAL: "INITIAL";
|
|
399
|
+
CASH: "CASH";
|
|
295
400
|
TOKENS: "TOKENS";
|
|
296
|
-
|
|
297
|
-
PERCENTPNL: "PERCENTPNL";
|
|
298
|
-
TITLE: "TITLE";
|
|
299
|
-
RESOLVING: "RESOLVING";
|
|
300
|
-
PRICE: "PRICE";
|
|
301
|
-
AVGPRICE: "AVGPRICE";
|
|
401
|
+
TIMESTAMP: "TIMESTAMP";
|
|
302
402
|
}>>;
|
|
303
403
|
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
304
404
|
ASC: "ASC";
|
|
305
405
|
DESC: "DESC";
|
|
306
406
|
}>>;
|
|
307
|
-
|
|
407
|
+
side: z.ZodOptional<z.ZodEnum<{
|
|
408
|
+
BUY: "BUY";
|
|
409
|
+
SELL: "SELL";
|
|
410
|
+
}>>;
|
|
308
411
|
}, z.core.$strip>;
|
|
309
|
-
|
|
310
|
-
|
|
412
|
+
type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
|
|
413
|
+
type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
414
|
+
declare const ListActivityError: {
|
|
415
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Lists wallet activity.
|
|
419
|
+
*
|
|
420
|
+
* @remarks
|
|
421
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
422
|
+
*
|
|
423
|
+
* @throws {@link ListActivityError}
|
|
424
|
+
* Thrown on failure.
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* Fetch the first page of results:
|
|
428
|
+
* ```ts
|
|
429
|
+
* const result = listActivity(client, {
|
|
430
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
431
|
+
* pageSize: 10,
|
|
432
|
+
* });
|
|
433
|
+
*
|
|
434
|
+
* const firstPage = await result.firstPage();
|
|
435
|
+
*
|
|
436
|
+
* // Optionally, fetch additional pages:
|
|
437
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
438
|
+
* // page.items: Activity[]
|
|
439
|
+
* }
|
|
440
|
+
* ```
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* Loop through all pages with `for await`:
|
|
444
|
+
* ```ts
|
|
445
|
+
* const result = listActivity(client, {
|
|
446
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
447
|
+
* pageSize: 10,
|
|
448
|
+
* });
|
|
449
|
+
*
|
|
450
|
+
* for await (const page of result) {
|
|
451
|
+
* // page.items: Activity[]
|
|
452
|
+
* }
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
declare function listActivity(client: BaseClient, request: ListActivityRequest): Paginated<Activity[]>;
|
|
456
|
+
declare const ListComboActivityRequestSchema: z.ZodObject<{
|
|
457
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
458
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
459
|
+
user: z.ZodString;
|
|
460
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>]>>;
|
|
461
|
+
}, z.core.$strip>;
|
|
462
|
+
type ListComboActivityRequest = z.input<typeof ListComboActivityRequestSchema>;
|
|
463
|
+
type ListComboActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
464
|
+
declare const ListComboActivityError: {
|
|
465
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* Lists combo lifecycle activity for a wallet.
|
|
469
|
+
*
|
|
470
|
+
* @remarks
|
|
471
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
472
|
+
*
|
|
473
|
+
* @throws {@link ListComboActivityError}
|
|
474
|
+
* Thrown on failure.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* Fetch the first page of results:
|
|
478
|
+
* ```ts
|
|
479
|
+
* const result = listComboActivity(client, {
|
|
480
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
481
|
+
* pageSize: 10,
|
|
482
|
+
* });
|
|
483
|
+
*
|
|
484
|
+
* const firstPage = await result.firstPage();
|
|
485
|
+
*
|
|
486
|
+
* // Optionally, fetch additional pages:
|
|
487
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
488
|
+
* // page.items: ComboActivity[]
|
|
489
|
+
* }
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
declare function listComboActivity(client: BaseClient, request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
493
|
+
|
|
494
|
+
declare enum ComboPositionSort {
|
|
495
|
+
CurrentValueDesc = "current_value_desc",
|
|
496
|
+
FirstEntryDesc = "first_entry_desc",
|
|
497
|
+
EntryCostDesc = "entry_cost_desc",
|
|
498
|
+
ResolvedAtDesc = "resolved_at_desc",
|
|
499
|
+
UpdatedAsc = "updated_asc"
|
|
500
|
+
}
|
|
501
|
+
declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
502
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
311
503
|
user: z.ZodString;
|
|
312
504
|
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
|
-
title: z.ZodOptional<z.ZodString>;
|
|
314
505
|
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
506
|
+
sizeThreshold: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
redeemable: z.ZodOptional<z.ZodBoolean>;
|
|
508
|
+
mergeable: z.ZodOptional<z.ZodBoolean>;
|
|
315
509
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
316
510
|
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
511
|
+
TOKENS: "TOKENS";
|
|
512
|
+
CURRENT: "CURRENT";
|
|
513
|
+
INITIAL: "INITIAL";
|
|
514
|
+
CASHPNL: "CASHPNL";
|
|
515
|
+
PERCENTPNL: "PERCENTPNL";
|
|
317
516
|
TITLE: "TITLE";
|
|
517
|
+
RESOLVING: "RESOLVING";
|
|
318
518
|
PRICE: "PRICE";
|
|
319
519
|
AVGPRICE: "AVGPRICE";
|
|
320
|
-
REALIZEDPNL: "REALIZEDPNL";
|
|
321
|
-
TIMESTAMP: "TIMESTAMP";
|
|
322
520
|
}>>;
|
|
323
521
|
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
324
522
|
ASC: "ASC";
|
|
325
523
|
DESC: "DESC";
|
|
326
524
|
}>>;
|
|
327
|
-
|
|
328
|
-
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
329
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
|
|
330
|
-
user: z.ZodString;
|
|
331
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
332
|
-
status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
|
|
333
|
-
conditionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>;
|
|
334
|
-
positionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>;
|
|
335
|
-
}, z.core.$strip>;
|
|
336
|
-
declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
|
|
337
|
-
user: z.ZodString;
|
|
338
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
339
|
-
}, z.core.$strip>;
|
|
340
|
-
declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
|
|
341
|
-
user: z.ZodString;
|
|
342
|
-
}, z.core.$strip>;
|
|
343
|
-
declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
|
|
344
|
-
user: z.ZodString;
|
|
525
|
+
title: z.ZodOptional<z.ZodString>;
|
|
345
526
|
}, z.core.$strip>;
|
|
346
527
|
type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
|
|
347
|
-
type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
|
|
348
|
-
type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
|
|
349
|
-
type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
|
|
350
|
-
type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
|
|
351
|
-
type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
|
|
352
528
|
type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
353
529
|
declare const ListPositionsError: {
|
|
354
|
-
isError(error: unknown): error is
|
|
530
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
355
531
|
};
|
|
356
532
|
/**
|
|
357
533
|
* Lists current positions for a wallet.
|
|
@@ -392,13 +568,29 @@ declare const ListPositionsError: {
|
|
|
392
568
|
* ```
|
|
393
569
|
*/
|
|
394
570
|
declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
|
|
571
|
+
declare const ListClosedPositionsRequestSchema: z.ZodObject<{
|
|
572
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
573
|
+
user: z.ZodString;
|
|
574
|
+
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
575
|
+
title: z.ZodOptional<z.ZodString>;
|
|
576
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
577
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
578
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
579
|
+
TIMESTAMP: "TIMESTAMP";
|
|
580
|
+
TITLE: "TITLE";
|
|
581
|
+
PRICE: "PRICE";
|
|
582
|
+
AVGPRICE: "AVGPRICE";
|
|
583
|
+
REALIZEDPNL: "REALIZEDPNL";
|
|
584
|
+
}>>;
|
|
585
|
+
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
586
|
+
ASC: "ASC";
|
|
587
|
+
DESC: "DESC";
|
|
588
|
+
}>>;
|
|
589
|
+
}, z.core.$strip>;
|
|
590
|
+
type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
|
|
395
591
|
type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
396
592
|
declare const ListClosedPositionsError: {
|
|
397
|
-
isError(error: unknown): error is
|
|
398
|
-
};
|
|
399
|
-
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
400
|
-
declare const ListComboPositionsError: {
|
|
401
|
-
isError(error: unknown): error is UserInputError | UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
|
|
593
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
402
594
|
};
|
|
403
595
|
/**
|
|
404
596
|
* Lists closed positions for a wallet.
|
|
@@ -439,6 +631,21 @@ declare const ListComboPositionsError: {
|
|
|
439
631
|
* ```
|
|
440
632
|
*/
|
|
441
633
|
declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
634
|
+
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
635
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
636
|
+
user: z.ZodString;
|
|
637
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
638
|
+
status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionStatus>>;
|
|
639
|
+
sort: z.ZodOptional<z.ZodEnum<typeof ComboPositionSort>>;
|
|
640
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>>]>>;
|
|
641
|
+
updatedAfter: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
updatedBefore: z.ZodOptional<z.ZodNumber>;
|
|
643
|
+
}, z.core.$strip>;
|
|
644
|
+
type ListComboPositionsRequest = z.input<typeof ListComboPositionsRequestSchema>;
|
|
645
|
+
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
646
|
+
declare const ListComboPositionsError: {
|
|
647
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
648
|
+
};
|
|
442
649
|
/**
|
|
443
650
|
* Lists combo positions for a wallet.
|
|
444
651
|
*
|
|
@@ -472,11 +679,27 @@ declare function listClosedPositions(client: BaseClient, request: ListClosedPosi
|
|
|
472
679
|
* status: ComboPositionStatus.Open,
|
|
473
680
|
* });
|
|
474
681
|
* ```
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* Incrementally sync changed combo positions:
|
|
685
|
+
* ```ts
|
|
686
|
+
* const result = listComboPositions(client, {
|
|
687
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
688
|
+
* updatedAfter: 1_797_360_000,
|
|
689
|
+
* sort: ComboPositionSort.UpdatedAsc,
|
|
690
|
+
* pageSize: 1000,
|
|
691
|
+
* });
|
|
692
|
+
* ```
|
|
475
693
|
*/
|
|
476
694
|
declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
695
|
+
declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
|
|
696
|
+
user: z.ZodString;
|
|
697
|
+
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
|
|
477
700
|
type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
478
701
|
declare const FetchPortfolioValueError: {
|
|
479
|
-
isError(error: unknown): error is
|
|
702
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
480
703
|
};
|
|
481
704
|
/**
|
|
482
705
|
* Fetches the total value for a wallet's positions.
|
|
@@ -497,9 +720,13 @@ declare const FetchPortfolioValueError: {
|
|
|
497
720
|
* ```
|
|
498
721
|
*/
|
|
499
722
|
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
|
|
723
|
+
declare const FetchTradedMarketCountRequestSchema: z.ZodObject<{
|
|
724
|
+
user: z.ZodString;
|
|
725
|
+
}, z.core.$strip>;
|
|
726
|
+
type FetchTradedMarketCountRequest = z.input<typeof FetchTradedMarketCountRequestSchema>;
|
|
500
727
|
type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
501
728
|
declare const FetchTradedMarketCountError: {
|
|
502
|
-
isError(error: unknown): error is
|
|
729
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
503
730
|
};
|
|
504
731
|
/**
|
|
505
732
|
* Fetches the total number of markets a wallet has traded.
|
|
@@ -520,9 +747,13 @@ declare const FetchTradedMarketCountError: {
|
|
|
520
747
|
* ```
|
|
521
748
|
*/
|
|
522
749
|
declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
|
|
750
|
+
declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
|
|
751
|
+
user: z.ZodString;
|
|
752
|
+
}, z.core.$strip>;
|
|
753
|
+
type DownloadAccountingSnapshotRequest = z.input<typeof DownloadAccountingSnapshotRequestSchema>;
|
|
523
754
|
type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
524
755
|
declare const DownloadAccountingSnapshotError: {
|
|
525
|
-
isError(error: unknown): error is
|
|
756
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
526
757
|
};
|
|
527
758
|
/**
|
|
528
759
|
* Downloads an accounting snapshot archive for a wallet.
|
|
@@ -561,6 +792,7 @@ type SecureFetchPortfolioValueRequest = DefaultAccountWallet<FetchPortfolioValue
|
|
|
561
792
|
type SecureFetchTradedMarketCountRequest = DefaultAccountWallet<FetchTradedMarketCountRequest>;
|
|
562
793
|
type SecureDownloadAccountingSnapshotRequest = DefaultAccountWallet<DownloadAccountingSnapshotRequest>;
|
|
563
794
|
type SecureListActivityRequest = DefaultAccountWallet<ListActivityRequest>;
|
|
795
|
+
type SecureListComboActivityRequest = DefaultAccountWallet<ListComboActivityRequest>;
|
|
564
796
|
type CommonAccountActions = {
|
|
565
797
|
/**
|
|
566
798
|
* Lists positions for a market.
|
|
@@ -768,6 +1000,24 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
768
1000
|
* ```
|
|
769
1001
|
*/
|
|
770
1002
|
listActivity(request: ListActivityRequest): Paginated<Activity[]>;
|
|
1003
|
+
/**
|
|
1004
|
+
* Lists combo lifecycle activity for a wallet.
|
|
1005
|
+
*
|
|
1006
|
+
* @throws {@link ListComboActivityError}
|
|
1007
|
+
* Thrown on failure.
|
|
1008
|
+
*
|
|
1009
|
+
* @example
|
|
1010
|
+
* Fetch the first page of results:
|
|
1011
|
+
* ```ts
|
|
1012
|
+
* const paginator = client.listComboActivity({
|
|
1013
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1014
|
+
* pageSize: 10,
|
|
1015
|
+
* });
|
|
1016
|
+
*
|
|
1017
|
+
* const firstPage = await paginator.firstPage();
|
|
1018
|
+
* ```
|
|
1019
|
+
*/
|
|
1020
|
+
listComboActivity(request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
771
1021
|
}>;
|
|
772
1022
|
type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
773
1023
|
/**
|
|
@@ -843,6 +1093,15 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
843
1093
|
* Thrown on failure.
|
|
844
1094
|
*/
|
|
845
1095
|
listActivity(request?: SecureListActivityRequest): Paginated<Activity[]>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Lists combo lifecycle activity for a wallet.
|
|
1098
|
+
*
|
|
1099
|
+
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1100
|
+
*
|
|
1101
|
+
* @throws {@link ListComboActivityError}
|
|
1102
|
+
* Thrown on failure.
|
|
1103
|
+
*/
|
|
1104
|
+
listComboActivity(request?: SecureListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
846
1105
|
/**
|
|
847
1106
|
* Lists trades for the authenticated account across all pages.
|
|
848
1107
|
*
|
|
@@ -1060,7 +1319,7 @@ type DataActions = {
|
|
|
1060
1319
|
*/
|
|
1061
1320
|
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
|
|
1062
1321
|
/**
|
|
1063
|
-
* Fetches the midpoint price for a token.
|
|
1322
|
+
* Fetches the midpoint price for a token as a decimal string.
|
|
1064
1323
|
*
|
|
1065
1324
|
* @throws {@link FetchMidpointError}
|
|
1066
1325
|
* Thrown on failure.
|
|
@@ -1070,9 +1329,9 @@ type DataActions = {
|
|
|
1070
1329
|
* const midpoint = await client.fetchMidpoint({ tokenId: '123' });
|
|
1071
1330
|
* ```
|
|
1072
1331
|
*/
|
|
1073
|
-
fetchMidpoint(request: FetchMidpointRequest): Promise<
|
|
1332
|
+
fetchMidpoint(request: FetchMidpointRequest): Promise<DecimalString>;
|
|
1074
1333
|
/**
|
|
1075
|
-
* Fetches midpoint prices for multiple tokens.
|
|
1334
|
+
* Fetches midpoint prices for multiple tokens as a token ID keyed lookup.
|
|
1076
1335
|
*
|
|
1077
1336
|
* @throws {@link FetchMidpointsError}
|
|
1078
1337
|
* Thrown on failure.
|
|
@@ -1082,9 +1341,9 @@ type DataActions = {
|
|
|
1082
1341
|
* const midpoints = await client.fetchMidpoints([{ tokenId: '123' }]);
|
|
1083
1342
|
* ```
|
|
1084
1343
|
*/
|
|
1085
|
-
fetchMidpoints(request: FetchMidpointsRequest): Promise<
|
|
1344
|
+
fetchMidpoints(request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
1086
1345
|
/**
|
|
1087
|
-
* Fetches the current quoted price for a token and side.
|
|
1346
|
+
* Fetches the current quoted price for a token and side as a decimal string.
|
|
1088
1347
|
*
|
|
1089
1348
|
* @throws {@link FetchPriceError}
|
|
1090
1349
|
* Thrown on failure.
|
|
@@ -1094,9 +1353,9 @@ type DataActions = {
|
|
|
1094
1353
|
* const price = await client.fetchPrice({ tokenId: '123', side: OrderSide.BUY });
|
|
1095
1354
|
* ```
|
|
1096
1355
|
*/
|
|
1097
|
-
fetchPrice(request: FetchPriceRequest): Promise<
|
|
1356
|
+
fetchPrice(request: FetchPriceRequest): Promise<DecimalString>;
|
|
1098
1357
|
/**
|
|
1099
|
-
* Fetches quoted prices for multiple tokens.
|
|
1358
|
+
* Fetches quoted prices for multiple tokens as a token ID keyed lookup.
|
|
1100
1359
|
*
|
|
1101
1360
|
* @throws {@link FetchPricesError}
|
|
1102
1361
|
* Thrown on failure.
|
|
@@ -1132,7 +1391,7 @@ type DataActions = {
|
|
|
1132
1391
|
*/
|
|
1133
1392
|
fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
1134
1393
|
/**
|
|
1135
|
-
* Fetches the spread for a token.
|
|
1394
|
+
* Fetches the spread for a token as a decimal string.
|
|
1136
1395
|
*
|
|
1137
1396
|
* @throws {@link FetchSpreadError}
|
|
1138
1397
|
* Thrown on failure.
|
|
@@ -1142,9 +1401,9 @@ type DataActions = {
|
|
|
1142
1401
|
* const spread = await client.fetchSpread({ tokenId: '123' });
|
|
1143
1402
|
* ```
|
|
1144
1403
|
*/
|
|
1145
|
-
fetchSpread(request: FetchSpreadRequest): Promise<
|
|
1404
|
+
fetchSpread(request: FetchSpreadRequest): Promise<DecimalString>;
|
|
1146
1405
|
/**
|
|
1147
|
-
* Fetches spreads for multiple tokens.
|
|
1406
|
+
* Fetches spreads for multiple tokens as a token ID keyed lookup.
|
|
1148
1407
|
*
|
|
1149
1408
|
* @throws {@link FetchSpreadsError}
|
|
1150
1409
|
* Thrown on failure.
|
|
@@ -1154,7 +1413,7 @@ type DataActions = {
|
|
|
1154
1413
|
* const spreads = await client.fetchSpreads([{ tokenId: '123' }]);
|
|
1155
1414
|
* ```
|
|
1156
1415
|
*/
|
|
1157
|
-
fetchSpreads(request: FetchSpreadsRequest): Promise<
|
|
1416
|
+
fetchSpreads(request: FetchSpreadsRequest): Promise<Spreads>;
|
|
1158
1417
|
/**
|
|
1159
1418
|
* Fetches the last traded price for a token.
|
|
1160
1419
|
*
|
|
@@ -1524,6 +1783,25 @@ type DiscoveryActions = {
|
|
|
1524
1783
|
* ```
|
|
1525
1784
|
*/
|
|
1526
1785
|
fetchSeries(request: FetchSeriesRequest): Promise<Series>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Lists market clarifications — notes that resolve ambiguity in how a market
|
|
1788
|
+
* settles.
|
|
1789
|
+
*
|
|
1790
|
+
* @throws {@link ListMarketClarificationsError}
|
|
1791
|
+
* Thrown on failure.
|
|
1792
|
+
*
|
|
1793
|
+
* @example
|
|
1794
|
+
* ```ts
|
|
1795
|
+
* const paginator = client.listMarketClarifications({
|
|
1796
|
+
* marketId: '512038',
|
|
1797
|
+
* });
|
|
1798
|
+
*
|
|
1799
|
+
* for await (const page of paginator) {
|
|
1800
|
+
* // page.items: MarketClarification[]
|
|
1801
|
+
* }
|
|
1802
|
+
* ```
|
|
1803
|
+
*/
|
|
1804
|
+
listMarketClarifications(request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
|
|
1527
1805
|
/**
|
|
1528
1806
|
* Lists tags.
|
|
1529
1807
|
*
|
|
@@ -1603,6 +1881,9 @@ type DiscoveryActions = {
|
|
|
1603
1881
|
/**
|
|
1604
1882
|
* Runs a public full-text search.
|
|
1605
1883
|
*
|
|
1884
|
+
* `keepClosedMarkets` is an hour window for including recently closed markets
|
|
1885
|
+
* when searching active events.
|
|
1886
|
+
*
|
|
1606
1887
|
* @throws {@link SearchError}
|
|
1607
1888
|
* Thrown on failure.
|
|
1608
1889
|
*
|
|
@@ -1792,103 +2073,215 @@ type DiscoveryActions = {
|
|
|
1792
2073
|
declare function discoveryActions(client: BasePublicClient): DiscoveryActions;
|
|
1793
2074
|
declare function discoveryActions(client: BaseSecureClient): DiscoveryActions;
|
|
1794
2075
|
|
|
2076
|
+
/**
|
|
2077
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2078
|
+
*/
|
|
1795
2079
|
type PublicPerpsActions = {
|
|
1796
2080
|
/**
|
|
1797
2081
|
* Fetches Perps instruments.
|
|
1798
2082
|
*
|
|
2083
|
+
* @example
|
|
2084
|
+
* ```ts
|
|
2085
|
+
* const instruments = await client.fetchPerpsInstruments();
|
|
2086
|
+
* ```
|
|
2087
|
+
*
|
|
1799
2088
|
* @throws {@link FetchPerpsInstrumentsError}
|
|
1800
2089
|
* Thrown on failure.
|
|
2090
|
+
*
|
|
2091
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1801
2092
|
*/
|
|
1802
2093
|
fetchPerpsInstruments(request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
1803
2094
|
/**
|
|
1804
2095
|
* Fetches the current Perps ticker for an instrument.
|
|
1805
2096
|
*
|
|
2097
|
+
* @example
|
|
2098
|
+
* ```ts
|
|
2099
|
+
* const ticker = await client.fetchPerpsTicker({ instrumentId: 1 });
|
|
2100
|
+
* ```
|
|
2101
|
+
*
|
|
1806
2102
|
* @throws {@link FetchPerpsTickerError}
|
|
1807
2103
|
* Thrown on failure.
|
|
2104
|
+
*
|
|
2105
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1808
2106
|
*/
|
|
1809
2107
|
fetchPerpsTicker(request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
1810
2108
|
/**
|
|
1811
2109
|
* Fetches current Perps tickers.
|
|
1812
2110
|
*
|
|
2111
|
+
* @example
|
|
2112
|
+
* ```ts
|
|
2113
|
+
* const tickers = await client.fetchPerpsTickers();
|
|
2114
|
+
* ```
|
|
2115
|
+
*
|
|
1813
2116
|
* @throws {@link FetchPerpsTickersError}
|
|
1814
2117
|
* Thrown on failure.
|
|
2118
|
+
*
|
|
2119
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1815
2120
|
*/
|
|
1816
2121
|
fetchPerpsTickers(request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
1817
2122
|
/**
|
|
1818
2123
|
* Fetches a Perps order book.
|
|
1819
2124
|
*
|
|
2125
|
+
* @example
|
|
2126
|
+
* ```ts
|
|
2127
|
+
* const book = await client.fetchPerpsBook({ instrumentId: 1, depth: 100 });
|
|
2128
|
+
* ```
|
|
2129
|
+
*
|
|
1820
2130
|
* @throws {@link FetchPerpsBookError}
|
|
1821
2131
|
* Thrown on failure.
|
|
2132
|
+
*
|
|
2133
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1822
2134
|
*/
|
|
1823
2135
|
fetchPerpsBook(request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
1824
2136
|
/**
|
|
1825
2137
|
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
1826
2138
|
*
|
|
2139
|
+
* @example
|
|
2140
|
+
* ```ts
|
|
2141
|
+
* for await (const candles of client.listPerpsCandles({
|
|
2142
|
+
* instrumentId: 1,
|
|
2143
|
+
* interval: PerpsKlineInterval.OneMinute,
|
|
2144
|
+
* })) {
|
|
2145
|
+
* console.log(candles);
|
|
2146
|
+
* }
|
|
2147
|
+
* ```
|
|
2148
|
+
*
|
|
1827
2149
|
* @throws {@link ListPerpsCandlesError}
|
|
1828
2150
|
* Thrown on failure.
|
|
2151
|
+
*
|
|
2152
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1829
2153
|
*/
|
|
1830
2154
|
listPerpsCandles(request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
1831
2155
|
/**
|
|
1832
2156
|
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
1833
2157
|
*
|
|
2158
|
+
* @example
|
|
2159
|
+
* ```ts
|
|
2160
|
+
* for await (const rates of client.listPerpsFundingHistory({
|
|
2161
|
+
* instrumentId: 1,
|
|
2162
|
+
* })) {
|
|
2163
|
+
* console.log(rates);
|
|
2164
|
+
* }
|
|
2165
|
+
* ```
|
|
2166
|
+
*
|
|
1834
2167
|
* @throws {@link ListPerpsFundingHistoryError}
|
|
1835
2168
|
* Thrown on failure.
|
|
2169
|
+
*
|
|
2170
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1836
2171
|
*/
|
|
1837
2172
|
listPerpsFundingHistory(request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
1838
2173
|
/**
|
|
1839
2174
|
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
1840
2175
|
*
|
|
2176
|
+
* @example
|
|
2177
|
+
* ```ts
|
|
2178
|
+
* for await (const trades of client.listPerpsTrades({ instrumentId: 1 })) {
|
|
2179
|
+
* console.log(trades);
|
|
2180
|
+
* }
|
|
2181
|
+
* ```
|
|
2182
|
+
*
|
|
1841
2183
|
* @throws {@link ListPerpsTradesError}
|
|
1842
2184
|
* Thrown on failure.
|
|
2185
|
+
*
|
|
2186
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1843
2187
|
*/
|
|
1844
2188
|
listPerpsTrades(request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
1845
2189
|
/**
|
|
1846
2190
|
* Fetches the Perps fee schedule.
|
|
1847
2191
|
*
|
|
2192
|
+
* @example
|
|
2193
|
+
* ```ts
|
|
2194
|
+
* const fees = await client.fetchPerpsFees();
|
|
2195
|
+
* ```
|
|
2196
|
+
*
|
|
1848
2197
|
* @throws {@link FetchPerpsFeesError}
|
|
1849
2198
|
* Thrown on failure.
|
|
2199
|
+
*
|
|
2200
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1850
2201
|
*/
|
|
1851
2202
|
fetchPerpsFees(): Promise<PerpsFeeScheduleEntry[]>;
|
|
1852
2203
|
};
|
|
2204
|
+
/**
|
|
2205
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2206
|
+
*/
|
|
1853
2207
|
type SecurePerpsActions = PublicPerpsActions & {
|
|
1854
2208
|
/**
|
|
1855
2209
|
* Deposits collateral into Perps for the authenticated signer account.
|
|
1856
2210
|
*
|
|
2211
|
+
* @example
|
|
2212
|
+
* ```ts
|
|
2213
|
+
* const transaction = await client.depositToPerps({ amount: 100_000_000n });
|
|
2214
|
+
* ```
|
|
2215
|
+
*
|
|
1857
2216
|
* @throws {@link DepositToPerpsError}
|
|
1858
2217
|
* Thrown on failure.
|
|
2218
|
+
*
|
|
2219
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1859
2220
|
*/
|
|
1860
2221
|
depositToPerps(request: DepositToPerpsRequest): Promise<TransactionHandle>;
|
|
1861
2222
|
/**
|
|
1862
2223
|
* Opens a Perps account session.
|
|
1863
2224
|
*
|
|
1864
2225
|
* @remarks
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
2226
|
+
* Omit `expiresIn` to create new delegated Perps credentials that expire after
|
|
2227
|
+
* one week. Pass `expiresIn` as a duration in milliseconds to use a shorter or
|
|
2228
|
+
* longer credential lifetime, or pass existing credentials to validate and
|
|
2229
|
+
* resume a previous session.
|
|
2230
|
+
*
|
|
2231
|
+
* @example
|
|
2232
|
+
* ```ts
|
|
2233
|
+
* const session = await client.openPerpsSession();
|
|
2234
|
+
* ```
|
|
1867
2235
|
*
|
|
1868
2236
|
* @throws {@link OpenPerpsSessionError}
|
|
1869
2237
|
* Thrown on failure.
|
|
2238
|
+
*
|
|
2239
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1870
2240
|
*/
|
|
1871
|
-
openPerpsSession(request
|
|
2241
|
+
openPerpsSession(request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
|
|
1872
2242
|
/**
|
|
1873
2243
|
* Revokes delegated Perps credentials by proxy address.
|
|
1874
2244
|
*
|
|
1875
2245
|
* @remarks
|
|
1876
2246
|
* This can revoke credentials outside the currently open Perps session.
|
|
1877
2247
|
*
|
|
2248
|
+
* @example
|
|
2249
|
+
* ```ts
|
|
2250
|
+
* await client.revokePerpsCredentials({ proxy: session.credentials.proxy });
|
|
2251
|
+
* ```
|
|
2252
|
+
*
|
|
1878
2253
|
* @throws {@link RevokePerpsCredentialsError}
|
|
1879
2254
|
* Thrown on failure.
|
|
2255
|
+
*
|
|
2256
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1880
2257
|
*/
|
|
1881
2258
|
revokePerpsCredentials(request: RevokePerpsCredentialsRequest): Promise<void>;
|
|
1882
2259
|
/**
|
|
1883
2260
|
* Requests a Perps withdrawal to the authenticated wallet.
|
|
1884
2261
|
*
|
|
2262
|
+
* @example
|
|
2263
|
+
* ```ts
|
|
2264
|
+
* const withdrawalId = await client.withdrawFromPerps({ amount: 100_000_000n });
|
|
2265
|
+
* ```
|
|
2266
|
+
*
|
|
1885
2267
|
* @throws {@link WithdrawFromPerpsError}
|
|
1886
2268
|
* Thrown on failure.
|
|
2269
|
+
*
|
|
2270
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1887
2271
|
*/
|
|
1888
2272
|
withdrawFromPerps(request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
|
|
1889
2273
|
};
|
|
2274
|
+
/**
|
|
2275
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2276
|
+
*/
|
|
1890
2277
|
type PerpsActions = PublicPerpsActions;
|
|
2278
|
+
/**
|
|
2279
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2280
|
+
*/
|
|
1891
2281
|
declare function perpsActions(client: BasePublicClient): PublicPerpsActions;
|
|
2282
|
+
/**
|
|
2283
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2284
|
+
*/
|
|
1892
2285
|
declare function perpsActions(client: BaseSecureClient): SecurePerpsActions;
|
|
1893
2286
|
|
|
1894
2287
|
type PublicRewardsActions = {
|
|
@@ -2144,9 +2537,9 @@ declare class RfqQuoteRejectedError extends PolymarketError {
|
|
|
2144
2537
|
readonly rfqId: RfqId;
|
|
2145
2538
|
constructor(message: string, options: ErrorOptions & RfqQuoteRejectedErrorOptions);
|
|
2146
2539
|
}
|
|
2147
|
-
type RfqQuoteError = RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
|
|
2540
|
+
type RfqQuoteError = ConnectionLostError | RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
|
|
2148
2541
|
declare const RfqQuoteError: {
|
|
2149
|
-
isError(error: unknown): error is
|
|
2542
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | ConnectionLostError | TimeoutError | RfqQuoteRejectedError;
|
|
2150
2543
|
};
|
|
2151
2544
|
type RfqCancelQuoteRejectedErrorOptions = {
|
|
2152
2545
|
/** RFQ error code for the rejected cancellation request. */
|
|
@@ -2169,9 +2562,9 @@ declare class RfqCancelQuoteRejectedError extends PolymarketError {
|
|
|
2169
2562
|
readonly quoteId: RfqQuoteId;
|
|
2170
2563
|
constructor(message: string, options: ErrorOptions & RfqCancelQuoteRejectedErrorOptions);
|
|
2171
2564
|
}
|
|
2172
|
-
type RfqCancelQuoteError = RfqCancelQuoteRejectedError | TimeoutError | TransportError;
|
|
2565
|
+
type RfqCancelQuoteError = ConnectionLostError | RfqCancelQuoteRejectedError | TimeoutError | TransportError;
|
|
2173
2566
|
declare const RfqCancelQuoteError: {
|
|
2174
|
-
isError(error: unknown): error is TransportError | TimeoutError | RfqCancelQuoteRejectedError;
|
|
2567
|
+
isError(error: unknown): error is TransportError | ConnectionLostError | TimeoutError | RfqCancelQuoteRejectedError;
|
|
2175
2568
|
};
|
|
2176
2569
|
type RfqConfirmationRejectedErrorOptions = {
|
|
2177
2570
|
/** RFQ error code for the rejected confirmation decision. */
|
|
@@ -2194,9 +2587,9 @@ declare class RfqConfirmationRejectedError extends PolymarketError {
|
|
|
2194
2587
|
readonly quoteId: RfqQuoteId;
|
|
2195
2588
|
constructor(message: string, options: ErrorOptions & RfqConfirmationRejectedErrorOptions);
|
|
2196
2589
|
}
|
|
2197
|
-
type RfqConfirmationError = RfqConfirmationRejectedError | TimeoutError | TransportError;
|
|
2590
|
+
type RfqConfirmationError = ConnectionLostError | RfqConfirmationRejectedError | TimeoutError | TransportError;
|
|
2198
2591
|
declare const RfqConfirmationError: {
|
|
2199
|
-
isError(error: unknown): error is TransportError | TimeoutError | RfqConfirmationRejectedError;
|
|
2592
|
+
isError(error: unknown): error is TransportError | ConnectionLostError | TimeoutError | RfqConfirmationRejectedError;
|
|
2200
2593
|
};
|
|
2201
2594
|
/**
|
|
2202
2595
|
* Server request asking the market maker to provide a quote for an RFQ.
|
|
@@ -2293,9 +2686,9 @@ interface RfqSession extends AsyncIterable<RfqEvent> {
|
|
|
2293
2686
|
*/
|
|
2294
2687
|
close(): Promise<void>;
|
|
2295
2688
|
}
|
|
2296
|
-
type OpenRfqSessionError = TransportError;
|
|
2689
|
+
type OpenRfqSessionError = ConnectionLostError | TransportError;
|
|
2297
2690
|
declare const OpenRfqSessionError: {
|
|
2298
|
-
isError(error: unknown): error is TransportError;
|
|
2691
|
+
isError(error: unknown): error is TransportError | ConnectionLostError;
|
|
2299
2692
|
};
|
|
2300
2693
|
/**
|
|
2301
2694
|
* Opens an RFQ event session.
|
|
@@ -2504,7 +2897,7 @@ declare const CancelMarketOrdersRequestSchema: z.ZodObject<{
|
|
|
2504
2897
|
type CancelOrderRequest = z.input<typeof CancelOrderRequestSchema>;
|
|
2505
2898
|
type CancelOrderError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2506
2899
|
declare const CancelOrderError: {
|
|
2507
|
-
isError(error: unknown): error is
|
|
2900
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2508
2901
|
};
|
|
2509
2902
|
/**
|
|
2510
2903
|
* Cancels a single open order for the authenticated account.
|
|
@@ -2521,14 +2914,14 @@ declare const CancelOrderError: {
|
|
|
2521
2914
|
* orderId: '123',
|
|
2522
2915
|
* });
|
|
2523
2916
|
*
|
|
2524
|
-
* // response.canceled:
|
|
2917
|
+
* // response.canceled: OrderId[]
|
|
2525
2918
|
* ```
|
|
2526
2919
|
*/
|
|
2527
2920
|
declare function cancelOrder(client: BaseSecureClient, request: CancelOrderRequest): Promise<CancelOrdersResponse>;
|
|
2528
2921
|
type CancelOrdersRequest = z.input<typeof CancelOrdersRequestSchema>;
|
|
2529
2922
|
type CancelOrdersError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2530
2923
|
declare const CancelOrdersError: {
|
|
2531
|
-
isError(error: unknown): error is
|
|
2924
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2532
2925
|
};
|
|
2533
2926
|
/**
|
|
2534
2927
|
* Cancels multiple open orders for the authenticated account.
|
|
@@ -2545,13 +2938,13 @@ declare const CancelOrdersError: {
|
|
|
2545
2938
|
* orderIds: ['1', '2'],
|
|
2546
2939
|
* });
|
|
2547
2940
|
*
|
|
2548
|
-
* // response.canceled:
|
|
2941
|
+
* // response.canceled: OrderId[]
|
|
2549
2942
|
* ```
|
|
2550
2943
|
*/
|
|
2551
2944
|
declare function cancelOrders(client: BaseSecureClient, request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
|
|
2552
2945
|
type CancelAllError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError;
|
|
2553
2946
|
declare const CancelAllError: {
|
|
2554
|
-
isError(error: unknown): error is
|
|
2947
|
+
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2555
2948
|
};
|
|
2556
2949
|
/**
|
|
2557
2950
|
* Cancels all open orders for the authenticated account.
|
|
@@ -2566,14 +2959,14 @@ declare const CancelAllError: {
|
|
|
2566
2959
|
* ```ts
|
|
2567
2960
|
* const response = await cancelAll(client);
|
|
2568
2961
|
*
|
|
2569
|
-
* // response.canceled:
|
|
2962
|
+
* // response.canceled: OrderId[]
|
|
2570
2963
|
* ```
|
|
2571
2964
|
*/
|
|
2572
2965
|
declare function cancelAll(client: BaseSecureClient): Promise<CancelOrdersResponse>;
|
|
2573
2966
|
type CancelMarketOrdersRequest = z.input<typeof CancelMarketOrdersRequestSchema>;
|
|
2574
2967
|
type CancelMarketOrdersError = RequestRejectedError | RateLimitError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2575
2968
|
declare const CancelMarketOrdersError: {
|
|
2576
|
-
isError(error: unknown): error is
|
|
2969
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2577
2970
|
};
|
|
2578
2971
|
/**
|
|
2579
2972
|
* Cancels all open orders for the authenticated account that match the market
|
|
@@ -2591,7 +2984,7 @@ declare const CancelMarketOrdersError: {
|
|
|
2591
2984
|
* market: '0x0000000000000000000000000000000000000000000000000000000000000001',
|
|
2592
2985
|
* });
|
|
2593
2986
|
*
|
|
2594
|
-
* // response.canceled:
|
|
2987
|
+
* // response.canceled: OrderId[]
|
|
2595
2988
|
* ```
|
|
2596
2989
|
*/
|
|
2597
2990
|
declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
|
|
@@ -2627,7 +3020,7 @@ type EstimateMarketSellPriceRequest = {
|
|
|
2627
3020
|
type EstimateMarketPriceRequest = EstimateMarketBuyPriceRequest | EstimateMarketSellPriceRequest;
|
|
2628
3021
|
type EstimateMarketPriceError = InsufficientLiquidityError | RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2629
3022
|
declare const EstimateMarketPriceError: {
|
|
2630
|
-
isError(error: unknown): error is
|
|
3023
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | InsufficientLiquidityError;
|
|
2631
3024
|
};
|
|
2632
3025
|
/**
|
|
2633
3026
|
* Estimates the price level a market order would cross at current book depth.
|
|
@@ -2759,7 +3152,7 @@ type PrepareLimitOrderRequest = {
|
|
|
2759
3152
|
* When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
|
|
2760
3153
|
* expires at the given timestamp.
|
|
2761
3154
|
*
|
|
2762
|
-
* The timestamp must be at least
|
|
3155
|
+
* The timestamp must be at least 3 minutes in the future. Add your own
|
|
2763
3156
|
* buffer for network latency and clock skew when deriving it from the
|
|
2764
3157
|
* current time.
|
|
2765
3158
|
*
|
|
@@ -2805,11 +3198,11 @@ declare const PostOrdersRequestSchema: z.ZodArray<z.ZodCustom<SignedOrder, Signe
|
|
|
2805
3198
|
type PostOrdersRequest = z.input<typeof PostOrdersRequestSchema>;
|
|
2806
3199
|
type PostOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
2807
3200
|
declare const PostOrderError: {
|
|
2808
|
-
isError(error: unknown): error is
|
|
3201
|
+
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2809
3202
|
};
|
|
2810
3203
|
type PostOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
2811
3204
|
declare const PostOrdersError: {
|
|
2812
|
-
isError(error: unknown): error is
|
|
3205
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
2813
3206
|
};
|
|
2814
3207
|
/**
|
|
2815
3208
|
* Posts a signed order for the authenticated account.
|
|
@@ -2910,7 +3303,7 @@ type SecureTradingActions = {
|
|
|
2910
3303
|
* Creates a signed limit order for the authenticated account.
|
|
2911
3304
|
*
|
|
2912
3305
|
* @remarks
|
|
2913
|
-
* GTD expirations must be at least
|
|
3306
|
+
* GTD expirations must be at least 3 minutes in the future. Add your own
|
|
2914
3307
|
* buffer for network latency and clock skew when deriving an expiration from
|
|
2915
3308
|
* the current time.
|
|
2916
3309
|
*
|
|
@@ -2933,7 +3326,7 @@ type SecureTradingActions = {
|
|
|
2933
3326
|
* Creates and posts a limit order for the authenticated account.
|
|
2934
3327
|
*
|
|
2935
3328
|
* @remarks
|
|
2936
|
-
* GTD expirations must be at least
|
|
3329
|
+
* GTD expirations must be at least 3 minutes in the future. Add your own
|
|
2937
3330
|
* buffer for network latency and clock skew when deriving an expiration from
|
|
2938
3331
|
* the current time.
|
|
2939
3332
|
*
|
|
@@ -2991,7 +3384,7 @@ type SecureTradingActions = {
|
|
|
2991
3384
|
* ```ts
|
|
2992
3385
|
* const response = await client.cancelOrder({ orderId: '123' });
|
|
2993
3386
|
*
|
|
2994
|
-
* // response.canceled:
|
|
3387
|
+
* // response.canceled: OrderId[]
|
|
2995
3388
|
* ```
|
|
2996
3389
|
*/
|
|
2997
3390
|
cancelOrder(request: CancelOrderRequest): Promise<CancelOrdersResponse>;
|
|
@@ -3005,7 +3398,7 @@ type SecureTradingActions = {
|
|
|
3005
3398
|
* ```ts
|
|
3006
3399
|
* const response = await client.cancelOrders({ orderIds: ['1', '2'] });
|
|
3007
3400
|
*
|
|
3008
|
-
* // response.canceled:
|
|
3401
|
+
* // response.canceled: OrderId[]
|
|
3009
3402
|
* ```
|
|
3010
3403
|
*/
|
|
3011
3404
|
cancelOrders(request: CancelOrdersRequest): Promise<CancelOrdersResponse>;
|
|
@@ -3019,7 +3412,7 @@ type SecureTradingActions = {
|
|
|
3019
3412
|
* ```ts
|
|
3020
3413
|
* const response = await client.cancelAll();
|
|
3021
3414
|
*
|
|
3022
|
-
* // response.canceled:
|
|
3415
|
+
* // response.canceled: OrderId[]
|
|
3023
3416
|
* ```
|
|
3024
3417
|
*/
|
|
3025
3418
|
cancelAll(): Promise<CancelOrdersResponse>;
|
|
@@ -3035,7 +3428,7 @@ type SecureTradingActions = {
|
|
|
3035
3428
|
* market: '0x0000000000000000000000000000000000000000000000000000000000000001',
|
|
3036
3429
|
* });
|
|
3037
3430
|
*
|
|
3038
|
-
* // response.canceled:
|
|
3431
|
+
* // response.canceled: OrderId[]
|
|
3039
3432
|
* ```
|
|
3040
3433
|
*/
|
|
3041
3434
|
cancelMarketOrders(request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
|
|
@@ -3089,12 +3482,6 @@ type SecureTradingActions = {
|
|
|
3089
3482
|
declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
|
|
3090
3483
|
|
|
3091
3484
|
type SecureWalletActions = {
|
|
3092
|
-
/**
|
|
3093
|
-
* @deprecated You no longer need to call this. `createSecureClient` ensures
|
|
3094
|
-
* the account wallet is set up for its trading flow, so this always resolves
|
|
3095
|
-
* to `true` and is retained only for backward compatibility.
|
|
3096
|
-
*/
|
|
3097
|
-
isGaslessReady(): Promise<boolean>;
|
|
3098
3485
|
/**
|
|
3099
3486
|
* Sets up the approvals required for trading and supported position lifecycle workflows.
|
|
3100
3487
|
*
|
|
@@ -3106,7 +3493,7 @@ type SecureWalletActions = {
|
|
|
3106
3493
|
* await client.setupTradingApprovals();
|
|
3107
3494
|
* ```
|
|
3108
3495
|
*/
|
|
3109
|
-
setupTradingApprovals(): Promise<
|
|
3496
|
+
setupTradingApprovals(): Promise<void>;
|
|
3110
3497
|
/**
|
|
3111
3498
|
* Approves ERC-20 token spending for the authenticated account.
|
|
3112
3499
|
*
|
|
@@ -3302,6 +3689,9 @@ type ClobEndpoints = RestEndpoint & {
|
|
|
3302
3689
|
user: WebSocketEndpoint;
|
|
3303
3690
|
};
|
|
3304
3691
|
type RfqEndpoints = RestEndpoint & WebSocketEndpoint;
|
|
3692
|
+
/**
|
|
3693
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3694
|
+
*/
|
|
3305
3695
|
type PerpsEndpoints = RestEndpoint & WebSocketEndpoint;
|
|
3306
3696
|
type EnvironmentContracts = {
|
|
3307
3697
|
collateralToken: EvmAddress;
|
|
@@ -3484,12 +3874,6 @@ declare class BaseSecureClient<TPublicActions extends ClientActions = ClientActi
|
|
|
3484
3874
|
* The authenticated account identity associated with this client, including the signer and wallet addresses and wallet type.
|
|
3485
3875
|
*/
|
|
3486
3876
|
get account(): AccountIdentity;
|
|
3487
|
-
/**
|
|
3488
|
-
* @deprecated `createSecureClient` now sets up the account wallet for its
|
|
3489
|
-
* trading flow, so this is a no-op retained only for backward compatibility
|
|
3490
|
-
* and returns the current secure client.
|
|
3491
|
-
*/
|
|
3492
|
-
setupGaslessWallet(): Promise<SecureClient<TPublicActions, TSecureActions>>;
|
|
3493
3877
|
/**
|
|
3494
3878
|
* Closes all active realtime subscriptions owned by this client.
|
|
3495
3879
|
*
|
|
@@ -3607,7 +3991,7 @@ type SecureClientOptions = PublicClientOptions & {
|
|
|
3607
3991
|
declare function createPublicClient(options?: PublicClientOptions): PublicClient<PublicActions, SecureActions>;
|
|
3608
3992
|
type CreateSecureClientError = CancelledSigningError | DeployDepositWalletError | IsWalletDeployedError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError | WaitForGaslessTransactionError;
|
|
3609
3993
|
declare const CreateSecureClientError: {
|
|
3610
|
-
isError(error: unknown): error is
|
|
3994
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
3611
3995
|
};
|
|
3612
3996
|
type SetupGaslessWalletError = UserInputError;
|
|
3613
3997
|
declare const SetupGaslessWalletError: {
|
|
@@ -3630,7 +4014,7 @@ declare function createSecureClient(options: SecureClientOptions): Promise<Secur
|
|
|
3630
4014
|
|
|
3631
4015
|
type FetchClosedOnlyModeError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
3632
4016
|
declare const FetchClosedOnlyModeError: {
|
|
3633
|
-
isError(error: unknown): error is
|
|
4017
|
+
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3634
4018
|
};
|
|
3635
4019
|
/**
|
|
3636
4020
|
* Fetches whether the account is restricted to closed-only trading.
|
|
@@ -3648,14 +4032,14 @@ declare const FetchClosedOnlyModeError: {
|
|
|
3648
4032
|
declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
|
|
3649
4033
|
declare const ListOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
3650
4034
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
3651
|
-
cursor: z.ZodOptional<z.
|
|
4035
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3652
4036
|
id: z.ZodOptional<z.ZodString>;
|
|
3653
4037
|
market: z.ZodOptional<z.ZodString>;
|
|
3654
4038
|
}, z.core.$strip>>;
|
|
3655
4039
|
type ListOpenOrdersRequest = z.input<typeof ListOpenOrdersRequestSchema>;
|
|
3656
4040
|
type ListOpenOrdersError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3657
4041
|
declare const ListOpenOrdersError: {
|
|
3658
|
-
isError(error: unknown): error is
|
|
4042
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3659
4043
|
};
|
|
3660
4044
|
/**
|
|
3661
4045
|
* Lists open orders for the authenticated account across all pages.
|
|
@@ -3699,7 +4083,7 @@ declare const FetchOrderRequestSchema: z.ZodObject<{
|
|
|
3699
4083
|
type FetchOrderRequest = z.input<typeof FetchOrderRequestSchema>;
|
|
3700
4084
|
type FetchOrderError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3701
4085
|
declare const FetchOrderError: {
|
|
3702
|
-
isError(error: unknown): error is
|
|
4086
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3703
4087
|
};
|
|
3704
4088
|
/**
|
|
3705
4089
|
* Fetches a single order for the authenticated account.
|
|
@@ -3721,7 +4105,7 @@ declare const ListAccountTradesRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
|
3721
4105
|
after: z.ZodOptional<z.ZodString>;
|
|
3722
4106
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
3723
4107
|
before: z.ZodOptional<z.ZodString>;
|
|
3724
|
-
cursor: z.ZodOptional<z.
|
|
4108
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3725
4109
|
id: z.ZodOptional<z.ZodString>;
|
|
3726
4110
|
makerAddress: z.ZodOptional<z.ZodString>;
|
|
3727
4111
|
market: z.ZodOptional<z.ZodString>;
|
|
@@ -3729,7 +4113,7 @@ declare const ListAccountTradesRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
|
3729
4113
|
type ListAccountTradesRequest = z.input<typeof ListAccountTradesRequestSchema>;
|
|
3730
4114
|
type ListAccountTradesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3731
4115
|
declare const ListAccountTradesError: {
|
|
3732
|
-
isError(error: unknown): error is
|
|
4116
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3733
4117
|
};
|
|
3734
4118
|
/**
|
|
3735
4119
|
* Lists trades for the authenticated account across all pages.
|
|
@@ -3769,7 +4153,7 @@ declare const ListAccountTradesError: {
|
|
|
3769
4153
|
declare function listAccountTrades(client: BaseSecureClient, request?: ListAccountTradesRequest): Paginated<ClobTrade[]>;
|
|
3770
4154
|
type FetchNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
3771
4155
|
declare const FetchNotificationsError: {
|
|
3772
|
-
isError(error: unknown): error is
|
|
4156
|
+
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3773
4157
|
};
|
|
3774
4158
|
declare const DropNotificationsRequestSchema: z.ZodObject<{
|
|
3775
4159
|
ids: z.ZodArray<z.ZodString>;
|
|
@@ -3791,7 +4175,7 @@ type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
|
|
|
3791
4175
|
declare function fetchNotifications(client: BaseSecureClient): Promise<NotificationsResponse>;
|
|
3792
4176
|
type DropNotificationsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3793
4177
|
declare const DropNotificationsError: {
|
|
3794
|
-
isError(error: unknown): error is
|
|
4178
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3795
4179
|
};
|
|
3796
4180
|
/**
|
|
3797
4181
|
* Drops notifications for the authenticated account.
|
|
@@ -3817,7 +4201,7 @@ declare const FetchBalanceAllowanceRequestSchema: z.ZodObject<{
|
|
|
3817
4201
|
type FetchBalanceAllowanceRequest = z.input<typeof FetchBalanceAllowanceRequestSchema>;
|
|
3818
4202
|
type FetchBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3819
4203
|
declare const FetchBalanceAllowanceError: {
|
|
3820
|
-
isError(error: unknown): error is
|
|
4204
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3821
4205
|
};
|
|
3822
4206
|
/**
|
|
3823
4207
|
* Fetches balance and allowance for the authenticated account.
|
|
@@ -3843,7 +4227,7 @@ declare const UpdateBalanceAllowanceRequestSchema: z.ZodObject<{
|
|
|
3843
4227
|
type UpdateBalanceAllowanceRequest = z.input<typeof UpdateBalanceAllowanceRequestSchema>;
|
|
3844
4228
|
type UpdateBalanceAllowanceError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3845
4229
|
declare const UpdateBalanceAllowanceError: {
|
|
3846
|
-
isError(error: unknown): error is
|
|
4230
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3847
4231
|
};
|
|
3848
4232
|
/**
|
|
3849
4233
|
* Refreshes balance and allowance for the authenticated account.
|
|
@@ -3868,7 +4252,7 @@ declare const FetchOrderScoringRequestSchema: z.ZodObject<{
|
|
|
3868
4252
|
type FetchOrderScoringRequest = z.input<typeof FetchOrderScoringRequestSchema>;
|
|
3869
4253
|
type FetchOrderScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3870
4254
|
declare const FetchOrderScoringError: {
|
|
3871
|
-
isError(error: unknown): error is
|
|
4255
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3872
4256
|
};
|
|
3873
4257
|
/**
|
|
3874
4258
|
* Fetches whether a single order is currently scoring.
|
|
@@ -3892,7 +4276,7 @@ declare const FetchOrdersScoringRequestSchema: z.ZodObject<{
|
|
|
3892
4276
|
type FetchOrdersScoringRequest = z.input<typeof FetchOrdersScoringRequestSchema>;
|
|
3893
4277
|
type FetchOrdersScoringError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3894
4278
|
declare const FetchOrdersScoringError: {
|
|
3895
|
-
isError(error: unknown): error is
|
|
4279
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3896
4280
|
};
|
|
3897
4281
|
/**
|
|
3898
4282
|
* Fetches scoring state for multiple orders.
|
|
@@ -3911,13 +4295,13 @@ declare const FetchOrdersScoringError: {
|
|
|
3911
4295
|
*/
|
|
3912
4296
|
declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
|
|
3913
4297
|
declare const ListUserEarningsForDayRequestSchema: z.ZodObject<{
|
|
3914
|
-
cursor: z.ZodOptional<z.
|
|
4298
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3915
4299
|
date: z.ZodString;
|
|
3916
4300
|
}, z.core.$strip>;
|
|
3917
4301
|
type ListUserEarningsForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
|
|
3918
4302
|
type ListUserEarningsForDayError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3919
4303
|
declare const ListUserEarningsForDayError: {
|
|
3920
|
-
isError(error: unknown): error is
|
|
4304
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3921
4305
|
};
|
|
3922
4306
|
/**
|
|
3923
4307
|
* Lists per-market earnings for the authenticated account on a given day.
|
|
@@ -3958,7 +4342,7 @@ declare function listUserEarningsForDay(client: BaseSecureClient, request: ListU
|
|
|
3958
4342
|
type FetchTotalEarningsForUserForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
|
|
3959
4343
|
type FetchTotalEarningsForUserForDayError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3960
4344
|
declare const FetchTotalEarningsForUserForDayError: {
|
|
3961
|
-
isError(error: unknown): error is
|
|
4345
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3962
4346
|
};
|
|
3963
4347
|
/**
|
|
3964
4348
|
* Fetches total earnings for the authenticated account on a given day.
|
|
@@ -3977,7 +4361,7 @@ declare const FetchTotalEarningsForUserForDayError: {
|
|
|
3977
4361
|
*/
|
|
3978
4362
|
declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
3979
4363
|
declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
|
|
3980
|
-
cursor: z.ZodOptional<z.
|
|
4364
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3981
4365
|
date: z.ZodString;
|
|
3982
4366
|
noCompetition: z.ZodOptional<z.ZodBoolean>;
|
|
3983
4367
|
orderBy: z.ZodOptional<z.ZodString>;
|
|
@@ -3987,7 +4371,7 @@ declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
|
|
|
3987
4371
|
type ListUserEarningsAndMarketsConfigRequest = z.input<typeof ListUserEarningsAndMarketsConfigRequestSchema>;
|
|
3988
4372
|
type ListUserEarningsAndMarketsConfigError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3989
4373
|
declare const ListUserEarningsAndMarketsConfigError: {
|
|
3990
|
-
isError(error: unknown): error is
|
|
4374
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3991
4375
|
};
|
|
3992
4376
|
/**
|
|
3993
4377
|
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
@@ -4027,151 +4411,22 @@ declare const ListUserEarningsAndMarketsConfigError: {
|
|
|
4027
4411
|
declare function listUserEarningsAndMarketsConfig(client: BaseSecureClient, request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning[]>;
|
|
4028
4412
|
type FetchRewardPercentagesError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError;
|
|
4029
4413
|
declare const FetchRewardPercentagesError: {
|
|
4030
|
-
isError(error: unknown): error is
|
|
4414
|
+
isError(error: unknown): error is SigningError | TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4031
4415
|
};
|
|
4032
4416
|
/**
|
|
4033
4417
|
* Fetches reward percentages for the authenticated account.
|
|
4034
4418
|
*
|
|
4035
4419
|
* @remarks
|
|
4036
|
-
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4037
|
-
*
|
|
4038
|
-
* @throws {@link FetchRewardPercentagesError}
|
|
4039
|
-
*
|
|
4040
|
-
* @example
|
|
4041
|
-
* ```ts
|
|
4042
|
-
* const percentages = await fetchRewardPercentages(client);
|
|
4043
|
-
* ```
|
|
4044
|
-
*/
|
|
4045
|
-
declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
|
|
4046
|
-
|
|
4047
|
-
declare const ListTradesRequestSchema: z.ZodObject<{
|
|
4048
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
|
|
4049
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4050
|
-
takerOnly: z.ZodOptional<z.ZodBoolean>;
|
|
4051
|
-
filterType: z.ZodOptional<z.ZodEnum<{
|
|
4052
|
-
TOKENS: "TOKENS";
|
|
4053
|
-
CASH: "CASH";
|
|
4054
|
-
}>>;
|
|
4055
|
-
filterAmount: z.ZodOptional<z.ZodNumber>;
|
|
4056
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4057
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4058
|
-
user: z.ZodOptional<z.ZodString>;
|
|
4059
|
-
side: z.ZodOptional<z.ZodEnum<{
|
|
4060
|
-
BUY: "BUY";
|
|
4061
|
-
SELL: "SELL";
|
|
4062
|
-
}>>;
|
|
4063
|
-
}, z.core.$strip>;
|
|
4064
|
-
declare const ListActivityRequestSchema: z.ZodObject<{
|
|
4065
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PaginationCursor, string>>>;
|
|
4066
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4067
|
-
user: z.ZodString;
|
|
4068
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4069
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4070
|
-
type: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof _polymarket_bindings_data.ActivityType>>>;
|
|
4071
|
-
start: z.ZodOptional<z.ZodNumber>;
|
|
4072
|
-
end: z.ZodOptional<z.ZodNumber>;
|
|
4073
|
-
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
4074
|
-
TOKENS: "TOKENS";
|
|
4075
|
-
TIMESTAMP: "TIMESTAMP";
|
|
4076
|
-
CASH: "CASH";
|
|
4077
|
-
}>>;
|
|
4078
|
-
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
4079
|
-
ASC: "ASC";
|
|
4080
|
-
DESC: "DESC";
|
|
4081
|
-
}>>;
|
|
4082
|
-
side: z.ZodOptional<z.ZodEnum<{
|
|
4083
|
-
BUY: "BUY";
|
|
4084
|
-
SELL: "SELL";
|
|
4085
|
-
}>>;
|
|
4086
|
-
}, z.core.$strip>;
|
|
4087
|
-
type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
|
|
4088
|
-
type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
|
|
4089
|
-
type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4090
|
-
declare const ListTradesError: {
|
|
4091
|
-
isError(error: unknown): error is UserInputError | UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
|
|
4092
|
-
};
|
|
4093
|
-
/**
|
|
4094
|
-
* Lists trades for a wallet, market, or event.
|
|
4095
|
-
*
|
|
4096
|
-
* @remarks
|
|
4097
|
-
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4098
|
-
*
|
|
4099
|
-
* @throws {@link ListTradesError}
|
|
4100
|
-
* Thrown on failure.
|
|
4101
|
-
*
|
|
4102
|
-
* @example
|
|
4103
|
-
* Fetch the first page of results:
|
|
4104
|
-
* ```ts
|
|
4105
|
-
* const result = listTrades(client, {
|
|
4106
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4107
|
-
* pageSize: 10,
|
|
4108
|
-
* });
|
|
4109
|
-
*
|
|
4110
|
-
* const firstPage = await result.firstPage();
|
|
4111
|
-
*
|
|
4112
|
-
* // Optionally, fetch additional pages:
|
|
4113
|
-
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
4114
|
-
* // page.items: Trade[]
|
|
4115
|
-
* }
|
|
4116
|
-
* ```
|
|
4117
|
-
*
|
|
4118
|
-
* @example
|
|
4119
|
-
* Loop through all pages with `for await`:
|
|
4120
|
-
* ```ts
|
|
4121
|
-
* const result = listTrades(client, {
|
|
4122
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4123
|
-
* pageSize: 10,
|
|
4124
|
-
* });
|
|
4125
|
-
*
|
|
4126
|
-
* for await (const page of result) {
|
|
4127
|
-
* // page.items: Trade[]
|
|
4128
|
-
* }
|
|
4129
|
-
* ```
|
|
4130
|
-
*/
|
|
4131
|
-
declare function listTrades(client: BaseClient, request?: ListTradesRequest): Paginated<Trade[]>;
|
|
4132
|
-
type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4133
|
-
declare const ListActivityError: {
|
|
4134
|
-
isError(error: unknown): error is UserInputError | UnexpectedResponseError | TransportError | RequestRejectedError | RateLimitError;
|
|
4135
|
-
};
|
|
4136
|
-
/**
|
|
4137
|
-
* Lists wallet activity.
|
|
4138
|
-
*
|
|
4139
|
-
* @remarks
|
|
4140
|
-
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4141
|
-
*
|
|
4142
|
-
* @throws {@link ListActivityError}
|
|
4143
|
-
* Thrown on failure.
|
|
4144
|
-
*
|
|
4145
|
-
* @example
|
|
4146
|
-
* Fetch the first page of results:
|
|
4147
|
-
* ```ts
|
|
4148
|
-
* const result = listActivity(client, {
|
|
4149
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4150
|
-
* pageSize: 10,
|
|
4151
|
-
* });
|
|
4152
|
-
*
|
|
4153
|
-
* const firstPage = await result.firstPage();
|
|
4154
|
-
*
|
|
4155
|
-
* // Optionally, fetch additional pages:
|
|
4156
|
-
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
4157
|
-
* // page.items: Activity[]
|
|
4158
|
-
* }
|
|
4159
|
-
* ```
|
|
4420
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4421
|
+
*
|
|
4422
|
+
* @throws {@link FetchRewardPercentagesError}
|
|
4160
4423
|
*
|
|
4161
4424
|
* @example
|
|
4162
|
-
* Loop through all pages with `for await`:
|
|
4163
4425
|
* ```ts
|
|
4164
|
-
* const
|
|
4165
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4166
|
-
* pageSize: 10,
|
|
4167
|
-
* });
|
|
4168
|
-
*
|
|
4169
|
-
* for await (const page of result) {
|
|
4170
|
-
* // page.items: Activity[]
|
|
4171
|
-
* }
|
|
4426
|
+
* const percentages = await fetchRewardPercentages(client);
|
|
4172
4427
|
* ```
|
|
4173
4428
|
*/
|
|
4174
|
-
declare function
|
|
4429
|
+
declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
|
|
4175
4430
|
|
|
4176
4431
|
type Erc20ApprovalWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest;
|
|
4177
4432
|
type Erc20ApprovalWorkflow = AsyncGenerator<Erc20ApprovalWorkflowRequest, TransactionHandle, EvmAddress$1 | EvmSignature | TransactionHandle>;
|
|
@@ -4207,7 +4462,7 @@ declare const PrepareErc20ApprovalError: {
|
|
|
4207
4462
|
declare function prepareErc20Approval(client: BaseSecureClient, request: PrepareErc20ApprovalRequest): Promise<Erc20ApprovalWorkflow>;
|
|
4208
4463
|
type ApproveErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
4209
4464
|
declare const ApproveErc20Error: {
|
|
4210
|
-
isError(error: unknown): error is
|
|
4465
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4211
4466
|
};
|
|
4212
4467
|
/**
|
|
4213
4468
|
* Approves ERC-20 token spending for the authenticated account.
|
|
@@ -4252,7 +4507,7 @@ declare const PrepareErc1155ApprovalForAllError: {
|
|
|
4252
4507
|
declare function prepareErc1155ApprovalForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<Erc1155ApprovalForAllWorkflow>;
|
|
4253
4508
|
type ApproveErc1155ForAllError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
4254
4509
|
declare const ApproveErc1155ForAllError: {
|
|
4255
|
-
isError(error: unknown): error is
|
|
4510
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4256
4511
|
};
|
|
4257
4512
|
/**
|
|
4258
4513
|
* Approves or revokes ERC-1155 operator access for the authenticated account.
|
|
@@ -4268,7 +4523,7 @@ type TradingApprovalsWorkflowRequest = GaslessWorkflowRequest | SendErc20Approva
|
|
|
4268
4523
|
type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest, void, EvmAddress$1 | EvmSignature | TransactionHandle>;
|
|
4269
4524
|
type PrepareTradingApprovalsError = RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4270
4525
|
declare const PrepareTradingApprovalsError: {
|
|
4271
|
-
isError(error: unknown): error is
|
|
4526
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
4272
4527
|
};
|
|
4273
4528
|
/**
|
|
4274
4529
|
* Starts a trading-setup approval workflow.
|
|
@@ -4287,14 +4542,7 @@ declare const PrepareTradingApprovalsError: {
|
|
|
4287
4542
|
declare function prepareTradingApprovals(client: BaseSecureClient): Promise<TradingApprovalsWorkflow>;
|
|
4288
4543
|
type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSigningError | SigningError | WaitForGaslessTransactionError;
|
|
4289
4544
|
declare const SetupTradingApprovalsError: {
|
|
4290
|
-
isError(error: unknown): error is
|
|
4291
|
-
};
|
|
4292
|
-
type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
|
|
4293
|
-
/**
|
|
4294
|
-
* @deprecated `setupTradingApprovals` now waits internally. You do not need
|
|
4295
|
-
* to call this method, and it will be removed in a later version.
|
|
4296
|
-
*/
|
|
4297
|
-
wait(): Promise<void>;
|
|
4545
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
4298
4546
|
};
|
|
4299
4547
|
/**
|
|
4300
4548
|
* Sets up the approvals required for trading.
|
|
@@ -4305,13 +4553,13 @@ type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
|
|
|
4305
4553
|
* @throws {@link SetupTradingApprovalsError}
|
|
4306
4554
|
* Thrown on failure.
|
|
4307
4555
|
*/
|
|
4308
|
-
declare function setupTradingApprovals(client: BaseSecureClient): Promise<
|
|
4556
|
+
declare function setupTradingApprovals(client: BaseSecureClient): Promise<void>;
|
|
4309
4557
|
|
|
4310
4558
|
declare const ListBuilderTradesRequestSchema: z.ZodObject<{
|
|
4311
4559
|
after: z.ZodOptional<z.ZodString>;
|
|
4312
4560
|
before: z.ZodOptional<z.ZodString>;
|
|
4313
4561
|
builderCode: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.BuilderCode, string>>;
|
|
4314
|
-
cursor: z.ZodOptional<z.
|
|
4562
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4315
4563
|
id: z.ZodOptional<z.ZodString>;
|
|
4316
4564
|
market: z.ZodOptional<z.ZodString>;
|
|
4317
4565
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
@@ -4319,7 +4567,7 @@ declare const ListBuilderTradesRequestSchema: z.ZodObject<{
|
|
|
4319
4567
|
type ListBuilderTradesRequest = z.input<typeof ListBuilderTradesRequestSchema>;
|
|
4320
4568
|
type ListBuilderTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4321
4569
|
declare const ListBuilderTradesError: {
|
|
4322
|
-
isError(error: unknown): error is
|
|
4570
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4323
4571
|
};
|
|
4324
4572
|
/**
|
|
4325
4573
|
* Lists builder-attributed trades.
|
|
@@ -4361,10 +4609,10 @@ declare const FetchMidpointRequestSchema: z.ZodObject<{
|
|
|
4361
4609
|
type FetchMidpointRequest = z.input<typeof FetchMidpointRequestSchema>;
|
|
4362
4610
|
type FetchMidpointError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4363
4611
|
declare const FetchMidpointError: {
|
|
4364
|
-
isError(error: unknown): error is
|
|
4612
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4365
4613
|
};
|
|
4366
4614
|
/**
|
|
4367
|
-
* Fetches the midpoint price for a token.
|
|
4615
|
+
* Fetches the midpoint price for a token as a decimal string.
|
|
4368
4616
|
*
|
|
4369
4617
|
* @remarks
|
|
4370
4618
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4383,17 +4631,17 @@ declare const FetchMidpointError: {
|
|
|
4383
4631
|
* ```
|
|
4384
4632
|
*
|
|
4385
4633
|
*/
|
|
4386
|
-
declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<
|
|
4634
|
+
declare function fetchMidpoint(client: BaseClient, request: FetchMidpointRequest): Promise<DecimalString>;
|
|
4387
4635
|
declare const FetchMidpointsRequestSchema: z.ZodArray<z.ZodObject<{
|
|
4388
4636
|
tokenId: z.ZodString;
|
|
4389
4637
|
}, z.core.$strip>>;
|
|
4390
4638
|
type FetchMidpointsRequest = z.input<typeof FetchMidpointsRequestSchema>;
|
|
4391
4639
|
type FetchMidpointsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4392
4640
|
declare const FetchMidpointsError: {
|
|
4393
|
-
isError(error: unknown): error is
|
|
4641
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4394
4642
|
};
|
|
4395
4643
|
/**
|
|
4396
|
-
* Fetches midpoint prices for multiple tokens.
|
|
4644
|
+
* Fetches midpoint prices for multiple tokens as a token ID keyed lookup.
|
|
4397
4645
|
*
|
|
4398
4646
|
* @remarks
|
|
4399
4647
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4414,14 +4662,14 @@ declare const FetchMidpointsError: {
|
|
|
4414
4662
|
* ```
|
|
4415
4663
|
*
|
|
4416
4664
|
*/
|
|
4417
|
-
declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<
|
|
4665
|
+
declare function fetchMidpoints(client: BaseClient, request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
4418
4666
|
declare const FetchTickSizeRequestSchema: z.ZodObject<{
|
|
4419
4667
|
tokenId: z.ZodString;
|
|
4420
4668
|
}, z.core.$strip>;
|
|
4421
4669
|
type FetchTickSizeRequest = z.input<typeof FetchTickSizeRequestSchema>;
|
|
4422
4670
|
type FetchTickSizeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4423
4671
|
declare const FetchTickSizeError: {
|
|
4424
|
-
isError(error: unknown): error is
|
|
4672
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4425
4673
|
};
|
|
4426
4674
|
/**
|
|
4427
4675
|
* Fetches the minimum price tick size for a token's order book.
|
|
@@ -4449,7 +4697,7 @@ declare const FetchNegRiskRequestSchema: z.ZodObject<{
|
|
|
4449
4697
|
type FetchNegRiskRequest = z.input<typeof FetchNegRiskRequestSchema>;
|
|
4450
4698
|
type FetchNegRiskError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4451
4699
|
declare const FetchNegRiskError: {
|
|
4452
|
-
isError(error: unknown): error is
|
|
4700
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4453
4701
|
};
|
|
4454
4702
|
/**
|
|
4455
4703
|
* Fetches whether a token is in a negative-risk market.
|
|
@@ -4477,7 +4725,7 @@ declare const ResolveConditionByTokenRequestSchema: z.ZodObject<{
|
|
|
4477
4725
|
type ResolveConditionByTokenRequest = z.input<typeof ResolveConditionByTokenRequestSchema>;
|
|
4478
4726
|
type ResolveConditionByTokenError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4479
4727
|
declare const ResolveConditionByTokenError: {
|
|
4480
|
-
isError(error: unknown): error is
|
|
4728
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4481
4729
|
};
|
|
4482
4730
|
/**
|
|
4483
4731
|
* Resolves the condition ID for a token.
|
|
@@ -4495,7 +4743,7 @@ declare const FetchMarketInfoRequestSchema: z.ZodObject<{
|
|
|
4495
4743
|
type FetchMarketInfoRequest = z.input<typeof FetchMarketInfoRequestSchema>;
|
|
4496
4744
|
type FetchMarketInfoError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4497
4745
|
declare const FetchMarketInfoError: {
|
|
4498
|
-
isError(error: unknown): error is
|
|
4746
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4499
4747
|
};
|
|
4500
4748
|
/**
|
|
4501
4749
|
* Fetches market-level metadata for a condition.
|
|
@@ -4513,7 +4761,7 @@ declare const FetchBuilderFeeRatesRequestSchema: z.ZodObject<{
|
|
|
4513
4761
|
type FetchBuilderFeeRatesRequest = z.input<typeof FetchBuilderFeeRatesRequestSchema>;
|
|
4514
4762
|
type FetchBuilderFeeRatesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4515
4763
|
declare const FetchBuilderFeeRatesError: {
|
|
4516
|
-
isError(error: unknown): error is
|
|
4764
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4517
4765
|
};
|
|
4518
4766
|
/**
|
|
4519
4767
|
* Fetches builder maker and taker fee rates.
|
|
@@ -4532,10 +4780,10 @@ declare const FetchPriceRequestSchema: z.ZodObject<{
|
|
|
4532
4780
|
type FetchPriceRequest = z.input<typeof FetchPriceRequestSchema>;
|
|
4533
4781
|
type FetchPriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4534
4782
|
declare const FetchPriceError: {
|
|
4535
|
-
isError(error: unknown): error is
|
|
4783
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4536
4784
|
};
|
|
4537
4785
|
/**
|
|
4538
|
-
* Fetches the current quoted price for a token and side.
|
|
4786
|
+
* Fetches the current quoted price for a token and side as a decimal string.
|
|
4539
4787
|
*
|
|
4540
4788
|
* @remarks
|
|
4541
4789
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4555,7 +4803,7 @@ declare const FetchPriceError: {
|
|
|
4555
4803
|
* ```
|
|
4556
4804
|
*
|
|
4557
4805
|
*/
|
|
4558
|
-
declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<
|
|
4806
|
+
declare function fetchPrice(client: BaseClient, request: FetchPriceRequest): Promise<DecimalString>;
|
|
4559
4807
|
declare const FetchPricesRequestSchema: z.ZodArray<z.ZodObject<{
|
|
4560
4808
|
tokenId: z.ZodString;
|
|
4561
4809
|
side: z.ZodEnum<typeof _polymarket_bindings.OrderSide>;
|
|
@@ -4563,10 +4811,10 @@ declare const FetchPricesRequestSchema: z.ZodArray<z.ZodObject<{
|
|
|
4563
4811
|
type FetchPricesRequest = z.input<typeof FetchPricesRequestSchema>;
|
|
4564
4812
|
type FetchPricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4565
4813
|
declare const FetchPricesError: {
|
|
4566
|
-
isError(error: unknown): error is
|
|
4814
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4567
4815
|
};
|
|
4568
4816
|
/**
|
|
4569
|
-
* Fetches quoted prices for multiple tokens.
|
|
4817
|
+
* Fetches quoted prices for multiple tokens as a token ID keyed lookup.
|
|
4570
4818
|
*
|
|
4571
4819
|
* @remarks
|
|
4572
4820
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4595,7 +4843,7 @@ declare const FetchOrderBookRequestSchema: z.ZodObject<{
|
|
|
4595
4843
|
type FetchOrderBookRequest = z.input<typeof FetchOrderBookRequestSchema>;
|
|
4596
4844
|
type FetchOrderBookError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4597
4845
|
declare const FetchOrderBookError: {
|
|
4598
|
-
isError(error: unknown): error is
|
|
4846
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4599
4847
|
};
|
|
4600
4848
|
/**
|
|
4601
4849
|
* Fetches the current order book for a token.
|
|
@@ -4623,7 +4871,7 @@ declare const FetchOrderBooksRequestSchema: z.ZodArray<z.ZodObject<{
|
|
|
4623
4871
|
type FetchOrderBooksRequest = z.input<typeof FetchOrderBooksRequestSchema>;
|
|
4624
4872
|
type FetchOrderBooksError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4625
4873
|
declare const FetchOrderBooksError: {
|
|
4626
|
-
isError(error: unknown): error is
|
|
4874
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4627
4875
|
};
|
|
4628
4876
|
/**
|
|
4629
4877
|
* Fetches order books for multiple tokens.
|
|
@@ -4653,10 +4901,10 @@ declare const FetchSpreadRequestSchema: z.ZodObject<{
|
|
|
4653
4901
|
type FetchSpreadRequest = z.input<typeof FetchSpreadRequestSchema>;
|
|
4654
4902
|
type FetchSpreadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4655
4903
|
declare const FetchSpreadError: {
|
|
4656
|
-
isError(error: unknown): error is
|
|
4904
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4657
4905
|
};
|
|
4658
4906
|
/**
|
|
4659
|
-
* Fetches the spread for a token.
|
|
4907
|
+
* Fetches the spread for a token as a decimal string.
|
|
4660
4908
|
*
|
|
4661
4909
|
* @remarks
|
|
4662
4910
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4675,17 +4923,17 @@ declare const FetchSpreadError: {
|
|
|
4675
4923
|
* ```
|
|
4676
4924
|
*
|
|
4677
4925
|
*/
|
|
4678
|
-
declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<
|
|
4926
|
+
declare function fetchSpread(client: BaseClient, request: FetchSpreadRequest): Promise<DecimalString>;
|
|
4679
4927
|
declare const FetchSpreadsRequestSchema: z.ZodArray<z.ZodObject<{
|
|
4680
4928
|
tokenId: z.ZodString;
|
|
4681
4929
|
}, z.core.$strip>>;
|
|
4682
4930
|
type FetchSpreadsRequest = z.input<typeof FetchSpreadsRequestSchema>;
|
|
4683
4931
|
type FetchSpreadsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4684
4932
|
declare const FetchSpreadsError: {
|
|
4685
|
-
isError(error: unknown): error is
|
|
4933
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4686
4934
|
};
|
|
4687
4935
|
/**
|
|
4688
|
-
* Fetches spreads for multiple tokens.
|
|
4936
|
+
* Fetches spreads for multiple tokens as a token ID keyed lookup.
|
|
4689
4937
|
*
|
|
4690
4938
|
* @remarks
|
|
4691
4939
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -4706,14 +4954,14 @@ declare const FetchSpreadsError: {
|
|
|
4706
4954
|
* ```
|
|
4707
4955
|
*
|
|
4708
4956
|
*/
|
|
4709
|
-
declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<
|
|
4957
|
+
declare function fetchSpreads(client: BaseClient, request: FetchSpreadsRequest): Promise<Spreads>;
|
|
4710
4958
|
declare const FetchLastTradePriceRequestSchema: z.ZodObject<{
|
|
4711
4959
|
tokenId: z.ZodString;
|
|
4712
4960
|
}, z.core.$strip>;
|
|
4713
4961
|
type FetchLastTradePriceRequest = z.input<typeof FetchLastTradePriceRequestSchema>;
|
|
4714
4962
|
type FetchLastTradePriceError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4715
4963
|
declare const FetchLastTradePriceError: {
|
|
4716
|
-
isError(error: unknown): error is
|
|
4964
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4717
4965
|
};
|
|
4718
4966
|
/**
|
|
4719
4967
|
* Fetches the last traded price for a token.
|
|
@@ -4742,7 +4990,7 @@ declare const FetchLastTradePricesRequestSchema: z.ZodArray<z.ZodObject<{
|
|
|
4742
4990
|
type FetchLastTradePricesRequest = z.input<typeof FetchLastTradePricesRequestSchema>;
|
|
4743
4991
|
type FetchLastTradePricesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4744
4992
|
declare const FetchLastTradePricesError: {
|
|
4745
|
-
isError(error: unknown): error is
|
|
4993
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4746
4994
|
};
|
|
4747
4995
|
/**
|
|
4748
4996
|
* Fetches last traded prices for multiple tokens.
|
|
@@ -4777,7 +5025,7 @@ declare const ListPriceHistoryRequestSchema: z.ZodObject<{
|
|
|
4777
5025
|
type FetchPriceHistoryRequest = z.input<typeof ListPriceHistoryRequestSchema>;
|
|
4778
5026
|
type FetchPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4779
5027
|
declare const FetchPriceHistoryError: {
|
|
4780
|
-
isError(error: unknown): error is
|
|
5028
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4781
5029
|
};
|
|
4782
5030
|
/**
|
|
4783
5031
|
* Fetches historical price points for a token.
|
|
@@ -4803,13 +5051,13 @@ declare const FetchPriceHistoryError: {
|
|
|
4803
5051
|
*/
|
|
4804
5052
|
declare function fetchPriceHistory(client: BaseClient, request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
|
|
4805
5053
|
declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
4806
|
-
cursor: z.ZodOptional<z.
|
|
5054
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4807
5055
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
4808
5056
|
}, z.core.$strip>>;
|
|
4809
5057
|
type ListCurrentRewardsRequest = z.input<typeof ListCurrentRewardsRequestSchema>;
|
|
4810
5058
|
type ListCurrentRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4811
5059
|
declare const ListCurrentRewardsError: {
|
|
4812
|
-
isError(error: unknown): error is
|
|
5060
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4813
5061
|
};
|
|
4814
5062
|
/**
|
|
4815
5063
|
* Lists current active market rewards.
|
|
@@ -4846,13 +5094,13 @@ declare const ListCurrentRewardsError: {
|
|
|
4846
5094
|
declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
|
|
4847
5095
|
declare const ListMarketRewardsRequestSchema: z.ZodObject<{
|
|
4848
5096
|
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
|
|
4849
|
-
cursor: z.ZodOptional<z.
|
|
5097
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4850
5098
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
4851
5099
|
}, z.core.$strip>;
|
|
4852
5100
|
type ListMarketRewardsRequest = z.input<typeof ListMarketRewardsRequestSchema>;
|
|
4853
5101
|
type ListMarketRewardsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4854
5102
|
declare const ListMarketRewardsError: {
|
|
4855
|
-
isError(error: unknown): error is
|
|
5103
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4856
5104
|
};
|
|
4857
5105
|
/**
|
|
4858
5106
|
* Lists reward configurations for a market.
|
|
@@ -4896,7 +5144,7 @@ declare function listMarketRewards(client: BaseClient, request: ListMarketReward
|
|
|
4896
5144
|
|
|
4897
5145
|
declare const ListCommentsRequestSchema: z.ZodObject<{
|
|
4898
5146
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
4899
|
-
cursor: z.ZodOptional<z.
|
|
5147
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4900
5148
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4901
5149
|
getPositions: z.ZodOptional<z.ZodBoolean>;
|
|
4902
5150
|
holdersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4911,7 +5159,7 @@ declare const FetchCommentsByIdRequestSchema: z.ZodObject<{
|
|
|
4911
5159
|
declare const ListCommentsByUserAddressRequestSchema: z.ZodObject<{
|
|
4912
5160
|
address: z.ZodString;
|
|
4913
5161
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
4914
|
-
cursor: z.ZodOptional<z.
|
|
5162
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4915
5163
|
order: z.ZodOptional<z.ZodString>;
|
|
4916
5164
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4917
5165
|
}, z.core.$strip>;
|
|
@@ -4920,7 +5168,7 @@ type FetchCommentsByIdRequest = z.input<typeof FetchCommentsByIdRequestSchema>;
|
|
|
4920
5168
|
type ListCommentsByUserAddressRequest = z.input<typeof ListCommentsByUserAddressRequestSchema>;
|
|
4921
5169
|
type ListCommentsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4922
5170
|
declare const ListCommentsError: {
|
|
4923
|
-
isError(error: unknown): error is
|
|
5171
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4924
5172
|
};
|
|
4925
5173
|
/**
|
|
4926
5174
|
* Lists comments for an event or series.
|
|
@@ -4965,7 +5213,7 @@ declare const ListCommentsError: {
|
|
|
4965
5213
|
declare function listComments(client: BaseClient, request: ListCommentsRequest): Paginated<Comment[]>;
|
|
4966
5214
|
type FetchCommentsByIdError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4967
5215
|
declare const FetchCommentsByIdError: {
|
|
4968
|
-
isError(error: unknown): error is
|
|
5216
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4969
5217
|
};
|
|
4970
5218
|
/**
|
|
4971
5219
|
* Fetches a comment thread by comment id.
|
|
@@ -4989,7 +5237,7 @@ declare const FetchCommentsByIdError: {
|
|
|
4989
5237
|
declare function fetchCommentsById(client: BaseClient, request: FetchCommentsByIdRequest): Promise<Comment[]>;
|
|
4990
5238
|
type ListCommentsByUserAddressError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4991
5239
|
declare const ListCommentsByUserAddressError: {
|
|
4992
|
-
isError(error: unknown): error is
|
|
5240
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4993
5241
|
};
|
|
4994
5242
|
/**
|
|
4995
5243
|
* Lists comments written by a wallet address.
|
|
@@ -5036,7 +5284,7 @@ declare function listCommentsByUserAddress(client: BaseClient, request: ListComm
|
|
|
5036
5284
|
declare const ListEventsRequestSchema: z.ZodObject<{
|
|
5037
5285
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
5038
5286
|
closed: z.ZodDefault<z.ZodBoolean>;
|
|
5039
|
-
cursor: z.ZodOptional<z.
|
|
5287
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5040
5288
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
5041
5289
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
5042
5290
|
endDateMax: z.ZodOptional<z.ZodUnion<[z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, string>>, z.ZodPipe<z.ZodDate, z.ZodTransform<_polymarket_bindings.IsoDateTimeString, Date>>]>>;
|
|
@@ -5113,7 +5361,7 @@ declare const FetchEventLiveVolumeRequestSchema: z.ZodObject<{
|
|
|
5113
5361
|
type FetchEventLiveVolumeRequest = z.input<typeof FetchEventLiveVolumeRequestSchema>;
|
|
5114
5362
|
type ListEventsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5115
5363
|
declare const ListEventsError: {
|
|
5116
|
-
isError(error: unknown): error is
|
|
5364
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5117
5365
|
};
|
|
5118
5366
|
/**
|
|
5119
5367
|
* Lists events.
|
|
@@ -5158,7 +5406,7 @@ declare const ListEventsError: {
|
|
|
5158
5406
|
declare function listEvents(client: BaseClient, request?: ListEventsRequest): Paginated<Event[]>;
|
|
5159
5407
|
type FetchEventError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5160
5408
|
declare const FetchEventError: {
|
|
5161
|
-
isError(error: unknown): error is
|
|
5409
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5162
5410
|
};
|
|
5163
5411
|
/**
|
|
5164
5412
|
* Fetches an event.
|
|
@@ -5189,7 +5437,7 @@ declare const FetchEventError: {
|
|
|
5189
5437
|
declare function fetchEvent(client: BaseClient, request: FetchEventRequest): Promise<Event>;
|
|
5190
5438
|
type FetchEventTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5191
5439
|
declare const FetchEventTagsError: {
|
|
5192
|
-
isError(error: unknown): error is
|
|
5440
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5193
5441
|
};
|
|
5194
5442
|
/**
|
|
5195
5443
|
* Fetches an event's tags.
|
|
@@ -5212,7 +5460,7 @@ declare const FetchEventTagsError: {
|
|
|
5212
5460
|
declare function fetchEventTags(client: BaseClient, request: FetchEventTagsRequest): Promise<TagReference[]>;
|
|
5213
5461
|
type FetchEventLiveVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5214
5462
|
declare const FetchEventLiveVolumeError: {
|
|
5215
|
-
isError(error: unknown): error is
|
|
5463
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5216
5464
|
};
|
|
5217
5465
|
/**
|
|
5218
5466
|
* Fetches live volume for an event.
|
|
@@ -5235,7 +5483,7 @@ declare const FetchEventLiveVolumeError: {
|
|
|
5235
5483
|
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
|
|
5236
5484
|
|
|
5237
5485
|
declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
5238
|
-
cursor: z.ZodOptional<z.
|
|
5486
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5239
5487
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
5240
5488
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
5241
5489
|
DAY: "DAY";
|
|
@@ -5265,7 +5513,7 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
5265
5513
|
TECH: "TECH";
|
|
5266
5514
|
FINANCE: "FINANCE";
|
|
5267
5515
|
}>>;
|
|
5268
|
-
cursor: z.ZodOptional<z.
|
|
5516
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5269
5517
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
5270
5518
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
5271
5519
|
DAY: "DAY";
|
|
@@ -5285,7 +5533,7 @@ type ListBuilderVolumeRequest = z.input<typeof ListBuilderVolumeRequestSchema>;
|
|
|
5285
5533
|
type ListTraderLeaderboardRequest = z.input<typeof ListTraderLeaderboardRequestSchema>;
|
|
5286
5534
|
type ListBuilderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5287
5535
|
declare const ListBuilderLeaderboardError: {
|
|
5288
|
-
isError(error: unknown): error is
|
|
5536
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5289
5537
|
};
|
|
5290
5538
|
/**
|
|
5291
5539
|
* Lists builder leaderboard rankings.
|
|
@@ -5328,7 +5576,7 @@ declare const ListBuilderLeaderboardError: {
|
|
|
5328
5576
|
declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest): Paginated<LeaderboardEntry[]>;
|
|
5329
5577
|
type ListBuilderVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5330
5578
|
declare const ListBuilderVolumeError: {
|
|
5331
|
-
isError(error: unknown): error is
|
|
5579
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5332
5580
|
};
|
|
5333
5581
|
/**
|
|
5334
5582
|
* Lists daily builder volume entries.
|
|
@@ -5351,7 +5599,7 @@ declare const ListBuilderVolumeError: {
|
|
|
5351
5599
|
declare function fetchBuilderVolume(client: BaseClient, request?: ListBuilderVolumeRequest): Promise<BuilderVolumeEntry[]>;
|
|
5352
5600
|
type ListTraderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5353
5601
|
declare const ListTraderLeaderboardError: {
|
|
5354
|
-
isError(error: unknown): error is
|
|
5602
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5355
5603
|
};
|
|
5356
5604
|
/**
|
|
5357
5605
|
* Lists trader leaderboard rankings.
|
|
@@ -5395,11 +5643,68 @@ declare const ListTraderLeaderboardError: {
|
|
|
5395
5643
|
*/
|
|
5396
5644
|
declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
|
|
5397
5645
|
|
|
5646
|
+
declare const ListMarketClarificationsRequestSchema: z.ZodObject<{
|
|
5647
|
+
marketId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5648
|
+
eventId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5649
|
+
questionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5650
|
+
state: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof MarketClarificationState>, z.ZodArray<z.ZodEnum<typeof MarketClarificationState>>]>>;
|
|
5651
|
+
showInFrontend: z.ZodOptional<z.ZodBoolean>;
|
|
5652
|
+
txHash: z.ZodOptional<z.ZodString>;
|
|
5653
|
+
order: z.ZodOptional<z.ZodString>;
|
|
5654
|
+
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
5655
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5656
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
5657
|
+
}, z.core.$strip>;
|
|
5658
|
+
type ListMarketClarificationsRequest = z.input<typeof ListMarketClarificationsRequestSchema>;
|
|
5659
|
+
type ListMarketClarificationsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5660
|
+
declare const ListMarketClarificationsError: {
|
|
5661
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5662
|
+
};
|
|
5663
|
+
/**
|
|
5664
|
+
* Lists market clarifications — official notes that resolve ambiguity in how a
|
|
5665
|
+
* market settles.
|
|
5666
|
+
*
|
|
5667
|
+
* @remarks
|
|
5668
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5669
|
+
*
|
|
5670
|
+
* @throws {@link ListMarketClarificationsError}
|
|
5671
|
+
* Thrown on failure.
|
|
5672
|
+
*
|
|
5673
|
+
* @example
|
|
5674
|
+
* Fetch the first page of results:
|
|
5675
|
+
* ```ts
|
|
5676
|
+
* const result = listMarketClarifications(client, {
|
|
5677
|
+
* marketId: '512038',
|
|
5678
|
+
* pageSize: 25,
|
|
5679
|
+
* });
|
|
5680
|
+
*
|
|
5681
|
+
* const firstPage = await result.firstPage();
|
|
5682
|
+
*
|
|
5683
|
+
* // Optionally, fetch additional pages:
|
|
5684
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
5685
|
+
* // page.items: MarketClarification[]
|
|
5686
|
+
* }
|
|
5687
|
+
* ```
|
|
5688
|
+
*
|
|
5689
|
+
* @example
|
|
5690
|
+
* Loop through all pages with `for await`:
|
|
5691
|
+
* ```ts
|
|
5692
|
+
* const result = listMarketClarifications(client, {
|
|
5693
|
+
* marketId: '512038',
|
|
5694
|
+
* });
|
|
5695
|
+
*
|
|
5696
|
+
* for await (const page of result) {
|
|
5697
|
+
* // page.items: MarketClarification[]
|
|
5698
|
+
* }
|
|
5699
|
+
* ```
|
|
5700
|
+
*/
|
|
5701
|
+
declare function listMarketClarifications(client: BaseClient, request?: ListMarketClarificationsRequest): Paginated<MarketClarification[]>;
|
|
5702
|
+
|
|
5398
5703
|
declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
5399
5704
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
5400
5705
|
closed: z.ZodOptional<z.ZodBoolean>;
|
|
5401
5706
|
clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5402
|
-
cursor: z.ZodOptional<z.
|
|
5707
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5403
5708
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
5404
5709
|
conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
|
|
5405
5710
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5460,7 +5765,7 @@ declare const ListOpenInterestRequestSchema: z.ZodObject<{
|
|
|
5460
5765
|
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5461
5766
|
}, z.core.$strip>;
|
|
5462
5767
|
declare const ListMarketPositionsRequestSchema: z.ZodObject<{
|
|
5463
|
-
cursor: z.ZodOptional<z.
|
|
5768
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5464
5769
|
market: z.ZodString;
|
|
5465
5770
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
5466
5771
|
user: z.ZodOptional<z.ZodString>;
|
|
@@ -5485,7 +5790,7 @@ type ListOpenInterestRequest = z.input<typeof ListOpenInterestRequestSchema>;
|
|
|
5485
5790
|
type ListMarketPositionsRequest = z.input<typeof ListMarketPositionsRequestSchema>;
|
|
5486
5791
|
type ListMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5487
5792
|
declare const ListMarketsError: {
|
|
5488
|
-
isError(error: unknown): error is
|
|
5793
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5489
5794
|
};
|
|
5490
5795
|
/**
|
|
5491
5796
|
* Lists markets.
|
|
@@ -5530,14 +5835,14 @@ declare const ListMarketsError: {
|
|
|
5530
5835
|
*/
|
|
5531
5836
|
declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market[]>;
|
|
5532
5837
|
declare const ListComboMarketsRequestSchema: z.ZodObject<{
|
|
5533
|
-
cursor: z.ZodOptional<z.
|
|
5838
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5534
5839
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
5535
5840
|
exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
|
|
5536
5841
|
}, z.core.$strip>;
|
|
5537
5842
|
type ListComboMarketsRequest = z.input<typeof ListComboMarketsRequestSchema>;
|
|
5538
5843
|
type ListComboMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5539
5844
|
declare const ListComboMarketsError: {
|
|
5540
|
-
isError(error: unknown): error is
|
|
5845
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5541
5846
|
};
|
|
5542
5847
|
/**
|
|
5543
5848
|
* Lists markets available for Combos.
|
|
@@ -5575,7 +5880,7 @@ declare const ListComboMarketsError: {
|
|
|
5575
5880
|
declare function listComboMarkets(client: BaseClient, request?: ListComboMarketsRequest): Paginated<ComboMarket[]>;
|
|
5576
5881
|
type FetchMarketError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5577
5882
|
declare const FetchMarketError: {
|
|
5578
|
-
isError(error: unknown): error is
|
|
5883
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5579
5884
|
};
|
|
5580
5885
|
/**
|
|
5581
5886
|
* Fetches a market.
|
|
@@ -5610,7 +5915,7 @@ declare const FetchMarketError: {
|
|
|
5610
5915
|
declare function fetchMarket(client: BaseClient, request: FetchMarketRequest): Promise<Market>;
|
|
5611
5916
|
type FetchMarketTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5612
5917
|
declare const FetchMarketTagsError: {
|
|
5613
|
-
isError(error: unknown): error is
|
|
5918
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5614
5919
|
};
|
|
5615
5920
|
/**
|
|
5616
5921
|
* Fetches a market's tags.
|
|
@@ -5633,7 +5938,7 @@ declare const FetchMarketTagsError: {
|
|
|
5633
5938
|
declare function fetchMarketTags(client: BaseClient, request: FetchMarketTagsRequest): Promise<TagReference[]>;
|
|
5634
5939
|
type ListMarketHoldersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5635
5940
|
declare const ListMarketHoldersError: {
|
|
5636
|
-
isError(error: unknown): error is
|
|
5941
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5637
5942
|
};
|
|
5638
5943
|
/**
|
|
5639
5944
|
* Lists the top holders for one or more markets.
|
|
@@ -5657,7 +5962,7 @@ declare const ListMarketHoldersError: {
|
|
|
5657
5962
|
declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest): Promise<MetaHolder[]>;
|
|
5658
5963
|
type ListOpenInterestError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5659
5964
|
declare const ListOpenInterestError: {
|
|
5660
|
-
isError(error: unknown): error is
|
|
5965
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5661
5966
|
};
|
|
5662
5967
|
/**
|
|
5663
5968
|
* Lists open interest for one or more markets.
|
|
@@ -5680,7 +5985,7 @@ declare const ListOpenInterestError: {
|
|
|
5680
5985
|
declare function listOpenInterest(client: BaseClient, request?: ListOpenInterestRequest): Promise<OpenInterest[]>;
|
|
5681
5986
|
type ListMarketPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5682
5987
|
declare const ListMarketPositionsError: {
|
|
5683
|
-
isError(error: unknown): error is
|
|
5988
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5684
5989
|
};
|
|
5685
5990
|
/**
|
|
5686
5991
|
* Lists positions for a market.
|
|
@@ -5722,279 +6027,522 @@ declare const ListMarketPositionsError: {
|
|
|
5722
6027
|
*/
|
|
5723
6028
|
declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPosition[]>;
|
|
5724
6029
|
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
instrumentId
|
|
5738
|
-
}
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
clientOrderId
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
end?: number
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
end: z.ZodOptional<z.ZodNumber>;
|
|
5767
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
|
|
5768
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
5769
|
-
cursor: PaginationCursor | undefined;
|
|
5770
|
-
params: Omit<Record<string, unknown>, "start" | "end"> & PerpsHistoryParams;
|
|
5771
|
-
}, {
|
|
5772
|
-
start?: number | undefined;
|
|
5773
|
-
end?: number | undefined;
|
|
5774
|
-
cursor?: PaginationCursor | undefined;
|
|
5775
|
-
}>>, z.ZodPipe<z.ZodObject<{
|
|
5776
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
5777
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
5778
|
-
cursor: PaginationCursor;
|
|
5779
|
-
params: undefined;
|
|
5780
|
-
}, {
|
|
5781
|
-
cursor: PaginationCursor;
|
|
5782
|
-
}>>]>;
|
|
5783
|
-
type ListPerpsFillsRequest = z.input<typeof ListPerpsFillsRequestSchema>;
|
|
5784
|
-
declare const ListPerpsFundingPaymentsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5785
|
-
start: z.ZodOptional<z.ZodNumber>;
|
|
5786
|
-
end: z.ZodOptional<z.ZodNumber>;
|
|
5787
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
|
|
5788
|
-
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
5789
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
5790
|
-
cursor: PaginationCursor | undefined;
|
|
5791
|
-
params: Omit<{
|
|
5792
|
-
start?: number | undefined;
|
|
5793
|
-
end?: number | undefined;
|
|
5794
|
-
instrumentId?: PerpsInstrumentId | undefined;
|
|
5795
|
-
}, "start" | "end"> & PerpsHistoryParams;
|
|
5796
|
-
}, {
|
|
5797
|
-
start?: number | undefined;
|
|
5798
|
-
end?: number | undefined;
|
|
5799
|
-
cursor?: PaginationCursor | undefined;
|
|
5800
|
-
instrumentId?: PerpsInstrumentId | undefined;
|
|
5801
|
-
}>>, z.ZodPipe<z.ZodObject<{
|
|
5802
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
5803
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
5804
|
-
cursor: PaginationCursor;
|
|
5805
|
-
params: undefined;
|
|
5806
|
-
}, {
|
|
5807
|
-
cursor: PaginationCursor;
|
|
5808
|
-
}>>]>;
|
|
5809
|
-
type ListPerpsFundingPaymentsRequest = z.input<typeof ListPerpsFundingPaymentsRequestSchema>;
|
|
5810
|
-
declare const ListPerpsDepositsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5811
|
-
start: z.ZodOptional<z.ZodNumber>;
|
|
5812
|
-
end: z.ZodOptional<z.ZodNumber>;
|
|
5813
|
-
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>>;
|
|
5814
|
-
depositStatus: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsDepositStatus>>;
|
|
5815
|
-
hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>;
|
|
5816
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
5817
|
-
cursor: PaginationCursor | undefined;
|
|
5818
|
-
params: Omit<{
|
|
5819
|
-
start?: number | undefined;
|
|
5820
|
-
end?: number | undefined;
|
|
5821
|
-
depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
|
|
5822
|
-
hash?: _polymarket_types.TxHash | undefined;
|
|
5823
|
-
}, "start" | "end"> & PerpsHistoryParams;
|
|
5824
|
-
}, {
|
|
5825
|
-
start?: number | undefined;
|
|
5826
|
-
end?: number | undefined;
|
|
5827
|
-
cursor?: PaginationCursor | undefined;
|
|
5828
|
-
depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
|
|
5829
|
-
hash?: _polymarket_types.TxHash | undefined;
|
|
5830
|
-
}>>, z.ZodPipe<z.ZodObject<{
|
|
5831
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
5832
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
6030
|
+
/**
|
|
6031
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6032
|
+
*/
|
|
6033
|
+
type FetchPerpsAccountConfigRequest = {
|
|
6034
|
+
/** Optional Perps instrument identifier filter. */
|
|
6035
|
+
instrumentId?: number;
|
|
6036
|
+
};
|
|
6037
|
+
/**
|
|
6038
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6039
|
+
*/
|
|
6040
|
+
type FetchPerpsOpenOrdersRequest = {
|
|
6041
|
+
/** Optional Perps instrument identifier filter. */
|
|
6042
|
+
instrumentId?: number;
|
|
6043
|
+
};
|
|
6044
|
+
/**
|
|
6045
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6046
|
+
*/
|
|
6047
|
+
type FetchPerpsOrdersRequest = {
|
|
6048
|
+
/** Optional order identifier filter. */
|
|
6049
|
+
orderId?: number;
|
|
6050
|
+
/** Optional caller-supplied idempotency identifier filter. */
|
|
6051
|
+
clientOrderId?: string;
|
|
6052
|
+
/** Optional Perps instrument identifier filter. */
|
|
6053
|
+
instrumentId?: number;
|
|
6054
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
6055
|
+
start?: number;
|
|
6056
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6057
|
+
end?: number;
|
|
6058
|
+
};
|
|
6059
|
+
/**
|
|
6060
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6061
|
+
*/
|
|
6062
|
+
type ListPerpsFillsRequest = {
|
|
6063
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
6064
|
+
start?: number;
|
|
6065
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6066
|
+
end?: number;
|
|
6067
|
+
/** Opaque cursor returned by a previous page. */
|
|
6068
|
+
cursor?: PaginationCursor;
|
|
6069
|
+
} | {
|
|
6070
|
+
/** Opaque cursor returned by a previous page. */
|
|
5833
6071
|
cursor: PaginationCursor;
|
|
5834
|
-
|
|
5835
|
-
|
|
6072
|
+
};
|
|
6073
|
+
/**
|
|
6074
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6075
|
+
*/
|
|
6076
|
+
type ListPerpsFundingPaymentsRequest = {
|
|
6077
|
+
/** Optional Perps instrument identifier filter. */
|
|
6078
|
+
instrumentId?: number;
|
|
6079
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
6080
|
+
start?: number;
|
|
6081
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6082
|
+
end?: number;
|
|
6083
|
+
/** Opaque cursor returned by a previous page. */
|
|
6084
|
+
cursor?: PaginationCursor;
|
|
6085
|
+
} | {
|
|
6086
|
+
/** Opaque cursor returned by a previous page. */
|
|
5836
6087
|
cursor: PaginationCursor;
|
|
5837
|
-
}
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
hash
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
start?: number | undefined;
|
|
5855
|
-
end?: number | undefined;
|
|
5856
|
-
cursor?: PaginationCursor | undefined;
|
|
5857
|
-
withdrawalStatus?: _polymarket_bindings_perps.PerpsWithdrawalStatus | undefined;
|
|
5858
|
-
hash?: _polymarket_types.TxHash | undefined;
|
|
5859
|
-
}>>, z.ZodPipe<z.ZodObject<{
|
|
5860
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
5861
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
6088
|
+
};
|
|
6089
|
+
/**
|
|
6090
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6091
|
+
*/
|
|
6092
|
+
type ListPerpsDepositsRequest = {
|
|
6093
|
+
/** Optional deposit status filter. */
|
|
6094
|
+
depositStatus?: PerpsDepositStatus;
|
|
6095
|
+
/** Optional transaction hash filter. */
|
|
6096
|
+
hash?: string;
|
|
6097
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
6098
|
+
start?: number;
|
|
6099
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6100
|
+
end?: number;
|
|
6101
|
+
/** Opaque cursor returned by a previous page. */
|
|
6102
|
+
cursor?: PaginationCursor;
|
|
6103
|
+
} | {
|
|
6104
|
+
/** Opaque cursor returned by a previous page. */
|
|
5862
6105
|
cursor: PaginationCursor;
|
|
5863
|
-
|
|
5864
|
-
|
|
6106
|
+
};
|
|
6107
|
+
/**
|
|
6108
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6109
|
+
*/
|
|
6110
|
+
type ListPerpsWithdrawalsRequest = {
|
|
6111
|
+
/** Optional withdrawal status filter. */
|
|
6112
|
+
withdrawalStatus?: PerpsWithdrawalStatus;
|
|
6113
|
+
/** Optional transaction hash filter. */
|
|
6114
|
+
hash?: string;
|
|
6115
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
6116
|
+
start?: number;
|
|
6117
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6118
|
+
end?: number;
|
|
6119
|
+
/** Opaque cursor returned by a previous page. */
|
|
6120
|
+
cursor?: PaginationCursor;
|
|
6121
|
+
} | {
|
|
6122
|
+
/** Opaque cursor returned by a previous page. */
|
|
5865
6123
|
cursor: PaginationCursor;
|
|
5866
|
-
}
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
cursor: PaginationCursor | undefined;
|
|
5875
|
-
params: PerpsIntervalHistoryParams;
|
|
5876
|
-
}, {
|
|
5877
|
-
interval: _polymarket_bindings_perps.PerpsPnlInterval;
|
|
6124
|
+
};
|
|
6125
|
+
/**
|
|
6126
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6127
|
+
*/
|
|
6128
|
+
type ListPerpsEquityHistoryRequest = {
|
|
6129
|
+
/** History interval. */
|
|
6130
|
+
interval: PerpsPnlInterval;
|
|
6131
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
5878
6132
|
start: number;
|
|
5879
|
-
end
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
cursor
|
|
5883
|
-
}
|
|
5884
|
-
cursor
|
|
5885
|
-
params: undefined;
|
|
5886
|
-
}, {
|
|
6133
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6134
|
+
end?: number;
|
|
6135
|
+
/** Opaque cursor returned by a previous page. */
|
|
6136
|
+
cursor?: PaginationCursor;
|
|
6137
|
+
} | {
|
|
6138
|
+
/** Opaque cursor returned by a previous page. */
|
|
5887
6139
|
cursor: PaginationCursor;
|
|
5888
|
-
}
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
cursor: PaginationCursor | undefined;
|
|
5897
|
-
params: PerpsIntervalHistoryParams;
|
|
5898
|
-
}, {
|
|
5899
|
-
interval: _polymarket_bindings_perps.PerpsPnlInterval;
|
|
6140
|
+
};
|
|
6141
|
+
/**
|
|
6142
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6143
|
+
*/
|
|
6144
|
+
type ListPerpsPnlHistoryRequest = {
|
|
6145
|
+
/** History interval. */
|
|
6146
|
+
interval: PerpsPnlInterval;
|
|
6147
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
5900
6148
|
start: number;
|
|
5901
|
-
end
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
cursor
|
|
5905
|
-
}
|
|
5906
|
-
cursor
|
|
5907
|
-
params: undefined;
|
|
5908
|
-
}, {
|
|
6149
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
6150
|
+
end?: number;
|
|
6151
|
+
/** Opaque cursor returned by a previous page. */
|
|
6152
|
+
cursor?: PaginationCursor;
|
|
6153
|
+
} | {
|
|
6154
|
+
/** Opaque cursor returned by a previous page. */
|
|
5909
6155
|
cursor: PaginationCursor;
|
|
5910
|
-
}
|
|
5911
|
-
type ListPerpsPnlHistoryRequest = z.input<typeof ListPerpsPnlHistoryRequestSchema>;
|
|
6156
|
+
};
|
|
5912
6157
|
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
type
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
type
|
|
6158
|
+
/**
|
|
6159
|
+
* Good-til-cancelled Perps order.
|
|
6160
|
+
*
|
|
6161
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6162
|
+
*/
|
|
6163
|
+
type PerpsPlaceGtcOrderRequest = {
|
|
6164
|
+
/** Perps instrument identifier to trade. */
|
|
6165
|
+
instrumentId: number;
|
|
6166
|
+
/** Trade direction. */
|
|
6167
|
+
side: OrderSide;
|
|
6168
|
+
/** Limit price. */
|
|
6169
|
+
price: PerpsDecimalInput;
|
|
6170
|
+
/** Order quantity. */
|
|
6171
|
+
quantity: PerpsDecimalInput;
|
|
6172
|
+
/** Good-til-cancelled execution. */
|
|
6173
|
+
timeInForce: PerpsTimeInForce.GTC;
|
|
6174
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
6175
|
+
postOnly?: boolean;
|
|
6176
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6177
|
+
reduceOnly?: boolean;
|
|
6178
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6179
|
+
clientOrderId?: string;
|
|
6180
|
+
};
|
|
6181
|
+
/**
|
|
6182
|
+
* Immediate-or-cancel Perps order.
|
|
6183
|
+
*
|
|
6184
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6185
|
+
*/
|
|
6186
|
+
type PerpsPlaceIocOrderRequest = {
|
|
6187
|
+
/** Perps instrument identifier to trade. */
|
|
6188
|
+
instrumentId: number;
|
|
6189
|
+
/** Trade direction. */
|
|
6190
|
+
side: OrderSide;
|
|
6191
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6192
|
+
price?: PerpsDecimalInput;
|
|
6193
|
+
/** Order quantity. */
|
|
6194
|
+
quantity: PerpsDecimalInput;
|
|
6195
|
+
/** Immediate-or-cancel execution. */
|
|
6196
|
+
timeInForce: PerpsTimeInForce.IOC;
|
|
6197
|
+
postOnly?: never;
|
|
6198
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6199
|
+
reduceOnly?: boolean;
|
|
6200
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6201
|
+
clientOrderId?: string;
|
|
6202
|
+
};
|
|
6203
|
+
/**
|
|
6204
|
+
* Fill-or-kill Perps order.
|
|
6205
|
+
*
|
|
6206
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6207
|
+
*/
|
|
6208
|
+
type PerpsPlaceFokOrderRequest = {
|
|
6209
|
+
/** Perps instrument identifier to trade. */
|
|
6210
|
+
instrumentId: number;
|
|
6211
|
+
/** Trade direction. */
|
|
6212
|
+
side: OrderSide;
|
|
6213
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6214
|
+
price?: PerpsDecimalInput;
|
|
6215
|
+
/** Order quantity. */
|
|
6216
|
+
quantity: PerpsDecimalInput;
|
|
6217
|
+
/** Fill-or-kill execution. */
|
|
6218
|
+
timeInForce: PerpsTimeInForce.FOK;
|
|
6219
|
+
postOnly?: never;
|
|
6220
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6221
|
+
reduceOnly?: boolean;
|
|
6222
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6223
|
+
clientOrderId?: string;
|
|
6224
|
+
};
|
|
6225
|
+
/**
|
|
6226
|
+
* Request parameters for one Perps order.
|
|
6227
|
+
*
|
|
6228
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6229
|
+
*/
|
|
6230
|
+
type PerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
|
|
6231
|
+
/**
|
|
6232
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6233
|
+
*/
|
|
6234
|
+
type PerpsTpSlTrigger = {
|
|
6235
|
+
triggerPrice: PerpsDecimalInput;
|
|
6236
|
+
limitPrice?: PerpsDecimalInput;
|
|
6237
|
+
};
|
|
6238
|
+
/**
|
|
6239
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6240
|
+
*/
|
|
6241
|
+
type PerpsPositionTpSlTrigger = {
|
|
6242
|
+
triggerPrice: PerpsDecimalInput;
|
|
6243
|
+
};
|
|
6244
|
+
/**
|
|
6245
|
+
* Request parameters for posting one or more Perps orders.
|
|
6246
|
+
*
|
|
6247
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6248
|
+
*/
|
|
6249
|
+
type PostPerpsOrdersRequest = {
|
|
6250
|
+
/** Orders to post as one command. */
|
|
6251
|
+
orders: PerpsOrderRequest[];
|
|
6252
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6253
|
+
expiresAt?: number;
|
|
6254
|
+
};
|
|
6255
|
+
/**
|
|
6256
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6257
|
+
*/
|
|
6258
|
+
type PlacePerpsOrderRequest = {
|
|
6259
|
+
/** Perps instrument identifier to trade. */
|
|
6260
|
+
instrumentId: number;
|
|
6261
|
+
/** Trade direction. */
|
|
6262
|
+
side: OrderSide;
|
|
6263
|
+
/** Limit price. */
|
|
6264
|
+
price: PerpsDecimalInput;
|
|
6265
|
+
/** Order quantity. */
|
|
6266
|
+
quantity: PerpsDecimalInput;
|
|
6267
|
+
/** Good-til-cancelled execution. */
|
|
6268
|
+
timeInForce: PerpsTimeInForce.GTC;
|
|
6269
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
6270
|
+
postOnly?: boolean;
|
|
6271
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6272
|
+
reduceOnly?: boolean;
|
|
6273
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6274
|
+
clientOrderId?: string;
|
|
6275
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6276
|
+
expiresAt?: number;
|
|
6277
|
+
takeProfit?: never;
|
|
6278
|
+
stopLoss?: never;
|
|
6279
|
+
} | {
|
|
6280
|
+
/** Perps instrument identifier to trade. */
|
|
6281
|
+
instrumentId: number;
|
|
6282
|
+
/** Trade direction. */
|
|
6283
|
+
side: OrderSide;
|
|
6284
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6285
|
+
price?: PerpsDecimalInput;
|
|
6286
|
+
/** Order quantity. */
|
|
6287
|
+
quantity: PerpsDecimalInput;
|
|
6288
|
+
/** Immediate-or-cancel execution. */
|
|
6289
|
+
timeInForce: PerpsTimeInForce.IOC;
|
|
6290
|
+
postOnly?: never;
|
|
6291
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6292
|
+
reduceOnly?: boolean;
|
|
6293
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6294
|
+
clientOrderId?: string;
|
|
6295
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6296
|
+
expiresAt?: number;
|
|
6297
|
+
takeProfit?: never;
|
|
6298
|
+
stopLoss?: never;
|
|
6299
|
+
} | {
|
|
6300
|
+
/** Perps instrument identifier to trade. */
|
|
6301
|
+
instrumentId: number;
|
|
6302
|
+
/** Trade direction. */
|
|
6303
|
+
side: OrderSide;
|
|
6304
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6305
|
+
price?: PerpsDecimalInput;
|
|
6306
|
+
/** Order quantity. */
|
|
6307
|
+
quantity: PerpsDecimalInput;
|
|
6308
|
+
/** Fill-or-kill execution. */
|
|
6309
|
+
timeInForce: PerpsTimeInForce.FOK;
|
|
6310
|
+
postOnly?: never;
|
|
6311
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6312
|
+
reduceOnly?: boolean;
|
|
6313
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6314
|
+
clientOrderId?: string;
|
|
6315
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6316
|
+
expiresAt?: number;
|
|
6317
|
+
takeProfit?: never;
|
|
6318
|
+
stopLoss?: never;
|
|
6319
|
+
};
|
|
6320
|
+
/**
|
|
6321
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6322
|
+
*/
|
|
6323
|
+
type PlacePerpsOrderWithTpSlRequest = {
|
|
6324
|
+
/** Perps instrument identifier to trade. */
|
|
6325
|
+
instrumentId: number;
|
|
6326
|
+
/** Trade direction. */
|
|
6327
|
+
side: OrderSide;
|
|
6328
|
+
/** Limit price. */
|
|
6329
|
+
price: PerpsDecimalInput;
|
|
6330
|
+
/** Order quantity. */
|
|
6331
|
+
quantity: PerpsDecimalInput;
|
|
6332
|
+
/** Good-til-cancelled execution. */
|
|
6333
|
+
timeInForce: PerpsTimeInForce.GTC;
|
|
6334
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
6335
|
+
postOnly?: boolean;
|
|
6336
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6337
|
+
reduceOnly?: boolean;
|
|
6338
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6339
|
+
clientOrderId?: string;
|
|
6340
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6341
|
+
expiresAt?: number;
|
|
6342
|
+
/** Take-profit trigger to place with the entry order. */
|
|
6343
|
+
takeProfit: PerpsTpSlTrigger;
|
|
6344
|
+
/** Optional stop-loss trigger to place with the entry order. */
|
|
6345
|
+
stopLoss?: PerpsTpSlTrigger;
|
|
6346
|
+
} | {
|
|
6347
|
+
/** Perps instrument identifier to trade. */
|
|
6348
|
+
instrumentId: number;
|
|
6349
|
+
/** Trade direction. */
|
|
6350
|
+
side: OrderSide;
|
|
6351
|
+
/** Limit price. */
|
|
6352
|
+
price: PerpsDecimalInput;
|
|
6353
|
+
/** Order quantity. */
|
|
6354
|
+
quantity: PerpsDecimalInput;
|
|
6355
|
+
/** Good-til-cancelled execution. */
|
|
6356
|
+
timeInForce: PerpsTimeInForce.GTC;
|
|
6357
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
6358
|
+
postOnly?: boolean;
|
|
6359
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6360
|
+
reduceOnly?: boolean;
|
|
6361
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6362
|
+
clientOrderId?: string;
|
|
6363
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6364
|
+
expiresAt?: number;
|
|
6365
|
+
/** Optional take-profit trigger to place with the entry order. */
|
|
6366
|
+
takeProfit?: PerpsTpSlTrigger;
|
|
6367
|
+
/** Stop-loss trigger to place with the entry order. */
|
|
6368
|
+
stopLoss: PerpsTpSlTrigger;
|
|
6369
|
+
} | {
|
|
6370
|
+
/** Perps instrument identifier to trade. */
|
|
6371
|
+
instrumentId: number;
|
|
6372
|
+
/** Trade direction. */
|
|
6373
|
+
side: OrderSide;
|
|
6374
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6375
|
+
price?: PerpsDecimalInput;
|
|
6376
|
+
/** Order quantity. */
|
|
6377
|
+
quantity: PerpsDecimalInput;
|
|
6378
|
+
/** Immediate-or-cancel execution. */
|
|
6379
|
+
timeInForce: PerpsTimeInForce.IOC;
|
|
6380
|
+
postOnly?: never;
|
|
6381
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6382
|
+
reduceOnly?: boolean;
|
|
6383
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6384
|
+
clientOrderId?: string;
|
|
6385
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6386
|
+
expiresAt?: number;
|
|
6387
|
+
/** Take-profit trigger to place with the entry order. */
|
|
6388
|
+
takeProfit: PerpsTpSlTrigger;
|
|
6389
|
+
/** Optional stop-loss trigger to place with the entry order. */
|
|
6390
|
+
stopLoss?: PerpsTpSlTrigger;
|
|
6391
|
+
} | {
|
|
6392
|
+
/** Perps instrument identifier to trade. */
|
|
6393
|
+
instrumentId: number;
|
|
6394
|
+
/** Trade direction. */
|
|
6395
|
+
side: OrderSide;
|
|
6396
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6397
|
+
price?: PerpsDecimalInput;
|
|
6398
|
+
/** Order quantity. */
|
|
6399
|
+
quantity: PerpsDecimalInput;
|
|
6400
|
+
/** Immediate-or-cancel execution. */
|
|
6401
|
+
timeInForce: PerpsTimeInForce.IOC;
|
|
6402
|
+
postOnly?: never;
|
|
6403
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6404
|
+
reduceOnly?: boolean;
|
|
6405
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6406
|
+
clientOrderId?: string;
|
|
6407
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6408
|
+
expiresAt?: number;
|
|
6409
|
+
/** Optional take-profit trigger to place with the entry order. */
|
|
6410
|
+
takeProfit?: PerpsTpSlTrigger;
|
|
6411
|
+
/** Stop-loss trigger to place with the entry order. */
|
|
6412
|
+
stopLoss: PerpsTpSlTrigger;
|
|
6413
|
+
} | {
|
|
6414
|
+
/** Perps instrument identifier to trade. */
|
|
6415
|
+
instrumentId: number;
|
|
6416
|
+
/** Trade direction. */
|
|
6417
|
+
side: OrderSide;
|
|
6418
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6419
|
+
price?: PerpsDecimalInput;
|
|
6420
|
+
/** Order quantity. */
|
|
6421
|
+
quantity: PerpsDecimalInput;
|
|
6422
|
+
/** Fill-or-kill execution. */
|
|
6423
|
+
timeInForce: PerpsTimeInForce.FOK;
|
|
6424
|
+
postOnly?: never;
|
|
6425
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6426
|
+
reduceOnly?: boolean;
|
|
6427
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6428
|
+
clientOrderId?: string;
|
|
6429
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6430
|
+
expiresAt?: number;
|
|
6431
|
+
/** Take-profit trigger to place with the entry order. */
|
|
6432
|
+
takeProfit: PerpsTpSlTrigger;
|
|
6433
|
+
/** Optional stop-loss trigger to place with the entry order. */
|
|
6434
|
+
stopLoss?: PerpsTpSlTrigger;
|
|
6435
|
+
} | {
|
|
6436
|
+
/** Perps instrument identifier to trade. */
|
|
6437
|
+
instrumentId: number;
|
|
6438
|
+
/** Trade direction. */
|
|
6439
|
+
side: OrderSide;
|
|
6440
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
6441
|
+
price?: PerpsDecimalInput;
|
|
6442
|
+
/** Order quantity. */
|
|
6443
|
+
quantity: PerpsDecimalInput;
|
|
6444
|
+
/** Fill-or-kill execution. */
|
|
6445
|
+
timeInForce: PerpsTimeInForce.FOK;
|
|
6446
|
+
postOnly?: never;
|
|
6447
|
+
/** Whether the order may only reduce or close an existing position. */
|
|
6448
|
+
reduceOnly?: boolean;
|
|
6449
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
6450
|
+
clientOrderId?: string;
|
|
6451
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6452
|
+
expiresAt?: number;
|
|
6453
|
+
/** Optional take-profit trigger to place with the entry order. */
|
|
6454
|
+
takeProfit?: PerpsTpSlTrigger;
|
|
6455
|
+
/** Stop-loss trigger to place with the entry order. */
|
|
6456
|
+
stopLoss: PerpsTpSlTrigger;
|
|
6457
|
+
};
|
|
6458
|
+
/**
|
|
6459
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6460
|
+
*/
|
|
6461
|
+
type PlacePerpsPositionTpSlRequest = {
|
|
6462
|
+
/** Perps instrument identifier whose current position should receive TP/SL protection. */
|
|
6463
|
+
instrumentId: number;
|
|
6464
|
+
/** Take-profit trigger to place for the current position. */
|
|
6465
|
+
takeProfit: PerpsPositionTpSlTrigger;
|
|
6466
|
+
/** Optional stop-loss trigger to place alongside the take-profit. */
|
|
6467
|
+
stopLoss?: PerpsPositionTpSlTrigger;
|
|
6468
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6469
|
+
expiresAt?: number;
|
|
6470
|
+
} | {
|
|
6471
|
+
/** Perps instrument identifier whose current position should receive TP/SL protection. */
|
|
6472
|
+
instrumentId: number;
|
|
6473
|
+
/** Optional take-profit trigger to place alongside the stop-loss. */
|
|
6474
|
+
takeProfit?: PerpsPositionTpSlTrigger;
|
|
6475
|
+
/** Stop-loss trigger to place for the current position. */
|
|
6476
|
+
stopLoss: PerpsPositionTpSlTrigger;
|
|
6477
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6478
|
+
expiresAt?: number;
|
|
6479
|
+
};
|
|
6480
|
+
/**
|
|
6481
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6482
|
+
*/
|
|
6483
|
+
type CancelPerpsOrderRequest = {
|
|
6484
|
+
/** Order identifier to cancel. */
|
|
6485
|
+
orderId: number;
|
|
6486
|
+
clientOrderId?: never;
|
|
6487
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6488
|
+
expiresAt?: number;
|
|
6489
|
+
} | {
|
|
6490
|
+
/** Caller-supplied idempotency identifier to cancel. */
|
|
6491
|
+
clientOrderId: string;
|
|
6492
|
+
orderId?: never;
|
|
6493
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6494
|
+
expiresAt?: number;
|
|
6495
|
+
};
|
|
6496
|
+
/**
|
|
6497
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6498
|
+
*/
|
|
6499
|
+
type CancelPerpsOrdersRequest = {
|
|
6500
|
+
/** Order identifiers to cancel. */
|
|
6501
|
+
orderIds: number[];
|
|
6502
|
+
clientOrderIds?: never;
|
|
6503
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6504
|
+
expiresAt?: number;
|
|
6505
|
+
} | {
|
|
6506
|
+
/** Caller-supplied idempotency identifiers to cancel. */
|
|
6507
|
+
clientOrderIds: string[];
|
|
6508
|
+
orderIds?: never;
|
|
6509
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6510
|
+
expiresAt?: number;
|
|
6511
|
+
};
|
|
6512
|
+
/**
|
|
6513
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6514
|
+
*/
|
|
6515
|
+
type CancelAllPerpsOrdersRequest = {
|
|
6516
|
+
/** Optional Perps instrument identifier to scope cancellation. */
|
|
6517
|
+
instrumentId?: number;
|
|
6518
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
6519
|
+
expiresAt?: number;
|
|
6520
|
+
};
|
|
6521
|
+
/**
|
|
6522
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6523
|
+
*/
|
|
6524
|
+
type UpdatePerpsLeverageRequest = {
|
|
6525
|
+
/** Perps instrument identifier whose leverage should be updated. */
|
|
6526
|
+
instrumentId: number;
|
|
6527
|
+
/** Target leverage multiplier. */
|
|
6528
|
+
leverage: number;
|
|
6529
|
+
/** Whether the instrument should use cross margin. */
|
|
6530
|
+
crossMargin: boolean;
|
|
6531
|
+
};
|
|
6532
|
+
/**
|
|
6533
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6534
|
+
*/
|
|
6535
|
+
type UpdatePerpsLeverageError = RequestRejectedError | SigningError | TransportError | UserInputError;
|
|
6536
|
+
/**
|
|
6537
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6538
|
+
*/
|
|
6539
|
+
declare const UpdatePerpsLeverageError: {
|
|
6540
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | RequestRejectedError;
|
|
6541
|
+
};
|
|
5997
6542
|
|
|
6543
|
+
/**
|
|
6544
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6545
|
+
*/
|
|
5998
6546
|
type PerpsSessionOptions = {
|
|
5999
6547
|
chainId: number;
|
|
6000
6548
|
credentials: PerpsCredentials;
|
|
@@ -6003,59 +6551,356 @@ type PerpsSessionOptions = {
|
|
|
6003
6551
|
restUrl: string;
|
|
6004
6552
|
wsUrl: string;
|
|
6005
6553
|
};
|
|
6554
|
+
/**
|
|
6555
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6556
|
+
*/
|
|
6557
|
+
type PerpsSessionLifecycleError = RequestRejectedError | TransportError;
|
|
6558
|
+
/**
|
|
6559
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6560
|
+
*/
|
|
6561
|
+
type PerpsSessionAccountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6562
|
+
/**
|
|
6563
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6564
|
+
*/
|
|
6565
|
+
type PerpsSessionTradingError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6566
|
+
/**
|
|
6567
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6568
|
+
*/
|
|
6569
|
+
type PerpsPlacedTpSlOrder = {
|
|
6570
|
+
orderId: PerpsOrderId;
|
|
6571
|
+
};
|
|
6572
|
+
/**
|
|
6573
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6574
|
+
*/
|
|
6575
|
+
type PerpsPlacedTpSlOrders = {
|
|
6576
|
+
takeProfit?: PerpsPlacedTpSlOrder;
|
|
6577
|
+
stopLoss?: PerpsPlacedTpSlOrder;
|
|
6578
|
+
};
|
|
6579
|
+
/**
|
|
6580
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6581
|
+
*/
|
|
6582
|
+
type PlacePerpsOrderResult = {
|
|
6583
|
+
order: PerpsOrder;
|
|
6584
|
+
};
|
|
6585
|
+
/**
|
|
6586
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6587
|
+
*/
|
|
6588
|
+
type PlacePerpsOrderWithTpSlResult = PlacePerpsOrderResult & {
|
|
6589
|
+
tpSl: PerpsPlacedTpSlOrders;
|
|
6590
|
+
};
|
|
6591
|
+
/**
|
|
6592
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6593
|
+
*/
|
|
6594
|
+
type PlacePerpsPositionTpSlResult = {
|
|
6595
|
+
tpSl: PerpsPlacedTpSlOrders;
|
|
6596
|
+
};
|
|
6597
|
+
/**
|
|
6598
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6599
|
+
*/
|
|
6006
6600
|
declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
6007
6601
|
#private;
|
|
6008
6602
|
readonly credentials: PerpsCredentials;
|
|
6603
|
+
/**
|
|
6604
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6605
|
+
*/
|
|
6009
6606
|
constructor(options: PerpsSessionOptions);
|
|
6607
|
+
/**
|
|
6608
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6609
|
+
*/
|
|
6010
6610
|
get closed(): boolean;
|
|
6611
|
+
/**
|
|
6612
|
+
* Connects and authenticates the session WebSocket.
|
|
6613
|
+
*
|
|
6614
|
+
* @throws {@link PerpsSessionLifecycleError}
|
|
6615
|
+
* Thrown on failure.
|
|
6616
|
+
*
|
|
6617
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6618
|
+
*/
|
|
6011
6619
|
connect(): Promise<void>;
|
|
6620
|
+
/**
|
|
6621
|
+
* Closes the session and releases pending requests.
|
|
6622
|
+
*
|
|
6623
|
+
* @throws {@link PerpsSessionLifecycleError}
|
|
6624
|
+
* Thrown on failure.
|
|
6625
|
+
*
|
|
6626
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6627
|
+
*/
|
|
6012
6628
|
close(): Promise<void>;
|
|
6629
|
+
/**
|
|
6630
|
+
* Iterates authenticated Perps account events emitted by this session.
|
|
6631
|
+
*
|
|
6632
|
+
* @example
|
|
6633
|
+
* ```ts
|
|
6634
|
+
* for await (const event of session) {
|
|
6635
|
+
* if (event.type === 'order') {
|
|
6636
|
+
* console.log(event.payload.id);
|
|
6637
|
+
* }
|
|
6638
|
+
* }
|
|
6639
|
+
* ```
|
|
6640
|
+
*
|
|
6641
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6642
|
+
*/
|
|
6013
6643
|
[Symbol.asyncIterator](): AsyncIterator<PerpsSessionEvent>;
|
|
6644
|
+
/**
|
|
6645
|
+
* Fetches current Perps balances for the authenticated account.
|
|
6646
|
+
*
|
|
6647
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6648
|
+
* Thrown on failure.
|
|
6649
|
+
*
|
|
6650
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6651
|
+
*/
|
|
6014
6652
|
fetchBalances(): Promise<PerpsBalance[]>;
|
|
6653
|
+
/**
|
|
6654
|
+
* Fetches the current Perps portfolio for the authenticated account.
|
|
6655
|
+
*
|
|
6656
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6657
|
+
* Thrown on failure.
|
|
6658
|
+
*
|
|
6659
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6660
|
+
*/
|
|
6015
6661
|
fetchPortfolio(): Promise<PerpsPortfolio>;
|
|
6662
|
+
/**
|
|
6663
|
+
* Fetches account-level Perps statistics for the authenticated account.
|
|
6664
|
+
*
|
|
6665
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6666
|
+
* Thrown on failure.
|
|
6667
|
+
*
|
|
6668
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6669
|
+
*/
|
|
6670
|
+
fetchStats(): Promise<PerpsAccountStats>;
|
|
6671
|
+
/**
|
|
6672
|
+
* Fetches Perps account configuration, optionally filtered by instrument.
|
|
6673
|
+
*
|
|
6674
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6675
|
+
* Thrown on failure.
|
|
6676
|
+
*
|
|
6677
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6678
|
+
*/
|
|
6016
6679
|
fetchAccountConfig(request?: FetchPerpsAccountConfigRequest): Promise<PerpsAccountConfig[]>;
|
|
6680
|
+
/**
|
|
6681
|
+
* Fetches currently open Perps orders, optionally filtered by instrument.
|
|
6682
|
+
*
|
|
6683
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6684
|
+
* Thrown on failure.
|
|
6685
|
+
*
|
|
6686
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6687
|
+
*/
|
|
6017
6688
|
fetchOpenOrders(request?: FetchPerpsOpenOrdersRequest): Promise<PerpsOrder[]>;
|
|
6689
|
+
/**
|
|
6690
|
+
* Fetches Perps orders for the authenticated account.
|
|
6691
|
+
*
|
|
6692
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6693
|
+
* Thrown on failure.
|
|
6694
|
+
*
|
|
6695
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6696
|
+
*/
|
|
6018
6697
|
fetchOrders(request?: FetchPerpsOrdersRequest): Promise<PerpsOrder[]>;
|
|
6698
|
+
/**
|
|
6699
|
+
* Lists Perps fills with SDK-owned pagination.
|
|
6700
|
+
*
|
|
6701
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6702
|
+
* Thrown on failure.
|
|
6703
|
+
*
|
|
6704
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6705
|
+
*/
|
|
6019
6706
|
listFills(request?: ListPerpsFillsRequest): Paginated<PerpsAccountFill[]>;
|
|
6707
|
+
/**
|
|
6708
|
+
* Lists Perps funding payments with SDK-owned pagination.
|
|
6709
|
+
*
|
|
6710
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6711
|
+
* Thrown on failure.
|
|
6712
|
+
*
|
|
6713
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6714
|
+
*/
|
|
6020
6715
|
listFundingPayments(request?: ListPerpsFundingPaymentsRequest): Paginated<PerpsAccountFundingPayment[]>;
|
|
6716
|
+
/**
|
|
6717
|
+
* Lists Perps deposits with SDK-owned pagination.
|
|
6718
|
+
*
|
|
6719
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6720
|
+
* Thrown on failure.
|
|
6721
|
+
*
|
|
6722
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6723
|
+
*/
|
|
6021
6724
|
listDeposits(request?: ListPerpsDepositsRequest): Paginated<PerpsDeposit[]>;
|
|
6725
|
+
/**
|
|
6726
|
+
* Lists Perps withdrawals with SDK-owned pagination.
|
|
6727
|
+
*
|
|
6728
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6729
|
+
* Thrown on failure.
|
|
6730
|
+
*
|
|
6731
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6732
|
+
*/
|
|
6022
6733
|
listWithdrawals(request?: ListPerpsWithdrawalsRequest): Paginated<PerpsWithdrawal[]>;
|
|
6734
|
+
/**
|
|
6735
|
+
* Lists Perps equity history with SDK-owned pagination.
|
|
6736
|
+
*
|
|
6737
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6738
|
+
* Thrown on failure.
|
|
6739
|
+
*
|
|
6740
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6741
|
+
*/
|
|
6023
6742
|
listEquityHistory(request: ListPerpsEquityHistoryRequest): Paginated<PerpsEquityPoint[]>;
|
|
6743
|
+
/**
|
|
6744
|
+
* Lists Perps PnL history with SDK-owned pagination.
|
|
6745
|
+
*
|
|
6746
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6747
|
+
* Thrown on failure.
|
|
6748
|
+
*
|
|
6749
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6750
|
+
*/
|
|
6024
6751
|
listPnlHistory(request: ListPerpsPnlHistoryRequest): Paginated<PerpsPnlPoint[]>;
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6752
|
+
/**
|
|
6753
|
+
* Places one Perps order and resolves with the first matching orders update.
|
|
6754
|
+
*
|
|
6755
|
+
* @example
|
|
6756
|
+
* ```ts
|
|
6757
|
+
* const { order } = await session.placeOrder({
|
|
6758
|
+
* instrumentId: 1,
|
|
6759
|
+
* price: '100',
|
|
6760
|
+
* quantity: '1',
|
|
6761
|
+
* side: OrderSide.BUY,
|
|
6762
|
+
* timeInForce: PerpsTimeInForce.GTC,
|
|
6763
|
+
* });
|
|
6764
|
+
* ```
|
|
6765
|
+
*
|
|
6766
|
+
* @example
|
|
6767
|
+
* ```ts
|
|
6768
|
+
* const { order, tpSl } = await session.placeOrder({
|
|
6769
|
+
* instrumentId: 1,
|
|
6770
|
+
* price: '100',
|
|
6771
|
+
* quantity: '1',
|
|
6772
|
+
* side: OrderSide.BUY,
|
|
6773
|
+
* stopLoss: { triggerPrice: '90' },
|
|
6774
|
+
* timeInForce: PerpsTimeInForce.GTC,
|
|
6775
|
+
* });
|
|
6776
|
+
* ```
|
|
6777
|
+
*
|
|
6778
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6779
|
+
* Thrown on failure.
|
|
6780
|
+
*
|
|
6781
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6782
|
+
*/
|
|
6783
|
+
placeOrder(request: PlacePerpsOrderWithTpSlRequest): Promise<PlacePerpsOrderWithTpSlResult>;
|
|
6784
|
+
/**
|
|
6785
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6786
|
+
*/
|
|
6787
|
+
placeOrder(request: PlacePerpsOrderRequest): Promise<PlacePerpsOrderResult>;
|
|
6788
|
+
/**
|
|
6789
|
+
* Posts one or more Perps orders and returns queue-entry acknowledgements.
|
|
6790
|
+
*
|
|
6791
|
+
* @remarks
|
|
6792
|
+
* This is a low-level method. Most SDK consumers should prefer `placeOrder`.
|
|
6793
|
+
*
|
|
6794
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6795
|
+
* Thrown on failure.
|
|
6796
|
+
*
|
|
6797
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6798
|
+
*/
|
|
6799
|
+
postOrders(request: PostPerpsOrdersRequest): Promise<PerpsPostOrderAck[]>;
|
|
6800
|
+
/**
|
|
6801
|
+
* Places take-profit and/or stop-loss protection for the current position.
|
|
6802
|
+
*
|
|
6803
|
+
* @remarks
|
|
6804
|
+
* The exit side is inferred from the current position for the requested
|
|
6805
|
+
* instrument.
|
|
6806
|
+
*
|
|
6807
|
+
* @example
|
|
6808
|
+
* ```ts
|
|
6809
|
+
* const { tpSl } = await session.placePositionTpSl({
|
|
6810
|
+
* instrumentId: 1,
|
|
6811
|
+
* stopLoss: { triggerPrice: '90' },
|
|
6812
|
+
* });
|
|
6813
|
+
* ```
|
|
6814
|
+
*
|
|
6815
|
+
* @throws {@link PerpsSessionAccountError}
|
|
6816
|
+
* Thrown when the current position cannot be read.
|
|
6817
|
+
*
|
|
6818
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6819
|
+
* Thrown when the TP/SL command fails.
|
|
6820
|
+
*
|
|
6821
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6822
|
+
*/
|
|
6823
|
+
placePositionTpSl(request: PlacePerpsPositionTpSlRequest): Promise<PlacePerpsPositionTpSlResult>;
|
|
6824
|
+
/**
|
|
6825
|
+
* Cancels one Perps order and returns the cancel result.
|
|
6826
|
+
*
|
|
6827
|
+
* @remarks
|
|
6828
|
+
* The returned status reflects whether the cancel happened.
|
|
6829
|
+
*
|
|
6830
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6831
|
+
* Thrown on failure.
|
|
6832
|
+
*
|
|
6833
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6834
|
+
*/
|
|
6835
|
+
cancelOrder(request: CancelPerpsOrderRequest): Promise<PerpsCancelOrderResult>;
|
|
6836
|
+
/**
|
|
6837
|
+
* Cancels one or more Perps orders and returns one result per requested order.
|
|
6838
|
+
*
|
|
6839
|
+
* @remarks
|
|
6840
|
+
* Each returned status reflects whether that cancel happened.
|
|
6841
|
+
*
|
|
6842
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6843
|
+
* Thrown on failure.
|
|
6844
|
+
*
|
|
6845
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6846
|
+
*/
|
|
6847
|
+
cancelOrders(request: CancelPerpsOrdersRequest): Promise<PerpsCancelOrderResult[]>;
|
|
6848
|
+
/**
|
|
6849
|
+
* Cancels all open Perps orders for the authenticated account.
|
|
6850
|
+
*
|
|
6851
|
+
* @remarks
|
|
6852
|
+
* Omit `instrumentId` to cancel open orders across all instruments. The
|
|
6853
|
+
* endpoint returns once the cancel-all request is accepted; individual orders
|
|
6854
|
+
* can still race with fills or other cancels.
|
|
6855
|
+
*
|
|
6856
|
+
* @throws {@link PerpsSessionTradingError}
|
|
6857
|
+
* Thrown on failure.
|
|
6858
|
+
*
|
|
6859
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6860
|
+
*/
|
|
6861
|
+
cancelAllOrders(request?: CancelAllPerpsOrdersRequest): Promise<void>;
|
|
6862
|
+
/**
|
|
6863
|
+
* Updates Perps leverage and margin mode for an instrument.
|
|
6864
|
+
*
|
|
6865
|
+
* @example
|
|
6866
|
+
* ```ts
|
|
6867
|
+
* await session.updateLeverage({
|
|
6868
|
+
* crossMargin: true,
|
|
6869
|
+
* instrumentId: 1,
|
|
6870
|
+
* leverage: 2,
|
|
6871
|
+
* });
|
|
6872
|
+
* ```
|
|
6873
|
+
*
|
|
6874
|
+
* @throws {@link UpdatePerpsLeverageError}
|
|
6875
|
+
* Thrown on failure.
|
|
6876
|
+
*
|
|
6877
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6878
|
+
*/
|
|
6879
|
+
updateLeverage(request: UpdatePerpsLeverageRequest): Promise<PerpsUpdateLeverageResult>;
|
|
6033
6880
|
}
|
|
6034
6881
|
|
|
6035
6882
|
type PerpsPublicReadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6036
6883
|
declare const PerpsPublicReadError: {
|
|
6037
|
-
isError(error: unknown): error is
|
|
6884
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6038
6885
|
};
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>>;
|
|
6052
|
-
instrumentType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentType>>;
|
|
6053
|
-
category: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentCategory>>;
|
|
6054
|
-
}, z.core.$strip>>;
|
|
6055
|
-
type FetchPerpsInstrumentsRequest = z.input<typeof FetchPerpsInstrumentsRequestSchema>;
|
|
6886
|
+
/**
|
|
6887
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6888
|
+
*/
|
|
6889
|
+
type FetchPerpsInstrumentsRequest = {
|
|
6890
|
+
/** Perps instrument identifier to fetch. */
|
|
6891
|
+
instrumentId?: number;
|
|
6892
|
+
/** Optional instrument category filter. */
|
|
6893
|
+
category?: PerpsInstrumentCategory;
|
|
6894
|
+
};
|
|
6895
|
+
/**
|
|
6896
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6897
|
+
*/
|
|
6056
6898
|
type FetchPerpsInstrumentsError = PerpsPublicReadError;
|
|
6899
|
+
/**
|
|
6900
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6901
|
+
*/
|
|
6057
6902
|
declare const FetchPerpsInstrumentsError: {
|
|
6058
|
-
isError(error: unknown): error is
|
|
6903
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6059
6904
|
};
|
|
6060
6905
|
/**
|
|
6061
6906
|
* Fetches Perps instruments.
|
|
@@ -6065,15 +6910,26 @@ declare const FetchPerpsInstrumentsError: {
|
|
|
6065
6910
|
*
|
|
6066
6911
|
* @throws {@link FetchPerpsInstrumentsError}
|
|
6067
6912
|
* Thrown on failure.
|
|
6913
|
+
*
|
|
6914
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6068
6915
|
*/
|
|
6069
6916
|
declare function fetchPerpsInstruments(client: BaseClient, request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
type FetchPerpsTickerRequest =
|
|
6917
|
+
/**
|
|
6918
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6919
|
+
*/
|
|
6920
|
+
type FetchPerpsTickerRequest = {
|
|
6921
|
+
/** Perps instrument identifier whose ticker should be fetched. */
|
|
6922
|
+
instrumentId: number;
|
|
6923
|
+
};
|
|
6924
|
+
/**
|
|
6925
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6926
|
+
*/
|
|
6074
6927
|
type FetchPerpsTickerError = PerpsPublicReadError;
|
|
6928
|
+
/**
|
|
6929
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6930
|
+
*/
|
|
6075
6931
|
declare const FetchPerpsTickerError: {
|
|
6076
|
-
isError(error: unknown): error is
|
|
6932
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6077
6933
|
};
|
|
6078
6934
|
/**
|
|
6079
6935
|
* Fetches the current Perps ticker for an instrument.
|
|
@@ -6083,15 +6939,26 @@ declare const FetchPerpsTickerError: {
|
|
|
6083
6939
|
*
|
|
6084
6940
|
* @throws {@link FetchPerpsTickerError}
|
|
6085
6941
|
* Thrown on failure.
|
|
6942
|
+
*
|
|
6943
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6086
6944
|
*/
|
|
6087
6945
|
declare function fetchPerpsTicker(client: BaseClient, request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
type FetchPerpsTickersRequest =
|
|
6946
|
+
/**
|
|
6947
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6948
|
+
*/
|
|
6949
|
+
type FetchPerpsTickersRequest = {
|
|
6950
|
+
/** Optional Perps instrument identifier filter. */
|
|
6951
|
+
instrumentId?: number;
|
|
6952
|
+
};
|
|
6953
|
+
/**
|
|
6954
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6955
|
+
*/
|
|
6092
6956
|
type FetchPerpsTickersError = PerpsPublicReadError;
|
|
6957
|
+
/**
|
|
6958
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6959
|
+
*/
|
|
6093
6960
|
declare const FetchPerpsTickersError: {
|
|
6094
|
-
isError(error: unknown): error is
|
|
6961
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6095
6962
|
};
|
|
6096
6963
|
/**
|
|
6097
6964
|
* Fetches current Perps tickers.
|
|
@@ -6101,16 +6968,32 @@ declare const FetchPerpsTickersError: {
|
|
|
6101
6968
|
*
|
|
6102
6969
|
* @throws {@link FetchPerpsTickersError}
|
|
6103
6970
|
* Thrown on failure.
|
|
6971
|
+
*
|
|
6972
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6104
6973
|
*/
|
|
6105
6974
|
declare function fetchPerpsTickers(client: BaseClient, request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6975
|
+
/**
|
|
6976
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6977
|
+
*/
|
|
6978
|
+
type PerpsBookDepth = 10 | 100 | 500 | 1000;
|
|
6979
|
+
/**
|
|
6980
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6981
|
+
*/
|
|
6982
|
+
type FetchPerpsBookRequest = {
|
|
6983
|
+
/** Perps instrument identifier whose order book should be fetched. */
|
|
6984
|
+
instrumentId: number;
|
|
6985
|
+
/** Number of price levels to return on each side. */
|
|
6986
|
+
depth?: PerpsBookDepth;
|
|
6987
|
+
};
|
|
6988
|
+
/**
|
|
6989
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6990
|
+
*/
|
|
6111
6991
|
type FetchPerpsBookError = PerpsPublicReadError;
|
|
6992
|
+
/**
|
|
6993
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6994
|
+
*/
|
|
6112
6995
|
declare const FetchPerpsBookError: {
|
|
6113
|
-
isError(error: unknown): error is
|
|
6996
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6114
6997
|
};
|
|
6115
6998
|
/**
|
|
6116
6999
|
* Fetches a Perps order book.
|
|
@@ -6120,35 +7003,37 @@ declare const FetchPerpsBookError: {
|
|
|
6120
7003
|
*
|
|
6121
7004
|
* @throws {@link FetchPerpsBookError}
|
|
6122
7005
|
* Thrown on failure.
|
|
7006
|
+
*
|
|
7007
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6123
7008
|
*/
|
|
6124
7009
|
declare function fetchPerpsBook(client: BaseClient, request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
cursor: PaginationCursor | undefined;
|
|
6133
|
-
params: PerpsCandlesParams;
|
|
6134
|
-
}, {
|
|
6135
|
-
instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
|
|
7010
|
+
/**
|
|
7011
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7012
|
+
*/
|
|
7013
|
+
type ListPerpsCandlesRequest = {
|
|
7014
|
+
/** Perps instrument identifier whose candles should be listed. */
|
|
7015
|
+
instrumentId: number;
|
|
7016
|
+
/** Candle interval. */
|
|
6136
7017
|
interval: PerpsKlineInterval;
|
|
6137
|
-
start
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
cursor
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
}, {
|
|
7018
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
7019
|
+
start?: number;
|
|
7020
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
7021
|
+
end?: number;
|
|
7022
|
+
/** Opaque cursor returned by a previous page. */
|
|
7023
|
+
cursor?: PaginationCursor;
|
|
7024
|
+
} | {
|
|
7025
|
+
/** Opaque cursor returned by a previous page. */
|
|
6146
7026
|
cursor: PaginationCursor;
|
|
6147
|
-
}
|
|
6148
|
-
|
|
7027
|
+
};
|
|
7028
|
+
/**
|
|
7029
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7030
|
+
*/
|
|
6149
7031
|
type ListPerpsCandlesError = PerpsPublicReadError;
|
|
7032
|
+
/**
|
|
7033
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7034
|
+
*/
|
|
6150
7035
|
declare const ListPerpsCandlesError: {
|
|
6151
|
-
isError(error: unknown): error is
|
|
7036
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6152
7037
|
};
|
|
6153
7038
|
/**
|
|
6154
7039
|
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
@@ -6158,33 +7043,35 @@ declare const ListPerpsCandlesError: {
|
|
|
6158
7043
|
*
|
|
6159
7044
|
* @throws {@link ListPerpsCandlesError}
|
|
6160
7045
|
* Thrown on failure.
|
|
7046
|
+
*
|
|
7047
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6161
7048
|
*/
|
|
6162
7049
|
declare function listPerpsCandles(client: BaseClient, request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
6178
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
6179
|
-
cursor: PaginationCursor;
|
|
6180
|
-
params: undefined;
|
|
6181
|
-
}, {
|
|
7050
|
+
/**
|
|
7051
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7052
|
+
*/
|
|
7053
|
+
type ListPerpsFundingHistoryRequest = {
|
|
7054
|
+
/** Perps instrument identifier whose funding history should be listed. */
|
|
7055
|
+
instrumentId: number;
|
|
7056
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
7057
|
+
start?: number;
|
|
7058
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
7059
|
+
end?: number;
|
|
7060
|
+
/** Opaque cursor returned by a previous page. */
|
|
7061
|
+
cursor?: PaginationCursor;
|
|
7062
|
+
} | {
|
|
7063
|
+
/** Opaque cursor returned by a previous page. */
|
|
6182
7064
|
cursor: PaginationCursor;
|
|
6183
|
-
}
|
|
6184
|
-
|
|
7065
|
+
};
|
|
7066
|
+
/**
|
|
7067
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7068
|
+
*/
|
|
6185
7069
|
type ListPerpsFundingHistoryError = PerpsPublicReadError;
|
|
7070
|
+
/**
|
|
7071
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7072
|
+
*/
|
|
6186
7073
|
declare const ListPerpsFundingHistoryError: {
|
|
6187
|
-
isError(error: unknown): error is
|
|
7074
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6188
7075
|
};
|
|
6189
7076
|
/**
|
|
6190
7077
|
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
@@ -6194,33 +7081,35 @@ declare const ListPerpsFundingHistoryError: {
|
|
|
6194
7081
|
*
|
|
6195
7082
|
* @throws {@link ListPerpsFundingHistoryError}
|
|
6196
7083
|
* Thrown on failure.
|
|
7084
|
+
*
|
|
7085
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6197
7086
|
*/
|
|
6198
7087
|
declare function listPerpsFundingHistory(client: BaseClient, request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
cursor: z.ZodPipe<z.ZodString, z.ZodTransform<PaginationCursor, string>>;
|
|
6214
|
-
}, z.core.$strip>, z.ZodTransform<{
|
|
6215
|
-
cursor: PaginationCursor;
|
|
6216
|
-
params: undefined;
|
|
6217
|
-
}, {
|
|
7088
|
+
/**
|
|
7089
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7090
|
+
*/
|
|
7091
|
+
type ListPerpsTradesRequest = {
|
|
7092
|
+
/** Perps instrument identifier whose recent trades should be listed. */
|
|
7093
|
+
instrumentId: number;
|
|
7094
|
+
/** Inclusive start timestamp in milliseconds. */
|
|
7095
|
+
start?: number;
|
|
7096
|
+
/** Inclusive end timestamp in milliseconds. */
|
|
7097
|
+
end?: number;
|
|
7098
|
+
/** Opaque cursor returned by a previous page. */
|
|
7099
|
+
cursor?: PaginationCursor;
|
|
7100
|
+
} | {
|
|
7101
|
+
/** Opaque cursor returned by a previous page. */
|
|
6218
7102
|
cursor: PaginationCursor;
|
|
6219
|
-
}
|
|
6220
|
-
|
|
7103
|
+
};
|
|
7104
|
+
/**
|
|
7105
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7106
|
+
*/
|
|
6221
7107
|
type ListPerpsTradesError = PerpsPublicReadError;
|
|
7108
|
+
/**
|
|
7109
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7110
|
+
*/
|
|
6222
7111
|
declare const ListPerpsTradesError: {
|
|
6223
|
-
isError(error: unknown): error is
|
|
7112
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6224
7113
|
};
|
|
6225
7114
|
/**
|
|
6226
7115
|
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
@@ -6230,11 +7119,19 @@ declare const ListPerpsTradesError: {
|
|
|
6230
7119
|
*
|
|
6231
7120
|
* @throws {@link ListPerpsTradesError}
|
|
6232
7121
|
* Thrown on failure.
|
|
7122
|
+
*
|
|
7123
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6233
7124
|
*/
|
|
6234
7125
|
declare function listPerpsTrades(client: BaseClient, request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
7126
|
+
/**
|
|
7127
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7128
|
+
*/
|
|
6235
7129
|
type FetchPerpsFeesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
7130
|
+
/**
|
|
7131
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7132
|
+
*/
|
|
6236
7133
|
declare const FetchPerpsFeesError: {
|
|
6237
|
-
isError(error: unknown): error is
|
|
7134
|
+
isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6238
7135
|
};
|
|
6239
7136
|
/**
|
|
6240
7137
|
* Fetches the Perps fee schedule.
|
|
@@ -6244,69 +7141,126 @@ declare const FetchPerpsFeesError: {
|
|
|
6244
7141
|
*
|
|
6245
7142
|
* @throws {@link FetchPerpsFeesError}
|
|
6246
7143
|
* Thrown on failure.
|
|
7144
|
+
*
|
|
7145
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6247
7146
|
*/
|
|
6248
7147
|
declare function fetchPerpsFees(client: BaseClient): Promise<PerpsFeeScheduleEntry[]>;
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
7148
|
+
/**
|
|
7149
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7150
|
+
*/
|
|
7151
|
+
type CreatePerpsSessionRequest = {
|
|
7152
|
+
/** Delegated credential lifetime in milliseconds. */
|
|
7153
|
+
expiresIn?: number;
|
|
7154
|
+
/** Optional label for the delegated credentials. */
|
|
7155
|
+
label?: string;
|
|
7156
|
+
};
|
|
7157
|
+
/**
|
|
7158
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7159
|
+
*/
|
|
7160
|
+
type ResumePerpsSessionRequest = {
|
|
7161
|
+
/** Existing delegated Perps credentials to validate and resume. */
|
|
7162
|
+
credentials: PerpsCredentials;
|
|
7163
|
+
};
|
|
7164
|
+
/**
|
|
7165
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7166
|
+
*/
|
|
6266
7167
|
type OpenPerpsSessionRequest = CreatePerpsSessionRequest | ResumePerpsSessionRequest;
|
|
6267
|
-
|
|
7168
|
+
/**
|
|
7169
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7170
|
+
*/
|
|
7171
|
+
type RevokePerpsCredentialsRequest = {
|
|
7172
|
+
/** Proxy address whose delegated credentials should be revoked. */
|
|
7173
|
+
proxy: string;
|
|
7174
|
+
};
|
|
7175
|
+
/**
|
|
7176
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7177
|
+
*/
|
|
6268
7178
|
type PerpsDepositWorkflowRequest = GaslessWorkflowRequest | SendPerpsDepositTransactionRequest;
|
|
7179
|
+
/**
|
|
7180
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7181
|
+
*/
|
|
6269
7182
|
type PerpsDepositWorkflow = AsyncGenerator<PerpsDepositWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
amount:
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
7183
|
+
/**
|
|
7184
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7185
|
+
*/
|
|
7186
|
+
type DepositToPerpsRequest = {
|
|
7187
|
+
/** Collateral amount in base units. */
|
|
7188
|
+
amount: bigint;
|
|
7189
|
+
/** Optional wallet-visible metadata for gasless deposit workflows. */
|
|
7190
|
+
metadata?: string;
|
|
7191
|
+
};
|
|
7192
|
+
/**
|
|
7193
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7194
|
+
*/
|
|
7195
|
+
type WithdrawFromPerpsRequest = {
|
|
7196
|
+
/** Collateral amount in base units. */
|
|
7197
|
+
amount: bigint;
|
|
7198
|
+
};
|
|
7199
|
+
/**
|
|
7200
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7201
|
+
*/
|
|
6279
7202
|
type OpenPerpsSessionError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7203
|
+
/**
|
|
7204
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7205
|
+
*/
|
|
6280
7206
|
declare const OpenPerpsSessionError: {
|
|
6281
|
-
isError(error: unknown): error is
|
|
7207
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6282
7208
|
};
|
|
7209
|
+
/**
|
|
7210
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7211
|
+
*/
|
|
6283
7212
|
type RevokePerpsCredentialsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7213
|
+
/**
|
|
7214
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7215
|
+
*/
|
|
6284
7216
|
declare const RevokePerpsCredentialsError: {
|
|
6285
|
-
isError(error: unknown): error is
|
|
7217
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6286
7218
|
};
|
|
7219
|
+
/**
|
|
7220
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7221
|
+
*/
|
|
6287
7222
|
type PreparePerpsDepositError = UserInputError;
|
|
7223
|
+
/**
|
|
7224
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7225
|
+
*/
|
|
6288
7226
|
declare const PreparePerpsDepositError: {
|
|
6289
7227
|
isError(error: unknown): error is UserInputError;
|
|
6290
7228
|
};
|
|
7229
|
+
/**
|
|
7230
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7231
|
+
*/
|
|
6291
7232
|
type DepositToPerpsError = RateLimitError | RequestRejectedError | CancelledSigningError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7233
|
+
/**
|
|
7234
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7235
|
+
*/
|
|
6292
7236
|
declare const DepositToPerpsError: {
|
|
6293
|
-
isError(error: unknown): error is
|
|
7237
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6294
7238
|
};
|
|
7239
|
+
/**
|
|
7240
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7241
|
+
*/
|
|
6295
7242
|
type WithdrawFromPerpsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7243
|
+
/**
|
|
7244
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7245
|
+
*/
|
|
6296
7246
|
declare const WithdrawFromPerpsError: {
|
|
6297
|
-
isError(error: unknown): error is
|
|
7247
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6298
7248
|
};
|
|
6299
7249
|
/**
|
|
6300
7250
|
* Opens a Perps account session.
|
|
6301
7251
|
*
|
|
6302
7252
|
* @remarks
|
|
6303
|
-
*
|
|
6304
|
-
*
|
|
7253
|
+
* Omit `expiresIn` to create new delegated Perps credentials that expire after
|
|
7254
|
+
* one week. Pass `expiresIn` as a duration in milliseconds to use a shorter or
|
|
7255
|
+
* longer credential lifetime, or pass existing credentials to validate and
|
|
7256
|
+
* resume a previous session.
|
|
6305
7257
|
*
|
|
6306
7258
|
* @throws {@link OpenPerpsSessionError}
|
|
6307
7259
|
* Thrown on failure.
|
|
7260
|
+
*
|
|
7261
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6308
7262
|
*/
|
|
6309
|
-
declare function openPerpsSession(client: BaseSecureClient, request
|
|
7263
|
+
declare function openPerpsSession(client: BaseSecureClient, request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
|
|
6310
7264
|
/**
|
|
6311
7265
|
* Revokes delegated Perps credentials by proxy address.
|
|
6312
7266
|
*
|
|
@@ -6316,6 +7270,8 @@ declare function openPerpsSession(client: BaseSecureClient, request: OpenPerpsSe
|
|
|
6316
7270
|
*
|
|
6317
7271
|
* @throws {@link RevokePerpsCredentialsError}
|
|
6318
7272
|
* Thrown on failure.
|
|
7273
|
+
*
|
|
7274
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6319
7275
|
*/
|
|
6320
7276
|
declare function revokePerpsCredentials(client: BaseSecureClient, request: RevokePerpsCredentialsRequest): Promise<void>;
|
|
6321
7277
|
/**
|
|
@@ -6328,6 +7284,8 @@ declare function revokePerpsCredentials(client: BaseSecureClient, request: Revok
|
|
|
6328
7284
|
*
|
|
6329
7285
|
* @throws {@link PreparePerpsDepositError}
|
|
6330
7286
|
* Thrown on failure.
|
|
7287
|
+
*
|
|
7288
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6331
7289
|
*/
|
|
6332
7290
|
declare function preparePerpsDeposit(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<PerpsDepositWorkflow>;
|
|
6333
7291
|
/**
|
|
@@ -6335,6 +7293,8 @@ declare function preparePerpsDeposit(client: BaseSecureClient, request: DepositT
|
|
|
6335
7293
|
*
|
|
6336
7294
|
* @throws {@link DepositToPerpsError}
|
|
6337
7295
|
* Thrown on failure.
|
|
7296
|
+
*
|
|
7297
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6338
7298
|
*/
|
|
6339
7299
|
declare function depositToPerps(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<TransactionHandle>;
|
|
6340
7300
|
/**
|
|
@@ -6346,6 +7306,8 @@ declare function depositToPerps(client: BaseSecureClient, request: DepositToPerp
|
|
|
6346
7306
|
*
|
|
6347
7307
|
* @throws {@link WithdrawFromPerpsError}
|
|
6348
7308
|
* Thrown on failure.
|
|
7309
|
+
*
|
|
7310
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
6349
7311
|
*/
|
|
6350
7312
|
declare function withdrawFromPerps(client: BaseSecureClient, request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
|
|
6351
7313
|
|
|
@@ -6386,39 +7348,39 @@ type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, Tran
|
|
|
6386
7348
|
type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
6387
7349
|
type PrepareSplitPositionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6388
7350
|
declare const PrepareSplitPositionError: {
|
|
6389
|
-
isError(error: unknown): error is
|
|
7351
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6390
7352
|
};
|
|
6391
7353
|
type PrepareSplitMarketPositionError = PrepareSplitPositionError;
|
|
6392
7354
|
declare const PrepareSplitMarketPositionError: {
|
|
6393
|
-
isError(error: unknown): error is
|
|
7355
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6394
7356
|
};
|
|
6395
7357
|
type PrepareSplitComboPositionError = PrepareSplitPositionError;
|
|
6396
7358
|
declare const PrepareSplitComboPositionError: {
|
|
6397
|
-
isError(error: unknown): error is
|
|
7359
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6398
7360
|
};
|
|
6399
7361
|
type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6400
7362
|
declare const PrepareMergePositionsError: {
|
|
6401
|
-
isError(error: unknown): error is
|
|
7363
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6402
7364
|
};
|
|
6403
7365
|
type PrepareMergeMarketPositionError = PrepareMergePositionsError;
|
|
6404
7366
|
declare const PrepareMergeMarketPositionError: {
|
|
6405
|
-
isError(error: unknown): error is
|
|
7367
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6406
7368
|
};
|
|
6407
7369
|
type PrepareMergeComboPositionError = PrepareMergePositionsError;
|
|
6408
7370
|
declare const PrepareMergeComboPositionError: {
|
|
6409
|
-
isError(error: unknown): error is
|
|
7371
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6410
7372
|
};
|
|
6411
7373
|
type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6412
7374
|
declare const PrepareRedeemPositionsError: {
|
|
6413
|
-
isError(error: unknown): error is
|
|
7375
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6414
7376
|
};
|
|
6415
7377
|
type PrepareRedeemMarketPositionsError = PrepareRedeemPositionsError;
|
|
6416
7378
|
declare const PrepareRedeemMarketPositionsError: {
|
|
6417
|
-
isError(error: unknown): error is
|
|
7379
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6418
7380
|
};
|
|
6419
7381
|
type PrepareRedeemComboPositionError = PrepareRedeemPositionsError;
|
|
6420
7382
|
declare const PrepareRedeemComboPositionError: {
|
|
6421
|
-
isError(error: unknown): error is
|
|
7383
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6422
7384
|
};
|
|
6423
7385
|
/**
|
|
6424
7386
|
* Starts a split workflow for a market condition.
|
|
@@ -6466,15 +7428,15 @@ declare function prepareSplitComboPosition(client: BaseSecureClient, request: Pr
|
|
|
6466
7428
|
declare function prepareSplitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<SplitPositionWorkflow>;
|
|
6467
7429
|
type SplitPositionError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6468
7430
|
declare const SplitPositionError: {
|
|
6469
|
-
isError(error: unknown): error is
|
|
7431
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6470
7432
|
};
|
|
6471
7433
|
type SplitMarketPositionError = SplitPositionError;
|
|
6472
7434
|
declare const SplitMarketPositionError: {
|
|
6473
|
-
isError(error: unknown): error is
|
|
7435
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6474
7436
|
};
|
|
6475
7437
|
type SplitComboPositionError = SplitPositionError;
|
|
6476
7438
|
declare const SplitComboPositionError: {
|
|
6477
|
-
isError(error: unknown): error is
|
|
7439
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6478
7440
|
};
|
|
6479
7441
|
/**
|
|
6480
7442
|
* Splits collateral into market positions.
|
|
@@ -6578,15 +7540,15 @@ declare function prepareMergeComboPosition(client: BaseSecureClient, request: Pr
|
|
|
6578
7540
|
declare function prepareMergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<MergePositionsWorkflow>;
|
|
6579
7541
|
type MergePositionsError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6580
7542
|
declare const MergePositionsError: {
|
|
6581
|
-
isError(error: unknown): error is
|
|
7543
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6582
7544
|
};
|
|
6583
7545
|
type MergeMarketPositionError = MergePositionsError;
|
|
6584
7546
|
declare const MergeMarketPositionError: {
|
|
6585
|
-
isError(error: unknown): error is
|
|
7547
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6586
7548
|
};
|
|
6587
7549
|
type MergeComboPositionError = MergePositionsError;
|
|
6588
7550
|
declare const MergeComboPositionError: {
|
|
6589
|
-
isError(error: unknown): error is
|
|
7551
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6590
7552
|
};
|
|
6591
7553
|
/**
|
|
6592
7554
|
* Merges complementary market positions back into collateral.
|
|
@@ -6712,7 +7674,7 @@ declare function prepareRedeemComboPosition(client: BaseSecureClient, request: P
|
|
|
6712
7674
|
declare function prepareRedeemPositions(client: BaseSecureClient, request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
|
|
6713
7675
|
type RedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
6714
7676
|
declare const RedeemPositionsError: {
|
|
6715
|
-
isError(error: unknown): error is
|
|
7677
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6716
7678
|
};
|
|
6717
7679
|
/**
|
|
6718
7680
|
* Redeems resolved market or combo positions.
|
|
@@ -6731,7 +7693,7 @@ declare const FetchPublicProfileRequestSchema: z.ZodObject<{
|
|
|
6731
7693
|
type FetchPublicProfileRequest = z.input<typeof FetchPublicProfileRequestSchema>;
|
|
6732
7694
|
type FetchPublicProfileError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6733
7695
|
declare const FetchPublicProfileError: {
|
|
6734
|
-
isError(error: unknown): error is
|
|
7696
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6735
7697
|
};
|
|
6736
7698
|
/**
|
|
6737
7699
|
* Fetches a public profile by wallet address.
|
|
@@ -6753,11 +7715,20 @@ declare const FetchPublicProfileError: {
|
|
|
6753
7715
|
*/
|
|
6754
7716
|
declare function fetchPublicProfile(client: BaseClient, request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
|
|
6755
7717
|
|
|
7718
|
+
declare enum SearchSort {
|
|
7719
|
+
Volume = "volume",
|
|
7720
|
+
Volume24Hr = "volume_24hr",
|
|
7721
|
+
Liquidity = "liquidity",
|
|
7722
|
+
Competitive = "competitive",
|
|
7723
|
+
ClosedTime = "closed_time",
|
|
7724
|
+
StartDate = "start_date",
|
|
7725
|
+
EndDate = "end_date"
|
|
7726
|
+
}
|
|
6756
7727
|
declare const SearchRequestSchema: z.ZodObject<{
|
|
6757
7728
|
q: z.ZodString;
|
|
6758
7729
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
6759
7730
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
6760
|
-
cursor: z.ZodOptional<z.
|
|
7731
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6761
7732
|
eventsStatus: z.ZodOptional<z.ZodString>;
|
|
6762
7733
|
eventsTag: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6763
7734
|
excludeTagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -6772,7 +7743,7 @@ declare const SearchRequestSchema: z.ZodObject<{
|
|
|
6772
7743
|
}>>;
|
|
6773
7744
|
searchProfiles: z.ZodOptional<z.ZodBoolean>;
|
|
6774
7745
|
searchTags: z.ZodOptional<z.ZodBoolean>;
|
|
6775
|
-
sort: z.ZodOptional<z.
|
|
7746
|
+
sort: z.ZodOptional<z.ZodEnum<typeof SearchSort>>;
|
|
6776
7747
|
}, z.core.$strip>;
|
|
6777
7748
|
type SearchRequest = z.input<typeof SearchRequestSchema>;
|
|
6778
7749
|
type SearchResults = {
|
|
@@ -6782,13 +7753,15 @@ type SearchResults = {
|
|
|
6782
7753
|
};
|
|
6783
7754
|
type SearchError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6784
7755
|
declare const SearchError: {
|
|
6785
|
-
isError(error: unknown): error is
|
|
7756
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6786
7757
|
};
|
|
6787
7758
|
/**
|
|
6788
7759
|
* Runs a public full-text search.
|
|
6789
7760
|
*
|
|
6790
7761
|
* @remarks
|
|
6791
7762
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7763
|
+
* `keepClosedMarkets` is an hour window for including recently closed markets
|
|
7764
|
+
* when searching active events.
|
|
6792
7765
|
*
|
|
6793
7766
|
* @throws {@link SearchError}
|
|
6794
7767
|
* Thrown on failure.
|
|
@@ -6816,7 +7789,7 @@ declare function search(client: BaseClient, request: SearchRequest): Paginated<S
|
|
|
6816
7789
|
declare const ListSeriesRequestSchema: z.ZodObject<{
|
|
6817
7790
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
6818
7791
|
closed: z.ZodOptional<z.ZodBoolean>;
|
|
6819
|
-
cursor: z.ZodOptional<z.
|
|
7792
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6820
7793
|
excludeEvents: z.ZodOptional<z.ZodBoolean>;
|
|
6821
7794
|
locale: z.ZodOptional<z.ZodString>;
|
|
6822
7795
|
order: z.ZodOptional<z.ZodString>;
|
|
@@ -6836,7 +7809,7 @@ type ListSeriesRequest = z.input<typeof ListSeriesRequestSchema>;
|
|
|
6836
7809
|
type FetchSeriesRequest = z.input<typeof FetchSeriesRequestSchema>;
|
|
6837
7810
|
type ListSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6838
7811
|
declare const ListSeriesError: {
|
|
6839
|
-
isError(error: unknown): error is
|
|
7812
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6840
7813
|
};
|
|
6841
7814
|
/**
|
|
6842
7815
|
* Lists series.
|
|
@@ -6879,7 +7852,7 @@ declare const ListSeriesError: {
|
|
|
6879
7852
|
declare function listSeries(client: BaseClient, request?: ListSeriesRequest): Paginated<Series[]>;
|
|
6880
7853
|
type FetchSeriesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6881
7854
|
declare const FetchSeriesError: {
|
|
6882
|
-
isError(error: unknown): error is
|
|
7855
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6883
7856
|
};
|
|
6884
7857
|
/**
|
|
6885
7858
|
* Fetches a series.
|
|
@@ -6908,7 +7881,13 @@ type SportsEventType = SportsEvent['type'];
|
|
|
6908
7881
|
type CommentsEventType = CommentsEvent['type'];
|
|
6909
7882
|
type CryptoPricesEventType = CryptoPricesEvent['type'];
|
|
6910
7883
|
type EquityPricesEventType = EquityPricesEvent['type'];
|
|
7884
|
+
/**
|
|
7885
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7886
|
+
*/
|
|
6911
7887
|
type PerpsMarketDataEventType = PerpsMarketDataEvent['type'];
|
|
7888
|
+
/**
|
|
7889
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7890
|
+
*/
|
|
6912
7891
|
type PerpsStreamingCandleInterval = Exclude<PerpsKlineInterval, PerpsKlineInterval.OneSecond>;
|
|
6913
7892
|
type PerpsInstrumentIdInput = number;
|
|
6914
7893
|
type MarketSubscription = {
|
|
@@ -6943,31 +7922,52 @@ type EquityPricesSubscription = {
|
|
|
6943
7922
|
symbol: string;
|
|
6944
7923
|
types?: readonly EquityPricesEventType[];
|
|
6945
7924
|
};
|
|
7925
|
+
/**
|
|
7926
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7927
|
+
*/
|
|
6946
7928
|
type PerpsTradesSubscription = {
|
|
6947
7929
|
topic: 'perps.trades';
|
|
6948
7930
|
instrumentId: PerpsInstrumentIdInput;
|
|
6949
7931
|
};
|
|
7932
|
+
/**
|
|
7933
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7934
|
+
*/
|
|
6950
7935
|
type PerpsBboSubscription = {
|
|
6951
7936
|
topic: 'perps.bbo';
|
|
6952
7937
|
instrumentId: PerpsInstrumentIdInput;
|
|
6953
7938
|
};
|
|
7939
|
+
/**
|
|
7940
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7941
|
+
*/
|
|
6954
7942
|
type PerpsBookSubscription = {
|
|
6955
7943
|
topic: 'perps.book';
|
|
6956
7944
|
instrumentId: PerpsInstrumentIdInput;
|
|
6957
7945
|
};
|
|
7946
|
+
/**
|
|
7947
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7948
|
+
*/
|
|
6958
7949
|
type PerpsCandlesSubscription = {
|
|
6959
7950
|
topic: 'perps.candles';
|
|
6960
7951
|
instrumentId: PerpsInstrumentIdInput;
|
|
6961
7952
|
interval: PerpsStreamingCandleInterval;
|
|
6962
7953
|
};
|
|
7954
|
+
/**
|
|
7955
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7956
|
+
*/
|
|
6963
7957
|
type PerpsTickersSubscription = {
|
|
6964
7958
|
topic: 'perps.tickers';
|
|
6965
7959
|
instrumentId?: PerpsInstrumentIdInput;
|
|
6966
7960
|
};
|
|
7961
|
+
/**
|
|
7962
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7963
|
+
*/
|
|
6967
7964
|
type PerpsStatisticsSubscription = {
|
|
6968
7965
|
topic: 'perps.statistics';
|
|
6969
7966
|
instrumentId?: PerpsInstrumentIdInput;
|
|
6970
7967
|
};
|
|
7968
|
+
/**
|
|
7969
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
7970
|
+
*/
|
|
6971
7971
|
type PerpsMarketDataSubscription = PerpsTradesSubscription | PerpsBboSubscription | PerpsBookSubscription | PerpsCandlesSubscription | PerpsTickersSubscription | PerpsStatisticsSubscription;
|
|
6972
7972
|
type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
|
|
6973
7973
|
type SecureSubscriptionSpec = PublicSubscriptionSpec | UserSubscription;
|
|
@@ -7028,7 +8028,7 @@ declare function subscribe<const TSubscriptions extends readonly SecureSubscript
|
|
|
7028
8028
|
|
|
7029
8029
|
declare const ListTagsRequestSchema: z.ZodObject<{
|
|
7030
8030
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
7031
|
-
cursor: z.ZodOptional<z.
|
|
8031
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7032
8032
|
includeTemplate: z.ZodOptional<z.ZodBoolean>;
|
|
7033
8033
|
isCarousel: z.ZodOptional<z.ZodBoolean>;
|
|
7034
8034
|
locale: z.ZodOptional<z.ZodString>;
|
|
@@ -7081,7 +8081,7 @@ type FetchRelatedTagsRequest = z.input<typeof RelatedTagsByIdRequestSchema> | z.
|
|
|
7081
8081
|
type FetchRelatedTagResourcesRequest = z.input<typeof RelatedTagResourcesByIdRequestSchema> | z.input<typeof RelatedTagResourcesBySlugRequestSchema>;
|
|
7082
8082
|
type ListTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7083
8083
|
declare const ListTagsError: {
|
|
7084
|
-
isError(error: unknown): error is
|
|
8084
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7085
8085
|
};
|
|
7086
8086
|
/**
|
|
7087
8087
|
* Lists tags.
|
|
@@ -7124,7 +8124,7 @@ declare const ListTagsError: {
|
|
|
7124
8124
|
declare function listTags(client: BaseClient, request?: ListTagsRequest): Paginated<Tag[]>;
|
|
7125
8125
|
type FetchTagError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7126
8126
|
declare const FetchTagError: {
|
|
7127
|
-
isError(error: unknown): error is
|
|
8127
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7128
8128
|
};
|
|
7129
8129
|
/**
|
|
7130
8130
|
* Fetches a tag by id or slug.
|
|
@@ -7148,7 +8148,7 @@ declare const FetchTagError: {
|
|
|
7148
8148
|
declare function fetchTag(client: BaseClient, request: FetchTagRequest): Promise<Tag>;
|
|
7149
8149
|
type FetchRelatedTagsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7150
8150
|
declare const FetchRelatedTagsError: {
|
|
7151
|
-
isError(error: unknown): error is
|
|
8151
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7152
8152
|
};
|
|
7153
8153
|
/**
|
|
7154
8154
|
* Fetches related tag relationships by id or slug.
|
|
@@ -7173,7 +8173,7 @@ declare const FetchRelatedTagsError: {
|
|
|
7173
8173
|
declare function fetchRelatedTags(client: BaseClient, request: FetchRelatedTagsRequest): Promise<RelatedTag[]>;
|
|
7174
8174
|
type FetchRelatedTagResourcesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7175
8175
|
declare const FetchRelatedTagResourcesError: {
|
|
7176
|
-
isError(error: unknown): error is
|
|
8176
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7177
8177
|
};
|
|
7178
8178
|
/**
|
|
7179
8179
|
* Fetches resources linked from related tag relationships by id or slug.
|
|
@@ -7200,7 +8200,7 @@ declare function fetchRelatedTagResources(client: BaseClient, request: FetchRela
|
|
|
7200
8200
|
declare const ListTeamsRequestSchema: z.ZodObject<{
|
|
7201
8201
|
abbreviation: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7202
8202
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
7203
|
-
cursor: z.ZodOptional<z.
|
|
8203
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7204
8204
|
league: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7205
8205
|
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7206
8206
|
order: z.ZodOptional<z.ZodString>;
|
|
@@ -7210,7 +8210,7 @@ declare const ListTeamsRequestSchema: z.ZodObject<{
|
|
|
7210
8210
|
type ListTeamsRequest = z.input<typeof ListTeamsRequestSchema>;
|
|
7211
8211
|
type ListTeamsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7212
8212
|
declare const ListTeamsError: {
|
|
7213
|
-
isError(error: unknown): error is
|
|
8213
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7214
8214
|
};
|
|
7215
8215
|
/**
|
|
7216
8216
|
* Lists teams.
|
|
@@ -7286,7 +8286,7 @@ declare const PrepareErc20TransferError: {
|
|
|
7286
8286
|
declare function prepareErc20Transfer(client: BaseSecureClient, request: PrepareErc20TransferRequest): Promise<Erc20TransferWorkflow>;
|
|
7287
8287
|
type TransferErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
7288
8288
|
declare const TransferErc20Error: {
|
|
7289
|
-
isError(error: unknown): error is
|
|
8289
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7290
8290
|
};
|
|
7291
8291
|
/**
|
|
7292
8292
|
* Transfers ERC-20 tokens from the authenticated account.
|
|
@@ -7343,7 +8343,7 @@ type TransactionOutcome = {
|
|
|
7343
8343
|
};
|
|
7344
8344
|
type WaitForTransactionError = WaitForGaslessTransactionError;
|
|
7345
8345
|
declare const WaitForTransactionError: {
|
|
7346
|
-
isError(error: unknown): error is
|
|
8346
|
+
isError(error: unknown): error is TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
7347
8347
|
};
|
|
7348
8348
|
interface TransactionHandle {
|
|
7349
8349
|
/**
|
|
@@ -7370,4 +8370,4 @@ type Signer = {
|
|
|
7370
8370
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
7371
8371
|
};
|
|
7372
8372
|
|
|
7373
|
-
export { FetchPublicProfileError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type EnvironmentConfig as E, FetchClosedOnlyModeError as F, FetchEventLiveVolumeError as G, FetchEventTagsError as H, FetchLastTradePriceError as I, FetchLastTradePricesError as J, FetchMarketError as K, FetchMarketTagsError as L, FetchMidpointError as M, FetchMidpointsError as N, FetchNotificationsError as O, FetchOrderBookError as P, FetchOrderBooksError as Q, FetchOrderError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchOrderScoringError as V, FetchOrdersScoringError as W, FetchPortfolioValueError as X, FetchPriceError as Y, FetchPriceHistoryError as Z, FetchPricesError as _, type TypedData as a, RfqConfirmationError as a$, FetchRelatedTagResourcesError as a0, FetchRelatedTagsError as a1, FetchRewardPercentagesError as a2, FetchSeriesError as a3, FetchSpreadError as a4, FetchSpreadsError as a5, FetchTagError as a6, FetchTotalEarningsForUserForDayError as a7, FetchTradedMarketCountError as a8, InsufficientLiquidityError as a9, MergePositionsError as aA, OpenRfqSessionError as aB, type Page as aC, PageSizeSchema as aD, type Paginated as aE, type PerpsActions as aF, type PerpsEndpoints as aG, PerpsSession as aH, PostOrderError as aI, PostOrdersError as aJ, type PublicAccountActions as aK, type PublicActions as aL, type PublicClient as aM, type PublicClientOptions as aN, type PublicPerpsActions as aO, type PublicRewardsActions as aP, type PublicSubscriptionsActions as aQ, RateLimitError as aR, RedeemPositionsError as aS, RequestRejectedError as aT, type RequestRejectedErrorOptions as aU, type RestEndpoint as aV, type RfqCancelQuoteAck as aW, RfqCancelQuoteError as aX, RfqCancelQuoteRejectedError as aY, type RfqCancelQuoteRejectedErrorOptions as aZ, type RfqConfirmationAck as a_, ListAccountTradesError as aa, ListActivityError as ab, ListBuilderLeaderboardError as ac, ListBuilderTradesError as ad, ListBuilderVolumeError as ae, ListClosedPositionsError as af, ListComboMarketsError as ag, ListComboPositionsError as ah, ListCommentsByUserAddressError as ai, ListCommentsError as aj, ListCurrentRewardsError as ak, ListEventsError as al, ListMarketHoldersError as am, ListMarketPositionsError as an, ListMarketRewardsError as ao, ListMarketsError as ap, ListOpenInterestError as aq, ListOpenOrdersError as ar, ListPositionsError as as, ListSeriesError as at, ListTagsError as au, ListTeamsError as av, ListTraderLeaderboardError as aw, ListTradesError as ax, ListUserEarningsAndMarketsConfigError as ay, ListUserEarningsForDayError as az, type TransactionCall as b, walletActions as b$, RfqConfirmationRejectedError as b0, type RfqConfirmationRequestEvent as b1, type RfqEndpoints as b2, type RfqEvent as b3, RfqQuoteError as b4, type RfqQuoteReference as b5, RfqQuoteRejectedError as b6, type RfqQuoteRejectedErrorOptions as b7, type RfqQuoteRequestEvent as b8, type RfqQuoteResponse as b9, TimeoutError as bA, TransactionFailedError as bB, type TransactionHandle as bC, type TransactionOutcome as bD, TransferErc20Error as bE, TransportError as bF, type TypedDataDomain as bG, type TypedDataField as bH, UnexpectedResponseError as bI, WaitForTransactionError as bJ, type WalletDerivationConfig as bK, type WebSocketEndpoint as bL, accountActions as bM, allActions as bN, analyticsActions as bO, createPublicClient as bP, createSecureClient as bQ, dataActions as bR, discoveryActions as bS, forkEnvironmentConfig as bT, makeErrorGuard as bU, perpsActions as bV, production as bW, rewardsActions as bX, rfqActions as bY, subscriptionsActions as bZ, tradingActions as b_, type RfqQuoteSource as ba, type RfqSession as bb, type RfqTradeEvent as bc, SearchError as bd, type SecureAccountActions as be, type SecureActions as bf, type SecureClient as bg, type SecureClientOptions as bh, type SecureDownloadAccountingSnapshotRequest as bi, type SecureFetchPortfolioValueRequest as bj, type SecureFetchTradedMarketCountRequest as bk, type SecureListActivityRequest as bl, type SecureListClosedPositionsRequest as bm, type SecureListComboPositionsRequest as bn, type SecureListPositionsRequest as bo, type SecurePerpsActions as bp, type SecureRewardsActions as bq, type SecureRfqActions as br, type SecureSubscriptionsActions as bs, type SecureTradingActions as bt, type SecureWalletActions as bu, SetupGaslessWalletError as bv, SetupTradingApprovalsError as bw, type SignerTransactionRequest as bx, SigningError as by, SplitPositionError as bz, type AccountIdentity as c, FetchPerpsTickerError as c$, type CancelMarketOrdersRequest as c0, type CancelOrderRequest as c1, type CancelOrdersRequest as c2, type CancelPerpsOrderRequest as c3, type CancelPerpsOrdersRequest as c4, type CommentsEventType as c5, type CommentsSubscription as c6, type CreatePerpsSessionRequest as c7, type CryptoPricesEventType as c8, type CryptoPricesSubscription as c9, type FetchEventTagsRequest as cA, FetchExecuteParamsError as cB, type FetchExecuteParamsRequest as cC, type FetchGaslessTransactionRequest as cD, type FetchLastTradePriceRequest as cE, type FetchLastTradePricesRequest as cF, FetchMarketInfoError as cG, type FetchMarketInfoRequest as cH, type FetchMarketRequest as cI, type FetchMarketTagsRequest as cJ, type FetchMidpointRequest as cK, type FetchMidpointsRequest as cL, FetchNegRiskError as cM, type FetchNegRiskRequest as cN, type FetchOrderBookRequest as cO, type FetchOrderBooksRequest as cP, type FetchOrderRequest as cQ, type FetchOrderScoringRequest as cR, type FetchOrdersScoringRequest as cS, type FetchPerpsAccountConfigRequest as cT, FetchPerpsBookError as cU, type FetchPerpsBookRequest as cV, FetchPerpsFeesError as cW, FetchPerpsInstrumentsError as cX, type FetchPerpsInstrumentsRequest as cY, type FetchPerpsOpenOrdersRequest as cZ, type FetchPerpsOrdersRequest as c_, DeployDepositWalletError as ca, DepositToPerpsError as cb, type DepositToPerpsRequest as cc, type DeprecatedTransactionHandle as cd, type DownloadAccountingSnapshotRequest as ce, type DropNotificationsRequest as cf, type EquityPricesEventType as cg, type EquityPricesSubscription as ch, type Erc1155ApprovalForAllWorkflow as ci, type Erc1155ApprovalForAllWorkflowRequest as cj, type Erc20ApprovalWorkflow as ck, type Erc20ApprovalWorkflowRequest as cl, type Erc20TransferWorkflow as cm, type Erc20TransferWorkflowRequest as cn, type EstimateMarketBuyPriceRequest as co, type EstimateMarketPriceRequest as cp, type EstimateMarketSellPriceRequest as cq, type EventForSubscriptionSpec as cr, type EventForSubscriptionSpecs as cs, FetchBalanceAllowanceError as ct, type FetchBalanceAllowanceRequest as cu, FetchBuilderFeeRatesError as cv, type FetchBuilderFeeRatesRequest as cw, type FetchCommentsByIdRequest as cx, type FetchEventLiveVolumeRequest as cy, type FetchEventRequest as cz, type AnalyticsActions as d, type MarketSubscription as d$, type FetchPerpsTickerRequest as d0, FetchPerpsTickersError as d1, type FetchPerpsTickersRequest as d2, type FetchPortfolioValueRequest as d3, type FetchPriceHistoryRequest as d4, type FetchPriceRequest as d5, type FetchPricesRequest as d6, type FetchPublicProfileRequest as d7, type FetchRelatedTagResourcesRequest as d8, type FetchRelatedTagsRequest as d9, type ListMarketHoldersRequest as dA, type ListMarketPositionsRequest as dB, type ListMarketRewardsRequest as dC, type ListMarketsRequest as dD, type ListOpenInterestRequest as dE, type ListOpenOrdersRequest as dF, ListPerpsCandlesError as dG, type ListPerpsCandlesRequest as dH, type ListPerpsDepositsRequest as dI, type ListPerpsEquityHistoryRequest as dJ, type ListPerpsFillsRequest as dK, ListPerpsFundingHistoryError as dL, type ListPerpsFundingHistoryRequest as dM, type ListPerpsFundingPaymentsRequest as dN, type ListPerpsPnlHistoryRequest as dO, ListPerpsTradesError as dP, type ListPerpsTradesRequest as dQ, type ListPerpsWithdrawalsRequest as dR, type ListPositionsRequest as dS, type ListSeriesRequest as dT, type ListTagsRequest as dU, type ListTeamsRequest as dV, type ListTraderLeaderboardRequest as dW, type ListTradesRequest as dX, type ListUserEarningsAndMarketsConfigRequest as dY, type ListUserEarningsForDayRequest as dZ, type MarketEventType as d_, type FetchSeriesRequest as da, type FetchSpreadRequest as db, type FetchSpreadsRequest as dc, type FetchTagRequest as dd, FetchTickSizeError as de, type FetchTickSizeRequest as df, type FetchTotalEarningsForUserForDayRequest as dg, type FetchTradedMarketCountRequest as dh, GaslessTransactionMetadataSchema as di, type GaslessWorkflow as dj, type GaslessWorkflowRequest as dk, IsWalletDeployedError as dl, type IsWalletDeployedRequest as dm, type ListAccountTradesRequest as dn, type ListActivityRequest as dp, type ListBuilderLeaderboardRequest as dq, type ListBuilderTradesRequest as dr, type ListBuilderVolumeRequest as ds, type ListClosedPositionsRequest as dt, type ListComboMarketsRequest as du, type ListComboPositionsRequest as dv, type ListCommentsByUserAddressRequest as dw, type ListCommentsRequest as dx, type ListCurrentRewardsRequest as dy, type ListEventsRequest as dz, ApproveErc1155ForAllError as e, type RedeemPositionsWorkflow as e$, MergeComboPositionError as e0, MergeMarketPositionError as e1, type MergePositionsWorkflow as e2, type MergePositionsWorkflowRequest as e3, type ModifyPerpsOrderRequest as e4, type ModifyPerpsOrdersRequest as e5, OpenPerpsSessionError as e6, type OpenPerpsSessionRequest as e7, type OrderDraft as e8, type OrderPostingWorkflow as e9, type PrepareMarketOrderRequest as eA, type PrepareMarketSellOrderRequest as eB, PrepareMergeComboPositionError as eC, type PrepareMergeComboPositionRequest as eD, PrepareMergeMarketPositionError as eE, type PrepareMergeMarketPositionRequest as eF, PrepareMergePositionsError as eG, type PrepareMergePositionsRequest as eH, PreparePerpsDepositError as eI, PrepareRedeemComboPositionError as eJ, type PrepareRedeemComboPositionRequest as eK, type PrepareRedeemMarketPositionsByConditionIdRequest as eL, type PrepareRedeemMarketPositionsByMarketIdRequest as eM, PrepareRedeemMarketPositionsError as eN, type PrepareRedeemMarketPositionsRequest as eO, PrepareRedeemPositionsError as eP, type PrepareRedeemPositionsRequest as eQ, PrepareSplitComboPositionError as eR, type PrepareSplitComboPositionRequest as eS, PrepareSplitMarketPositionError as eT, type PrepareSplitMarketPositionRequest as eU, PrepareSplitPositionError as eV, type PrepareSplitPositionRequest as eW, PrepareTradingApprovalsError as eX, type PublicRealtimeEvent as eY, type PublicRealtimeTopic as eZ, type PublicSubscriptionSpec as e_, type OrderWorkflow as ea, type OrderWorkflowRequest as eb, type PerpsBboSubscription as ec, type PerpsBookSubscription as ed, type PerpsCandlesSubscription as ee, type PerpsDepositWorkflow as ef, type PerpsDepositWorkflowRequest as eg, type PerpsMarketDataEventType as eh, type PerpsMarketDataSubscription as ei, type PerpsStatisticsSubscription as ej, type PerpsStreamingCandleInterval as ek, type PerpsTickersSubscription as el, type PerpsTradesSubscription as em, type PlacePerpsOrderRequest as en, type PlacePerpsOrdersRequest as eo, type PostOrdersRequest as ep, PrepareErc1155ApprovalForAllError as eq, type PrepareErc1155ApprovalForAllRequest as er, PrepareErc20ApprovalError as es, type PrepareErc20ApprovalRequest as et, PrepareErc20TransferError as eu, type PrepareErc20TransferRequest as ev, PrepareGaslessTransactionError as ew, type PrepareGaslessTransactionRequest as ex, type PrepareLimitOrderRequest as ey, type PrepareMarketBuyOrderRequest as ez, ApproveErc20Error as f, fetchOrderBook as f$, type RedeemPositionsWorkflowRequest as f0, ResolveConditionByTokenError as f1, type ResolveConditionByTokenRequest as f2, type ResumePerpsSessionRequest as f3, RevokePerpsCredentialsError as f4, type RevokePerpsCredentialsRequest as f5, type RfqConfirmationRejectedErrorOptions as f6, type RfqExecutionUpdateEvent as f7, type SearchRequest as f8, type SearchResults as f9, cancelMarketOrders as fA, cancelOrder as fB, cancelOrders as fC, deployDepositWallet as fD, depositToPerps as fE, downloadAccountingSnapshot as fF, dropNotifications as fG, estimateMarketPrice as fH, fetchBalanceAllowance as fI, fetchBuilderFeeRates as fJ, fetchBuilderVolume as fK, fetchClosedOnlyMode as fL, fetchCommentsById as fM, fetchEvent as fN, fetchEventLiveVolume as fO, fetchEventTags as fP, fetchExecuteParams as fQ, fetchLastTradePrice as fR, fetchLastTradePrices as fS, fetchMarket as fT, fetchMarketInfo as fU, fetchMarketTags as fV, fetchMidpoint as fW, fetchMidpoints as fX, fetchNegRisk as fY, fetchNotifications as fZ, fetchOrder as f_, type SecureRealtimeEvent as fa, type SecureRealtimeTopic as fb, type SecureSubscriptionSpec as fc, type SignedOrder as fd, SplitComboPositionError as fe, SplitMarketPositionError as ff, type SplitPositionWorkflow as fg, type SplitPositionWorkflowRequest as fh, type SportsEventType as fi, type SportsSubscription as fj, type SubscribeError as fk, type SubscriptionHandle as fl, type TradingApprovalsWorkflow as fm, type TradingApprovalsWorkflowRequest as fn, UpdateBalanceAllowanceError as fo, type UpdateBalanceAllowanceRequest as fp, type UpdatePerpsLeverageRequest as fq, type UpdatePerpsMarginRequest as fr, type UserEventType as fs, type UserSubscription as ft, WaitForGaslessTransactionError as fu, WithdrawFromPerpsError as fv, type WithdrawFromPerpsRequest as fw, approveErc1155ForAll as fx, approveErc20 as fy, cancelAll as fz, BasePublicClient as g, prepareGaslessTransaction as g$, fetchOrderBooks as g0, fetchOrderScoring as g1, fetchOrdersScoring as g2, fetchPerpsBook as g3, fetchPerpsFees as g4, fetchPerpsInstruments as g5, fetchPerpsTicker as g6, fetchPerpsTickers as g7, fetchPortfolioValue as g8, fetchPrice as g9, listMarketHolders as gA, listMarketPositions as gB, listMarketRewards as gC, listMarkets as gD, listOpenInterest as gE, listOpenOrders as gF, listPerpsCandles as gG, listPerpsFundingHistory as gH, listPerpsTrades as gI, listPositions as gJ, listSeries as gK, listTags as gL, listTeams as gM, listTraderLeaderboard as gN, listTrades as gO, listUserEarningsAndMarketsConfig as gP, listUserEarningsForDay as gQ, mergeComboPosition as gR, mergeMarketPosition as gS, mergePositions as gT, openPerpsSession as gU, openRfqSession as gV, postOrder as gW, postOrders as gX, prepareErc1155ApprovalForAll as gY, prepareErc20Approval as gZ, prepareErc20Transfer as g_, fetchPriceHistory as ga, fetchPrices as gb, fetchPublicProfile as gc, fetchRelatedTagResources as gd, fetchRelatedTags as ge, fetchRewardPercentages as gf, fetchSeries as gg, fetchSpread as gh, fetchSpreads as gi, fetchTag as gj, fetchTickSize as gk, fetchTotalEarningsForUserForDay as gl, fetchTradedMarketCount as gm, fetchTransaction as gn, isWalletDeployed as go, listAccountTrades as gp, listActivity as gq, listBuilderLeaderboard as gr, listBuilderTrades as gs, listClosedPositions as gt, listComboMarkets as gu, listComboPositions as gv, listComments as gw, listCommentsByUserAddress as gx, listCurrentRewards as gy, listEvents as gz, BaseSecureClient as h, prepareMergeComboPosition as h0, prepareMergeMarketPosition as h1, prepareMergePositions as h2, preparePerpsDeposit as h3, prepareRedeemComboPosition as h4, prepareRedeemMarketPositions as h5, prepareRedeemPositions as h6, prepareSplitComboPosition as h7, prepareSplitMarketPosition as h8, prepareSplitPosition as h9, prepareTradingApprovals as ha, redeemPositions as hb, resolveConditionByToken as hc, revokePerpsCredentials as hd, search as he, setupTradingApprovals as hf, splitComboPosition as hg, splitMarketPosition as hh, splitPosition as hi, subscribe as hj, transferErc20 as hk, updateBalanceAllowance as hl, withdrawFromPerps as hm, type BeginAuthenticationRequest as i, CancelMarketOrdersError as j, CancelOrderError as k, CancelOrdersError as l, CancelledSigningError as m, type Client as n, type ClientActions as o, type ClientDecorator as p, type ClobEndpoints as q, CreateSecureClientError as r, type DiscoveryActions as s, DownloadAccountingSnapshotError as t, DropNotificationsError as u, type EnvironmentConfigFork as v, type EnvironmentContracts as w, EstimateMarketPriceError as x, FetchCommentsByIdError as y, FetchEventError as z };
|
|
8373
|
+
export { FetchOrderBookError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type DepositToPerpsRequest as E, type DiscoveryActions as F, DownloadAccountingSnapshotError as G, DropNotificationsError as H, type EnvironmentConfig as I, type EnvironmentConfigFork as J, type EnvironmentContracts as K, EstimateMarketPriceError as L, FetchClosedOnlyModeError as M, FetchCommentsByIdError as N, FetchEventError as O, FetchEventLiveVolumeError as P, FetchEventTagsError as Q, FetchLastTradePriceError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchLastTradePricesError as V, FetchMarketError as W, FetchMarketTagsError as X, FetchMidpointError as Y, FetchMidpointsError as Z, FetchNotificationsError as _, type TypedData as a, ListSeriesError as a$, FetchOrderBooksError as a0, FetchOrderError as a1, FetchOrderScoringError as a2, FetchOrdersScoringError as a3, type FetchPerpsAccountConfigRequest as a4, FetchPerpsBookError as a5, type FetchPerpsBookRequest as a6, FetchPerpsFeesError as a7, FetchPerpsInstrumentsError as a8, type FetchPerpsInstrumentsRequest as a9, ListClosedPositionsError as aA, ListComboActivityError as aB, ListComboMarketsError as aC, ListComboPositionsError as aD, ListCommentsByUserAddressError as aE, ListCommentsError as aF, ListCurrentRewardsError as aG, ListEventsError as aH, ListMarketHoldersError as aI, ListMarketPositionsError as aJ, ListMarketRewardsError as aK, ListMarketsError as aL, ListOpenInterestError as aM, ListOpenOrdersError as aN, ListPerpsCandlesError as aO, type ListPerpsCandlesRequest as aP, type ListPerpsDepositsRequest as aQ, type ListPerpsEquityHistoryRequest as aR, type ListPerpsFillsRequest as aS, ListPerpsFundingHistoryError as aT, type ListPerpsFundingHistoryRequest as aU, type ListPerpsFundingPaymentsRequest as aV, type ListPerpsPnlHistoryRequest as aW, ListPerpsTradesError as aX, type ListPerpsTradesRequest as aY, type ListPerpsWithdrawalsRequest as aZ, ListPositionsError as a_, type FetchPerpsOpenOrdersRequest as aa, type FetchPerpsOrdersRequest as ab, FetchPerpsTickerError as ac, type FetchPerpsTickerRequest as ad, FetchPerpsTickersError as ae, type FetchPerpsTickersRequest as af, FetchPortfolioValueError as ag, FetchPriceError as ah, FetchPriceHistoryError as ai, FetchPricesError as aj, FetchPublicProfileError as ak, FetchRelatedTagResourcesError as al, FetchRelatedTagsError as am, FetchRewardPercentagesError as an, FetchSeriesError as ao, FetchSpreadError as ap, FetchSpreadsError as aq, FetchTagError as ar, FetchTotalEarningsForUserForDayError as as, FetchTradedMarketCountError as at, InsufficientLiquidityError as au, ListAccountTradesError as av, ListActivityError as aw, ListBuilderLeaderboardError as ax, ListBuilderTradesError as ay, ListBuilderVolumeError as az, type TransactionCall as b, type RfqQuoteReference as b$, ListTagsError as b0, ListTeamsError as b1, ListTraderLeaderboardError as b2, ListTradesError as b3, ListUserEarningsAndMarketsConfigError as b4, ListUserEarningsForDayError as b5, MergePositionsError as b6, OpenPerpsSessionError as b7, type OpenPerpsSessionRequest as b8, OpenRfqSessionError as b9, type PostPerpsOrdersRequest as bA, type PublicAccountActions as bB, type PublicActions as bC, type PublicClient as bD, type PublicClientOptions as bE, type PublicPerpsActions as bF, type PublicRewardsActions as bG, type PublicSubscriptionsActions as bH, RateLimitError as bI, RedeemPositionsError as bJ, RequestRejectedError as bK, type RequestRejectedErrorOptions as bL, type RestEndpoint as bM, type ResumePerpsSessionRequest as bN, RevokePerpsCredentialsError as bO, type RevokePerpsCredentialsRequest as bP, type RfqCancelQuoteAck as bQ, RfqCancelQuoteError as bR, RfqCancelQuoteRejectedError as bS, type RfqCancelQuoteRejectedErrorOptions as bT, type RfqConfirmationAck as bU, RfqConfirmationError as bV, RfqConfirmationRejectedError as bW, type RfqConfirmationRequestEvent as bX, type RfqEndpoints as bY, type RfqEvent as bZ, RfqQuoteError as b_, type Page as ba, PageSizeSchema as bb, type Paginated as bc, type PerpsActions as bd, type PerpsBookDepth as be, type PerpsEndpoints as bf, type PerpsOrderRequest as bg, type PerpsPlaceFokOrderRequest as bh, type PerpsPlaceGtcOrderRequest as bi, type PerpsPlaceIocOrderRequest as bj, type PerpsPlacedTpSlOrder as bk, type PerpsPlacedTpSlOrders as bl, type PerpsPositionTpSlTrigger as bm, PerpsSession as bn, type PerpsSessionAccountError as bo, type PerpsSessionLifecycleError as bp, type PerpsSessionTradingError as bq, type PerpsTpSlTrigger as br, type PlacePerpsOrderRequest as bs, type PlacePerpsOrderResult as bt, type PlacePerpsOrderWithTpSlRequest as bu, type PlacePerpsOrderWithTpSlResult as bv, type PlacePerpsPositionTpSlRequest as bw, type PlacePerpsPositionTpSlResult as bx, PostOrderError as by, PostOrdersError as bz, type AccountIdentity as c, subscriptionsActions as c$, RfqQuoteRejectedError as c0, type RfqQuoteRejectedErrorOptions as c1, type RfqQuoteRequestEvent as c2, type RfqQuoteResponse as c3, type RfqQuoteSource as c4, type RfqSession as c5, type RfqTradeEvent as c6, SearchError as c7, SearchSort as c8, type SecureAccountActions as c9, TransferErc20Error as cA, TransportError as cB, type TypedDataDomain as cC, type TypedDataField as cD, UnexpectedResponseError as cE, UpdatePerpsLeverageError as cF, type UpdatePerpsLeverageRequest as cG, WaitForTransactionError as cH, type WalletDerivationConfig as cI, type WebSocketCloseCode as cJ, type WebSocketEndpoint as cK, WebSocketKnownCloseCode as cL, WithdrawFromPerpsError as cM, type WithdrawFromPerpsRequest as cN, accountActions as cO, allActions as cP, analyticsActions as cQ, createPublicClient as cR, createSecureClient as cS, dataActions as cT, discoveryActions as cU, forkEnvironmentConfig as cV, makeErrorGuard as cW, perpsActions as cX, production as cY, rewardsActions as cZ, rfqActions as c_, type SecureActions as ca, type SecureClient as cb, type SecureClientOptions as cc, type SecureDownloadAccountingSnapshotRequest as cd, type SecureFetchPortfolioValueRequest as ce, type SecureFetchTradedMarketCountRequest as cf, type SecureListActivityRequest as cg, type SecureListClosedPositionsRequest as ch, type SecureListComboActivityRequest as ci, type SecureListComboPositionsRequest as cj, type SecureListPositionsRequest as ck, type SecurePerpsActions as cl, type SecureRewardsActions as cm, type SecureRfqActions as cn, type SecureSubscriptionsActions as co, type SecureTradingActions as cp, type SecureWalletActions as cq, SetupGaslessWalletError as cr, SetupTradingApprovalsError as cs, type SignerTransactionRequest as ct, SigningError as cu, SplitPositionError as cv, TimeoutError as cw, TransactionFailedError as cx, type TransactionHandle as cy, type TransactionOutcome as cz, type AnalyticsActions as d, FetchTickSizeError as d$, tradingActions as d0, walletActions as d1, type CancelMarketOrdersRequest as d2, type CancelOrderRequest as d3, type CancelOrdersRequest as d4, type CommentsEventType as d5, type CommentsSubscription as d6, type CryptoPricesEventType as d7, type CryptoPricesSubscription as d8, DeployDepositWalletError as d9, type FetchGaslessTransactionRequest as dA, type FetchLastTradePriceRequest as dB, type FetchLastTradePricesRequest as dC, FetchMarketInfoError as dD, type FetchMarketInfoRequest as dE, type FetchMarketRequest as dF, type FetchMarketTagsRequest as dG, type FetchMidpointRequest as dH, type FetchMidpointsRequest as dI, FetchNegRiskError as dJ, type FetchNegRiskRequest as dK, type FetchOrderBookRequest as dL, type FetchOrderBooksRequest as dM, type FetchOrderRequest as dN, type FetchOrderScoringRequest as dO, type FetchOrdersScoringRequest as dP, type FetchPortfolioValueRequest as dQ, type FetchPriceHistoryRequest as dR, type FetchPriceRequest as dS, type FetchPricesRequest as dT, type FetchPublicProfileRequest as dU, type FetchRelatedTagResourcesRequest as dV, type FetchRelatedTagsRequest as dW, type FetchSeriesRequest as dX, type FetchSpreadRequest as dY, type FetchSpreadsRequest as dZ, type FetchTagRequest as d_, type DownloadAccountingSnapshotRequest as da, type DropNotificationsRequest as db, type EquityPricesEventType as dc, type EquityPricesSubscription as dd, type Erc1155ApprovalForAllWorkflow as de, type Erc1155ApprovalForAllWorkflowRequest as df, type Erc20ApprovalWorkflow as dg, type Erc20ApprovalWorkflowRequest as dh, type Erc20TransferWorkflow as di, type Erc20TransferWorkflowRequest as dj, type EstimateMarketBuyPriceRequest as dk, type EstimateMarketPriceRequest as dl, type EstimateMarketSellPriceRequest as dm, type EventForSubscriptionSpec as dn, type EventForSubscriptionSpecs as dp, FetchBalanceAllowanceError as dq, type FetchBalanceAllowanceRequest as dr, FetchBuilderFeeRatesError as ds, type FetchBuilderFeeRatesRequest as dt, type FetchCommentsByIdRequest as du, type FetchEventLiveVolumeRequest as dv, type FetchEventRequest as dw, type FetchEventTagsRequest as dx, FetchExecuteParamsError as dy, type FetchExecuteParamsRequest as dz, ApproveErc1155ForAllError as e, PrepareErc20TransferError as e$, type FetchTickSizeRequest as e0, type FetchTotalEarningsForUserForDayRequest as e1, type FetchTradedMarketCountRequest as e2, GaslessTransactionMetadataSchema as e3, type GaslessWorkflow as e4, type GaslessWorkflowRequest as e5, IsWalletDeployedError as e6, type IsWalletDeployedRequest as e7, type ListAccountTradesRequest as e8, type ListActivityRequest as e9, type ListUserEarningsForDayRequest as eA, type MarketEventType as eB, type MarketSubscription as eC, MergeComboPositionError as eD, MergeMarketPositionError as eE, type MergePositionsWorkflow as eF, type MergePositionsWorkflowRequest as eG, type OrderDraft as eH, type OrderPostingWorkflow as eI, type OrderWorkflow as eJ, type OrderWorkflowRequest as eK, type PerpsBboSubscription as eL, type PerpsBookSubscription as eM, type PerpsCandlesSubscription as eN, type PerpsDepositWorkflow as eO, type PerpsDepositWorkflowRequest as eP, type PerpsMarketDataEventType as eQ, type PerpsMarketDataSubscription as eR, type PerpsStatisticsSubscription as eS, type PerpsStreamingCandleInterval as eT, type PerpsTickersSubscription as eU, type PerpsTradesSubscription as eV, type PostOrdersRequest as eW, PrepareErc1155ApprovalForAllError as eX, type PrepareErc1155ApprovalForAllRequest as eY, PrepareErc20ApprovalError as eZ, type PrepareErc20ApprovalRequest as e_, type ListBuilderLeaderboardRequest as ea, type ListBuilderTradesRequest as eb, type ListBuilderVolumeRequest as ec, type ListClosedPositionsRequest as ed, type ListComboActivityRequest as ee, type ListComboMarketsRequest as ef, type ListComboPositionsRequest as eg, type ListCommentsByUserAddressRequest as eh, type ListCommentsRequest as ei, type ListCurrentRewardsRequest as ej, type ListEventsRequest as ek, ListMarketClarificationsError as el, type ListMarketClarificationsRequest as em, type ListMarketHoldersRequest as en, type ListMarketPositionsRequest as eo, type ListMarketRewardsRequest as ep, type ListMarketsRequest as eq, type ListOpenInterestRequest as er, type ListOpenOrdersRequest as es, type ListPositionsRequest as et, type ListSeriesRequest as eu, type ListTagsRequest as ev, type ListTeamsRequest as ew, type ListTraderLeaderboardRequest as ex, type ListTradesRequest as ey, type ListUserEarningsAndMarketsConfigRequest as ez, ApproveErc20Error as f, cancelOrder as f$, type PrepareErc20TransferRequest as f0, PrepareGaslessTransactionError as f1, type PrepareGaslessTransactionRequest as f2, type PrepareLimitOrderRequest as f3, type PrepareMarketBuyOrderRequest as f4, type PrepareMarketOrderRequest as f5, type PrepareMarketSellOrderRequest as f6, PrepareMergeComboPositionError as f7, type PrepareMergeComboPositionRequest as f8, PrepareMergeMarketPositionError as f9, type RfqConfirmationRejectedErrorOptions as fA, type RfqExecutionUpdateEvent as fB, type SearchRequest as fC, type SearchResults as fD, type SecureRealtimeEvent as fE, type SecureRealtimeTopic as fF, type SecureSubscriptionSpec as fG, type SignedOrder as fH, SplitComboPositionError as fI, SplitMarketPositionError as fJ, type SplitPositionWorkflow as fK, type SplitPositionWorkflowRequest as fL, type SportsEventType as fM, type SportsSubscription as fN, type SubscribeError as fO, type SubscriptionHandle as fP, type TradingApprovalsWorkflow as fQ, type TradingApprovalsWorkflowRequest as fR, UpdateBalanceAllowanceError as fS, type UpdateBalanceAllowanceRequest as fT, type UserEventType as fU, type UserSubscription as fV, WaitForGaslessTransactionError as fW, approveErc1155ForAll as fX, approveErc20 as fY, cancelAll as fZ, cancelMarketOrders as f_, type PrepareMergeMarketPositionRequest as fa, PrepareMergePositionsError as fb, type PrepareMergePositionsRequest as fc, PreparePerpsDepositError as fd, PrepareRedeemComboPositionError as fe, type PrepareRedeemComboPositionRequest as ff, type PrepareRedeemMarketPositionsByConditionIdRequest as fg, type PrepareRedeemMarketPositionsByMarketIdRequest as fh, PrepareRedeemMarketPositionsError as fi, type PrepareRedeemMarketPositionsRequest as fj, PrepareRedeemPositionsError as fk, type PrepareRedeemPositionsRequest as fl, PrepareSplitComboPositionError as fm, type PrepareSplitComboPositionRequest as fn, PrepareSplitMarketPositionError as fo, type PrepareSplitMarketPositionRequest as fp, PrepareSplitPositionError as fq, type PrepareSplitPositionRequest as fr, PrepareTradingApprovalsError as fs, type PublicRealtimeEvent as ft, type PublicRealtimeTopic as fu, type PublicSubscriptionSpec as fv, type RedeemPositionsWorkflow as fw, type RedeemPositionsWorkflowRequest as fx, ResolveConditionByTokenError as fy, type ResolveConditionByTokenRequest as fz, BasePublicClient as g, listMarketClarifications as g$, cancelOrders as g0, deployDepositWallet as g1, depositToPerps as g2, downloadAccountingSnapshot as g3, dropNotifications as g4, estimateMarketPrice as g5, fetchBalanceAllowance as g6, fetchBuilderFeeRates as g7, fetchBuilderVolume as g8, fetchClosedOnlyMode as g9, fetchPriceHistory as gA, fetchPrices as gB, fetchPublicProfile as gC, fetchRelatedTagResources as gD, fetchRelatedTags as gE, fetchRewardPercentages as gF, fetchSeries as gG, fetchSpread as gH, fetchSpreads as gI, fetchTag as gJ, fetchTickSize as gK, fetchTotalEarningsForUserForDay as gL, fetchTradedMarketCount as gM, fetchTransaction as gN, isWalletDeployed as gO, listAccountTrades as gP, listActivity as gQ, listBuilderLeaderboard as gR, listBuilderTrades as gS, listClosedPositions as gT, listComboActivity as gU, listComboMarkets as gV, listComboPositions as gW, listComments as gX, listCommentsByUserAddress as gY, listCurrentRewards as gZ, listEvents as g_, fetchCommentsById as ga, fetchEvent as gb, fetchEventLiveVolume as gc, fetchEventTags as gd, fetchExecuteParams as ge, fetchLastTradePrice as gf, fetchLastTradePrices as gg, fetchMarket as gh, fetchMarketInfo as gi, fetchMarketTags as gj, fetchMidpoint as gk, fetchMidpoints as gl, fetchNegRisk as gm, fetchNotifications as gn, fetchOrder as go, fetchOrderBook as gp, fetchOrderBooks as gq, fetchOrderScoring as gr, fetchOrdersScoring as gs, fetchPerpsBook as gt, fetchPerpsFees as gu, fetchPerpsInstruments as gv, fetchPerpsTicker as gw, fetchPerpsTickers as gx, fetchPortfolioValue as gy, fetchPrice as gz, BaseSecureClient as h, listMarketHolders as h0, listMarketPositions as h1, listMarketRewards as h2, listMarkets as h3, listOpenInterest as h4, listOpenOrders as h5, listPerpsCandles as h6, listPerpsFundingHistory as h7, listPerpsTrades as h8, listPositions as h9, prepareSplitMarketPosition as hA, prepareSplitPosition as hB, prepareTradingApprovals as hC, redeemPositions as hD, resolveConditionByToken as hE, revokePerpsCredentials as hF, search as hG, setupTradingApprovals as hH, splitComboPosition as hI, splitMarketPosition as hJ, splitPosition as hK, subscribe as hL, transferErc20 as hM, updateBalanceAllowance as hN, withdrawFromPerps as hO, listSeries as ha, listTags as hb, listTeams as hc, listTraderLeaderboard as hd, listTrades as he, listUserEarningsAndMarketsConfig as hf, listUserEarningsForDay as hg, mergeComboPosition as hh, mergeMarketPosition as hi, mergePositions as hj, openPerpsSession as hk, openRfqSession as hl, postOrder as hm, postOrders as hn, prepareErc1155ApprovalForAll as ho, prepareErc20Approval as hp, prepareErc20Transfer as hq, prepareGaslessTransaction as hr, prepareMergeComboPosition as hs, prepareMergeMarketPosition as ht, prepareMergePositions as hu, preparePerpsDeposit as hv, prepareRedeemComboPosition as hw, prepareRedeemMarketPositions as hx, prepareRedeemPositions as hy, prepareSplitComboPosition as hz, type BeginAuthenticationRequest as i, type CancelAllPerpsOrdersRequest as j, CancelMarketOrdersError as k, CancelOrderError as l, CancelOrdersError as m, type CancelPerpsOrderRequest as n, type CancelPerpsOrdersRequest as o, CancelledSigningError as p, type Client as q, type ClientActions as r, type ClientDecorator as s, type ClobEndpoints as t, ComboPositionSort as u, ConnectionLostError as v, type ConnectionLostErrorOptions as w, type CreatePerpsSessionRequest as x, CreateSecureClientError as y, DepositToPerpsError as z };
|