@polymarket/client 0.1.0-beta.1 → 0.1.0-beta.11
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 +2 -10
- package/dist/actions/index.d.ts +15 -13
- package/dist/actions/index.js +1 -1
- package/dist/chunk-YMXQJO42.js +2 -0
- package/dist/chunk-YMXQJO42.js.map +1 -0
- package/dist/ethers-v5.d.ts +3 -1
- package/dist/index.d.ts +74 -11
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{sports-BDLhQVTP.d.ts → sports-uAc0WNNs.d.ts} +55 -7
- package/dist/{types-D7tLX0ye.d.ts → types-CnxVkr1p.d.ts} +2355 -394
- package/dist/viem.d.ts +3 -1
- package/package.json +13 -4
- package/dist/chunk-VQOVE5SC.js +0 -2
- package/dist/chunk-VQOVE5SC.js.map +0 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
|
-
import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1,
|
|
3
|
-
import
|
|
2
|
+
import { PaginationCursor, OrderSide, OrderType, TokenId, BuilderCode, EvmAddress as EvmAddress$1, CtfConditionId, TickSizeValue, TxHashSchema, PositionId, TransactionId } from '@polymarket/bindings';
|
|
3
|
+
import * as _polymarket_types from '@polymarket/types';
|
|
4
|
+
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, PrivateKey, TxHash } from '@polymarket/types';
|
|
4
5
|
import { WalletType, Event, TagReference, Market, Series, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
5
6
|
import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
|
|
6
7
|
import { ZodError, z } from 'zod';
|
|
7
8
|
import * as _polymarket_bindings_clob from '@polymarket/bindings/clob';
|
|
8
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';
|
|
9
10
|
import * as _polymarket_bindings_data from '@polymarket/bindings/data';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { Value, Traded, ClosedPosition, ComboPosition, Position, MetaMarketPosition, Activity, LeaderboardEntry, BuilderVolumeEntry, TraderLeaderboardEntry, LiveVolume, OpenInterest, MetaHolder, Trade } from '@polymarket/bindings/data';
|
|
12
|
+
import { ComboMarket, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, RfqErrorCode, RfqId, RfqQuoteId } from '@polymarket/bindings/rfq';
|
|
13
|
+
import * as _polymarket_bindings_perps from '@polymarket/bindings/perps';
|
|
14
|
+
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsInstrumentId, PerpsDepositStatusSchema, PerpsWithdrawalStatusSchema, PerpsPnlIntervalSchema, PerpsDecimalInput, PerpsTimeInForce, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountConfig, PerpsOrder, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsKlineInterval, PerpsInstrumentIdSchema } from '@polymarket/bindings/perps';
|
|
15
|
+
import { PerpsSessionEvent, CommentsEvent, CryptoPricesTopic, EquityPricesTopic, EquityPricesEvent, MarketEvent, StandardMarketEvent, UserEvent, SportsEvent, CryptoPricesBinanceEvent, CryptoPricesChainlinkEvent, PerpsTradeEvent, PerpsBboEvent, PerpsBookEvent, PerpsCandleEvent, PerpsTickerEvent, PerpsStatisticEvent, CryptoPricesEvent, PerpsMarketDataEvent } from '@polymarket/bindings/subscriptions';
|
|
12
16
|
import { Hex } from 'ox';
|
|
13
17
|
|
|
14
18
|
type ResponseValidationContext = {
|
|
@@ -119,6 +123,10 @@ type SendErc20TransferTransactionRequest = {
|
|
|
119
123
|
kind: 'sendErc20TransferTransaction';
|
|
120
124
|
request: SignerTransactionRequest;
|
|
121
125
|
};
|
|
126
|
+
type SendPerpsDepositTransactionRequest = {
|
|
127
|
+
kind: 'sendPerpsDepositTransaction';
|
|
128
|
+
request: SignerTransactionRequest;
|
|
129
|
+
};
|
|
122
130
|
type SignGaslessTypedDataRequest = {
|
|
123
131
|
kind: 'signGaslessTypedData';
|
|
124
132
|
payload: TypedDataPayload;
|
|
@@ -157,7 +165,7 @@ declare const FetchExecuteParamsError: {
|
|
|
157
165
|
* Fetches the parameters needed to prepare a low-level transaction submission.
|
|
158
166
|
*
|
|
159
167
|
* @remarks
|
|
160
|
-
* This is a low-level
|
|
168
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
161
169
|
*
|
|
162
170
|
* @throws {@link FetchExecuteParamsError}
|
|
163
171
|
* Thrown on failure.
|
|
@@ -167,32 +175,35 @@ declare const FetchGaslessTransactionRequestSchema: z.ZodObject<{
|
|
|
167
175
|
transactionId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.TransactionId, string>>;
|
|
168
176
|
}, z.core.$strip>;
|
|
169
177
|
type FetchGaslessTransactionRequest = z.input<typeof FetchGaslessTransactionRequestSchema>;
|
|
170
|
-
declare const
|
|
178
|
+
declare const IsWalletDeployedRequestSchema: z.ZodObject<{
|
|
171
179
|
wallet: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
|
|
172
180
|
type: z.ZodEnum<typeof WalletType>;
|
|
173
181
|
}, z.core.$strip>;
|
|
174
|
-
type
|
|
175
|
-
type
|
|
176
|
-
declare const
|
|
182
|
+
type IsWalletDeployedRequest = z.input<typeof IsWalletDeployedRequestSchema>;
|
|
183
|
+
type IsWalletDeployedError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
184
|
+
declare const IsWalletDeployedError: {
|
|
177
185
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
178
186
|
};
|
|
179
187
|
/**
|
|
180
|
-
* Checks whether a wallet is
|
|
188
|
+
* Checks whether a wallet is deployed for relayer-backed transactions.
|
|
189
|
+
*
|
|
190
|
+
* It only checks deployment status; it does not check trading approvals or complete
|
|
191
|
+
* order-readiness.
|
|
181
192
|
*
|
|
182
193
|
* @remarks
|
|
183
|
-
* This is a low-level
|
|
194
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
184
195
|
*
|
|
185
|
-
* @throws {@link
|
|
196
|
+
* @throws {@link IsWalletDeployedError}
|
|
186
197
|
* Thrown on failure.
|
|
187
198
|
*
|
|
188
199
|
* @example
|
|
189
200
|
* ```ts
|
|
190
|
-
* const
|
|
201
|
+
* const deployed = await isWalletDeployed(client, {
|
|
191
202
|
* wallet: '0x1234...',
|
|
192
203
|
* });
|
|
193
204
|
* ```
|
|
194
205
|
*/
|
|
195
|
-
declare function
|
|
206
|
+
declare function isWalletDeployed(client: BaseClient, request?: IsWalletDeployedRequest): Promise<boolean>;
|
|
196
207
|
declare const GaslessTransactionMetadataSchema: z.ZodString;
|
|
197
208
|
type DeployDepositWalletError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
198
209
|
declare const DeployDepositWalletError: {
|
|
@@ -202,7 +213,7 @@ declare const DeployDepositWalletError: {
|
|
|
202
213
|
* Deploys a Deposit Wallet for the authenticated signer.
|
|
203
214
|
*
|
|
204
215
|
* @remarks
|
|
205
|
-
* This is a low-level
|
|
216
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
206
217
|
*
|
|
207
218
|
* @throws {@link DeployDepositWalletError}
|
|
208
219
|
* Thrown on failure.
|
|
@@ -212,7 +223,7 @@ declare function deployDepositWallet(client: BaseSecureClient): Promise<Transact
|
|
|
212
223
|
* Fetches a submitted transaction.
|
|
213
224
|
*
|
|
214
225
|
* @remarks
|
|
215
|
-
* This is a low-level
|
|
226
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
216
227
|
*
|
|
217
228
|
* @throws {@link FetchGaslessTransactionError}
|
|
218
229
|
* Thrown on failure.
|
|
@@ -245,7 +256,7 @@ declare const PrepareGaslessTransactionError: {
|
|
|
245
256
|
* Starts preparing a low-level transaction workflow from one or more calls.
|
|
246
257
|
*
|
|
247
258
|
* @remarks
|
|
248
|
-
* This is a low-level
|
|
259
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
249
260
|
*
|
|
250
261
|
* @throws {@link PrepareGaslessTransactionError}
|
|
251
262
|
* Thrown on failure.
|
|
@@ -269,6 +280,270 @@ type Paginated<T> = AsyncIterable<Page<T>> & {
|
|
|
269
280
|
from(cursor?: PaginationCursor): Paginated<T>;
|
|
270
281
|
};
|
|
271
282
|
|
|
283
|
+
declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
284
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
285
|
+
user: z.ZodString;
|
|
286
|
+
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
288
|
+
sizeThreshold: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
redeemable: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
mergeable: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
292
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
293
|
+
CURRENT: "CURRENT";
|
|
294
|
+
INITIAL: "INITIAL";
|
|
295
|
+
TOKENS: "TOKENS";
|
|
296
|
+
CASHPNL: "CASHPNL";
|
|
297
|
+
PERCENTPNL: "PERCENTPNL";
|
|
298
|
+
TITLE: "TITLE";
|
|
299
|
+
RESOLVING: "RESOLVING";
|
|
300
|
+
PRICE: "PRICE";
|
|
301
|
+
AVGPRICE: "AVGPRICE";
|
|
302
|
+
}>>;
|
|
303
|
+
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
304
|
+
ASC: "ASC";
|
|
305
|
+
DESC: "DESC";
|
|
306
|
+
}>>;
|
|
307
|
+
title: z.ZodOptional<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
declare const ListClosedPositionsRequestSchema: z.ZodObject<{
|
|
310
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
311
|
+
user: z.ZodString;
|
|
312
|
+
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
|
+
title: z.ZodOptional<z.ZodString>;
|
|
314
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
315
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
316
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
317
|
+
TITLE: "TITLE";
|
|
318
|
+
PRICE: "PRICE";
|
|
319
|
+
AVGPRICE: "AVGPRICE";
|
|
320
|
+
REALIZEDPNL: "REALIZEDPNL";
|
|
321
|
+
TIMESTAMP: "TIMESTAMP";
|
|
322
|
+
}>>;
|
|
323
|
+
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
324
|
+
ASC: "ASC";
|
|
325
|
+
DESC: "DESC";
|
|
326
|
+
}>>;
|
|
327
|
+
}, z.core.$strip>;
|
|
328
|
+
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
329
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
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;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
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
|
+
type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
353
|
+
declare const ListPositionsError: {
|
|
354
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* Lists current positions for a wallet.
|
|
358
|
+
*
|
|
359
|
+
* @remarks
|
|
360
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
361
|
+
*
|
|
362
|
+
* @throws {@link ListPositionsError}
|
|
363
|
+
* Thrown on failure.
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* Fetch the first page of results:
|
|
367
|
+
* ```ts
|
|
368
|
+
* const result = listPositions(client, {
|
|
369
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
370
|
+
* pageSize: 10,
|
|
371
|
+
* });
|
|
372
|
+
*
|
|
373
|
+
* const firstPage = await result.firstPage();
|
|
374
|
+
*
|
|
375
|
+
* // Optionally, fetch additional pages:
|
|
376
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
377
|
+
* // page.items: Position[]
|
|
378
|
+
* }
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* Loop through all pages with `for await`:
|
|
383
|
+
* ```ts
|
|
384
|
+
* const result = listPositions(client, {
|
|
385
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
386
|
+
* pageSize: 10,
|
|
387
|
+
* });
|
|
388
|
+
*
|
|
389
|
+
* for await (const page of result) {
|
|
390
|
+
* // page.items: Position[]
|
|
391
|
+
* }
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
|
|
395
|
+
type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
396
|
+
declare const ListClosedPositionsError: {
|
|
397
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
398
|
+
};
|
|
399
|
+
type ListComboPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
400
|
+
declare const ListComboPositionsError: {
|
|
401
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Lists closed positions for a wallet.
|
|
405
|
+
*
|
|
406
|
+
* @remarks
|
|
407
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
408
|
+
*
|
|
409
|
+
* @throws {@link ListClosedPositionsError}
|
|
410
|
+
* Thrown on failure.
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* Fetch the first page of results:
|
|
414
|
+
* ```ts
|
|
415
|
+
* const result = listClosedPositions(client, {
|
|
416
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
417
|
+
* pageSize: 10,
|
|
418
|
+
* });
|
|
419
|
+
*
|
|
420
|
+
* const firstPage = await result.firstPage();
|
|
421
|
+
*
|
|
422
|
+
* // Optionally, fetch additional pages:
|
|
423
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
424
|
+
* // page.items: ClosedPosition[]
|
|
425
|
+
* }
|
|
426
|
+
* ```
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* Loop through all pages with `for await`:
|
|
430
|
+
* ```ts
|
|
431
|
+
* const result = listClosedPositions(client, {
|
|
432
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
433
|
+
* pageSize: 10,
|
|
434
|
+
* });
|
|
435
|
+
*
|
|
436
|
+
* for await (const page of result) {
|
|
437
|
+
* // page.items: ClosedPosition[]
|
|
438
|
+
* }
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
442
|
+
/**
|
|
443
|
+
* Lists combo positions for a wallet.
|
|
444
|
+
*
|
|
445
|
+
* @remarks
|
|
446
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
447
|
+
*
|
|
448
|
+
* @throws {@link ListComboPositionsError}
|
|
449
|
+
* Thrown on failure.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* Fetch the first page of results:
|
|
453
|
+
* ```ts
|
|
454
|
+
* const result = listComboPositions(client, {
|
|
455
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
456
|
+
* pageSize: 10,
|
|
457
|
+
* });
|
|
458
|
+
*
|
|
459
|
+
* const firstPage = await result.firstPage();
|
|
460
|
+
*
|
|
461
|
+
* // Optionally, fetch additional pages:
|
|
462
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
463
|
+
* // page.items: ComboPosition[]
|
|
464
|
+
* }
|
|
465
|
+
* ```
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* Filter to open combo positions:
|
|
469
|
+
* ```ts
|
|
470
|
+
* const result = listComboPositions(client, {
|
|
471
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
472
|
+
* status: ComboPositionStatus.Open,
|
|
473
|
+
* });
|
|
474
|
+
* ```
|
|
475
|
+
*/
|
|
476
|
+
declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
477
|
+
type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
478
|
+
declare const FetchPortfolioValueError: {
|
|
479
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Fetches the total value for a wallet's positions.
|
|
483
|
+
*
|
|
484
|
+
* @remarks
|
|
485
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
486
|
+
*
|
|
487
|
+
* @throws {@link FetchPortfolioValueError}
|
|
488
|
+
* Thrown on failure.
|
|
489
|
+
*
|
|
490
|
+
* @example
|
|
491
|
+
* ```ts
|
|
492
|
+
* const value = await fetchPortfolioValue(client, {
|
|
493
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
494
|
+
* });
|
|
495
|
+
*
|
|
496
|
+
* // value: Value[]
|
|
497
|
+
* ```
|
|
498
|
+
*/
|
|
499
|
+
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<Value[]>;
|
|
500
|
+
type FetchTradedMarketCountError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
501
|
+
declare const FetchTradedMarketCountError: {
|
|
502
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Fetches the total number of markets a wallet has traded.
|
|
506
|
+
*
|
|
507
|
+
* @remarks
|
|
508
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
509
|
+
*
|
|
510
|
+
* @throws {@link FetchTradedMarketCountError}
|
|
511
|
+
* Thrown on failure.
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```ts
|
|
515
|
+
* const traded = await fetchTradedMarketCount(client, {
|
|
516
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
517
|
+
* });
|
|
518
|
+
*
|
|
519
|
+
* // traded === Traded
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
declare function fetchTradedMarketCount(client: BaseClient, request: FetchTradedMarketCountRequest): Promise<Traded>;
|
|
523
|
+
type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
524
|
+
declare const DownloadAccountingSnapshotError: {
|
|
525
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Downloads an accounting snapshot archive for a wallet.
|
|
529
|
+
*
|
|
530
|
+
* @remarks
|
|
531
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
532
|
+
*
|
|
533
|
+
* @throws {@link DownloadAccountingSnapshotError}
|
|
534
|
+
* Thrown on failure.
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* ```ts
|
|
538
|
+
* const snapshot = await downloadAccountingSnapshot(client, {
|
|
539
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
540
|
+
* });
|
|
541
|
+
*
|
|
542
|
+
* // snapshot === Blob
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
|
|
546
|
+
|
|
272
547
|
type DefaultAccountWallet<TRequest extends {
|
|
273
548
|
user: string;
|
|
274
549
|
}> = Prettify<Omit<TRequest, 'user'> & {
|
|
@@ -281,6 +556,7 @@ type DefaultAccountWallet<TRequest extends {
|
|
|
281
556
|
}>;
|
|
282
557
|
type SecureListPositionsRequest = DefaultAccountWallet<ListPositionsRequest>;
|
|
283
558
|
type SecureListClosedPositionsRequest = DefaultAccountWallet<ListClosedPositionsRequest>;
|
|
559
|
+
type SecureListComboPositionsRequest = DefaultAccountWallet<ListComboPositionsRequest>;
|
|
284
560
|
type SecureFetchPortfolioValueRequest = DefaultAccountWallet<FetchPortfolioValueRequest>;
|
|
285
561
|
type SecureFetchTradedMarketCountRequest = DefaultAccountWallet<FetchTradedMarketCountRequest>;
|
|
286
562
|
type SecureDownloadAccountingSnapshotRequest = DefaultAccountWallet<DownloadAccountingSnapshotRequest>;
|
|
@@ -396,6 +672,24 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
396
672
|
* ```
|
|
397
673
|
*/
|
|
398
674
|
listClosedPositions(request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
675
|
+
/**
|
|
676
|
+
* Lists combo positions for a wallet.
|
|
677
|
+
*
|
|
678
|
+
* @throws {@link ListComboPositionsError}
|
|
679
|
+
* Thrown on failure.
|
|
680
|
+
*
|
|
681
|
+
* @example
|
|
682
|
+
* Fetch the first page of results:
|
|
683
|
+
* ```ts
|
|
684
|
+
* const paginator = client.listComboPositions({
|
|
685
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
686
|
+
* pageSize: 10,
|
|
687
|
+
* });
|
|
688
|
+
*
|
|
689
|
+
* const firstPage = await paginator.firstPage();
|
|
690
|
+
* ```
|
|
691
|
+
*/
|
|
692
|
+
listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
399
693
|
/**
|
|
400
694
|
* Fetches the total value for a wallet's positions.
|
|
401
695
|
*
|
|
@@ -504,6 +798,15 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
504
798
|
* Thrown on failure.
|
|
505
799
|
*/
|
|
506
800
|
listClosedPositions(request?: SecureListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
801
|
+
/**
|
|
802
|
+
* Lists combo positions for a wallet.
|
|
803
|
+
*
|
|
804
|
+
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
805
|
+
*
|
|
806
|
+
* @throws {@link ListComboPositionsError}
|
|
807
|
+
* Thrown on failure.
|
|
808
|
+
*/
|
|
809
|
+
listComboPositions(request?: SecureListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
507
810
|
/**
|
|
508
811
|
* Fetches the total value for a wallet's positions.
|
|
509
812
|
*
|
|
@@ -980,6 +1283,8 @@ type DiscoveryActions = {
|
|
|
980
1283
|
/**
|
|
981
1284
|
* Lists events.
|
|
982
1285
|
*
|
|
1286
|
+
* Defaults to open events. Pass `closed: true` to list settled events.
|
|
1287
|
+
*
|
|
983
1288
|
* @throws {@link ListEventsError}
|
|
984
1289
|
* Thrown on failure.
|
|
985
1290
|
*
|
|
@@ -1041,23 +1346,62 @@ type DiscoveryActions = {
|
|
|
1041
1346
|
*
|
|
1042
1347
|
* @example
|
|
1043
1348
|
* ```ts
|
|
1044
|
-
* const tags = await client.fetchEventTags({
|
|
1045
|
-
* id: '123',
|
|
1349
|
+
* const tags = await client.fetchEventTags({
|
|
1350
|
+
* id: '123',
|
|
1351
|
+
* });
|
|
1352
|
+
* ```
|
|
1353
|
+
*/
|
|
1354
|
+
fetchEventTags(request: FetchEventTagsRequest): Promise<TagReference[]>;
|
|
1355
|
+
/**
|
|
1356
|
+
* Lists markets.
|
|
1357
|
+
*
|
|
1358
|
+
* @remarks
|
|
1359
|
+
* Legacy multi-outcome markets cannot be represented by the binary
|
|
1360
|
+
* {@link Market} model and are omitted from results.
|
|
1361
|
+
*
|
|
1362
|
+
* @throws {@link ListMarketsError}
|
|
1363
|
+
* Thrown on failure.
|
|
1364
|
+
*
|
|
1365
|
+
* @example
|
|
1366
|
+
* Fetch the first page of results:
|
|
1367
|
+
* ```ts
|
|
1368
|
+
* const paginator = client.listMarkets({
|
|
1369
|
+
* closed: false,
|
|
1370
|
+
* pageSize: 10,
|
|
1371
|
+
* });
|
|
1372
|
+
*
|
|
1373
|
+
* const firstPage = await paginator.firstPage();
|
|
1374
|
+
*
|
|
1375
|
+
* // Optionally, fetch additional pages:
|
|
1376
|
+
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
1377
|
+
* // page.items: Market[]
|
|
1378
|
+
* }
|
|
1379
|
+
* ```
|
|
1380
|
+
*
|
|
1381
|
+
* @example
|
|
1382
|
+
* Loop through all pages with `for await`:
|
|
1383
|
+
* ```ts
|
|
1384
|
+
* const paginator = client.listMarkets({
|
|
1385
|
+
* closed: false,
|
|
1386
|
+
* pageSize: 10,
|
|
1046
1387
|
* });
|
|
1388
|
+
*
|
|
1389
|
+
* for await (const page of paginator) {
|
|
1390
|
+
* // page.items: Market[]
|
|
1391
|
+
* }
|
|
1047
1392
|
* ```
|
|
1048
1393
|
*/
|
|
1049
|
-
|
|
1394
|
+
listMarkets(request?: ListMarketsRequest): Paginated<Market[]>;
|
|
1050
1395
|
/**
|
|
1051
|
-
* Lists markets.
|
|
1396
|
+
* Lists markets available for Combos.
|
|
1052
1397
|
*
|
|
1053
|
-
* @throws {@link
|
|
1398
|
+
* @throws {@link ListComboMarketsError}
|
|
1054
1399
|
* Thrown on failure.
|
|
1055
1400
|
*
|
|
1056
1401
|
* @example
|
|
1057
1402
|
* Fetch the first page of results:
|
|
1058
1403
|
* ```ts
|
|
1059
|
-
* const paginator = client.
|
|
1060
|
-
* closed: false,
|
|
1404
|
+
* const paginator = client.listComboMarkets({
|
|
1061
1405
|
* pageSize: 10,
|
|
1062
1406
|
* });
|
|
1063
1407
|
*
|
|
@@ -1065,27 +1409,40 @@ type DiscoveryActions = {
|
|
|
1065
1409
|
*
|
|
1066
1410
|
* // Optionally, fetch additional pages:
|
|
1067
1411
|
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
1068
|
-
* // page.items:
|
|
1412
|
+
* // page.items: ComboMarket[]
|
|
1069
1413
|
* }
|
|
1070
1414
|
* ```
|
|
1071
1415
|
*
|
|
1072
1416
|
* @example
|
|
1073
1417
|
* Loop through all pages with `for await`:
|
|
1074
1418
|
* ```ts
|
|
1075
|
-
* const paginator = client.
|
|
1076
|
-
* closed: false,
|
|
1419
|
+
* const paginator = client.listComboMarkets({
|
|
1077
1420
|
* pageSize: 10,
|
|
1078
1421
|
* });
|
|
1079
1422
|
*
|
|
1080
1423
|
* for await (const page of paginator) {
|
|
1081
|
-
* // page.items:
|
|
1424
|
+
* // page.items: ComboMarket[]
|
|
1082
1425
|
* }
|
|
1083
1426
|
* ```
|
|
1427
|
+
*
|
|
1428
|
+
* @example
|
|
1429
|
+
* Omit markets the caller has already displayed:
|
|
1430
|
+
* ```ts
|
|
1431
|
+
* const paginator = client.listComboMarkets({
|
|
1432
|
+
* exclude: ['0x4cd77d456c83e7d8c569a8fb8f6396c3f40154f657e6d970733e2b1b6a7110ff'],
|
|
1433
|
+
* pageSize: 10,
|
|
1434
|
+
* });
|
|
1435
|
+
* ```
|
|
1084
1436
|
*/
|
|
1085
|
-
|
|
1437
|
+
listComboMarkets(request?: ListComboMarketsRequest): Paginated<ComboMarket[]>;
|
|
1086
1438
|
/**
|
|
1087
1439
|
* Fetches a market.
|
|
1088
1440
|
*
|
|
1441
|
+
* @remarks
|
|
1442
|
+
* Legacy multi-outcome markets cannot be represented by the binary
|
|
1443
|
+
* {@link Market} model, so fetching one fails with an
|
|
1444
|
+
* `UnexpectedResponseError`.
|
|
1445
|
+
*
|
|
1089
1446
|
* @throws {@link FetchMarketError}
|
|
1090
1447
|
* Thrown on failure.
|
|
1091
1448
|
*
|
|
@@ -1100,7 +1457,7 @@ type DiscoveryActions = {
|
|
|
1100
1457
|
* });
|
|
1101
1458
|
*
|
|
1102
1459
|
* const marketByUrl = await client.fetchMarket({
|
|
1103
|
-
* url: 'https://polymarket.com/
|
|
1460
|
+
* url: 'https://polymarket.com/event/some-market-slug',
|
|
1104
1461
|
* });
|
|
1105
1462
|
* ```
|
|
1106
1463
|
*/
|
|
@@ -1246,6 +1603,9 @@ type DiscoveryActions = {
|
|
|
1246
1603
|
/**
|
|
1247
1604
|
* Runs a public full-text search.
|
|
1248
1605
|
*
|
|
1606
|
+
* `keepClosedMarkets` is an hour window for including recently closed markets
|
|
1607
|
+
* when searching active events.
|
|
1608
|
+
*
|
|
1249
1609
|
* @throws {@link SearchError}
|
|
1250
1610
|
* Thrown on failure.
|
|
1251
1611
|
*
|
|
@@ -1435,6 +1795,107 @@ type DiscoveryActions = {
|
|
|
1435
1795
|
declare function discoveryActions(client: BasePublicClient): DiscoveryActions;
|
|
1436
1796
|
declare function discoveryActions(client: BaseSecureClient): DiscoveryActions;
|
|
1437
1797
|
|
|
1798
|
+
type PublicPerpsActions = {
|
|
1799
|
+
/**
|
|
1800
|
+
* Fetches Perps instruments.
|
|
1801
|
+
*
|
|
1802
|
+
* @throws {@link FetchPerpsInstrumentsError}
|
|
1803
|
+
* Thrown on failure.
|
|
1804
|
+
*/
|
|
1805
|
+
fetchPerpsInstruments(request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
1806
|
+
/**
|
|
1807
|
+
* Fetches the current Perps ticker for an instrument.
|
|
1808
|
+
*
|
|
1809
|
+
* @throws {@link FetchPerpsTickerError}
|
|
1810
|
+
* Thrown on failure.
|
|
1811
|
+
*/
|
|
1812
|
+
fetchPerpsTicker(request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
1813
|
+
/**
|
|
1814
|
+
* Fetches current Perps tickers.
|
|
1815
|
+
*
|
|
1816
|
+
* @throws {@link FetchPerpsTickersError}
|
|
1817
|
+
* Thrown on failure.
|
|
1818
|
+
*/
|
|
1819
|
+
fetchPerpsTickers(request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Fetches a Perps order book.
|
|
1822
|
+
*
|
|
1823
|
+
* @throws {@link FetchPerpsBookError}
|
|
1824
|
+
* Thrown on failure.
|
|
1825
|
+
*/
|
|
1826
|
+
fetchPerpsBook(request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
1829
|
+
*
|
|
1830
|
+
* @throws {@link ListPerpsCandlesError}
|
|
1831
|
+
* Thrown on failure.
|
|
1832
|
+
*/
|
|
1833
|
+
listPerpsCandles(request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
1836
|
+
*
|
|
1837
|
+
* @throws {@link ListPerpsFundingHistoryError}
|
|
1838
|
+
* Thrown on failure.
|
|
1839
|
+
*/
|
|
1840
|
+
listPerpsFundingHistory(request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
1841
|
+
/**
|
|
1842
|
+
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
1843
|
+
*
|
|
1844
|
+
* @throws {@link ListPerpsTradesError}
|
|
1845
|
+
* Thrown on failure.
|
|
1846
|
+
*/
|
|
1847
|
+
listPerpsTrades(request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
1848
|
+
/**
|
|
1849
|
+
* Fetches the Perps fee schedule.
|
|
1850
|
+
*
|
|
1851
|
+
* @throws {@link FetchPerpsFeesError}
|
|
1852
|
+
* Thrown on failure.
|
|
1853
|
+
*/
|
|
1854
|
+
fetchPerpsFees(): Promise<PerpsFeeScheduleEntry[]>;
|
|
1855
|
+
};
|
|
1856
|
+
type SecurePerpsActions = PublicPerpsActions & {
|
|
1857
|
+
/**
|
|
1858
|
+
* Deposits collateral into Perps for the authenticated signer account.
|
|
1859
|
+
*
|
|
1860
|
+
* @throws {@link DepositToPerpsError}
|
|
1861
|
+
* Thrown on failure.
|
|
1862
|
+
*/
|
|
1863
|
+
depositToPerps(request: DepositToPerpsRequest): Promise<TransactionHandle>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Opens a Perps account session.
|
|
1866
|
+
*
|
|
1867
|
+
* @remarks
|
|
1868
|
+
* Omit `expiresIn` to create new delegated Perps credentials that expire after
|
|
1869
|
+
* one week. Pass `expiresIn` as a duration in milliseconds to use a shorter or
|
|
1870
|
+
* longer credential lifetime, or pass existing credentials to validate and
|
|
1871
|
+
* resume a previous session.
|
|
1872
|
+
*
|
|
1873
|
+
* @throws {@link OpenPerpsSessionError}
|
|
1874
|
+
* Thrown on failure.
|
|
1875
|
+
*/
|
|
1876
|
+
openPerpsSession(request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
|
|
1877
|
+
/**
|
|
1878
|
+
* Revokes delegated Perps credentials by proxy address.
|
|
1879
|
+
*
|
|
1880
|
+
* @remarks
|
|
1881
|
+
* This can revoke credentials outside the currently open Perps session.
|
|
1882
|
+
*
|
|
1883
|
+
* @throws {@link RevokePerpsCredentialsError}
|
|
1884
|
+
* Thrown on failure.
|
|
1885
|
+
*/
|
|
1886
|
+
revokePerpsCredentials(request: RevokePerpsCredentialsRequest): Promise<void>;
|
|
1887
|
+
/**
|
|
1888
|
+
* Requests a Perps withdrawal to the authenticated wallet.
|
|
1889
|
+
*
|
|
1890
|
+
* @throws {@link WithdrawFromPerpsError}
|
|
1891
|
+
* Thrown on failure.
|
|
1892
|
+
*/
|
|
1893
|
+
withdrawFromPerps(request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
|
|
1894
|
+
};
|
|
1895
|
+
type PerpsActions = PublicPerpsActions;
|
|
1896
|
+
declare function perpsActions(client: BasePublicClient): PublicPerpsActions;
|
|
1897
|
+
declare function perpsActions(client: BaseSecureClient): SecurePerpsActions;
|
|
1898
|
+
|
|
1438
1899
|
type PublicRewardsActions = {
|
|
1439
1900
|
/**
|
|
1440
1901
|
* Lists current active market rewards.
|
|
@@ -1554,81 +2015,442 @@ type SecureRewardsActions = Prettify<PublicRewardsActions & {
|
|
|
1554
2015
|
* ```
|
|
1555
2016
|
*
|
|
1556
2017
|
* @example
|
|
1557
|
-
* Loop through all pages with `for await`:
|
|
2018
|
+
* Loop through all pages with `for await`:
|
|
2019
|
+
* ```ts
|
|
2020
|
+
* const paginator = client.listUserEarningsForDay({
|
|
2021
|
+
* date: '2026-04-16',
|
|
2022
|
+
* });
|
|
2023
|
+
*
|
|
2024
|
+
* for await (const page of paginator) {
|
|
2025
|
+
* // page.items: UserEarning[]
|
|
2026
|
+
* }
|
|
2027
|
+
* ```
|
|
2028
|
+
*/
|
|
2029
|
+
listUserEarningsForDay(request: ListUserEarningsForDayRequest): Paginated<UserEarning[]>;
|
|
2030
|
+
/**
|
|
2031
|
+
* Fetches total earnings for the authenticated account on a given day.
|
|
2032
|
+
*
|
|
2033
|
+
* @throws {@link FetchTotalEarningsForUserForDayError}
|
|
2034
|
+
* Thrown on failure.
|
|
2035
|
+
*
|
|
2036
|
+
* @example
|
|
2037
|
+
* ```ts
|
|
2038
|
+
* const earnings = await client.fetchTotalEarningsForUserForDay({
|
|
2039
|
+
* date: '2026-04-16',
|
|
2040
|
+
* });
|
|
2041
|
+
* ```
|
|
2042
|
+
*/
|
|
2043
|
+
fetchTotalEarningsForUserForDay(request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
2044
|
+
/**
|
|
2045
|
+
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
2046
|
+
*
|
|
2047
|
+
* @throws {@link ListUserEarningsAndMarketsConfigError}
|
|
2048
|
+
* Thrown on failure.
|
|
2049
|
+
*
|
|
2050
|
+
* @example
|
|
2051
|
+
* Fetch the first page of results:
|
|
2052
|
+
* ```ts
|
|
2053
|
+
* const paginator = client.listUserEarningsAndMarketsConfig({
|
|
2054
|
+
* date: '2026-04-16',
|
|
2055
|
+
* });
|
|
2056
|
+
*
|
|
2057
|
+
* const firstPage = await paginator.firstPage();
|
|
2058
|
+
*
|
|
2059
|
+
* // Optionally, fetch additional pages:
|
|
2060
|
+
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
2061
|
+
* // page.items: UserRewardsEarning[]
|
|
2062
|
+
* }
|
|
2063
|
+
* ```
|
|
2064
|
+
*
|
|
2065
|
+
* @example
|
|
2066
|
+
* Loop through all pages with `for await`:
|
|
2067
|
+
* ```ts
|
|
2068
|
+
* const paginator = client.listUserEarningsAndMarketsConfig({
|
|
2069
|
+
* date: '2026-04-16',
|
|
2070
|
+
* });
|
|
2071
|
+
*
|
|
2072
|
+
* for await (const page of paginator) {
|
|
2073
|
+
* // page.items: UserRewardsEarning[]
|
|
2074
|
+
* }
|
|
2075
|
+
* ```
|
|
2076
|
+
*/
|
|
2077
|
+
listUserEarningsAndMarketsConfig(request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning[]>;
|
|
2078
|
+
/**
|
|
2079
|
+
* Fetches reward percentages for the authenticated account.
|
|
2080
|
+
*
|
|
2081
|
+
* @throws {@link FetchRewardPercentagesError}
|
|
2082
|
+
* Thrown on failure.
|
|
2083
|
+
*
|
|
2084
|
+
* @example
|
|
2085
|
+
* ```ts
|
|
2086
|
+
* const percentages = await client.fetchRewardPercentages();
|
|
2087
|
+
* ```
|
|
2088
|
+
*/
|
|
2089
|
+
fetchRewardPercentages(): Promise<RewardsPercentages>;
|
|
2090
|
+
}>;
|
|
2091
|
+
declare function rewardsActions(client: BasePublicClient): PublicRewardsActions;
|
|
2092
|
+
declare function rewardsActions(client: BaseSecureClient): SecureRewardsActions;
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* Plain-data reference identifying a submitted RFQ quote.
|
|
2096
|
+
*
|
|
2097
|
+
* @remarks
|
|
2098
|
+
* This identifies the quote; it does not imply execution or guarantee that a
|
|
2099
|
+
* later cancellation request can withdraw it.
|
|
2100
|
+
*/
|
|
2101
|
+
type RfqQuoteReference = Omit<RfqQuoteAck, 'type'>;
|
|
2102
|
+
/** Acknowledgement that a quote cancellation request was processed. */
|
|
2103
|
+
type RfqCancelQuoteAck = Omit<RfqQuoteCancelAck, 'type'>;
|
|
2104
|
+
type RfqConfirmationAck = Omit<RfqConfirmationAck$1, 'decision' | 'type'>;
|
|
2105
|
+
type RfqQuoteSource = 'collateral' | 'inventory';
|
|
2106
|
+
type RfqQuoteResponse = {
|
|
2107
|
+
/** Quote price in pUSD per outcome token, for example `0.45` or `"0.45"`. */
|
|
2108
|
+
price: number | string;
|
|
2109
|
+
/**
|
|
2110
|
+
* How the maker wants to fund the quote.
|
|
2111
|
+
*
|
|
2112
|
+
* @remarks
|
|
2113
|
+
* For a BUY request (BUY YES):
|
|
2114
|
+
* - `inventory` sells YES tokens from the maker's inventory at `price`.
|
|
2115
|
+
* - `collateral` buys NO tokens with collateral at `1 - price`.
|
|
2116
|
+
*
|
|
2117
|
+
* For a SELL request (SELL YES):
|
|
2118
|
+
* - `inventory` sells NO tokens from the maker's inventory at `1 - price`.
|
|
2119
|
+
* - `collateral` buys YES tokens with collateral at `price`.
|
|
2120
|
+
*
|
|
2121
|
+
* When omitted, the SDK uses `collateral`.
|
|
2122
|
+
*
|
|
2123
|
+
* @defaultValue `'collateral'`
|
|
2124
|
+
*/
|
|
2125
|
+
source?: RfqQuoteSource;
|
|
2126
|
+
/**
|
|
2127
|
+
* Optional quote size in outcome tokens.
|
|
2128
|
+
*
|
|
2129
|
+
* This is the human-readable token amount: `1` means one full share, not one
|
|
2130
|
+
* 6-decimal base unit. When omitted, the quote uses the full RFQ request size.
|
|
2131
|
+
*/
|
|
2132
|
+
size?: number | string;
|
|
2133
|
+
};
|
|
2134
|
+
type RfqQuoteRejectedErrorOptions = {
|
|
2135
|
+
/** RFQ error code for the rejected quote. */
|
|
2136
|
+
code?: RfqErrorCode;
|
|
2137
|
+
/** Error identifier for the rejected quote. */
|
|
2138
|
+
errorId?: string;
|
|
2139
|
+
/** RFQ identifier for the rejected quote. */
|
|
2140
|
+
rfqId: RfqId;
|
|
2141
|
+
};
|
|
2142
|
+
/**
|
|
2143
|
+
* Error thrown when the RFQ server rejects a quote response.
|
|
2144
|
+
*/
|
|
2145
|
+
declare class RfqQuoteRejectedError extends PolymarketError {
|
|
2146
|
+
name: "RfqQuoteRejectedError";
|
|
2147
|
+
readonly code: RfqErrorCode | undefined;
|
|
2148
|
+
readonly errorId: string | undefined;
|
|
2149
|
+
readonly rfqId: RfqId;
|
|
2150
|
+
constructor(message: string, options: ErrorOptions & RfqQuoteRejectedErrorOptions);
|
|
2151
|
+
}
|
|
2152
|
+
type RfqQuoteError = RfqQuoteRejectedError | SigningError | TimeoutError | TransportError | UserInputError;
|
|
2153
|
+
declare const RfqQuoteError: {
|
|
2154
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | TimeoutError | RfqQuoteRejectedError;
|
|
2155
|
+
};
|
|
2156
|
+
type RfqCancelQuoteRejectedErrorOptions = {
|
|
2157
|
+
/** RFQ error code for the rejected cancellation request. */
|
|
2158
|
+
code?: RfqErrorCode;
|
|
2159
|
+
/** Error identifier for the rejected cancellation request. */
|
|
2160
|
+
errorId?: string;
|
|
2161
|
+
/** RFQ identifier for the cancellation request. */
|
|
2162
|
+
rfqId: RfqId;
|
|
2163
|
+
/** Quote identifier for the cancellation request. */
|
|
2164
|
+
quoteId: RfqQuoteId;
|
|
2165
|
+
};
|
|
2166
|
+
/**
|
|
2167
|
+
* Error thrown when the RFQ server rejects a quote cancellation request.
|
|
2168
|
+
*/
|
|
2169
|
+
declare class RfqCancelQuoteRejectedError extends PolymarketError {
|
|
2170
|
+
name: "RfqCancelQuoteRejectedError";
|
|
2171
|
+
readonly code: RfqErrorCode | undefined;
|
|
2172
|
+
readonly errorId: string | undefined;
|
|
2173
|
+
readonly rfqId: RfqId;
|
|
2174
|
+
readonly quoteId: RfqQuoteId;
|
|
2175
|
+
constructor(message: string, options: ErrorOptions & RfqCancelQuoteRejectedErrorOptions);
|
|
2176
|
+
}
|
|
2177
|
+
type RfqCancelQuoteError = RfqCancelQuoteRejectedError | TimeoutError | TransportError;
|
|
2178
|
+
declare const RfqCancelQuoteError: {
|
|
2179
|
+
isError(error: unknown): error is TransportError | TimeoutError | RfqCancelQuoteRejectedError;
|
|
2180
|
+
};
|
|
2181
|
+
type RfqConfirmationRejectedErrorOptions = {
|
|
2182
|
+
/** RFQ error code for the rejected confirmation decision. */
|
|
2183
|
+
code?: RfqErrorCode;
|
|
2184
|
+
/** Error identifier for the rejected confirmation decision. */
|
|
2185
|
+
errorId?: string;
|
|
2186
|
+
/** RFQ identifier for the rejected confirmation decision. */
|
|
2187
|
+
rfqId: RfqId;
|
|
2188
|
+
/** Quote identifier for the rejected confirmation decision. */
|
|
2189
|
+
quoteId: RfqQuoteId;
|
|
2190
|
+
};
|
|
2191
|
+
/**
|
|
2192
|
+
* Error thrown when the RFQ server rejects a confirmation decision.
|
|
2193
|
+
*/
|
|
2194
|
+
declare class RfqConfirmationRejectedError extends PolymarketError {
|
|
2195
|
+
name: "RfqConfirmationRejectedError";
|
|
2196
|
+
readonly code: RfqErrorCode | undefined;
|
|
2197
|
+
readonly errorId: string | undefined;
|
|
2198
|
+
readonly rfqId: RfqId;
|
|
2199
|
+
readonly quoteId: RfqQuoteId;
|
|
2200
|
+
constructor(message: string, options: ErrorOptions & RfqConfirmationRejectedErrorOptions);
|
|
2201
|
+
}
|
|
2202
|
+
type RfqConfirmationError = RfqConfirmationRejectedError | TimeoutError | TransportError;
|
|
2203
|
+
declare const RfqConfirmationError: {
|
|
2204
|
+
isError(error: unknown): error is TransportError | TimeoutError | RfqConfirmationRejectedError;
|
|
2205
|
+
};
|
|
2206
|
+
/**
|
|
2207
|
+
* Server request asking the market maker to provide a quote for an RFQ.
|
|
2208
|
+
*/
|
|
2209
|
+
interface RfqQuoteRequestEvent extends RfqQuoteRequest {
|
|
2210
|
+
/** Requested RFQ size and unit. Share values are human-readable outcome-token amounts. */
|
|
2211
|
+
requestedSize: RfqRequestedSize;
|
|
2212
|
+
/**
|
|
2213
|
+
* Requested RFQ position side.
|
|
2214
|
+
*
|
|
2215
|
+
* @remarks
|
|
2216
|
+
* The current RFQ system only supports YES-side requests, so this is always
|
|
2217
|
+
* {@link RfqSide.Yes}. Use {@link RfqQuoteRequestEvent.direction} to determine
|
|
2218
|
+
* whether the requester wants to buy or sell that YES-side position.
|
|
2219
|
+
*/
|
|
2220
|
+
side: RfqSide.Yes;
|
|
2221
|
+
/**
|
|
2222
|
+
* Sends a quote response for this RFQ request.
|
|
2223
|
+
*
|
|
2224
|
+
* @remarks
|
|
2225
|
+
* If this resolves, the server accepted the quote and assigned `quoteId`.
|
|
2226
|
+
*
|
|
2227
|
+
* @throws {@link RfqQuoteError}
|
|
2228
|
+
* Thrown when validation fails, signing fails, the websocket fails, the quote
|
|
2229
|
+
* acknowledgement times out, or the server rejects the quote.
|
|
2230
|
+
*/
|
|
2231
|
+
quote(response: RfqQuoteResponse): Promise<RfqQuoteReference>;
|
|
2232
|
+
}
|
|
2233
|
+
/**
|
|
2234
|
+
* Server request asking the market maker to confirm or decline a selected quote.
|
|
2235
|
+
*/
|
|
2236
|
+
interface RfqConfirmationRequestEvent extends RfqConfirmationRequest {
|
|
2237
|
+
/**
|
|
2238
|
+
* Requested RFQ position side.
|
|
2239
|
+
*
|
|
2240
|
+
* @remarks
|
|
2241
|
+
* The current RFQ system only supports YES-side requests, so this is always
|
|
2242
|
+
* {@link RfqSide.Yes}. Use {@link RfqConfirmationRequestEvent.direction} to
|
|
2243
|
+
* determine whether the requester wants to buy or sell that YES-side position.
|
|
2244
|
+
*/
|
|
2245
|
+
side: RfqSide.Yes;
|
|
2246
|
+
/**
|
|
2247
|
+
* Confirms that the maker wants to proceed with the selected quote.
|
|
2248
|
+
*
|
|
2249
|
+
* @remarks
|
|
2250
|
+
* If this resolves, the server accepted the confirmation decision.
|
|
2251
|
+
*
|
|
2252
|
+
* @throws {@link RfqConfirmationError}
|
|
2253
|
+
* Thrown when the websocket fails, the acknowledgement times out, or the
|
|
2254
|
+
* server rejects the confirmation decision.
|
|
2255
|
+
*/
|
|
2256
|
+
confirm(): Promise<RfqConfirmationAck>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Declines the selected quote during the confirmation window.
|
|
2259
|
+
*
|
|
2260
|
+
* @remarks
|
|
2261
|
+
* If this resolves, the server accepted the decline decision.
|
|
2262
|
+
*
|
|
2263
|
+
* @throws {@link RfqConfirmationError}
|
|
2264
|
+
* Thrown when the websocket fails, the acknowledgement times out, or the
|
|
2265
|
+
* server rejects the decline decision.
|
|
2266
|
+
*/
|
|
2267
|
+
decline(): Promise<RfqConfirmationAck>;
|
|
2268
|
+
}
|
|
2269
|
+
/**
|
|
2270
|
+
* Execution status update for an RFQ after acceptance and handoff.
|
|
2271
|
+
*/
|
|
2272
|
+
interface RfqExecutionUpdateEvent extends RfqExecutionUpdate {
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* Confirmed combo trade broadcast visible to all authenticated quoters.
|
|
2276
|
+
*/
|
|
2277
|
+
interface RfqTradeEvent extends RfqTrade {
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* Event emitted by an RFQ session.
|
|
2281
|
+
*/
|
|
2282
|
+
type RfqEvent = RfqQuoteRequestEvent | RfqConfirmationRequestEvent | RfqExecutionUpdateEvent | RfqTradeEvent;
|
|
2283
|
+
interface RfqSession extends AsyncIterable<RfqEvent> {
|
|
2284
|
+
/**
|
|
2285
|
+
* Requests cancellation of a submitted RFQ quote.
|
|
2286
|
+
*
|
|
2287
|
+
* @remarks
|
|
2288
|
+
* The returned ack means the backend processed the cancellation request; it
|
|
2289
|
+
* does not guarantee the quote was withdrawn from an already-selected RFQ.
|
|
2290
|
+
*
|
|
2291
|
+
* @throws {@link RfqCancelQuoteError}
|
|
2292
|
+
* Thrown when the websocket fails, the acknowledgement times out, or the
|
|
2293
|
+
* server rejects the cancellation request.
|
|
2294
|
+
*/
|
|
2295
|
+
cancelQuote(reference: RfqQuoteReference): Promise<RfqCancelQuoteAck>;
|
|
2296
|
+
/**
|
|
2297
|
+
* Closes the RFQ quoter stream.
|
|
2298
|
+
*/
|
|
2299
|
+
close(): Promise<void>;
|
|
2300
|
+
}
|
|
2301
|
+
type OpenRfqSessionError = TransportError;
|
|
2302
|
+
declare const OpenRfqSessionError: {
|
|
2303
|
+
isError(error: unknown): error is TransportError;
|
|
2304
|
+
};
|
|
2305
|
+
/**
|
|
2306
|
+
* Opens an RFQ event session.
|
|
2307
|
+
*
|
|
2308
|
+
* @remarks
|
|
2309
|
+
* The returned async iterator is a stream, not a worker queue. Await inside the
|
|
2310
|
+
* loop to process RFQ events sequentially, or dispatch handlers without awaiting
|
|
2311
|
+
* them to fan out handling when quote windows are tight.
|
|
2312
|
+
*
|
|
2313
|
+
* @throws {@link OpenRfqSessionError}
|
|
2314
|
+
* Thrown on failure.
|
|
2315
|
+
*/
|
|
2316
|
+
declare function openRfqSession(client: BaseSecureClient): Promise<RfqSession>;
|
|
2317
|
+
|
|
2318
|
+
type SecureRfqActions = {
|
|
2319
|
+
/**
|
|
2320
|
+
* Opens an RFQ event session.
|
|
2321
|
+
*
|
|
2322
|
+
* @remarks
|
|
2323
|
+
* The returned async iterator is a stream, not a worker queue. Await inside the
|
|
2324
|
+
* loop to process RFQ events sequentially, or dispatch handlers without awaiting
|
|
2325
|
+
* them to fan out handling when quote windows are tight.
|
|
2326
|
+
*
|
|
2327
|
+
* @example
|
|
2328
|
+
* Quote the full requested size:
|
|
2329
|
+
* ```ts
|
|
2330
|
+
* const session = await client.openRfqSession();
|
|
2331
|
+
*
|
|
2332
|
+
* for await (const event of session) {
|
|
2333
|
+
* switch (event.type) {
|
|
2334
|
+
* case 'quote_request':
|
|
2335
|
+
* await event.quote({ price: 0.45 });
|
|
2336
|
+
* break;
|
|
2337
|
+
*
|
|
2338
|
+
* case 'execution_update':
|
|
2339
|
+
* // event.rfqId: RfqId
|
|
2340
|
+
* // event.status: RfqExecutionStatus
|
|
2341
|
+
* // event.txHash: TxHash | undefined
|
|
2342
|
+
* break;
|
|
2343
|
+
* }
|
|
2344
|
+
* }
|
|
2345
|
+
* ```
|
|
2346
|
+
*
|
|
2347
|
+
* @example
|
|
2348
|
+
* Quote a specific outcome-token size. `0.5` means half of one share, not
|
|
2349
|
+
* half of one 6-decimal base unit:
|
|
1558
2350
|
* ```ts
|
|
1559
|
-
* const
|
|
1560
|
-
* date: '2026-04-16',
|
|
1561
|
-
* });
|
|
2351
|
+
* const session = await client.openRfqSession();
|
|
1562
2352
|
*
|
|
1563
|
-
* for await (const
|
|
1564
|
-
*
|
|
2353
|
+
* for await (const event of session) {
|
|
2354
|
+
* switch (event.type) {
|
|
2355
|
+
* case 'quote_request':
|
|
2356
|
+
* await event.quote({ price: 0.45, size: 0.5 });
|
|
2357
|
+
* break;
|
|
2358
|
+
*
|
|
2359
|
+
* // …
|
|
2360
|
+
* }
|
|
1565
2361
|
* }
|
|
1566
2362
|
* ```
|
|
1567
|
-
*/
|
|
1568
|
-
listUserEarningsForDay(request: ListUserEarningsForDayRequest): Paginated<UserEarning[]>;
|
|
1569
|
-
/**
|
|
1570
|
-
* Fetches total earnings for the authenticated account on a given day.
|
|
1571
|
-
*
|
|
1572
|
-
* @throws {@link FetchTotalEarningsForUserForDayError}
|
|
1573
|
-
* Thrown on failure.
|
|
1574
2363
|
*
|
|
1575
2364
|
* @example
|
|
2365
|
+
* Cancel a submitted quote using the live session:
|
|
1576
2366
|
* ```ts
|
|
1577
|
-
* const
|
|
1578
|
-
* date: '2026-04-16',
|
|
1579
|
-
* });
|
|
1580
|
-
* ```
|
|
1581
|
-
*/
|
|
1582
|
-
fetchTotalEarningsForUserForDay(request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
1583
|
-
/**
|
|
1584
|
-
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
2367
|
+
* const session = await client.openRfqSession();
|
|
1585
2368
|
*
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
2369
|
+
* for await (const event of session) {
|
|
2370
|
+
* switch (event.type) {
|
|
2371
|
+
* case 'quote_request': {
|
|
2372
|
+
* const ref = await event.quote({ price: 0.45 });
|
|
2373
|
+
*
|
|
2374
|
+
* if (shouldCancel(ref)) {
|
|
2375
|
+
* await session.cancelQuote(ref);
|
|
2376
|
+
* }
|
|
2377
|
+
* break;
|
|
2378
|
+
* }
|
|
2379
|
+
*
|
|
2380
|
+
* // …
|
|
2381
|
+
* }
|
|
2382
|
+
* }
|
|
2383
|
+
* ```
|
|
2384
|
+
* The cancellation ack means the backend processed the request; it does not
|
|
2385
|
+
* guarantee the quote was withdrawn from an already-selected RFQ.
|
|
1588
2386
|
*
|
|
1589
2387
|
* @example
|
|
1590
|
-
*
|
|
2388
|
+
* Handle Last Look confirmation requests:
|
|
1591
2389
|
* ```ts
|
|
1592
|
-
* const
|
|
1593
|
-
* date: '2026-04-16',
|
|
1594
|
-
* });
|
|
2390
|
+
* const session = await client.openRfqSession();
|
|
1595
2391
|
*
|
|
1596
|
-
* const
|
|
2392
|
+
* for await (const event of session) {
|
|
2393
|
+
* switch (event.type) {
|
|
2394
|
+
* case 'quote_request':
|
|
2395
|
+
* await event.quote({ price: 0.45 });
|
|
2396
|
+
* break;
|
|
1597
2397
|
*
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
2398
|
+
* case 'confirmation_request':
|
|
2399
|
+
* await event.confirm();
|
|
2400
|
+
* break;
|
|
2401
|
+
*
|
|
2402
|
+
* // …
|
|
2403
|
+
* }
|
|
1601
2404
|
* }
|
|
1602
2405
|
* ```
|
|
2406
|
+
* Any maker can quote permissionlessly. Last Look confirmation requests are
|
|
2407
|
+
* only sent to makers with Last Look enabled.
|
|
1603
2408
|
*
|
|
1604
2409
|
* @example
|
|
1605
|
-
*
|
|
2410
|
+
* Choose collateral or inventory per request:
|
|
1606
2411
|
* ```ts
|
|
1607
|
-
* const
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
2412
|
+
* const session = await client.openRfqSession();
|
|
2413
|
+
*
|
|
2414
|
+
* for await (const event of session) {
|
|
2415
|
+
* switch (event.type) {
|
|
2416
|
+
* case 'quote_request': {
|
|
2417
|
+
* switch (event.direction) {
|
|
2418
|
+
* case RfqDirection.Buy:
|
|
2419
|
+
* await event.quote({
|
|
2420
|
+
* price: 0.45,
|
|
2421
|
+
* source: chooseSource(event.yesPositionId, event.requestedSize),
|
|
2422
|
+
* });
|
|
2423
|
+
* break;
|
|
2424
|
+
*
|
|
2425
|
+
* case RfqDirection.Sell:
|
|
2426
|
+
* await event.quote({
|
|
2427
|
+
* price: 0.45,
|
|
2428
|
+
* source: chooseSource(event.noPositionId, event.requestedSize),
|
|
2429
|
+
* });
|
|
2430
|
+
* break;
|
|
2431
|
+
* }
|
|
2432
|
+
* break;
|
|
2433
|
+
* }
|
|
2434
|
+
*
|
|
2435
|
+
* case 'confirmation_request':
|
|
2436
|
+
* await event.confirm();
|
|
2437
|
+
* break;
|
|
2438
|
+
*
|
|
2439
|
+
* // …
|
|
2440
|
+
* }
|
|
2441
|
+
* }
|
|
1610
2442
|
*
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
2443
|
+
* function chooseSource(positionId: PositionId, requestedSize: RfqRequestedSize): RfqQuoteSource {
|
|
2444
|
+
* return hasInventory(positionId, requestedSize) ? 'inventory' : 'collateral';
|
|
1613
2445
|
* }
|
|
1614
2446
|
* ```
|
|
1615
|
-
*/
|
|
1616
|
-
listUserEarningsAndMarketsConfig(request: ListUserEarningsAndMarketsConfigRequest): Paginated<UserRewardsEarning[]>;
|
|
1617
|
-
/**
|
|
1618
|
-
* Fetches reward percentages for the authenticated account.
|
|
1619
2447
|
*
|
|
1620
|
-
* @throws {@link
|
|
2448
|
+
* @throws {@link OpenRfqSessionError}
|
|
1621
2449
|
* Thrown on failure.
|
|
1622
|
-
*
|
|
1623
|
-
* @example
|
|
1624
|
-
* ```ts
|
|
1625
|
-
* const percentages = await client.fetchRewardPercentages();
|
|
1626
|
-
* ```
|
|
1627
2450
|
*/
|
|
1628
|
-
|
|
1629
|
-
}
|
|
1630
|
-
declare function
|
|
1631
|
-
declare function rewardsActions(client: BaseSecureClient): SecureRewardsActions;
|
|
2451
|
+
openRfqSession(): Promise<RfqSession>;
|
|
2452
|
+
};
|
|
2453
|
+
declare function rfqActions(client: BaseSecureClient): SecureRfqActions;
|
|
1632
2454
|
|
|
1633
2455
|
type PublicSubscriptionsActions = {
|
|
1634
2456
|
/**
|
|
@@ -1692,6 +2514,9 @@ declare const CancelOrderError: {
|
|
|
1692
2514
|
/**
|
|
1693
2515
|
* Cancels a single open order for the authenticated account.
|
|
1694
2516
|
*
|
|
2517
|
+
* @remarks
|
|
2518
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2519
|
+
*
|
|
1695
2520
|
* @throws {@link CancelOrderError}
|
|
1696
2521
|
* Thrown on failure.
|
|
1697
2522
|
*
|
|
@@ -1713,6 +2538,9 @@ declare const CancelOrdersError: {
|
|
|
1713
2538
|
/**
|
|
1714
2539
|
* Cancels multiple open orders for the authenticated account.
|
|
1715
2540
|
*
|
|
2541
|
+
* @remarks
|
|
2542
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2543
|
+
*
|
|
1716
2544
|
* @throws {@link CancelOrdersError}
|
|
1717
2545
|
* Thrown on failure.
|
|
1718
2546
|
*
|
|
@@ -1733,6 +2561,9 @@ declare const CancelAllError: {
|
|
|
1733
2561
|
/**
|
|
1734
2562
|
* Cancels all open orders for the authenticated account.
|
|
1735
2563
|
*
|
|
2564
|
+
* @remarks
|
|
2565
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2566
|
+
*
|
|
1736
2567
|
* @throws {@link CancelAllError}
|
|
1737
2568
|
* Thrown on failure.
|
|
1738
2569
|
*
|
|
@@ -1753,6 +2584,9 @@ declare const CancelMarketOrdersError: {
|
|
|
1753
2584
|
* Cancels all open orders for the authenticated account that match the market
|
|
1754
2585
|
* or token filter.
|
|
1755
2586
|
*
|
|
2587
|
+
* @remarks
|
|
2588
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2589
|
+
*
|
|
1756
2590
|
* @throws {@link CancelMarketOrdersError}
|
|
1757
2591
|
* Thrown on failure.
|
|
1758
2592
|
*
|
|
@@ -1813,6 +2647,9 @@ declare const EstimateMarketPriceError: {
|
|
|
1813
2647
|
* should be treated as a partial-fill execution estimate rather than a full-fill
|
|
1814
2648
|
* guarantee.
|
|
1815
2649
|
*
|
|
2650
|
+
* @remarks
|
|
2651
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2652
|
+
*
|
|
1816
2653
|
* @example
|
|
1817
2654
|
* ```ts
|
|
1818
2655
|
* const price = await estimateMarketPrice(client, {
|
|
@@ -1868,14 +2705,35 @@ type PrepareMarketBuyOrderRequest = BasePrepareMarketOrderRequest & {
|
|
|
1868
2705
|
* fees. Leave it unset to pay fees on top of `amount`.
|
|
1869
2706
|
*/
|
|
1870
2707
|
maxSpend?: number | string;
|
|
2708
|
+
/**
|
|
2709
|
+
* Highest acceptable price per share for the BUY.
|
|
2710
|
+
*
|
|
2711
|
+
* The order may only fill at this price or better. For FOK, the full
|
|
2712
|
+
* `amount` must fill within this bound or the order is killed. For FAK, any
|
|
2713
|
+
* immediately available liquidity within this bound fills and the remainder
|
|
2714
|
+
* is canceled.
|
|
2715
|
+
*/
|
|
2716
|
+
maxPrice?: number | string;
|
|
1871
2717
|
};
|
|
1872
2718
|
type PrepareMarketSellOrderRequest = BasePrepareMarketOrderRequest & {
|
|
1873
2719
|
/** Sell side of the order. */
|
|
1874
2720
|
side: OrderSide.SELL;
|
|
1875
2721
|
/**
|
|
1876
|
-
* Number of
|
|
2722
|
+
* Number of outcome tokens to sell.
|
|
2723
|
+
*
|
|
2724
|
+
* This is the human-readable token amount: `1` means one full share, not one
|
|
2725
|
+
* 6-decimal base unit.
|
|
1877
2726
|
*/
|
|
1878
2727
|
shares: number | string;
|
|
2728
|
+
/**
|
|
2729
|
+
* Lowest acceptable price per share for the SELL.
|
|
2730
|
+
*
|
|
2731
|
+
* The order may only fill at this price or better. For FOK, all `shares`
|
|
2732
|
+
* must fill within this bound or the order is killed. For FAK, any
|
|
2733
|
+
* immediately available liquidity within this bound fills and the remainder
|
|
2734
|
+
* is canceled.
|
|
2735
|
+
*/
|
|
2736
|
+
minPrice?: number | string;
|
|
1879
2737
|
};
|
|
1880
2738
|
type PrepareMarketOrderRequest = PrepareMarketBuyOrderRequest | PrepareMarketSellOrderRequest;
|
|
1881
2739
|
type PrepareLimitOrderRequest = {
|
|
@@ -1883,7 +2741,12 @@ type PrepareLimitOrderRequest = {
|
|
|
1883
2741
|
tokenId: string;
|
|
1884
2742
|
/** Price used to create the order */
|
|
1885
2743
|
price: number | string;
|
|
1886
|
-
/**
|
|
2744
|
+
/**
|
|
2745
|
+
* Order size in outcome tokens.
|
|
2746
|
+
*
|
|
2747
|
+
* This is the human-readable token amount: `1` means one full share, not one
|
|
2748
|
+
* 6-decimal base unit.
|
|
2749
|
+
*/
|
|
1887
2750
|
size: number | string;
|
|
1888
2751
|
/** Side of the order */
|
|
1889
2752
|
side: OrderSide;
|
|
@@ -1901,6 +2764,10 @@ type PrepareLimitOrderRequest = {
|
|
|
1901
2764
|
* When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
|
|
1902
2765
|
* expires at the given timestamp.
|
|
1903
2766
|
*
|
|
2767
|
+
* The timestamp must be at least 60 seconds in the future. Add your own
|
|
2768
|
+
* buffer for network latency and clock skew when deriving it from the
|
|
2769
|
+
* current time.
|
|
2770
|
+
*
|
|
1904
2771
|
* When omitted, the SDK prepares a Good-Til-Cancelled (GTC) limit order.
|
|
1905
2772
|
*/
|
|
1906
2773
|
expiration?: number;
|
|
@@ -1952,6 +2819,9 @@ declare const PostOrdersError: {
|
|
|
1952
2819
|
/**
|
|
1953
2820
|
* Posts a signed order for the authenticated account.
|
|
1954
2821
|
*
|
|
2822
|
+
* @remarks
|
|
2823
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2824
|
+
*
|
|
1955
2825
|
* @example
|
|
1956
2826
|
* ```ts
|
|
1957
2827
|
* const order = await client.createMarketOrder({
|
|
@@ -1970,6 +2840,8 @@ declare function postOrder(client: BaseSecureClient): (order: SignedOrder) => Pr
|
|
|
1970
2840
|
* Posts multiple signed orders for the authenticated account.
|
|
1971
2841
|
*
|
|
1972
2842
|
* @remarks
|
|
2843
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2844
|
+
*
|
|
1973
2845
|
* Accepts between 1 and 15 orders, matching the current service limit.
|
|
1974
2846
|
*
|
|
1975
2847
|
* @example
|
|
@@ -1989,10 +2861,20 @@ type SecureTradingActions = {
|
|
|
1989
2861
|
* @throws {@link CreateMarketOrderError}
|
|
1990
2862
|
* Thrown on failure.
|
|
1991
2863
|
*
|
|
1992
|
-
* @example
|
|
2864
|
+
* @example Basic market buy
|
|
2865
|
+
* ```ts
|
|
2866
|
+
* const order = await client.createMarketOrder({
|
|
2867
|
+
* amount: 10,
|
|
2868
|
+
* side: OrderSide.BUY,
|
|
2869
|
+
* tokenId: '123',
|
|
2870
|
+
* });
|
|
2871
|
+
* ```
|
|
2872
|
+
*
|
|
2873
|
+
* @example Protected market buy
|
|
1993
2874
|
* ```ts
|
|
1994
2875
|
* const order = await client.createMarketOrder({
|
|
1995
2876
|
* amount: 10,
|
|
2877
|
+
* maxPrice: '0.55',
|
|
1996
2878
|
* side: OrderSide.BUY,
|
|
1997
2879
|
* tokenId: '123',
|
|
1998
2880
|
* });
|
|
@@ -2005,7 +2887,7 @@ type SecureTradingActions = {
|
|
|
2005
2887
|
* @throws {@link PlaceMarketOrderError}
|
|
2006
2888
|
* Thrown on failure.
|
|
2007
2889
|
*
|
|
2008
|
-
* @example
|
|
2890
|
+
* @example Basic market buy
|
|
2009
2891
|
* ```ts
|
|
2010
2892
|
* const response = await client.placeMarketOrder({
|
|
2011
2893
|
* amount: 10,
|
|
@@ -2015,11 +2897,28 @@ type SecureTradingActions = {
|
|
|
2015
2897
|
*
|
|
2016
2898
|
* // response: OrderResponse
|
|
2017
2899
|
* ```
|
|
2900
|
+
*
|
|
2901
|
+
* @example Protected market sell
|
|
2902
|
+
* ```ts
|
|
2903
|
+
* const response = await client.placeMarketOrder({
|
|
2904
|
+
* minPrice: '0.54',
|
|
2905
|
+
* shares: 10,
|
|
2906
|
+
* side: OrderSide.SELL,
|
|
2907
|
+
* tokenId: '123',
|
|
2908
|
+
* });
|
|
2909
|
+
*
|
|
2910
|
+
* // response: OrderResponse
|
|
2911
|
+
* ```
|
|
2018
2912
|
*/
|
|
2019
2913
|
placeMarketOrder(request: PrepareMarketOrderRequest): Promise<OrderResponse>;
|
|
2020
2914
|
/**
|
|
2021
2915
|
* Creates a signed limit order for the authenticated account.
|
|
2022
2916
|
*
|
|
2917
|
+
* @remarks
|
|
2918
|
+
* GTD expirations must be at least 60 seconds in the future. Add your own
|
|
2919
|
+
* buffer for network latency and clock skew when deriving an expiration from
|
|
2920
|
+
* the current time.
|
|
2921
|
+
*
|
|
2023
2922
|
* @throws {@link CreateLimitOrderError}
|
|
2024
2923
|
* Thrown on failure.
|
|
2025
2924
|
*
|
|
@@ -2038,6 +2937,11 @@ type SecureTradingActions = {
|
|
|
2038
2937
|
/**
|
|
2039
2938
|
* Creates and posts a limit order for the authenticated account.
|
|
2040
2939
|
*
|
|
2940
|
+
* @remarks
|
|
2941
|
+
* GTD expirations must be at least 60 seconds in the future. Add your own
|
|
2942
|
+
* buffer for network latency and clock skew when deriving an expiration from
|
|
2943
|
+
* the current time.
|
|
2944
|
+
*
|
|
2041
2945
|
* @throws {@link PlaceLimitOrderError}
|
|
2042
2946
|
* Thrown on failure.
|
|
2043
2947
|
*
|
|
@@ -2191,15 +3095,9 @@ declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
|
|
|
2191
3095
|
|
|
2192
3096
|
type SecureWalletActions = {
|
|
2193
3097
|
/**
|
|
2194
|
-
*
|
|
2195
|
-
*
|
|
2196
|
-
*
|
|
2197
|
-
* Thrown on failure.
|
|
2198
|
-
*
|
|
2199
|
-
* @example
|
|
2200
|
-
* ```ts
|
|
2201
|
-
* const ready = await client.isGaslessReady();
|
|
2202
|
-
* ```
|
|
3098
|
+
* @deprecated You no longer need to call this. `createSecureClient` ensures
|
|
3099
|
+
* the account wallet is set up for its trading flow, so this always resolves
|
|
3100
|
+
* to `true` and is retained only for backward compatibility.
|
|
2203
3101
|
*/
|
|
2204
3102
|
isGaslessReady(): Promise<boolean>;
|
|
2205
3103
|
/**
|
|
@@ -2210,14 +3108,10 @@ type SecureWalletActions = {
|
|
|
2210
3108
|
*
|
|
2211
3109
|
* @example
|
|
2212
3110
|
* ```ts
|
|
2213
|
-
*
|
|
2214
|
-
*
|
|
2215
|
-
* const outcome = await handle.wait();
|
|
2216
|
-
*
|
|
2217
|
-
* // outcome.transactionHash: TxHash
|
|
3111
|
+
* await client.setupTradingApprovals();
|
|
2218
3112
|
* ```
|
|
2219
3113
|
*/
|
|
2220
|
-
setupTradingApprovals(): Promise<
|
|
3114
|
+
setupTradingApprovals(): Promise<DeprecatedTransactionHandle>;
|
|
2221
3115
|
/**
|
|
2222
3116
|
* Approves ERC-20 token spending for the authenticated account.
|
|
2223
3117
|
*
|
|
@@ -2268,7 +3162,7 @@ type SecureWalletActions = {
|
|
|
2268
3162
|
* const handle = await client.transferErc20({
|
|
2269
3163
|
* amount: 1n,
|
|
2270
3164
|
* recipientAddress: client.account.signer,
|
|
2271
|
-
* tokenAddress: client.environment.collateralToken,
|
|
3165
|
+
* tokenAddress: client.environment.contracts.collateralToken,
|
|
2272
3166
|
* });
|
|
2273
3167
|
*
|
|
2274
3168
|
* const outcome = await handle.wait();
|
|
@@ -2278,12 +3172,12 @@ type SecureWalletActions = {
|
|
|
2278
3172
|
*/
|
|
2279
3173
|
transferErc20(request: PrepareErc20TransferRequest): Promise<TransactionHandle>;
|
|
2280
3174
|
/**
|
|
2281
|
-
* Splits collateral into market positions.
|
|
3175
|
+
* Splits collateral into market or combo positions.
|
|
2282
3176
|
*
|
|
2283
3177
|
* @throws {@link SplitPositionError}
|
|
2284
3178
|
* Thrown on failure.
|
|
2285
3179
|
*
|
|
2286
|
-
* @example
|
|
3180
|
+
* @example Split a market by condition ID.
|
|
2287
3181
|
* ```ts
|
|
2288
3182
|
* const handle = await client.splitPosition({
|
|
2289
3183
|
* amount: 1n,
|
|
@@ -2295,15 +3189,27 @@ type SecureWalletActions = {
|
|
|
2295
3189
|
*
|
|
2296
3190
|
* // outcome.transactionHash: TxHash
|
|
2297
3191
|
* ```
|
|
3192
|
+
*
|
|
3193
|
+
* @example Split a combo by legs.
|
|
3194
|
+
* ```ts
|
|
3195
|
+
* const handle = await client.splitPosition({
|
|
3196
|
+
* amount: 1n,
|
|
3197
|
+
* legs: ['123', '456'],
|
|
3198
|
+
* });
|
|
3199
|
+
*
|
|
3200
|
+
* const outcome = await handle.wait();
|
|
3201
|
+
*
|
|
3202
|
+
* // outcome.transactionHash: TxHash
|
|
3203
|
+
* ```
|
|
2298
3204
|
*/
|
|
2299
3205
|
splitPosition(request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
|
|
2300
3206
|
/**
|
|
2301
|
-
* Merges complementary market positions back into collateral.
|
|
3207
|
+
* Merges complementary market or combo positions back into collateral.
|
|
2302
3208
|
*
|
|
2303
3209
|
* @throws {@link MergePositionsError}
|
|
2304
3210
|
* Thrown on failure.
|
|
2305
3211
|
*
|
|
2306
|
-
* @example
|
|
3212
|
+
* @example Merge a market by condition ID.
|
|
2307
3213
|
* ```ts
|
|
2308
3214
|
* const handle = await client.mergePositions({
|
|
2309
3215
|
* amount: 'max',
|
|
@@ -2315,21 +3221,41 @@ type SecureWalletActions = {
|
|
|
2315
3221
|
*
|
|
2316
3222
|
* // outcome.transactionHash: TxHash
|
|
2317
3223
|
* ```
|
|
3224
|
+
*
|
|
3225
|
+
* @example Merge a combo by legs.
|
|
3226
|
+
* ```ts
|
|
3227
|
+
* const handle = await client.mergePositions({
|
|
3228
|
+
* amount: 'max',
|
|
3229
|
+
* legs: ['123', '456'],
|
|
3230
|
+
* });
|
|
3231
|
+
*
|
|
3232
|
+
* const outcome = await handle.wait();
|
|
3233
|
+
*
|
|
3234
|
+
* // outcome.transactionHash: TxHash
|
|
3235
|
+
* ```
|
|
2318
3236
|
*/
|
|
2319
3237
|
mergePositions(request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
|
|
2320
3238
|
/**
|
|
2321
|
-
* Redeems resolved market positions.
|
|
3239
|
+
* Redeems resolved market or combo positions.
|
|
2322
3240
|
*
|
|
2323
3241
|
* @throws {@link RedeemPositionsError}
|
|
2324
3242
|
* Thrown on failure.
|
|
2325
3243
|
*
|
|
2326
3244
|
* @example
|
|
2327
3245
|
* ```ts
|
|
3246
|
+
* // Redeem a market by condition ID.
|
|
2328
3247
|
* const handle = await client.redeemPositions({
|
|
2329
3248
|
* conditionId:
|
|
2330
3249
|
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
2331
3250
|
* });
|
|
2332
3251
|
*
|
|
3252
|
+
* const outcome = await handle.wait();
|
|
3253
|
+
*
|
|
3254
|
+
* // outcome.transactionHash: TxHash
|
|
3255
|
+
* ```
|
|
3256
|
+
*
|
|
3257
|
+
* @example Redeem a market by market ID.
|
|
3258
|
+
* ```ts
|
|
2333
3259
|
* const handle = await client.redeemPositions({
|
|
2334
3260
|
* marketId: '12345',
|
|
2335
3261
|
* });
|
|
@@ -2338,13 +3264,24 @@ type SecureWalletActions = {
|
|
|
2338
3264
|
*
|
|
2339
3265
|
* // outcome.transactionHash: TxHash
|
|
2340
3266
|
* ```
|
|
3267
|
+
*
|
|
3268
|
+
* @example Redeem a combo by position ID.
|
|
3269
|
+
* ```ts
|
|
3270
|
+
* const handle = await client.redeemPositions({
|
|
3271
|
+
* positionId: '123',
|
|
3272
|
+
* });
|
|
3273
|
+
*
|
|
3274
|
+
* const outcome = await handle.wait();
|
|
3275
|
+
*
|
|
3276
|
+
* // outcome.transactionHash: TxHash
|
|
3277
|
+
* ```
|
|
2341
3278
|
*/
|
|
2342
3279
|
redeemPositions(request: PrepareRedeemPositionsRequest): Promise<TransactionHandle>;
|
|
2343
3280
|
};
|
|
2344
3281
|
declare function walletActions(client: BaseSecureClient): SecureWalletActions;
|
|
2345
3282
|
|
|
2346
|
-
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
|
|
2347
|
-
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecureAccountActions & SecureRewardsActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
3283
|
+
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
|
|
3284
|
+
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
2348
3285
|
declare function allActions(client: BasePublicClient): PublicActions;
|
|
2349
3286
|
declare function allActions(client: BaseSecureClient): SecureActions;
|
|
2350
3287
|
|
|
@@ -2357,17 +3294,76 @@ type WalletDerivationConfig = {
|
|
|
2357
3294
|
safeFactory: EvmAddress;
|
|
2358
3295
|
safeInitCodeHash: Hex.Hex;
|
|
2359
3296
|
};
|
|
3297
|
+
type RestEndpoint = {
|
|
3298
|
+
rest: string;
|
|
3299
|
+
headers?: Record<string, string>;
|
|
3300
|
+
};
|
|
3301
|
+
type WebSocketEndpoint = {
|
|
3302
|
+
ws: string;
|
|
3303
|
+
headers?: Record<string, string>;
|
|
3304
|
+
};
|
|
3305
|
+
type ClobEndpoints = RestEndpoint & {
|
|
3306
|
+
market: WebSocketEndpoint;
|
|
3307
|
+
user: WebSocketEndpoint;
|
|
3308
|
+
};
|
|
3309
|
+
type RfqEndpoints = RestEndpoint & WebSocketEndpoint;
|
|
3310
|
+
type PerpsEndpoints = RestEndpoint & WebSocketEndpoint;
|
|
3311
|
+
type EnvironmentContracts = {
|
|
3312
|
+
collateralToken: EvmAddress;
|
|
3313
|
+
conditionalTokens: EvmAddress;
|
|
3314
|
+
negRiskAdapter: EvmAddress;
|
|
3315
|
+
collateralAdapter: EvmAddress;
|
|
3316
|
+
negRiskCollateralAdapter: EvmAddress;
|
|
3317
|
+
standardExchange: EvmAddress;
|
|
3318
|
+
negRiskExchange: EvmAddress;
|
|
3319
|
+
exchangeV3: EvmAddress;
|
|
3320
|
+
protocolV2Router: EvmAddress;
|
|
3321
|
+
combinatorialModule: EvmAddress;
|
|
3322
|
+
positionManager: EvmAddress;
|
|
3323
|
+
autoRedeemOperator: EvmAddress;
|
|
3324
|
+
safeMultisend: EvmAddress;
|
|
3325
|
+
relayHub: EvmAddress;
|
|
3326
|
+
perpsDepositContract: EvmAddress;
|
|
3327
|
+
};
|
|
2360
3328
|
type EnvironmentConfig = {
|
|
2361
3329
|
name: string;
|
|
2362
3330
|
chainId: number;
|
|
2363
3331
|
};
|
|
3332
|
+
type EnvironmentConfigForkEndpoint = Partial<RestEndpoint & WebSocketEndpoint>;
|
|
3333
|
+
type EnvironmentConfigFork = {
|
|
3334
|
+
name: string;
|
|
3335
|
+
chainId?: number;
|
|
3336
|
+
rpc?: string;
|
|
3337
|
+
walletDerivation?: Partial<WalletDerivationConfig>;
|
|
3338
|
+
contracts?: Partial<EnvironmentContracts>;
|
|
3339
|
+
clob?: Partial<RestEndpoint> & {
|
|
3340
|
+
market?: Partial<WebSocketEndpoint>;
|
|
3341
|
+
user?: Partial<WebSocketEndpoint>;
|
|
3342
|
+
};
|
|
3343
|
+
relayer?: Partial<RestEndpoint>;
|
|
3344
|
+
gamma?: Partial<RestEndpoint>;
|
|
3345
|
+
data?: Partial<RestEndpoint>;
|
|
3346
|
+
rfq?: EnvironmentConfigForkEndpoint;
|
|
3347
|
+
perps?: EnvironmentConfigForkEndpoint;
|
|
3348
|
+
rtds?: Partial<WebSocketEndpoint>;
|
|
3349
|
+
sports?: Partial<WebSocketEndpoint>;
|
|
3350
|
+
relayerMaxPolls?: number;
|
|
3351
|
+
relayerPollFrequencyMs?: number;
|
|
3352
|
+
};
|
|
2364
3353
|
/**
|
|
2365
3354
|
* The production environment configuration.
|
|
2366
3355
|
*/
|
|
2367
3356
|
declare const production: EnvironmentConfig;
|
|
3357
|
+
/**
|
|
3358
|
+
* Forks an environment config from production unless a different base is passed.
|
|
3359
|
+
*
|
|
3360
|
+
* @experimental This helper is intended for advanced custom environment use,
|
|
3361
|
+
* not general SDK usage. Its signature may change without notice.
|
|
3362
|
+
*/
|
|
3363
|
+
declare function forkEnvironmentConfig(fork: EnvironmentConfigFork, base?: EnvironmentConfig): EnvironmentConfig;
|
|
2368
3364
|
|
|
2369
3365
|
type ServiceRequest = {
|
|
2370
|
-
method: 'DELETE' | 'GET' | 'POST';
|
|
3366
|
+
method: 'DELETE' | 'GET' | 'PATCH' | 'POST';
|
|
2371
3367
|
path: string;
|
|
2372
3368
|
body?: string;
|
|
2373
3369
|
headers?: HeadersInit;
|
|
@@ -2494,15 +3490,9 @@ declare class BaseSecureClient<TPublicActions extends ClientActions = ClientActi
|
|
|
2494
3490
|
*/
|
|
2495
3491
|
get account(): AccountIdentity;
|
|
2496
3492
|
/**
|
|
2497
|
-
*
|
|
2498
|
-
*
|
|
2499
|
-
*
|
|
2500
|
-
* If this client is already bound to a gasless wallet, this returns a secure
|
|
2501
|
-
* client for the current wallet. For EOA clients, this deploys or reuses the
|
|
2502
|
-
* authenticated signer's deterministic Deposit Wallet.
|
|
2503
|
-
*
|
|
2504
|
-
* @throws {@link SetupGaslessWalletError}
|
|
2505
|
-
* Thrown on failure.
|
|
3493
|
+
* @deprecated `createSecureClient` now sets up the account wallet for its
|
|
3494
|
+
* trading flow, so this is a no-op retained only for backward compatibility
|
|
3495
|
+
* and returns the current secure client.
|
|
2506
3496
|
*/
|
|
2507
3497
|
setupGaslessWallet(): Promise<SecureClient<TPublicActions, TSecureActions>>;
|
|
2508
3498
|
/**
|
|
@@ -2563,7 +3553,7 @@ type SecureContext = PublicContext & {};
|
|
|
2563
3553
|
type SecureClientConfig = PublicClientConfig & {
|
|
2564
3554
|
account: AccountIdentity;
|
|
2565
3555
|
credentials: ApiKeyCreds;
|
|
2566
|
-
signer
|
|
3556
|
+
signer: Signer;
|
|
2567
3557
|
};
|
|
2568
3558
|
type PublicClient<TPublicActions extends ClientActions = PublicActions, TSecureActions extends ClientActions = SecureActions> = BasePublicClient<TPublicActions, TSecureActions> & TPublicActions;
|
|
2569
3559
|
type SecureClient<TPublicActions extends ClientActions = PublicActions, TSecureActions extends ClientActions = SecureActions> = BaseSecureClient<TPublicActions, TSecureActions> & TSecureActions;
|
|
@@ -2586,13 +3576,10 @@ type SecureClientOptions = PublicClientOptions & {
|
|
|
2586
3576
|
/**
|
|
2587
3577
|
* Wallet address to use as the account wallet.
|
|
2588
3578
|
*
|
|
2589
|
-
* If omitted, the client uses the signer
|
|
2590
|
-
*
|
|
2591
|
-
*
|
|
2592
|
-
*
|
|
2593
|
-
* Deposit Wallet, Poly Safe, or Poly Proxy wallet address to use that wallet
|
|
2594
|
-
* as the account/funder and enable gasless wallet operations when an API key
|
|
2595
|
-
* strategy supports them.
|
|
3579
|
+
* If omitted, the client uses the signer's deterministic Deposit Wallet as
|
|
3580
|
+
* the account wallet. Pass the signer address itself to explicitly trade as
|
|
3581
|
+
* an EOA account, or pass a supported Poly Deposit Wallet, Poly Safe, or Poly
|
|
3582
|
+
* Proxy wallet address to use that wallet as the account/funder.
|
|
2596
3583
|
*/
|
|
2597
3584
|
wallet?: string;
|
|
2598
3585
|
/**
|
|
@@ -2623,13 +3610,13 @@ type SecureClientOptions = PublicClientOptions & {
|
|
|
2623
3610
|
* ```
|
|
2624
3611
|
*/
|
|
2625
3612
|
declare function createPublicClient(options?: PublicClientOptions): PublicClient<PublicActions, SecureActions>;
|
|
2626
|
-
type CreateSecureClientError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3613
|
+
type CreateSecureClientError = CancelledSigningError | DeployDepositWalletError | IsWalletDeployedError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError | WaitForGaslessTransactionError;
|
|
2627
3614
|
declare const CreateSecureClientError: {
|
|
2628
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3615
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
2629
3616
|
};
|
|
2630
|
-
type SetupGaslessWalletError =
|
|
3617
|
+
type SetupGaslessWalletError = UserInputError;
|
|
2631
3618
|
declare const SetupGaslessWalletError: {
|
|
2632
|
-
isError(error: unknown): error is
|
|
3619
|
+
isError(error: unknown): error is UserInputError;
|
|
2633
3620
|
};
|
|
2634
3621
|
/**
|
|
2635
3622
|
* Creates a new authenticated `SecureClient` instance.
|
|
@@ -2653,6 +3640,9 @@ declare const FetchClosedOnlyModeError: {
|
|
|
2653
3640
|
/**
|
|
2654
3641
|
* Fetches whether the account is restricted to closed-only trading.
|
|
2655
3642
|
*
|
|
3643
|
+
* @remarks
|
|
3644
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3645
|
+
*
|
|
2656
3646
|
* @throws {@link FetchClosedOnlyModeError}
|
|
2657
3647
|
*
|
|
2658
3648
|
* @example
|
|
@@ -2663,7 +3653,7 @@ declare const FetchClosedOnlyModeError: {
|
|
|
2663
3653
|
declare function fetchClosedOnlyMode(client: BaseSecureClient): Promise<boolean>;
|
|
2664
3654
|
declare const ListOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
2665
3655
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
2666
|
-
cursor: z.ZodOptional<z.
|
|
3656
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
2667
3657
|
id: z.ZodOptional<z.ZodString>;
|
|
2668
3658
|
market: z.ZodOptional<z.ZodString>;
|
|
2669
3659
|
}, z.core.$strip>>;
|
|
@@ -2675,6 +3665,9 @@ declare const ListOpenOrdersError: {
|
|
|
2675
3665
|
/**
|
|
2676
3666
|
* Lists open orders for the authenticated account across all pages.
|
|
2677
3667
|
*
|
|
3668
|
+
* @remarks
|
|
3669
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3670
|
+
*
|
|
2678
3671
|
* @throws {@link ListOpenOrdersError}
|
|
2679
3672
|
*
|
|
2680
3673
|
* @example
|
|
@@ -2716,6 +3709,9 @@ declare const FetchOrderError: {
|
|
|
2716
3709
|
/**
|
|
2717
3710
|
* Fetches a single order for the authenticated account.
|
|
2718
3711
|
*
|
|
3712
|
+
* @remarks
|
|
3713
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3714
|
+
*
|
|
2719
3715
|
* @throws {@link FetchOrderError}
|
|
2720
3716
|
*
|
|
2721
3717
|
* @example
|
|
@@ -2730,7 +3726,7 @@ declare const ListAccountTradesRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2730
3726
|
after: z.ZodOptional<z.ZodString>;
|
|
2731
3727
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
2732
3728
|
before: z.ZodOptional<z.ZodString>;
|
|
2733
|
-
cursor: z.ZodOptional<z.
|
|
3729
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
2734
3730
|
id: z.ZodOptional<z.ZodString>;
|
|
2735
3731
|
makerAddress: z.ZodOptional<z.ZodString>;
|
|
2736
3732
|
market: z.ZodOptional<z.ZodString>;
|
|
@@ -2743,6 +3739,9 @@ declare const ListAccountTradesError: {
|
|
|
2743
3739
|
/**
|
|
2744
3740
|
* Lists trades for the authenticated account across all pages.
|
|
2745
3741
|
*
|
|
3742
|
+
* @remarks
|
|
3743
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3744
|
+
*
|
|
2746
3745
|
* @throws {@link ListAccountTradesError}
|
|
2747
3746
|
*
|
|
2748
3747
|
* @example
|
|
@@ -2784,6 +3783,9 @@ type DropNotificationsRequest = z.input<typeof DropNotificationsRequestSchema>;
|
|
|
2784
3783
|
/**
|
|
2785
3784
|
* Fetches notifications for the authenticated account.
|
|
2786
3785
|
*
|
|
3786
|
+
* @remarks
|
|
3787
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3788
|
+
*
|
|
2787
3789
|
* @throws {@link FetchNotificationsError}
|
|
2788
3790
|
*
|
|
2789
3791
|
* @example
|
|
@@ -2799,6 +3801,9 @@ declare const DropNotificationsError: {
|
|
|
2799
3801
|
/**
|
|
2800
3802
|
* Drops notifications for the authenticated account.
|
|
2801
3803
|
*
|
|
3804
|
+
* @remarks
|
|
3805
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3806
|
+
*
|
|
2802
3807
|
* @throws {@link DropNotificationsError}
|
|
2803
3808
|
* Thrown on failure.
|
|
2804
3809
|
*
|
|
@@ -2823,7 +3828,7 @@ declare const FetchBalanceAllowanceError: {
|
|
|
2823
3828
|
* Fetches balance and allowance for the authenticated account.
|
|
2824
3829
|
*
|
|
2825
3830
|
* @remarks
|
|
2826
|
-
* This is a low-level
|
|
3831
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2827
3832
|
*
|
|
2828
3833
|
* @throws {@link FetchBalanceAllowanceError}
|
|
2829
3834
|
* Thrown on failure.
|
|
@@ -2849,7 +3854,7 @@ declare const UpdateBalanceAllowanceError: {
|
|
|
2849
3854
|
* Refreshes balance and allowance for the authenticated account.
|
|
2850
3855
|
*
|
|
2851
3856
|
* @remarks
|
|
2852
|
-
* This is a low-level
|
|
3857
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
2853
3858
|
*
|
|
2854
3859
|
* @throws {@link UpdateBalanceAllowanceError}
|
|
2855
3860
|
* Thrown on failure.
|
|
@@ -2873,6 +3878,9 @@ declare const FetchOrderScoringError: {
|
|
|
2873
3878
|
/**
|
|
2874
3879
|
* Fetches whether a single order is currently scoring.
|
|
2875
3880
|
*
|
|
3881
|
+
* @remarks
|
|
3882
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3883
|
+
*
|
|
2876
3884
|
* @throws {@link FetchOrderScoringError}
|
|
2877
3885
|
*
|
|
2878
3886
|
* @example
|
|
@@ -2894,6 +3902,9 @@ declare const FetchOrdersScoringError: {
|
|
|
2894
3902
|
/**
|
|
2895
3903
|
* Fetches scoring state for multiple orders.
|
|
2896
3904
|
*
|
|
3905
|
+
* @remarks
|
|
3906
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3907
|
+
*
|
|
2897
3908
|
* @throws {@link FetchOrdersScoringError}
|
|
2898
3909
|
*
|
|
2899
3910
|
* @example
|
|
@@ -2905,7 +3916,7 @@ declare const FetchOrdersScoringError: {
|
|
|
2905
3916
|
*/
|
|
2906
3917
|
declare function fetchOrdersScoring(client: BaseSecureClient, request: FetchOrdersScoringRequest): Promise<OrdersScoringResponse>;
|
|
2907
3918
|
declare const ListUserEarningsForDayRequestSchema: z.ZodObject<{
|
|
2908
|
-
cursor: z.ZodOptional<z.
|
|
3919
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
2909
3920
|
date: z.ZodString;
|
|
2910
3921
|
}, z.core.$strip>;
|
|
2911
3922
|
type ListUserEarningsForDayRequest = z.input<typeof ListUserEarningsForDayRequestSchema>;
|
|
@@ -2916,6 +3927,9 @@ declare const ListUserEarningsForDayError: {
|
|
|
2916
3927
|
/**
|
|
2917
3928
|
* Lists per-market earnings for the authenticated account on a given day.
|
|
2918
3929
|
*
|
|
3930
|
+
* @remarks
|
|
3931
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3932
|
+
*
|
|
2919
3933
|
* @throws {@link ListUserEarningsForDayError}
|
|
2920
3934
|
*
|
|
2921
3935
|
* @example
|
|
@@ -2954,6 +3968,9 @@ declare const FetchTotalEarningsForUserForDayError: {
|
|
|
2954
3968
|
/**
|
|
2955
3969
|
* Fetches total earnings for the authenticated account on a given day.
|
|
2956
3970
|
*
|
|
3971
|
+
* @remarks
|
|
3972
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3973
|
+
*
|
|
2957
3974
|
* @throws {@link FetchTotalEarningsForUserForDayError}
|
|
2958
3975
|
*
|
|
2959
3976
|
* @example
|
|
@@ -2965,7 +3982,7 @@ declare const FetchTotalEarningsForUserForDayError: {
|
|
|
2965
3982
|
*/
|
|
2966
3983
|
declare function fetchTotalEarningsForUserForDay(client: BaseSecureClient, request: FetchTotalEarningsForUserForDayRequest): Promise<TotalUserEarning[]>;
|
|
2967
3984
|
declare const ListUserEarningsAndMarketsConfigRequestSchema: z.ZodObject<{
|
|
2968
|
-
cursor: z.ZodOptional<z.
|
|
3985
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
2969
3986
|
date: z.ZodString;
|
|
2970
3987
|
noCompetition: z.ZodOptional<z.ZodBoolean>;
|
|
2971
3988
|
orderBy: z.ZodOptional<z.ZodString>;
|
|
@@ -2980,6 +3997,9 @@ declare const ListUserEarningsAndMarketsConfigError: {
|
|
|
2980
3997
|
/**
|
|
2981
3998
|
* Lists market reward configuration and earnings for the authenticated account on a given day.
|
|
2982
3999
|
*
|
|
4000
|
+
* @remarks
|
|
4001
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4002
|
+
*
|
|
2983
4003
|
* @throws {@link ListUserEarningsAndMarketsConfigError}
|
|
2984
4004
|
*
|
|
2985
4005
|
* @example
|
|
@@ -3017,6 +4037,9 @@ declare const FetchRewardPercentagesError: {
|
|
|
3017
4037
|
/**
|
|
3018
4038
|
* Fetches reward percentages for the authenticated account.
|
|
3019
4039
|
*
|
|
4040
|
+
* @remarks
|
|
4041
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4042
|
+
*
|
|
3020
4043
|
* @throws {@link FetchRewardPercentagesError}
|
|
3021
4044
|
*
|
|
3022
4045
|
* @example
|
|
@@ -3027,7 +4050,7 @@ declare const FetchRewardPercentagesError: {
|
|
|
3027
4050
|
declare function fetchRewardPercentages(client: BaseSecureClient): Promise<RewardsPercentages>;
|
|
3028
4051
|
|
|
3029
4052
|
declare const ListTradesRequestSchema: z.ZodObject<{
|
|
3030
|
-
cursor: z.ZodOptional<z.
|
|
4053
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3031
4054
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
3032
4055
|
takerOnly: z.ZodOptional<z.ZodBoolean>;
|
|
3033
4056
|
filterType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -3044,7 +4067,7 @@ declare const ListTradesRequestSchema: z.ZodObject<{
|
|
|
3044
4067
|
}>>;
|
|
3045
4068
|
}, z.core.$strip>;
|
|
3046
4069
|
declare const ListActivityRequestSchema: z.ZodObject<{
|
|
3047
|
-
cursor: z.ZodOptional<z.
|
|
4070
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3048
4071
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
3049
4072
|
user: z.ZodString;
|
|
3050
4073
|
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -3075,6 +4098,9 @@ declare const ListTradesError: {
|
|
|
3075
4098
|
/**
|
|
3076
4099
|
* Lists trades for a wallet, market, or event.
|
|
3077
4100
|
*
|
|
4101
|
+
* @remarks
|
|
4102
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4103
|
+
*
|
|
3078
4104
|
* @throws {@link ListTradesError}
|
|
3079
4105
|
* Thrown on failure.
|
|
3080
4106
|
*
|
|
@@ -3115,6 +4141,9 @@ declare const ListActivityError: {
|
|
|
3115
4141
|
/**
|
|
3116
4142
|
* Lists wallet activity.
|
|
3117
4143
|
*
|
|
4144
|
+
* @remarks
|
|
4145
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4146
|
+
*
|
|
3118
4147
|
* @throws {@link ListActivityError}
|
|
3119
4148
|
* Thrown on failure.
|
|
3120
4149
|
*
|
|
@@ -3166,7 +4195,7 @@ declare const PrepareErc20ApprovalError: {
|
|
|
3166
4195
|
* Starts an ERC-20 approval workflow.
|
|
3167
4196
|
*
|
|
3168
4197
|
* @remarks
|
|
3169
|
-
* This is a low-level
|
|
4198
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3170
4199
|
*
|
|
3171
4200
|
* @example
|
|
3172
4201
|
* ```ts
|
|
@@ -3181,13 +4210,16 @@ declare const PrepareErc20ApprovalError: {
|
|
|
3181
4210
|
* Thrown on failure.
|
|
3182
4211
|
*/
|
|
3183
4212
|
declare function prepareErc20Approval(client: BaseSecureClient, request: PrepareErc20ApprovalRequest): Promise<Erc20ApprovalWorkflow>;
|
|
3184
|
-
type ApproveErc20Error =
|
|
4213
|
+
type ApproveErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
3185
4214
|
declare const ApproveErc20Error: {
|
|
3186
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
|
|
4215
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3187
4216
|
};
|
|
3188
4217
|
/**
|
|
3189
4218
|
* Approves ERC-20 token spending for the authenticated account.
|
|
3190
4219
|
*
|
|
4220
|
+
* @remarks
|
|
4221
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4222
|
+
*
|
|
3191
4223
|
* @throws {@link ApproveErc20Error}
|
|
3192
4224
|
* Thrown on failure.
|
|
3193
4225
|
*/
|
|
@@ -3209,7 +4241,7 @@ declare const PrepareErc1155ApprovalForAllError: {
|
|
|
3209
4241
|
* Starts an ERC-1155 approval-for-all workflow.
|
|
3210
4242
|
*
|
|
3211
4243
|
* @remarks
|
|
3212
|
-
* This is a low-level
|
|
4244
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3213
4245
|
*
|
|
3214
4246
|
* @example
|
|
3215
4247
|
* ```ts
|
|
@@ -3223,34 +4255,31 @@ declare const PrepareErc1155ApprovalForAllError: {
|
|
|
3223
4255
|
* Thrown on failure.
|
|
3224
4256
|
*/
|
|
3225
4257
|
declare function prepareErc1155ApprovalForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<Erc1155ApprovalForAllWorkflow>;
|
|
3226
|
-
type ApproveErc1155ForAllError =
|
|
4258
|
+
type ApproveErc1155ForAllError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
3227
4259
|
declare const ApproveErc1155ForAllError: {
|
|
3228
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
|
|
4260
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
3229
4261
|
};
|
|
3230
4262
|
/**
|
|
3231
4263
|
* Approves or revokes ERC-1155 operator access for the authenticated account.
|
|
3232
4264
|
*
|
|
4265
|
+
* @remarks
|
|
4266
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4267
|
+
*
|
|
3233
4268
|
* @throws {@link ApproveErc1155ForAllError}
|
|
3234
4269
|
* Thrown on failure.
|
|
3235
4270
|
*/
|
|
3236
4271
|
declare function approveErc1155ForAll(client: BaseSecureClient, request: PrepareErc1155ApprovalForAllRequest): Promise<TransactionHandle>;
|
|
3237
4272
|
type TradingApprovalsWorkflowRequest = GaslessWorkflowRequest | SendErc20ApprovalTransactionRequest | SendErc1155ApprovalForAllTransactionRequest;
|
|
3238
|
-
type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest,
|
|
3239
|
-
type PrepareTradingApprovalsError = UserInputError;
|
|
4273
|
+
type TradingApprovalsWorkflow = AsyncGenerator<TradingApprovalsWorkflowRequest, void, EvmAddress$1 | EvmSignature | TransactionHandle>;
|
|
4274
|
+
type PrepareTradingApprovalsError = RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
3240
4275
|
declare const PrepareTradingApprovalsError: {
|
|
3241
|
-
isError(error: unknown): error is UserInputError;
|
|
4276
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
3242
4277
|
};
|
|
3243
4278
|
/**
|
|
3244
4279
|
* Starts a trading-setup approval workflow.
|
|
3245
4280
|
*
|
|
3246
4281
|
* @remarks
|
|
3247
|
-
* This is a low-level
|
|
3248
|
-
*
|
|
3249
|
-
* Prepares all approvals required for trading, including collateral and
|
|
3250
|
-
* position token approvals for both standard and neg-risk market flows.
|
|
3251
|
-
* The collateral adapter approvals cover split, merge, and redemption workflows.
|
|
3252
|
-
* Auto-redeem approval is included so accounts are ready for supported position
|
|
3253
|
-
* lifecycle workflows.
|
|
4282
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3254
4283
|
*
|
|
3255
4284
|
* @example
|
|
3256
4285
|
* ```ts
|
|
@@ -3261,23 +4290,33 @@ declare const PrepareTradingApprovalsError: {
|
|
|
3261
4290
|
* Thrown on failure.
|
|
3262
4291
|
*/
|
|
3263
4292
|
declare function prepareTradingApprovals(client: BaseSecureClient): Promise<TradingApprovalsWorkflow>;
|
|
3264
|
-
type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSigningError | SigningError;
|
|
4293
|
+
type SetupTradingApprovalsError = PrepareTradingApprovalsError | CancelledSigningError | SigningError | WaitForGaslessTransactionError;
|
|
3265
4294
|
declare const SetupTradingApprovalsError: {
|
|
3266
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
|
|
4295
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
4296
|
+
};
|
|
4297
|
+
type DeprecatedTransactionHandle = Omit<TransactionHandle, 'wait'> & {
|
|
4298
|
+
/**
|
|
4299
|
+
* @deprecated `setupTradingApprovals` now waits internally. You do not need
|
|
4300
|
+
* to call this method, and it will be removed in a later version.
|
|
4301
|
+
*/
|
|
4302
|
+
wait(): Promise<void>;
|
|
3267
4303
|
};
|
|
3268
4304
|
/**
|
|
3269
4305
|
* Sets up the approvals required for trading.
|
|
3270
4306
|
*
|
|
4307
|
+
* @remarks
|
|
4308
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4309
|
+
*
|
|
3271
4310
|
* @throws {@link SetupTradingApprovalsError}
|
|
3272
4311
|
* Thrown on failure.
|
|
3273
4312
|
*/
|
|
3274
|
-
declare function setupTradingApprovals(client: BaseSecureClient): Promise<
|
|
4313
|
+
declare function setupTradingApprovals(client: BaseSecureClient): Promise<DeprecatedTransactionHandle>;
|
|
3275
4314
|
|
|
3276
4315
|
declare const ListBuilderTradesRequestSchema: z.ZodObject<{
|
|
3277
4316
|
after: z.ZodOptional<z.ZodString>;
|
|
3278
4317
|
before: z.ZodOptional<z.ZodString>;
|
|
3279
4318
|
builderCode: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.BuilderCode, string>>;
|
|
3280
|
-
cursor: z.ZodOptional<z.
|
|
4319
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3281
4320
|
id: z.ZodOptional<z.ZodString>;
|
|
3282
4321
|
market: z.ZodOptional<z.ZodString>;
|
|
3283
4322
|
tokenId: z.ZodOptional<z.ZodString>;
|
|
@@ -3290,6 +4329,9 @@ declare const ListBuilderTradesError: {
|
|
|
3290
4329
|
/**
|
|
3291
4330
|
* Lists builder-attributed trades.
|
|
3292
4331
|
*
|
|
4332
|
+
* @remarks
|
|
4333
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4334
|
+
*
|
|
3293
4335
|
* @throws {@link ListBuilderTradesError}
|
|
3294
4336
|
* Thrown on failure.
|
|
3295
4337
|
*
|
|
@@ -3329,6 +4371,9 @@ declare const FetchMidpointError: {
|
|
|
3329
4371
|
/**
|
|
3330
4372
|
* Fetches the midpoint price for a token.
|
|
3331
4373
|
*
|
|
4374
|
+
* @remarks
|
|
4375
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4376
|
+
*
|
|
3332
4377
|
* @throws {@link FetchMidpointError}
|
|
3333
4378
|
* Thrown on failure.
|
|
3334
4379
|
*
|
|
@@ -3355,6 +4400,9 @@ declare const FetchMidpointsError: {
|
|
|
3355
4400
|
/**
|
|
3356
4401
|
* Fetches midpoint prices for multiple tokens.
|
|
3357
4402
|
*
|
|
4403
|
+
* @remarks
|
|
4404
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4405
|
+
*
|
|
3358
4406
|
* @throws {@link FetchMidpointsError}
|
|
3359
4407
|
* Thrown on failure.
|
|
3360
4408
|
*
|
|
@@ -3384,7 +4432,7 @@ declare const FetchTickSizeError: {
|
|
|
3384
4432
|
* Fetches the minimum price tick size for a token's order book.
|
|
3385
4433
|
*
|
|
3386
4434
|
* @remarks
|
|
3387
|
-
* This is a low-level
|
|
4435
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3388
4436
|
*
|
|
3389
4437
|
* @throws {@link FetchTickSizeError}
|
|
3390
4438
|
* Thrown on failure.
|
|
@@ -3412,7 +4460,7 @@ declare const FetchNegRiskError: {
|
|
|
3412
4460
|
* Fetches whether a token is in a negative-risk market.
|
|
3413
4461
|
*
|
|
3414
4462
|
* @remarks
|
|
3415
|
-
* This is a low-level
|
|
4463
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3416
4464
|
*
|
|
3417
4465
|
* @throws {@link FetchNegRiskError}
|
|
3418
4466
|
* Thrown on failure.
|
|
@@ -3440,14 +4488,14 @@ declare const ResolveConditionByTokenError: {
|
|
|
3440
4488
|
* Resolves the condition ID for a token.
|
|
3441
4489
|
*
|
|
3442
4490
|
* @remarks
|
|
3443
|
-
* This is a low-level
|
|
4491
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3444
4492
|
*
|
|
3445
4493
|
* @throws {@link ResolveConditionByTokenError}
|
|
3446
4494
|
* Thrown on failure.
|
|
3447
4495
|
*/
|
|
3448
|
-
declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest): Promise<
|
|
4496
|
+
declare function resolveConditionByToken(client: BaseClient, request: ResolveConditionByTokenRequest): Promise<CtfConditionId>;
|
|
3449
4497
|
declare const FetchMarketInfoRequestSchema: z.ZodObject<{
|
|
3450
|
-
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
4498
|
+
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
|
|
3451
4499
|
}, z.core.$strip>;
|
|
3452
4500
|
type FetchMarketInfoRequest = z.input<typeof FetchMarketInfoRequestSchema>;
|
|
3453
4501
|
type FetchMarketInfoError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -3458,7 +4506,7 @@ declare const FetchMarketInfoError: {
|
|
|
3458
4506
|
* Fetches market-level metadata for a condition.
|
|
3459
4507
|
*
|
|
3460
4508
|
* @remarks
|
|
3461
|
-
* This is a low-level
|
|
4509
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3462
4510
|
*
|
|
3463
4511
|
* @throws {@link FetchMarketInfoError}
|
|
3464
4512
|
* Thrown on failure.
|
|
@@ -3476,7 +4524,7 @@ declare const FetchBuilderFeeRatesError: {
|
|
|
3476
4524
|
* Fetches builder maker and taker fee rates.
|
|
3477
4525
|
*
|
|
3478
4526
|
* @remarks
|
|
3479
|
-
* This is a low-level
|
|
4527
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
3480
4528
|
*
|
|
3481
4529
|
* @throws {@link FetchBuilderFeeRatesError}
|
|
3482
4530
|
* Thrown on failure.
|
|
@@ -3494,6 +4542,9 @@ declare const FetchPriceError: {
|
|
|
3494
4542
|
/**
|
|
3495
4543
|
* Fetches the current quoted price for a token and side.
|
|
3496
4544
|
*
|
|
4545
|
+
* @remarks
|
|
4546
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4547
|
+
*
|
|
3497
4548
|
* @throws {@link FetchPriceError}
|
|
3498
4549
|
* Thrown on failure.
|
|
3499
4550
|
*
|
|
@@ -3522,6 +4573,9 @@ declare const FetchPricesError: {
|
|
|
3522
4573
|
/**
|
|
3523
4574
|
* Fetches quoted prices for multiple tokens.
|
|
3524
4575
|
*
|
|
4576
|
+
* @remarks
|
|
4577
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4578
|
+
*
|
|
3525
4579
|
* @throws {@link FetchPricesError}
|
|
3526
4580
|
* Thrown on failure.
|
|
3527
4581
|
*
|
|
@@ -3551,6 +4605,9 @@ declare const FetchOrderBookError: {
|
|
|
3551
4605
|
/**
|
|
3552
4606
|
* Fetches the current order book for a token.
|
|
3553
4607
|
*
|
|
4608
|
+
* @remarks
|
|
4609
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4610
|
+
*
|
|
3554
4611
|
* @throws {@link FetchOrderBookError}
|
|
3555
4612
|
* Thrown on failure.
|
|
3556
4613
|
*
|
|
@@ -3576,6 +4633,9 @@ declare const FetchOrderBooksError: {
|
|
|
3576
4633
|
/**
|
|
3577
4634
|
* Fetches order books for multiple tokens.
|
|
3578
4635
|
*
|
|
4636
|
+
* @remarks
|
|
4637
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4638
|
+
*
|
|
3579
4639
|
* @throws {@link FetchOrderBooksError}
|
|
3580
4640
|
* Thrown on failure.
|
|
3581
4641
|
*
|
|
@@ -3603,6 +4663,9 @@ declare const FetchSpreadError: {
|
|
|
3603
4663
|
/**
|
|
3604
4664
|
* Fetches the spread for a token.
|
|
3605
4665
|
*
|
|
4666
|
+
* @remarks
|
|
4667
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4668
|
+
*
|
|
3606
4669
|
* @throws {@link FetchSpreadError}
|
|
3607
4670
|
* Thrown on failure.
|
|
3608
4671
|
*
|
|
@@ -3629,6 +4692,9 @@ declare const FetchSpreadsError: {
|
|
|
3629
4692
|
/**
|
|
3630
4693
|
* Fetches spreads for multiple tokens.
|
|
3631
4694
|
*
|
|
4695
|
+
* @remarks
|
|
4696
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4697
|
+
*
|
|
3632
4698
|
* @throws {@link FetchSpreadsError}
|
|
3633
4699
|
* Thrown on failure.
|
|
3634
4700
|
*
|
|
@@ -3657,6 +4723,9 @@ declare const FetchLastTradePriceError: {
|
|
|
3657
4723
|
/**
|
|
3658
4724
|
* Fetches the last traded price for a token.
|
|
3659
4725
|
*
|
|
4726
|
+
* @remarks
|
|
4727
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4728
|
+
*
|
|
3660
4729
|
* @throws {@link FetchLastTradePriceError}
|
|
3661
4730
|
* Thrown on failure.
|
|
3662
4731
|
*
|
|
@@ -3683,6 +4752,9 @@ declare const FetchLastTradePricesError: {
|
|
|
3683
4752
|
/**
|
|
3684
4753
|
* Fetches last traded prices for multiple tokens.
|
|
3685
4754
|
*
|
|
4755
|
+
* @remarks
|
|
4756
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4757
|
+
*
|
|
3686
4758
|
* @throws {@link FetchLastTradePricesError}
|
|
3687
4759
|
* Thrown on failure.
|
|
3688
4760
|
*
|
|
@@ -3715,6 +4787,9 @@ declare const FetchPriceHistoryError: {
|
|
|
3715
4787
|
/**
|
|
3716
4788
|
* Fetches historical price points for a token.
|
|
3717
4789
|
*
|
|
4790
|
+
* @remarks
|
|
4791
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4792
|
+
*
|
|
3718
4793
|
* @throws {@link FetchPriceHistoryError}
|
|
3719
4794
|
* Thrown on failure.
|
|
3720
4795
|
*
|
|
@@ -3733,7 +4808,7 @@ declare const FetchPriceHistoryError: {
|
|
|
3733
4808
|
*/
|
|
3734
4809
|
declare function fetchPriceHistory(client: BaseClient, request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
|
|
3735
4810
|
declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
3736
|
-
cursor: z.ZodOptional<z.
|
|
4811
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3737
4812
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
3738
4813
|
}, z.core.$strip>>;
|
|
3739
4814
|
type ListCurrentRewardsRequest = z.input<typeof ListCurrentRewardsRequestSchema>;
|
|
@@ -3744,6 +4819,9 @@ declare const ListCurrentRewardsError: {
|
|
|
3744
4819
|
/**
|
|
3745
4820
|
* Lists current active market rewards.
|
|
3746
4821
|
*
|
|
4822
|
+
* @remarks
|
|
4823
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4824
|
+
*
|
|
3747
4825
|
* @throws {@link ListCurrentRewardsError}
|
|
3748
4826
|
* Thrown on failure.
|
|
3749
4827
|
*
|
|
@@ -3772,8 +4850,8 @@ declare const ListCurrentRewardsError: {
|
|
|
3772
4850
|
*/
|
|
3773
4851
|
declare function listCurrentRewards(client: BaseClient, request?: ListCurrentRewardsRequest): Paginated<CurrentReward[]>;
|
|
3774
4852
|
declare const ListMarketRewardsRequestSchema: z.ZodObject<{
|
|
3775
|
-
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
3776
|
-
cursor: z.ZodOptional<z.
|
|
4853
|
+
conditionId: z.ZodPipe<z.ZodString, z.ZodTransform<CtfConditionId, string>>;
|
|
4854
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3777
4855
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
3778
4856
|
}, z.core.$strip>;
|
|
3779
4857
|
type ListMarketRewardsRequest = z.input<typeof ListMarketRewardsRequestSchema>;
|
|
@@ -3784,6 +4862,9 @@ declare const ListMarketRewardsError: {
|
|
|
3784
4862
|
/**
|
|
3785
4863
|
* Lists reward configurations for a market.
|
|
3786
4864
|
*
|
|
4865
|
+
* @remarks
|
|
4866
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4867
|
+
*
|
|
3787
4868
|
* @throws {@link ListMarketRewardsError}
|
|
3788
4869
|
* Thrown on failure.
|
|
3789
4870
|
*
|
|
@@ -3820,7 +4901,7 @@ declare function listMarketRewards(client: BaseClient, request: ListMarketReward
|
|
|
3820
4901
|
|
|
3821
4902
|
declare const ListCommentsRequestSchema: z.ZodObject<{
|
|
3822
4903
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
3823
|
-
cursor: z.ZodOptional<z.
|
|
4904
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3824
4905
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
3825
4906
|
getPositions: z.ZodOptional<z.ZodBoolean>;
|
|
3826
4907
|
holdersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3835,7 +4916,7 @@ declare const FetchCommentsByIdRequestSchema: z.ZodObject<{
|
|
|
3835
4916
|
declare const ListCommentsByUserAddressRequestSchema: z.ZodObject<{
|
|
3836
4917
|
address: z.ZodString;
|
|
3837
4918
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
3838
|
-
cursor: z.ZodOptional<z.
|
|
4919
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3839
4920
|
order: z.ZodOptional<z.ZodString>;
|
|
3840
4921
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
3841
4922
|
}, z.core.$strip>;
|
|
@@ -3849,6 +4930,9 @@ declare const ListCommentsError: {
|
|
|
3849
4930
|
/**
|
|
3850
4931
|
* Lists comments for an event or series.
|
|
3851
4932
|
*
|
|
4933
|
+
* @remarks
|
|
4934
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4935
|
+
*
|
|
3852
4936
|
* @throws {@link ListCommentsError}
|
|
3853
4937
|
* Thrown on failure.
|
|
3854
4938
|
*
|
|
@@ -3891,6 +4975,9 @@ declare const FetchCommentsByIdError: {
|
|
|
3891
4975
|
/**
|
|
3892
4976
|
* Fetches a comment thread by comment id.
|
|
3893
4977
|
*
|
|
4978
|
+
* @remarks
|
|
4979
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4980
|
+
*
|
|
3894
4981
|
* @throws {@link FetchCommentsByIdError}
|
|
3895
4982
|
* Thrown on failure.
|
|
3896
4983
|
*
|
|
@@ -3912,6 +4999,9 @@ declare const ListCommentsByUserAddressError: {
|
|
|
3912
4999
|
/**
|
|
3913
5000
|
* Lists comments written by a wallet address.
|
|
3914
5001
|
*
|
|
5002
|
+
* @remarks
|
|
5003
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5004
|
+
*
|
|
3915
5005
|
* @throws {@link ListCommentsByUserAddressError}
|
|
3916
5006
|
* Thrown on failure.
|
|
3917
5007
|
*
|
|
@@ -3950,8 +5040,8 @@ declare function listCommentsByUserAddress(client: BaseClient, request: ListComm
|
|
|
3950
5040
|
|
|
3951
5041
|
declare const ListEventsRequestSchema: z.ZodObject<{
|
|
3952
5042
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
3953
|
-
closed: z.
|
|
3954
|
-
cursor: z.ZodOptional<z.
|
|
5043
|
+
closed: z.ZodDefault<z.ZodBoolean>;
|
|
5044
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
3955
5045
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
3956
5046
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
3957
5047
|
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>>]>>;
|
|
@@ -4033,6 +5123,11 @@ declare const ListEventsError: {
|
|
|
4033
5123
|
/**
|
|
4034
5124
|
* Lists events.
|
|
4035
5125
|
*
|
|
5126
|
+
* Defaults to open events. Pass `closed: true` to list settled events.
|
|
5127
|
+
*
|
|
5128
|
+
* @remarks
|
|
5129
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5130
|
+
*
|
|
4036
5131
|
* @throws {@link ListEventsError}
|
|
4037
5132
|
* Thrown on failure.
|
|
4038
5133
|
*
|
|
@@ -4073,6 +5168,9 @@ declare const FetchEventError: {
|
|
|
4073
5168
|
/**
|
|
4074
5169
|
* Fetches an event.
|
|
4075
5170
|
*
|
|
5171
|
+
* @remarks
|
|
5172
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5173
|
+
*
|
|
4076
5174
|
* @throws {@link FetchEventError}
|
|
4077
5175
|
* Thrown on failure.
|
|
4078
5176
|
*
|
|
@@ -4101,6 +5199,9 @@ declare const FetchEventTagsError: {
|
|
|
4101
5199
|
/**
|
|
4102
5200
|
* Fetches an event's tags.
|
|
4103
5201
|
*
|
|
5202
|
+
* @remarks
|
|
5203
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5204
|
+
*
|
|
4104
5205
|
* @throws {@link FetchEventTagsError}
|
|
4105
5206
|
* Thrown on failure.
|
|
4106
5207
|
*
|
|
@@ -4121,6 +5222,9 @@ declare const FetchEventLiveVolumeError: {
|
|
|
4121
5222
|
/**
|
|
4122
5223
|
* Fetches live volume for an event.
|
|
4123
5224
|
*
|
|
5225
|
+
* @remarks
|
|
5226
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5227
|
+
*
|
|
4124
5228
|
* @throws {@link FetchEventLiveVolumeError}
|
|
4125
5229
|
* Thrown on failure.
|
|
4126
5230
|
*
|
|
@@ -4136,7 +5240,7 @@ declare const FetchEventLiveVolumeError: {
|
|
|
4136
5240
|
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume[]>;
|
|
4137
5241
|
|
|
4138
5242
|
declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
4139
|
-
cursor: z.ZodOptional<z.
|
|
5243
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4140
5244
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4141
5245
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
4142
5246
|
DAY: "DAY";
|
|
@@ -4166,7 +5270,7 @@ declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
|
4166
5270
|
TECH: "TECH";
|
|
4167
5271
|
FINANCE: "FINANCE";
|
|
4168
5272
|
}>>;
|
|
4169
|
-
cursor: z.ZodOptional<z.
|
|
5273
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4170
5274
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4171
5275
|
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
4172
5276
|
DAY: "DAY";
|
|
@@ -4191,6 +5295,9 @@ declare const ListBuilderLeaderboardError: {
|
|
|
4191
5295
|
/**
|
|
4192
5296
|
* Lists builder leaderboard rankings.
|
|
4193
5297
|
*
|
|
5298
|
+
* @remarks
|
|
5299
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5300
|
+
*
|
|
4194
5301
|
* @throws {@link ListBuilderLeaderboardError}
|
|
4195
5302
|
* Thrown on failure.
|
|
4196
5303
|
*
|
|
@@ -4231,6 +5338,9 @@ declare const ListBuilderVolumeError: {
|
|
|
4231
5338
|
/**
|
|
4232
5339
|
* Lists daily builder volume entries.
|
|
4233
5340
|
*
|
|
5341
|
+
* @remarks
|
|
5342
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5343
|
+
*
|
|
4234
5344
|
* @throws {@link ListBuilderVolumeError}
|
|
4235
5345
|
* Thrown on failure.
|
|
4236
5346
|
*
|
|
@@ -4251,6 +5361,9 @@ declare const ListTraderLeaderboardError: {
|
|
|
4251
5361
|
/**
|
|
4252
5362
|
* Lists trader leaderboard rankings.
|
|
4253
5363
|
*
|
|
5364
|
+
* @remarks
|
|
5365
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5366
|
+
*
|
|
4254
5367
|
* @throws {@link ListTraderLeaderboardError}
|
|
4255
5368
|
* Thrown on failure.
|
|
4256
5369
|
*
|
|
@@ -4291,9 +5404,9 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
4291
5404
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
4292
5405
|
closed: z.ZodOptional<z.ZodBoolean>;
|
|
4293
5406
|
clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4294
|
-
cursor: z.ZodOptional<z.
|
|
5407
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4295
5408
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
4296
|
-
conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.
|
|
5409
|
+
conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
|
|
4297
5410
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
4298
5411
|
decimalized: z.ZodOptional<z.ZodBoolean>;
|
|
4299
5412
|
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>>]>>;
|
|
@@ -4306,6 +5419,7 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
4306
5419
|
locale: z.ZodOptional<z.ZodString>;
|
|
4307
5420
|
marketMakerAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4308
5421
|
order: z.ZodOptional<z.ZodString>;
|
|
5422
|
+
positionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>>;
|
|
4309
5423
|
questionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4310
5424
|
relatedTags: z.ZodOptional<z.ZodBoolean>;
|
|
4311
5425
|
rfqEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4351,7 +5465,7 @@ declare const ListOpenInterestRequestSchema: z.ZodObject<{
|
|
|
4351
5465
|
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4352
5466
|
}, z.core.$strip>;
|
|
4353
5467
|
declare const ListMarketPositionsRequestSchema: z.ZodObject<{
|
|
4354
|
-
cursor: z.ZodOptional<z.
|
|
5468
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4355
5469
|
market: z.ZodString;
|
|
4356
5470
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
4357
5471
|
user: z.ZodOptional<z.ZodString>;
|
|
@@ -4381,6 +5495,12 @@ declare const ListMarketsError: {
|
|
|
4381
5495
|
/**
|
|
4382
5496
|
* Lists markets.
|
|
4383
5497
|
*
|
|
5498
|
+
* @remarks
|
|
5499
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5500
|
+
*
|
|
5501
|
+
* Legacy multi-outcome markets cannot be represented by the binary
|
|
5502
|
+
* {@link Market} model and are omitted from results.
|
|
5503
|
+
*
|
|
4384
5504
|
* @throws {@link ListMarketsError}
|
|
4385
5505
|
* Thrown on failure.
|
|
4386
5506
|
*
|
|
@@ -4414,6 +5534,50 @@ declare const ListMarketsError: {
|
|
|
4414
5534
|
* ```
|
|
4415
5535
|
*/
|
|
4416
5536
|
declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market[]>;
|
|
5537
|
+
declare const ListComboMarketsRequestSchema: z.ZodObject<{
|
|
5538
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5539
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
5540
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.CtfConditionId, string>>>>;
|
|
5541
|
+
}, z.core.$strip>;
|
|
5542
|
+
type ListComboMarketsRequest = z.input<typeof ListComboMarketsRequestSchema>;
|
|
5543
|
+
type ListComboMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5544
|
+
declare const ListComboMarketsError: {
|
|
5545
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5546
|
+
};
|
|
5547
|
+
/**
|
|
5548
|
+
* Lists markets available for Combos.
|
|
5549
|
+
*
|
|
5550
|
+
* @remarks
|
|
5551
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5552
|
+
*
|
|
5553
|
+
* @throws {@link ListComboMarketsError}
|
|
5554
|
+
* Thrown on failure.
|
|
5555
|
+
*
|
|
5556
|
+
* @example
|
|
5557
|
+
* Fetch the first page of results:
|
|
5558
|
+
* ```ts
|
|
5559
|
+
* const result = listComboMarkets(client, {
|
|
5560
|
+
* pageSize: 10,
|
|
5561
|
+
* });
|
|
5562
|
+
*
|
|
5563
|
+
* const firstPage = await result.firstPage();
|
|
5564
|
+
*
|
|
5565
|
+
* // Optionally, fetch additional pages:
|
|
5566
|
+
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
5567
|
+
* // page.items: ComboMarket[]
|
|
5568
|
+
* }
|
|
5569
|
+
* ```
|
|
5570
|
+
*
|
|
5571
|
+
* @example
|
|
5572
|
+
* Omit markets the caller has already displayed:
|
|
5573
|
+
* ```ts
|
|
5574
|
+
* const result = listComboMarkets(client, {
|
|
5575
|
+
* exclude: ['0x4cd77d456c83e7d8c569a8fb8f6396c3f40154f657e6d970733e2b1b6a7110ff'],
|
|
5576
|
+
* pageSize: 10,
|
|
5577
|
+
* });
|
|
5578
|
+
* ```
|
|
5579
|
+
*/
|
|
5580
|
+
declare function listComboMarkets(client: BaseClient, request?: ListComboMarketsRequest): Paginated<ComboMarket[]>;
|
|
4417
5581
|
type FetchMarketError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4418
5582
|
declare const FetchMarketError: {
|
|
4419
5583
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -4421,6 +5585,13 @@ declare const FetchMarketError: {
|
|
|
4421
5585
|
/**
|
|
4422
5586
|
* Fetches a market.
|
|
4423
5587
|
*
|
|
5588
|
+
* @remarks
|
|
5589
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5590
|
+
*
|
|
5591
|
+
* Legacy multi-outcome markets cannot be represented by the binary
|
|
5592
|
+
* {@link Market} model, so fetching one fails with an
|
|
5593
|
+
* {@link UnexpectedResponseError}.
|
|
5594
|
+
*
|
|
4424
5595
|
* @throws {@link FetchMarketError}
|
|
4425
5596
|
* Thrown on failure.
|
|
4426
5597
|
*
|
|
@@ -4435,7 +5606,7 @@ declare const FetchMarketError: {
|
|
|
4435
5606
|
* });
|
|
4436
5607
|
*
|
|
4437
5608
|
* const marketByUrl = await fetchMarket(client, {
|
|
4438
|
-
* url: 'https://polymarket.com/
|
|
5609
|
+
* url: 'https://polymarket.com/event/some-market-slug',
|
|
4439
5610
|
* });
|
|
4440
5611
|
*
|
|
4441
5612
|
* // market === Market
|
|
@@ -4449,6 +5620,9 @@ declare const FetchMarketTagsError: {
|
|
|
4449
5620
|
/**
|
|
4450
5621
|
* Fetches a market's tags.
|
|
4451
5622
|
*
|
|
5623
|
+
* @remarks
|
|
5624
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5625
|
+
*
|
|
4452
5626
|
* @throws {@link FetchMarketTagsError}
|
|
4453
5627
|
* Thrown on failure.
|
|
4454
5628
|
*
|
|
@@ -4469,6 +5643,9 @@ declare const ListMarketHoldersError: {
|
|
|
4469
5643
|
/**
|
|
4470
5644
|
* Lists the top holders for one or more markets.
|
|
4471
5645
|
*
|
|
5646
|
+
* @remarks
|
|
5647
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5648
|
+
*
|
|
4472
5649
|
* @throws {@link ListMarketHoldersError}
|
|
4473
5650
|
* Thrown on failure.
|
|
4474
5651
|
*
|
|
@@ -4490,6 +5667,9 @@ declare const ListOpenInterestError: {
|
|
|
4490
5667
|
/**
|
|
4491
5668
|
* Lists open interest for one or more markets.
|
|
4492
5669
|
*
|
|
5670
|
+
* @remarks
|
|
5671
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5672
|
+
*
|
|
4493
5673
|
* @throws {@link ListOpenInterestError}
|
|
4494
5674
|
* Thrown on failure.
|
|
4495
5675
|
*
|
|
@@ -4510,6 +5690,9 @@ declare const ListMarketPositionsError: {
|
|
|
4510
5690
|
/**
|
|
4511
5691
|
* Lists positions for a market.
|
|
4512
5692
|
*
|
|
5693
|
+
* @remarks
|
|
5694
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5695
|
+
*
|
|
4513
5696
|
* @throws {@link ListMarketPositionsError}
|
|
4514
5697
|
* Thrown on failure.
|
|
4515
5698
|
*
|
|
@@ -4544,316 +5727,986 @@ declare const ListMarketPositionsError: {
|
|
|
4544
5727
|
*/
|
|
4545
5728
|
declare function listMarketPositions(client: BaseClient, request: ListMarketPositionsRequest): Paginated<MetaMarketPosition[]>;
|
|
4546
5729
|
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
}, z.core.$strip
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
5730
|
+
type PerpsHistoryParams = {
|
|
5731
|
+
startTimestamp: number;
|
|
5732
|
+
endTimestamp: number;
|
|
5733
|
+
instrumentId?: PerpsInstrumentId;
|
|
5734
|
+
depositStatus?: z.output<typeof PerpsDepositStatusSchema>;
|
|
5735
|
+
withdrawalStatus?: z.output<typeof PerpsWithdrawalStatusSchema>;
|
|
5736
|
+
hash?: z.output<typeof TxHashSchema>;
|
|
5737
|
+
};
|
|
5738
|
+
type PerpsIntervalHistoryParams = PerpsHistoryParams & {
|
|
5739
|
+
interval: z.output<typeof PerpsPnlIntervalSchema>;
|
|
5740
|
+
};
|
|
5741
|
+
declare const FetchPerpsAccountConfigRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
5742
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
5743
|
+
}, z.core.$strip>>;
|
|
5744
|
+
type FetchPerpsAccountConfigRequest = z.input<typeof FetchPerpsAccountConfigRequestSchema>;
|
|
5745
|
+
declare const FetchPerpsOpenOrdersRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
5746
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
5747
|
+
}, z.core.$strip>>;
|
|
5748
|
+
type FetchPerpsOpenOrdersRequest = z.input<typeof FetchPerpsOpenOrdersRequestSchema>;
|
|
5749
|
+
declare const FetchPerpsOrdersRequestSchema: z.ZodPipe<z.ZodDefault<z.ZodObject<{
|
|
5750
|
+
orderId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>>;
|
|
5751
|
+
clientOrderId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>>;
|
|
5752
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
5753
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
5754
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5755
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
5756
|
+
endTimestamp: number | undefined;
|
|
5757
|
+
startTimestamp: number | undefined;
|
|
5758
|
+
orderId?: _polymarket_bindings_perps.PerpsOrderId | undefined;
|
|
5759
|
+
clientOrderId?: _polymarket_bindings_perps.PerpsClientOrderId | undefined;
|
|
5760
|
+
instrumentId?: PerpsInstrumentId | undefined;
|
|
5761
|
+
}, {
|
|
5762
|
+
orderId?: _polymarket_bindings_perps.PerpsOrderId | undefined;
|
|
5763
|
+
clientOrderId?: _polymarket_bindings_perps.PerpsClientOrderId | undefined;
|
|
5764
|
+
instrumentId?: PerpsInstrumentId | undefined;
|
|
5765
|
+
start?: number | undefined;
|
|
5766
|
+
end?: number | undefined;
|
|
5767
|
+
}>>;
|
|
5768
|
+
type FetchPerpsOrdersRequest = z.input<typeof FetchPerpsOrdersRequestSchema>;
|
|
5769
|
+
declare const ListPerpsFillsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5770
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
5771
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5772
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5773
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5774
|
+
cursor: PaginationCursor | undefined;
|
|
5775
|
+
params: Omit<Record<string, unknown>, "start" | "end"> & PerpsHistoryParams;
|
|
5776
|
+
}, {
|
|
5777
|
+
start?: number | undefined;
|
|
5778
|
+
end?: number | undefined;
|
|
5779
|
+
cursor?: PaginationCursor | undefined;
|
|
5780
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5781
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5782
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5783
|
+
cursor: PaginationCursor;
|
|
5784
|
+
params: undefined;
|
|
5785
|
+
}, {
|
|
5786
|
+
cursor: PaginationCursor;
|
|
5787
|
+
}>>]>;
|
|
5788
|
+
type ListPerpsFillsRequest = z.input<typeof ListPerpsFillsRequestSchema>;
|
|
5789
|
+
declare const ListPerpsFundingPaymentsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5790
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
5791
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5792
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5793
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
5794
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5795
|
+
cursor: PaginationCursor | undefined;
|
|
5796
|
+
params: Omit<{
|
|
5797
|
+
start?: number | undefined;
|
|
5798
|
+
end?: number | undefined;
|
|
5799
|
+
instrumentId?: PerpsInstrumentId | undefined;
|
|
5800
|
+
}, "start" | "end"> & PerpsHistoryParams;
|
|
5801
|
+
}, {
|
|
5802
|
+
start?: number | undefined;
|
|
5803
|
+
end?: number | undefined;
|
|
5804
|
+
cursor?: PaginationCursor | undefined;
|
|
5805
|
+
instrumentId?: PerpsInstrumentId | undefined;
|
|
5806
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5807
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5808
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5809
|
+
cursor: PaginationCursor;
|
|
5810
|
+
params: undefined;
|
|
5811
|
+
}, {
|
|
5812
|
+
cursor: PaginationCursor;
|
|
5813
|
+
}>>]>;
|
|
5814
|
+
type ListPerpsFundingPaymentsRequest = z.input<typeof ListPerpsFundingPaymentsRequestSchema>;
|
|
5815
|
+
declare const ListPerpsDepositsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5816
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
5817
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5818
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5819
|
+
depositStatus: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsDepositStatus>>;
|
|
5820
|
+
hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>;
|
|
5821
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5822
|
+
cursor: PaginationCursor | undefined;
|
|
5823
|
+
params: Omit<{
|
|
5824
|
+
start?: number | undefined;
|
|
5825
|
+
end?: number | undefined;
|
|
5826
|
+
depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
|
|
5827
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
5828
|
+
}, "start" | "end"> & PerpsHistoryParams;
|
|
5829
|
+
}, {
|
|
5830
|
+
start?: number | undefined;
|
|
5831
|
+
end?: number | undefined;
|
|
5832
|
+
cursor?: PaginationCursor | undefined;
|
|
5833
|
+
depositStatus?: _polymarket_bindings_perps.PerpsDepositStatus | undefined;
|
|
5834
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
5835
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5836
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5837
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5838
|
+
cursor: PaginationCursor;
|
|
5839
|
+
params: undefined;
|
|
5840
|
+
}, {
|
|
5841
|
+
cursor: PaginationCursor;
|
|
5842
|
+
}>>]>;
|
|
5843
|
+
type ListPerpsDepositsRequest = z.input<typeof ListPerpsDepositsRequestSchema>;
|
|
5844
|
+
declare const ListPerpsWithdrawalsRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5845
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
5846
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5847
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5848
|
+
withdrawalStatus: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsWithdrawalStatus>>;
|
|
5849
|
+
hash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>;
|
|
5850
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5851
|
+
cursor: PaginationCursor | undefined;
|
|
5852
|
+
params: Omit<{
|
|
5853
|
+
start?: number | undefined;
|
|
5854
|
+
end?: number | undefined;
|
|
5855
|
+
withdrawalStatus?: _polymarket_bindings_perps.PerpsWithdrawalStatus | undefined;
|
|
5856
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
5857
|
+
}, "start" | "end"> & PerpsHistoryParams;
|
|
5858
|
+
}, {
|
|
5859
|
+
start?: number | undefined;
|
|
5860
|
+
end?: number | undefined;
|
|
5861
|
+
cursor?: PaginationCursor | undefined;
|
|
5862
|
+
withdrawalStatus?: _polymarket_bindings_perps.PerpsWithdrawalStatus | undefined;
|
|
5863
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
5864
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5865
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5866
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5867
|
+
cursor: PaginationCursor;
|
|
5868
|
+
params: undefined;
|
|
5869
|
+
}, {
|
|
5870
|
+
cursor: PaginationCursor;
|
|
5871
|
+
}>>]>;
|
|
5872
|
+
type ListPerpsWithdrawalsRequest = z.input<typeof ListPerpsWithdrawalsRequestSchema>;
|
|
5873
|
+
declare const ListPerpsEquityHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5874
|
+
interval: z.ZodEnum<typeof _polymarket_bindings_perps.PerpsPnlInterval>;
|
|
5875
|
+
start: z.ZodNumber;
|
|
5876
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5877
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5878
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5879
|
+
cursor: PaginationCursor | undefined;
|
|
5880
|
+
params: PerpsIntervalHistoryParams;
|
|
5881
|
+
}, {
|
|
5882
|
+
interval: _polymarket_bindings_perps.PerpsPnlInterval;
|
|
5883
|
+
start: number;
|
|
5884
|
+
end?: number | undefined;
|
|
5885
|
+
cursor?: PaginationCursor | undefined;
|
|
5886
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5887
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5888
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5889
|
+
cursor: PaginationCursor;
|
|
5890
|
+
params: undefined;
|
|
5891
|
+
}, {
|
|
5892
|
+
cursor: PaginationCursor;
|
|
5893
|
+
}>>]>;
|
|
5894
|
+
type ListPerpsEquityHistoryRequest = z.input<typeof ListPerpsEquityHistoryRequestSchema>;
|
|
5895
|
+
declare const ListPerpsPnlHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
5896
|
+
interval: z.ZodEnum<typeof _polymarket_bindings_perps.PerpsPnlInterval>;
|
|
5897
|
+
start: z.ZodNumber;
|
|
5898
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
5899
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
5900
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5901
|
+
cursor: PaginationCursor | undefined;
|
|
5902
|
+
params: PerpsIntervalHistoryParams;
|
|
5903
|
+
}, {
|
|
5904
|
+
interval: _polymarket_bindings_perps.PerpsPnlInterval;
|
|
5905
|
+
start: number;
|
|
5906
|
+
end?: number | undefined;
|
|
5907
|
+
cursor?: PaginationCursor | undefined;
|
|
5908
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
5909
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
5910
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5911
|
+
cursor: PaginationCursor;
|
|
5912
|
+
params: undefined;
|
|
5913
|
+
}, {
|
|
5914
|
+
cursor: PaginationCursor;
|
|
5915
|
+
}>>]>;
|
|
5916
|
+
type ListPerpsPnlHistoryRequest = z.input<typeof ListPerpsPnlHistoryRequestSchema>;
|
|
5917
|
+
|
|
5918
|
+
/**
|
|
5919
|
+
* Good-til-cancelled Perps order.
|
|
5920
|
+
*/
|
|
5921
|
+
type PerpsPlaceGtcOrderRequest = {
|
|
5922
|
+
/** Perps instrument identifier to trade. */
|
|
5923
|
+
instrumentId: number;
|
|
5924
|
+
/** Trade direction. */
|
|
5925
|
+
side: OrderSide;
|
|
5926
|
+
/** Limit price. */
|
|
5927
|
+
price: PerpsDecimalInput;
|
|
5928
|
+
/** Order quantity. */
|
|
5929
|
+
quantity: PerpsDecimalInput;
|
|
5930
|
+
/** Good-til-cancelled execution. */
|
|
5931
|
+
timeInForce: PerpsTimeInForce.GTC;
|
|
5932
|
+
/** Whether the order must rest instead of taking liquidity. */
|
|
5933
|
+
postOnly?: boolean;
|
|
5934
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
5935
|
+
clientOrderId?: string;
|
|
5936
|
+
};
|
|
5937
|
+
/**
|
|
5938
|
+
* Immediate-or-cancel Perps order.
|
|
5939
|
+
*/
|
|
5940
|
+
type PerpsPlaceIocOrderRequest = {
|
|
5941
|
+
/** Perps instrument identifier to trade. */
|
|
5942
|
+
instrumentId: number;
|
|
5943
|
+
/** Trade direction. */
|
|
5944
|
+
side: OrderSide;
|
|
5945
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
5946
|
+
price?: PerpsDecimalInput;
|
|
5947
|
+
/** Order quantity. */
|
|
5948
|
+
quantity: PerpsDecimalInput;
|
|
5949
|
+
/** Immediate-or-cancel execution. */
|
|
5950
|
+
timeInForce: PerpsTimeInForce.IOC;
|
|
5951
|
+
postOnly?: undefined;
|
|
5952
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
5953
|
+
clientOrderId?: string;
|
|
5954
|
+
};
|
|
5955
|
+
/**
|
|
5956
|
+
* Fill-or-kill Perps order.
|
|
5957
|
+
*/
|
|
5958
|
+
type PerpsPlaceFokOrderRequest = {
|
|
5959
|
+
/** Perps instrument identifier to trade. */
|
|
5960
|
+
instrumentId: number;
|
|
5961
|
+
/** Trade direction. */
|
|
5962
|
+
side: OrderSide;
|
|
5963
|
+
/** Optional limit price. Omit for market-style execution. */
|
|
5964
|
+
price?: PerpsDecimalInput;
|
|
5965
|
+
/** Order quantity. */
|
|
5966
|
+
quantity: PerpsDecimalInput;
|
|
5967
|
+
/** Fill-or-kill execution. */
|
|
5968
|
+
timeInForce: PerpsTimeInForce.FOK;
|
|
5969
|
+
postOnly?: undefined;
|
|
5970
|
+
/** Optional caller-supplied idempotency identifier. */
|
|
5971
|
+
clientOrderId?: string;
|
|
5972
|
+
};
|
|
5973
|
+
/**
|
|
5974
|
+
* Request parameters for placing one Perps order.
|
|
5975
|
+
*/
|
|
5976
|
+
type PlacePerpsOrderRequest = PerpsPlaceGtcOrderRequest | PerpsPlaceIocOrderRequest | PerpsPlaceFokOrderRequest;
|
|
5977
|
+
/** Request parameters for posting one or more Perps orders. */
|
|
5978
|
+
type PostPerpsOrdersRequest = {
|
|
5979
|
+
/** Orders to post as one command. */
|
|
5980
|
+
orders: PlacePerpsOrderRequest[];
|
|
5981
|
+
/** Optional command expiration timestamp in milliseconds. */
|
|
5982
|
+
expiresAt?: number;
|
|
5983
|
+
};
|
|
5984
|
+
declare const CancelPerpsOrderRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5985
|
+
orderId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>;
|
|
5986
|
+
clientOrderId: z.ZodOptional<z.ZodUndefined>;
|
|
5987
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5988
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5989
|
+
clientOrderId: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>;
|
|
5990
|
+
orderId: z.ZodOptional<z.ZodUndefined>;
|
|
5991
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5992
|
+
}, z.core.$strip>]>;
|
|
5993
|
+
type CancelPerpsOrderRequest = z.input<typeof CancelPerpsOrderRequestSchema>;
|
|
5994
|
+
declare const CancelPerpsOrdersRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5995
|
+
orderIds: z.ZodArray<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsOrderId, number>>>;
|
|
5996
|
+
clientOrderIds: z.ZodOptional<z.ZodUndefined>;
|
|
5997
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
5998
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5999
|
+
clientOrderIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings_perps.PerpsClientOrderId, string>>>;
|
|
6000
|
+
orderIds: z.ZodOptional<z.ZodUndefined>;
|
|
6001
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
6002
|
+
}, z.core.$strip>]>;
|
|
6003
|
+
type CancelPerpsOrdersRequest = z.input<typeof CancelPerpsOrdersRequestSchema>;
|
|
6004
|
+
declare const UpdatePerpsLeverageRequestSchema: z.ZodObject<{
|
|
6005
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
6006
|
+
leverage: z.ZodNumber;
|
|
6007
|
+
crossMargin: z.ZodBoolean;
|
|
4601
6008
|
}, z.core.$strip>;
|
|
4602
|
-
type
|
|
4603
|
-
type
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
6009
|
+
type UpdatePerpsLeverageRequest = z.input<typeof UpdatePerpsLeverageRequestSchema>;
|
|
6010
|
+
type UpdatePerpsLeverageError = RequestRejectedError | SigningError | TransportError | UserInputError;
|
|
6011
|
+
declare const UpdatePerpsLeverageError: {
|
|
6012
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | RequestRejectedError;
|
|
6013
|
+
};
|
|
6014
|
+
|
|
6015
|
+
type PerpsSessionOptions = {
|
|
6016
|
+
chainId: number;
|
|
6017
|
+
credentials: PerpsCredentials;
|
|
6018
|
+
headers?: Record<string, string>;
|
|
6019
|
+
onClose: (session: PerpsSession) => void;
|
|
6020
|
+
restUrl: string;
|
|
6021
|
+
wsUrl: string;
|
|
6022
|
+
};
|
|
6023
|
+
declare class PerpsSession implements AsyncIterable<PerpsSessionEvent> {
|
|
6024
|
+
#private;
|
|
6025
|
+
readonly credentials: PerpsCredentials;
|
|
6026
|
+
constructor(options: PerpsSessionOptions);
|
|
6027
|
+
get closed(): boolean;
|
|
6028
|
+
connect(): Promise<void>;
|
|
6029
|
+
close(): Promise<void>;
|
|
6030
|
+
[Symbol.asyncIterator](): AsyncIterator<PerpsSessionEvent>;
|
|
6031
|
+
fetchBalances(): Promise<PerpsBalance[]>;
|
|
6032
|
+
fetchPortfolio(): Promise<PerpsPortfolio>;
|
|
6033
|
+
fetchAccountConfig(request?: FetchPerpsAccountConfigRequest): Promise<PerpsAccountConfig[]>;
|
|
6034
|
+
fetchOpenOrders(request?: FetchPerpsOpenOrdersRequest): Promise<PerpsOrder[]>;
|
|
6035
|
+
fetchOrders(request?: FetchPerpsOrdersRequest): Promise<PerpsOrder[]>;
|
|
6036
|
+
listFills(request?: ListPerpsFillsRequest): Paginated<PerpsAccountFill[]>;
|
|
6037
|
+
listFundingPayments(request?: ListPerpsFundingPaymentsRequest): Paginated<PerpsAccountFundingPayment[]>;
|
|
6038
|
+
listDeposits(request?: ListPerpsDepositsRequest): Paginated<PerpsDeposit[]>;
|
|
6039
|
+
listWithdrawals(request?: ListPerpsWithdrawalsRequest): Paginated<PerpsWithdrawal[]>;
|
|
6040
|
+
listEquityHistory(request: ListPerpsEquityHistoryRequest): Paginated<PerpsEquityPoint[]>;
|
|
6041
|
+
listPnlHistory(request: ListPerpsPnlHistoryRequest): Paginated<PerpsPnlPoint[]>;
|
|
6042
|
+
/**
|
|
6043
|
+
* Places one Perps order and resolves with the first matching orders update.
|
|
6044
|
+
*
|
|
6045
|
+
* @throws Thrown on failure.
|
|
6046
|
+
*/
|
|
6047
|
+
placeOrder(request: PlacePerpsOrderRequest): Promise<PerpsOrder>;
|
|
6048
|
+
/**
|
|
6049
|
+
* Posts one or more Perps orders and returns queue-entry acknowledgements.
|
|
6050
|
+
*
|
|
6051
|
+
* @remarks
|
|
6052
|
+
* This is a low-level method. Most SDK consumers should prefer `placeOrder`.
|
|
6053
|
+
*/
|
|
6054
|
+
postOrders(request: PostPerpsOrdersRequest): Promise<PerpsPostOrderAck[]>;
|
|
6055
|
+
/**
|
|
6056
|
+
* Cancels one Perps order and returns the cancel result.
|
|
6057
|
+
*
|
|
6058
|
+
* @remarks
|
|
6059
|
+
* The returned status reflects whether the cancel happened.
|
|
6060
|
+
*/
|
|
6061
|
+
cancelOrder(request: CancelPerpsOrderRequest): Promise<PerpsCancelOrderResult>;
|
|
6062
|
+
/**
|
|
6063
|
+
* Cancels one or more Perps orders and returns one result per requested order.
|
|
6064
|
+
*
|
|
6065
|
+
* @remarks
|
|
6066
|
+
* Each returned status reflects whether that cancel happened.
|
|
6067
|
+
*/
|
|
6068
|
+
cancelOrders(request: CancelPerpsOrdersRequest): Promise<PerpsCancelOrderResult[]>;
|
|
6069
|
+
updateLeverage(request: UpdatePerpsLeverageRequest): Promise<PerpsUpdateLeverageResult>;
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
type PerpsPublicReadError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6073
|
+
declare const PerpsPublicReadError: {
|
|
6074
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6075
|
+
};
|
|
6076
|
+
type PerpsCandlesParams = {
|
|
6077
|
+
instrumentId: z.output<typeof PerpsInstrumentIdSchema>;
|
|
6078
|
+
interval: PerpsKlineInterval;
|
|
6079
|
+
startTimestamp: number;
|
|
6080
|
+
endTimestamp: number;
|
|
6081
|
+
};
|
|
6082
|
+
type PerpsTimeRangeParams = {
|
|
6083
|
+
instrumentId: z.output<typeof PerpsInstrumentIdSchema>;
|
|
6084
|
+
startTimestamp: number;
|
|
6085
|
+
endTimestamp: number;
|
|
6086
|
+
};
|
|
6087
|
+
declare const FetchPerpsInstrumentsRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
6088
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>>;
|
|
6089
|
+
instrumentType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentType>>;
|
|
6090
|
+
category: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_perps.PerpsInstrumentCategory>>;
|
|
6091
|
+
}, z.core.$strip>>;
|
|
6092
|
+
type FetchPerpsInstrumentsRequest = z.input<typeof FetchPerpsInstrumentsRequestSchema>;
|
|
6093
|
+
type FetchPerpsInstrumentsError = PerpsPublicReadError;
|
|
6094
|
+
declare const FetchPerpsInstrumentsError: {
|
|
4609
6095
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4610
6096
|
};
|
|
4611
6097
|
/**
|
|
4612
|
-
*
|
|
4613
|
-
*
|
|
4614
|
-
* @throws {@link ListPositionsError}
|
|
4615
|
-
* Thrown on failure.
|
|
4616
|
-
*
|
|
4617
|
-
* @example
|
|
4618
|
-
* Fetch the first page of results:
|
|
4619
|
-
* ```ts
|
|
4620
|
-
* const result = listPositions(client, {
|
|
4621
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4622
|
-
* pageSize: 10,
|
|
4623
|
-
* });
|
|
6098
|
+
* Fetches Perps instruments.
|
|
4624
6099
|
*
|
|
4625
|
-
*
|
|
6100
|
+
* @remarks
|
|
6101
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4626
6102
|
*
|
|
4627
|
-
*
|
|
4628
|
-
*
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
6103
|
+
* @throws {@link FetchPerpsInstrumentsError}
|
|
6104
|
+
* Thrown on failure.
|
|
6105
|
+
*/
|
|
6106
|
+
declare function fetchPerpsInstruments(client: BaseClient, request?: FetchPerpsInstrumentsRequest): Promise<PerpsInstrument[]>;
|
|
6107
|
+
declare const FetchPerpsTickerRequestSchema: z.ZodObject<{
|
|
6108
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
|
|
6109
|
+
}, z.core.$strip>;
|
|
6110
|
+
type FetchPerpsTickerRequest = z.input<typeof FetchPerpsTickerRequestSchema>;
|
|
6111
|
+
type FetchPerpsTickerError = PerpsPublicReadError;
|
|
6112
|
+
declare const FetchPerpsTickerError: {
|
|
6113
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6114
|
+
};
|
|
6115
|
+
/**
|
|
6116
|
+
* Fetches the current Perps ticker for an instrument.
|
|
4632
6117
|
*
|
|
4633
|
-
* @
|
|
4634
|
-
*
|
|
4635
|
-
* ```ts
|
|
4636
|
-
* const result = listPositions(client, {
|
|
4637
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4638
|
-
* pageSize: 10,
|
|
4639
|
-
* });
|
|
6118
|
+
* @remarks
|
|
6119
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4640
6120
|
*
|
|
4641
|
-
*
|
|
4642
|
-
*
|
|
4643
|
-
* }
|
|
4644
|
-
* ```
|
|
6121
|
+
* @throws {@link FetchPerpsTickerError}
|
|
6122
|
+
* Thrown on failure.
|
|
4645
6123
|
*/
|
|
4646
|
-
declare function
|
|
4647
|
-
|
|
4648
|
-
|
|
6124
|
+
declare function fetchPerpsTicker(client: BaseClient, request: FetchPerpsTickerRequest): Promise<PerpsTicker>;
|
|
6125
|
+
declare const FetchPerpsTickersRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
6126
|
+
instrumentId: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>>;
|
|
6127
|
+
}, z.core.$strip>>;
|
|
6128
|
+
type FetchPerpsTickersRequest = z.input<typeof FetchPerpsTickersRequestSchema>;
|
|
6129
|
+
type FetchPerpsTickersError = PerpsPublicReadError;
|
|
6130
|
+
declare const FetchPerpsTickersError: {
|
|
4649
6131
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4650
6132
|
};
|
|
4651
6133
|
/**
|
|
4652
|
-
*
|
|
6134
|
+
* Fetches current Perps tickers.
|
|
4653
6135
|
*
|
|
4654
|
-
* @
|
|
6136
|
+
* @remarks
|
|
6137
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6138
|
+
*
|
|
6139
|
+
* @throws {@link FetchPerpsTickersError}
|
|
4655
6140
|
* Thrown on failure.
|
|
6141
|
+
*/
|
|
6142
|
+
declare function fetchPerpsTickers(client: BaseClient, request?: FetchPerpsTickersRequest): Promise<PerpsTicker[]>;
|
|
6143
|
+
type PerpsBookDepth = 10 | 100 | 500 | 1000;
|
|
6144
|
+
declare const FetchPerpsBookRequestSchema: z.ZodObject<{
|
|
6145
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
|
|
6146
|
+
depth: z.ZodDefault<z.ZodType<PerpsBookDepth, unknown, z.core.$ZodTypeInternals<PerpsBookDepth, unknown>>>;
|
|
6147
|
+
}, z.core.$strip>;
|
|
6148
|
+
type FetchPerpsBookRequest = z.input<typeof FetchPerpsBookRequestSchema>;
|
|
6149
|
+
type FetchPerpsBookError = PerpsPublicReadError;
|
|
6150
|
+
declare const FetchPerpsBookError: {
|
|
6151
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6152
|
+
};
|
|
6153
|
+
/**
|
|
6154
|
+
* Fetches a Perps order book.
|
|
4656
6155
|
*
|
|
4657
|
-
* @
|
|
4658
|
-
*
|
|
4659
|
-
* ```ts
|
|
4660
|
-
* const result = listClosedPositions(client, {
|
|
4661
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4662
|
-
* pageSize: 10,
|
|
4663
|
-
* });
|
|
6156
|
+
* @remarks
|
|
6157
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4664
6158
|
*
|
|
4665
|
-
*
|
|
6159
|
+
* @throws {@link FetchPerpsBookError}
|
|
6160
|
+
* Thrown on failure.
|
|
6161
|
+
*/
|
|
6162
|
+
declare function fetchPerpsBook(client: BaseClient, request: FetchPerpsBookRequest): Promise<PerpsBook>;
|
|
6163
|
+
declare const ListPerpsCandlesRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
6164
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
|
|
6165
|
+
interval: z.ZodEnum<typeof PerpsKlineInterval>;
|
|
6166
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
6167
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
6168
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
6169
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6170
|
+
cursor: PaginationCursor | undefined;
|
|
6171
|
+
params: PerpsCandlesParams;
|
|
6172
|
+
}, {
|
|
6173
|
+
instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
|
|
6174
|
+
interval: PerpsKlineInterval;
|
|
6175
|
+
start?: number | undefined;
|
|
6176
|
+
end?: number | undefined;
|
|
6177
|
+
cursor?: PaginationCursor | undefined;
|
|
6178
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
6179
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
6180
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6181
|
+
cursor: PaginationCursor;
|
|
6182
|
+
params: undefined;
|
|
6183
|
+
}, {
|
|
6184
|
+
cursor: PaginationCursor;
|
|
6185
|
+
}>>]>;
|
|
6186
|
+
type ListPerpsCandlesRequest = z.input<typeof ListPerpsCandlesRequestSchema>;
|
|
6187
|
+
type ListPerpsCandlesError = PerpsPublicReadError;
|
|
6188
|
+
declare const ListPerpsCandlesError: {
|
|
6189
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6190
|
+
};
|
|
6191
|
+
/**
|
|
6192
|
+
* Lists Perps candles for an instrument with SDK-owned pagination.
|
|
4666
6193
|
*
|
|
4667
|
-
*
|
|
4668
|
-
*
|
|
4669
|
-
* // page.items: ClosedPosition[]
|
|
4670
|
-
* }
|
|
4671
|
-
* ```
|
|
6194
|
+
* @remarks
|
|
6195
|
+
* Defaults to the past 24 hours when `start` is omitted.
|
|
4672
6196
|
*
|
|
4673
|
-
* @
|
|
4674
|
-
*
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
6197
|
+
* @throws {@link ListPerpsCandlesError}
|
|
6198
|
+
* Thrown on failure.
|
|
6199
|
+
*/
|
|
6200
|
+
declare function listPerpsCandles(client: BaseClient, request: ListPerpsCandlesRequest): Paginated<PerpsCandle[]>;
|
|
6201
|
+
declare const ListPerpsFundingHistoryRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
6202
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
|
|
6203
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
6204
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
6205
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
6206
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6207
|
+
cursor: PaginationCursor | undefined;
|
|
6208
|
+
params: PerpsTimeRangeParams;
|
|
6209
|
+
}, {
|
|
6210
|
+
instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
|
|
6211
|
+
start?: number | undefined;
|
|
6212
|
+
end?: number | undefined;
|
|
6213
|
+
cursor?: PaginationCursor | undefined;
|
|
6214
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
6215
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
6216
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6217
|
+
cursor: PaginationCursor;
|
|
6218
|
+
params: undefined;
|
|
6219
|
+
}, {
|
|
6220
|
+
cursor: PaginationCursor;
|
|
6221
|
+
}>>]>;
|
|
6222
|
+
type ListPerpsFundingHistoryRequest = z.input<typeof ListPerpsFundingHistoryRequestSchema>;
|
|
6223
|
+
type ListPerpsFundingHistoryError = PerpsPublicReadError;
|
|
6224
|
+
declare const ListPerpsFundingHistoryError: {
|
|
6225
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6226
|
+
};
|
|
6227
|
+
/**
|
|
6228
|
+
* Lists Perps funding-rate history for an instrument with SDK-owned pagination.
|
|
4680
6229
|
*
|
|
4681
|
-
*
|
|
4682
|
-
*
|
|
4683
|
-
*
|
|
4684
|
-
*
|
|
6230
|
+
* @remarks
|
|
6231
|
+
* Defaults to the past 24 hours when `start` is omitted.
|
|
6232
|
+
*
|
|
6233
|
+
* @throws {@link ListPerpsFundingHistoryError}
|
|
6234
|
+
* Thrown on failure.
|
|
4685
6235
|
*/
|
|
4686
|
-
declare function
|
|
4687
|
-
|
|
4688
|
-
|
|
6236
|
+
declare function listPerpsFundingHistory(client: BaseClient, request: ListPerpsFundingHistoryRequest): Paginated<PerpsFundingRate[]>;
|
|
6237
|
+
declare const ListPerpsTradesRequestSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
6238
|
+
instrumentId: z.ZodPipe<z.ZodNumber, z.ZodTransform<_polymarket_bindings_perps.PerpsInstrumentId, number>>;
|
|
6239
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
6240
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
6241
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
6242
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6243
|
+
cursor: PaginationCursor | undefined;
|
|
6244
|
+
params: PerpsTimeRangeParams;
|
|
6245
|
+
}, {
|
|
6246
|
+
instrumentId: _polymarket_bindings_perps.PerpsInstrumentId;
|
|
6247
|
+
start?: number | undefined;
|
|
6248
|
+
end?: number | undefined;
|
|
6249
|
+
cursor?: PaginationCursor | undefined;
|
|
6250
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
6251
|
+
cursor: z.ZodCustom<PaginationCursor, PaginationCursor>;
|
|
6252
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6253
|
+
cursor: PaginationCursor;
|
|
6254
|
+
params: undefined;
|
|
6255
|
+
}, {
|
|
6256
|
+
cursor: PaginationCursor;
|
|
6257
|
+
}>>]>;
|
|
6258
|
+
type ListPerpsTradesRequest = z.input<typeof ListPerpsTradesRequestSchema>;
|
|
6259
|
+
type ListPerpsTradesError = PerpsPublicReadError;
|
|
6260
|
+
declare const ListPerpsTradesError: {
|
|
4689
6261
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4690
6262
|
};
|
|
4691
6263
|
/**
|
|
4692
|
-
*
|
|
6264
|
+
* Lists recent Perps trades for an instrument with SDK-owned pagination.
|
|
4693
6265
|
*
|
|
4694
|
-
* @
|
|
6266
|
+
* @remarks
|
|
6267
|
+
* Defaults to the past 24 hours when `start` is omitted.
|
|
6268
|
+
*
|
|
6269
|
+
* @throws {@link ListPerpsTradesError}
|
|
4695
6270
|
* Thrown on failure.
|
|
6271
|
+
*/
|
|
6272
|
+
declare function listPerpsTrades(client: BaseClient, request: ListPerpsTradesRequest): Paginated<PerpsPublicTrade[]>;
|
|
6273
|
+
type FetchPerpsFeesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError;
|
|
6274
|
+
declare const FetchPerpsFeesError: {
|
|
6275
|
+
isError(error: unknown): error is TransportError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6276
|
+
};
|
|
6277
|
+
/**
|
|
6278
|
+
* Fetches the Perps fee schedule.
|
|
4696
6279
|
*
|
|
4697
|
-
* @
|
|
4698
|
-
*
|
|
4699
|
-
* const value = await fetchPortfolioValue(client, {
|
|
4700
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4701
|
-
* });
|
|
6280
|
+
* @remarks
|
|
6281
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4702
6282
|
*
|
|
4703
|
-
*
|
|
4704
|
-
*
|
|
6283
|
+
* @throws {@link FetchPerpsFeesError}
|
|
6284
|
+
* Thrown on failure.
|
|
4705
6285
|
*/
|
|
4706
|
-
declare function
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
6286
|
+
declare function fetchPerpsFees(client: BaseClient): Promise<PerpsFeeScheduleEntry[]>;
|
|
6287
|
+
declare const CreatePerpsSessionRequestSchema: z.ZodObject<{
|
|
6288
|
+
expiresIn: z.ZodDefault<z.ZodNumber>;
|
|
6289
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6290
|
+
}, z.core.$strict>;
|
|
6291
|
+
declare const ResumePerpsSessionRequestSchema: z.ZodObject<{
|
|
6292
|
+
credentials: z.ZodObject<{
|
|
6293
|
+
proxy: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
|
|
6294
|
+
privateKey: z.ZodCustom<PrivateKey, PrivateKey>;
|
|
6295
|
+
secret: z.ZodString;
|
|
6296
|
+
expiresAt: z.ZodNumber;
|
|
6297
|
+
}, z.core.$strip>;
|
|
6298
|
+
}, z.core.$strict>;
|
|
6299
|
+
declare const RevokePerpsCredentialsRequestSchema: z.ZodObject<{
|
|
6300
|
+
proxy: z.ZodPipe<z.ZodString, z.ZodTransform<EvmAddress, string>>;
|
|
6301
|
+
}, z.core.$strip>;
|
|
6302
|
+
type CreatePerpsSessionRequest = z.input<typeof CreatePerpsSessionRequestSchema>;
|
|
6303
|
+
type ResumePerpsSessionRequest = z.input<typeof ResumePerpsSessionRequestSchema>;
|
|
6304
|
+
type OpenPerpsSessionRequest = CreatePerpsSessionRequest | ResumePerpsSessionRequest;
|
|
6305
|
+
type RevokePerpsCredentialsRequest = z.input<typeof RevokePerpsCredentialsRequestSchema>;
|
|
6306
|
+
type PerpsDepositWorkflowRequest = GaslessWorkflowRequest | SendPerpsDepositTransactionRequest;
|
|
6307
|
+
type PerpsDepositWorkflow = AsyncGenerator<PerpsDepositWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
6308
|
+
declare const DepositToPerpsRequestSchema: z.ZodObject<{
|
|
6309
|
+
amount: z.ZodBigInt;
|
|
6310
|
+
metadata: z.ZodOptional<z.ZodString>;
|
|
6311
|
+
}, z.core.$strip>;
|
|
6312
|
+
declare const WithdrawFromPerpsRequestSchema: z.ZodObject<{
|
|
6313
|
+
amount: z.ZodBigInt;
|
|
6314
|
+
}, z.core.$strip>;
|
|
6315
|
+
type DepositToPerpsRequest = z.input<typeof DepositToPerpsRequestSchema>;
|
|
6316
|
+
type WithdrawFromPerpsRequest = z.input<typeof WithdrawFromPerpsRequestSchema>;
|
|
6317
|
+
type OpenPerpsSessionError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6318
|
+
declare const OpenPerpsSessionError: {
|
|
6319
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6320
|
+
};
|
|
6321
|
+
type RevokePerpsCredentialsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6322
|
+
declare const RevokePerpsCredentialsError: {
|
|
6323
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6324
|
+
};
|
|
6325
|
+
type PreparePerpsDepositError = UserInputError;
|
|
6326
|
+
declare const PreparePerpsDepositError: {
|
|
6327
|
+
isError(error: unknown): error is UserInputError;
|
|
6328
|
+
};
|
|
6329
|
+
type DepositToPerpsError = RateLimitError | RequestRejectedError | CancelledSigningError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6330
|
+
declare const DepositToPerpsError: {
|
|
6331
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6332
|
+
};
|
|
6333
|
+
type WithdrawFromPerpsError = RateLimitError | RequestRejectedError | SigningError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6334
|
+
declare const WithdrawFromPerpsError: {
|
|
6335
|
+
isError(error: unknown): error is SigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4710
6336
|
};
|
|
4711
6337
|
/**
|
|
4712
|
-
*
|
|
6338
|
+
* Opens a Perps account session.
|
|
4713
6339
|
*
|
|
4714
|
-
* @
|
|
6340
|
+
* @remarks
|
|
6341
|
+
* Omit `expiresIn` to create new delegated Perps credentials that expire after
|
|
6342
|
+
* one week. Pass `expiresIn` as a duration in milliseconds to use a shorter or
|
|
6343
|
+
* longer credential lifetime, or pass existing credentials to validate and
|
|
6344
|
+
* resume a previous session.
|
|
6345
|
+
*
|
|
6346
|
+
* @throws {@link OpenPerpsSessionError}
|
|
4715
6347
|
* Thrown on failure.
|
|
6348
|
+
*/
|
|
6349
|
+
declare function openPerpsSession(client: BaseSecureClient, request?: OpenPerpsSessionRequest): Promise<PerpsSession>;
|
|
6350
|
+
/**
|
|
6351
|
+
* Revokes delegated Perps credentials by proxy address.
|
|
4716
6352
|
*
|
|
4717
|
-
* @
|
|
4718
|
-
*
|
|
4719
|
-
*
|
|
4720
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
4721
|
-
* });
|
|
6353
|
+
* @remarks
|
|
6354
|
+
* This signs the revocation with the owner account. It can revoke credentials
|
|
6355
|
+
* outside the currently open Perps session.
|
|
4722
6356
|
*
|
|
4723
|
-
*
|
|
4724
|
-
*
|
|
6357
|
+
* @throws {@link RevokePerpsCredentialsError}
|
|
6358
|
+
* Thrown on failure.
|
|
4725
6359
|
*/
|
|
4726
|
-
declare function
|
|
4727
|
-
type DownloadAccountingSnapshotError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4728
|
-
declare const DownloadAccountingSnapshotError: {
|
|
4729
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4730
|
-
};
|
|
6360
|
+
declare function revokePerpsCredentials(client: BaseSecureClient, request: RevokePerpsCredentialsRequest): Promise<void>;
|
|
4731
6361
|
/**
|
|
4732
|
-
*
|
|
6362
|
+
* Starts a Perps deposit workflow.
|
|
4733
6363
|
*
|
|
4734
|
-
* @
|
|
6364
|
+
* @remarks
|
|
6365
|
+
* The deposit sends approved collateral into the Perps deposit contract and
|
|
6366
|
+
* credits the authenticated signer account. It does not approve collateral
|
|
6367
|
+
* spending; call `setupTradingApprovals` first when allowance is missing.
|
|
6368
|
+
*
|
|
6369
|
+
* @throws {@link PreparePerpsDepositError}
|
|
4735
6370
|
* Thrown on failure.
|
|
6371
|
+
*/
|
|
6372
|
+
declare function preparePerpsDeposit(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<PerpsDepositWorkflow>;
|
|
6373
|
+
/**
|
|
6374
|
+
* Deposits collateral into Perps for the authenticated signer account.
|
|
4736
6375
|
*
|
|
4737
|
-
* @
|
|
4738
|
-
*
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
6376
|
+
* @throws {@link DepositToPerpsError}
|
|
6377
|
+
* Thrown on failure.
|
|
6378
|
+
*/
|
|
6379
|
+
declare function depositToPerps(client: BaseSecureClient, request: DepositToPerpsRequest): Promise<TransactionHandle>;
|
|
6380
|
+
/**
|
|
6381
|
+
* Requests a Perps withdrawal to the authenticated wallet.
|
|
4742
6382
|
*
|
|
4743
|
-
*
|
|
4744
|
-
*
|
|
6383
|
+
* @remarks
|
|
6384
|
+
* The withdrawal is signed by the owner account and sends funds to the SDK
|
|
6385
|
+
* wallet address associated with the authenticated account.
|
|
6386
|
+
*
|
|
6387
|
+
* @throws {@link WithdrawFromPerpsError}
|
|
6388
|
+
* Thrown on failure.
|
|
4745
6389
|
*/
|
|
4746
|
-
declare function
|
|
6390
|
+
declare function withdrawFromPerps(client: BaseSecureClient, request: WithdrawFromPerpsRequest): Promise<PerpsWithdrawalId>;
|
|
4747
6391
|
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
conditionId:
|
|
4756
|
-
metadata
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
6392
|
+
/**
|
|
6393
|
+
* Parameters for preparing a market position split.
|
|
6394
|
+
*/
|
|
6395
|
+
type PrepareSplitMarketPositionRequest = {
|
|
6396
|
+
/** Amount of collateral to convert into market positions. */
|
|
6397
|
+
amount: bigint;
|
|
6398
|
+
/** Existing market condition ID that identifies the positions to mint. */
|
|
6399
|
+
conditionId: string | CtfConditionId;
|
|
6400
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6401
|
+
metadata?: string;
|
|
6402
|
+
};
|
|
6403
|
+
/**
|
|
6404
|
+
* Parameters for preparing a combo position split.
|
|
6405
|
+
*/
|
|
6406
|
+
type PrepareSplitComboPositionRequest = {
|
|
6407
|
+
/** Amount of collateral to convert into combo positions. */
|
|
6408
|
+
amount: bigint;
|
|
6409
|
+
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
6410
|
+
legs: string[] | PositionId[];
|
|
6411
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6412
|
+
metadata?: string;
|
|
6413
|
+
};
|
|
6414
|
+
/**
|
|
6415
|
+
* Parameters for preparing either supported position split workflow.
|
|
6416
|
+
*
|
|
6417
|
+
* @remarks
|
|
6418
|
+
* Provide either a market `conditionId` or combo `legs`.
|
|
6419
|
+
*/
|
|
6420
|
+
type PrepareSplitPositionRequest = PrepareSplitMarketPositionRequest | PrepareSplitComboPositionRequest;
|
|
4767
6421
|
type SplitPositionWorkflowRequest = GaslessWorkflowRequest | SendSplitPositionTransactionRequest;
|
|
4768
6422
|
type MergePositionsWorkflowRequest = GaslessWorkflowRequest | SendMergePositionsTransactionRequest;
|
|
4769
6423
|
type RedeemPositionsWorkflowRequest = GaslessWorkflowRequest | SendRedeemPositionsTransactionRequest;
|
|
4770
6424
|
type SplitPositionWorkflow = AsyncGenerator<SplitPositionWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
4771
6425
|
type MergePositionsWorkflow = AsyncGenerator<MergePositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
4772
6426
|
type RedeemPositionsWorkflow = AsyncGenerator<RedeemPositionsWorkflowRequest, TransactionHandle, EvmAddress | EvmSignature | TransactionHandle>;
|
|
4773
|
-
type
|
|
4774
|
-
type PrepareMergePositionsRequest = z.input<typeof PrepareMergePositionsRequestSchema>;
|
|
4775
|
-
type PrepareRedeemPositionsRequest = z.input<typeof PrepareRedeemPositionsRequestSchema>;
|
|
4776
|
-
type PrepareSplitPositionError = UserInputError;
|
|
6427
|
+
type PrepareSplitPositionError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4777
6428
|
declare const PrepareSplitPositionError: {
|
|
4778
|
-
isError(error: unknown): error is UserInputError;
|
|
6429
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6430
|
+
};
|
|
6431
|
+
type PrepareSplitMarketPositionError = PrepareSplitPositionError;
|
|
6432
|
+
declare const PrepareSplitMarketPositionError: {
|
|
6433
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6434
|
+
};
|
|
6435
|
+
type PrepareSplitComboPositionError = PrepareSplitPositionError;
|
|
6436
|
+
declare const PrepareSplitComboPositionError: {
|
|
6437
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4779
6438
|
};
|
|
4780
6439
|
type PrepareMergePositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4781
6440
|
declare const PrepareMergePositionsError: {
|
|
4782
6441
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4783
6442
|
};
|
|
6443
|
+
type PrepareMergeMarketPositionError = PrepareMergePositionsError;
|
|
6444
|
+
declare const PrepareMergeMarketPositionError: {
|
|
6445
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6446
|
+
};
|
|
6447
|
+
type PrepareMergeComboPositionError = PrepareMergePositionsError;
|
|
6448
|
+
declare const PrepareMergeComboPositionError: {
|
|
6449
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6450
|
+
};
|
|
4784
6451
|
type PrepareRedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4785
6452
|
declare const PrepareRedeemPositionsError: {
|
|
4786
6453
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4787
6454
|
};
|
|
6455
|
+
type PrepareRedeemMarketPositionsError = PrepareRedeemPositionsError;
|
|
6456
|
+
declare const PrepareRedeemMarketPositionsError: {
|
|
6457
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6458
|
+
};
|
|
6459
|
+
type PrepareRedeemComboPositionError = PrepareRedeemPositionsError;
|
|
6460
|
+
declare const PrepareRedeemComboPositionError: {
|
|
6461
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6462
|
+
};
|
|
4788
6463
|
/**
|
|
4789
6464
|
* Starts a split workflow for a market condition.
|
|
4790
6465
|
*
|
|
4791
6466
|
* @remarks
|
|
4792
|
-
* This is a low-level
|
|
6467
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4793
6468
|
*
|
|
4794
6469
|
* @example
|
|
4795
6470
|
* ```ts
|
|
4796
|
-
* const workflow = await
|
|
6471
|
+
* const workflow = await prepareSplitMarketPosition(client, {
|
|
4797
6472
|
* amount: 1n,
|
|
4798
6473
|
* conditionId:
|
|
4799
6474
|
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4800
6475
|
* });
|
|
4801
6476
|
* ```
|
|
4802
6477
|
*
|
|
6478
|
+
* @throws {@link PrepareSplitMarketPositionError}
|
|
6479
|
+
* Thrown on failure.
|
|
6480
|
+
*/
|
|
6481
|
+
declare function prepareSplitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<SplitPositionWorkflow>;
|
|
6482
|
+
/**
|
|
6483
|
+
* Starts a split workflow for a combo position from leg position IDs.
|
|
6484
|
+
*
|
|
6485
|
+
* @remarks
|
|
6486
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6487
|
+
*
|
|
6488
|
+
* @example
|
|
6489
|
+
* ```ts
|
|
6490
|
+
* const workflow = await prepareSplitComboPosition(client, {
|
|
6491
|
+
* amount: 1n,
|
|
6492
|
+
* legs: ['123', '456'],
|
|
6493
|
+
* });
|
|
6494
|
+
* ```
|
|
6495
|
+
*
|
|
6496
|
+
* @throws {@link PrepareSplitComboPositionError}
|
|
6497
|
+
* Thrown on failure.
|
|
6498
|
+
*/
|
|
6499
|
+
declare function prepareSplitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<SplitPositionWorkflow>;
|
|
6500
|
+
/**
|
|
6501
|
+
* Starts a split workflow for market or combo positions.
|
|
6502
|
+
*
|
|
4803
6503
|
* @throws {@link PrepareSplitPositionError}
|
|
4804
6504
|
* Thrown on failure.
|
|
4805
6505
|
*/
|
|
4806
6506
|
declare function prepareSplitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<SplitPositionWorkflow>;
|
|
4807
|
-
type SplitPositionError =
|
|
6507
|
+
type SplitPositionError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4808
6508
|
declare const SplitPositionError: {
|
|
4809
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
|
|
6509
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6510
|
+
};
|
|
6511
|
+
type SplitMarketPositionError = SplitPositionError;
|
|
6512
|
+
declare const SplitMarketPositionError: {
|
|
6513
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6514
|
+
};
|
|
6515
|
+
type SplitComboPositionError = SplitPositionError;
|
|
6516
|
+
declare const SplitComboPositionError: {
|
|
6517
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
4810
6518
|
};
|
|
4811
6519
|
/**
|
|
4812
6520
|
* Splits collateral into market positions.
|
|
4813
6521
|
*
|
|
6522
|
+
* @remarks
|
|
6523
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6524
|
+
*
|
|
6525
|
+
* @throws {@link SplitMarketPositionError}
|
|
6526
|
+
* Thrown on failure.
|
|
6527
|
+
*/
|
|
6528
|
+
declare function splitMarketPosition(client: BaseSecureClient, request: PrepareSplitMarketPositionRequest): Promise<TransactionHandle>;
|
|
6529
|
+
/**
|
|
6530
|
+
* Splits collateral into combo positions from leg position IDs.
|
|
6531
|
+
*
|
|
6532
|
+
* @remarks
|
|
6533
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6534
|
+
*
|
|
6535
|
+
* @throws {@link SplitComboPositionError}
|
|
6536
|
+
* Thrown on failure.
|
|
6537
|
+
*/
|
|
6538
|
+
declare function splitComboPosition(client: BaseSecureClient, request: PrepareSplitComboPositionRequest): Promise<TransactionHandle>;
|
|
6539
|
+
/**
|
|
6540
|
+
* Splits collateral into market or combo positions.
|
|
6541
|
+
*
|
|
4814
6542
|
* @throws {@link SplitPositionError}
|
|
4815
6543
|
* Thrown on failure.
|
|
4816
6544
|
*/
|
|
4817
6545
|
declare function splitPosition(client: BaseSecureClient, request: PrepareSplitPositionRequest): Promise<TransactionHandle>;
|
|
6546
|
+
/**
|
|
6547
|
+
* Parameters for preparing a market position merge.
|
|
6548
|
+
*/
|
|
6549
|
+
type PrepareMergeMarketPositionRequest = {
|
|
6550
|
+
/** Amount per complementary market position to merge. */
|
|
6551
|
+
amount: bigint | 'max';
|
|
6552
|
+
/** Existing market condition ID that identifies the positions to merge. */
|
|
6553
|
+
conditionId: string | CtfConditionId;
|
|
6554
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6555
|
+
metadata?: string;
|
|
6556
|
+
};
|
|
6557
|
+
/**
|
|
6558
|
+
* Parameters for preparing a combo position merge.
|
|
6559
|
+
*/
|
|
6560
|
+
type PrepareMergeComboPositionRequest = {
|
|
6561
|
+
/** Amount per complementary combo position to merge. */
|
|
6562
|
+
amount: bigint | 'max';
|
|
6563
|
+
/** Protocol v2 leg position IDs that define the combo condition. */
|
|
6564
|
+
legs: string[] | PositionId[];
|
|
6565
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6566
|
+
metadata?: string;
|
|
6567
|
+
};
|
|
6568
|
+
/**
|
|
6569
|
+
* Parameters for preparing either supported position merge workflow.
|
|
6570
|
+
*
|
|
6571
|
+
* @remarks
|
|
6572
|
+
* Provide either a market `conditionId` or combo `legs`.
|
|
6573
|
+
*/
|
|
6574
|
+
type PrepareMergePositionsRequest = PrepareMergeMarketPositionRequest | PrepareMergeComboPositionRequest;
|
|
4818
6575
|
/**
|
|
4819
6576
|
* Starts a workflow to merge complementary positions in a market back into collateral.
|
|
4820
6577
|
*
|
|
4821
6578
|
* @remarks
|
|
4822
|
-
* This is a low-level
|
|
6579
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4823
6580
|
*
|
|
4824
6581
|
* @example
|
|
4825
6582
|
* ```ts
|
|
4826
|
-
* const workflow = await
|
|
6583
|
+
* const workflow = await prepareMergeMarketPosition(client, {
|
|
4827
6584
|
* amount: 'max',
|
|
4828
6585
|
* conditionId:
|
|
4829
6586
|
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4830
6587
|
* });
|
|
4831
6588
|
* ```
|
|
4832
6589
|
*
|
|
6590
|
+
* @throws {@link PrepareMergeMarketPositionError}
|
|
6591
|
+
* Thrown on failure.
|
|
6592
|
+
*/
|
|
6593
|
+
declare function prepareMergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<MergePositionsWorkflow>;
|
|
6594
|
+
/**
|
|
6595
|
+
* Starts a workflow to merge complementary combo positions back into collateral.
|
|
6596
|
+
*
|
|
6597
|
+
* @remarks
|
|
6598
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6599
|
+
*
|
|
6600
|
+
* @example
|
|
6601
|
+
* ```ts
|
|
6602
|
+
* const workflow = await prepareMergeComboPosition(client, {
|
|
6603
|
+
* amount: 'max',
|
|
6604
|
+
* legs: ['123', '456'],
|
|
6605
|
+
* });
|
|
6606
|
+
* ```
|
|
6607
|
+
*
|
|
6608
|
+
* @throws {@link PrepareMergeComboPositionError}
|
|
6609
|
+
* Thrown on failure.
|
|
6610
|
+
*/
|
|
6611
|
+
declare function prepareMergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<MergePositionsWorkflow>;
|
|
6612
|
+
/**
|
|
6613
|
+
* Starts a merge workflow for market or combo positions.
|
|
6614
|
+
*
|
|
4833
6615
|
* @throws {@link PrepareMergePositionsError}
|
|
4834
6616
|
* Thrown on failure.
|
|
4835
6617
|
*/
|
|
4836
6618
|
declare function prepareMergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<MergePositionsWorkflow>;
|
|
4837
|
-
type MergePositionsError =
|
|
6619
|
+
type MergePositionsError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
4838
6620
|
declare const MergePositionsError: {
|
|
4839
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6621
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6622
|
+
};
|
|
6623
|
+
type MergeMarketPositionError = MergePositionsError;
|
|
6624
|
+
declare const MergeMarketPositionError: {
|
|
6625
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
6626
|
+
};
|
|
6627
|
+
type MergeComboPositionError = MergePositionsError;
|
|
6628
|
+
declare const MergeComboPositionError: {
|
|
6629
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
4840
6630
|
};
|
|
4841
6631
|
/**
|
|
4842
6632
|
* Merges complementary market positions back into collateral.
|
|
4843
6633
|
*
|
|
6634
|
+
* @remarks
|
|
6635
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6636
|
+
*
|
|
6637
|
+
* @throws {@link MergeMarketPositionError}
|
|
6638
|
+
* Thrown on failure.
|
|
6639
|
+
*/
|
|
6640
|
+
declare function mergeMarketPosition(client: BaseSecureClient, request: PrepareMergeMarketPositionRequest): Promise<TransactionHandle>;
|
|
6641
|
+
/**
|
|
6642
|
+
* Merges complementary combo positions back into collateral.
|
|
6643
|
+
*
|
|
6644
|
+
* @remarks
|
|
6645
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6646
|
+
*
|
|
6647
|
+
* @throws {@link MergeComboPositionError}
|
|
6648
|
+
* Thrown on failure.
|
|
6649
|
+
*/
|
|
6650
|
+
declare function mergeComboPosition(client: BaseSecureClient, request: PrepareMergeComboPositionRequest): Promise<TransactionHandle>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Merges complementary market or combo positions back into collateral.
|
|
6653
|
+
*
|
|
4844
6654
|
* @throws {@link MergePositionsError}
|
|
4845
6655
|
* Thrown on failure.
|
|
4846
6656
|
*/
|
|
4847
6657
|
declare function mergePositions(client: BaseSecureClient, request: PrepareMergePositionsRequest): Promise<TransactionHandle>;
|
|
4848
6658
|
/**
|
|
4849
|
-
*
|
|
6659
|
+
* Parameters for preparing a market position redemption by condition ID.
|
|
6660
|
+
*/
|
|
6661
|
+
type PrepareRedeemMarketPositionsByConditionIdRequest = {
|
|
6662
|
+
/** Existing market condition ID that identifies the positions to redeem. */
|
|
6663
|
+
conditionId: string | CtfConditionId;
|
|
6664
|
+
marketId?: never;
|
|
6665
|
+
amount?: never;
|
|
6666
|
+
positionId?: never;
|
|
6667
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6668
|
+
metadata?: string;
|
|
6669
|
+
};
|
|
6670
|
+
/**
|
|
6671
|
+
* Parameters for preparing a market position redemption by market ID.
|
|
6672
|
+
*/
|
|
6673
|
+
type PrepareRedeemMarketPositionsByMarketIdRequest = {
|
|
6674
|
+
conditionId?: never;
|
|
6675
|
+
/** Existing market ID that identifies the positions to redeem. */
|
|
6676
|
+
marketId: string;
|
|
6677
|
+
amount?: never;
|
|
6678
|
+
positionId?: never;
|
|
6679
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6680
|
+
metadata?: string;
|
|
6681
|
+
};
|
|
6682
|
+
/**
|
|
6683
|
+
* Parameters for preparing a combo position redemption.
|
|
6684
|
+
*/
|
|
6685
|
+
type PrepareRedeemComboPositionRequest = {
|
|
6686
|
+
/** Protocol v2 combo YES/NO position ID to redeem. */
|
|
6687
|
+
positionId: string | PositionId;
|
|
6688
|
+
conditionId?: never;
|
|
6689
|
+
marketId?: never;
|
|
6690
|
+
/** Optional transaction metadata for workflows that support metadata. */
|
|
6691
|
+
metadata?: string;
|
|
6692
|
+
};
|
|
6693
|
+
/**
|
|
6694
|
+
* Parameters for preparing either supported position redemption workflow.
|
|
6695
|
+
*
|
|
6696
|
+
* @remarks
|
|
6697
|
+
* Provide either a market `conditionId` or `marketId`, or a combo `positionId`.
|
|
6698
|
+
*/
|
|
6699
|
+
type PrepareRedeemPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest | PrepareRedeemComboPositionRequest;
|
|
6700
|
+
type PrepareRedeemMarketPositionsRequest = PrepareRedeemMarketPositionsByConditionIdRequest | PrepareRedeemMarketPositionsByMarketIdRequest;
|
|
6701
|
+
/**
|
|
6702
|
+
* Starts a redemption workflow for resolved market positions.
|
|
4850
6703
|
*
|
|
4851
6704
|
* @remarks
|
|
4852
|
-
* This is a low-level
|
|
6705
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4853
6706
|
*
|
|
4854
6707
|
* @example
|
|
4855
6708
|
* ```ts
|
|
4856
|
-
* const workflow = await
|
|
6709
|
+
* const workflow = await prepareRedeemMarketPositions(client, {
|
|
4857
6710
|
* conditionId:
|
|
4858
6711
|
* '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
|
4859
6712
|
* });
|
|
@@ -4861,21 +6714,51 @@ declare function mergePositions(client: BaseSecureClient, request: PrepareMergeP
|
|
|
4861
6714
|
*
|
|
4862
6715
|
* @example
|
|
4863
6716
|
* ```ts
|
|
4864
|
-
* const workflow = await
|
|
6717
|
+
* const workflow = await prepareRedeemMarketPositions(client, {
|
|
4865
6718
|
* marketId: '12345',
|
|
4866
6719
|
* });
|
|
4867
6720
|
* ```
|
|
4868
6721
|
*
|
|
6722
|
+
* @throws {@link PrepareRedeemMarketPositionsError}
|
|
6723
|
+
* Thrown on failure.
|
|
6724
|
+
*/
|
|
6725
|
+
declare function prepareRedeemMarketPositions(client: BaseSecureClient, request: PrepareRedeemMarketPositionsRequest): Promise<RedeemPositionsWorkflow>;
|
|
6726
|
+
/**
|
|
6727
|
+
* Starts a redemption workflow for a resolved combo position.
|
|
6728
|
+
*
|
|
6729
|
+
* @remarks
|
|
6730
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6731
|
+
*
|
|
6732
|
+
* @example
|
|
6733
|
+
* ```ts
|
|
6734
|
+
* const workflow = await prepareRedeemComboPosition(client, {
|
|
6735
|
+
* positionId: '123',
|
|
6736
|
+
* });
|
|
6737
|
+
* ```
|
|
6738
|
+
*
|
|
6739
|
+
* @throws {@link PrepareRedeemComboPositionError}
|
|
6740
|
+
* Thrown on failure.
|
|
6741
|
+
*/
|
|
6742
|
+
declare function prepareRedeemComboPosition(client: BaseSecureClient, request: PrepareRedeemComboPositionRequest): Promise<RedeemPositionsWorkflow>;
|
|
6743
|
+
/**
|
|
6744
|
+
* Starts a redemption workflow for resolved market or combo positions.
|
|
6745
|
+
*
|
|
6746
|
+
* @remarks
|
|
6747
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6748
|
+
*
|
|
4869
6749
|
* @throws {@link PrepareRedeemPositionsError}
|
|
4870
6750
|
* Thrown on failure.
|
|
4871
6751
|
*/
|
|
4872
6752
|
declare function prepareRedeemPositions(client: BaseSecureClient, request: PrepareRedeemPositionsRequest): Promise<RedeemPositionsWorkflow>;
|
|
4873
|
-
type RedeemPositionsError =
|
|
6753
|
+
type RedeemPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
4874
6754
|
declare const RedeemPositionsError: {
|
|
4875
6755
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
4876
6756
|
};
|
|
4877
6757
|
/**
|
|
4878
|
-
* Redeems resolved market positions.
|
|
6758
|
+
* Redeems resolved market or combo positions.
|
|
6759
|
+
*
|
|
6760
|
+
* @remarks
|
|
6761
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
4879
6762
|
*
|
|
4880
6763
|
* @throws {@link RedeemPositionsError}
|
|
4881
6764
|
* Thrown on failure.
|
|
@@ -4893,6 +6776,9 @@ declare const FetchPublicProfileError: {
|
|
|
4893
6776
|
/**
|
|
4894
6777
|
* Fetches a public profile by wallet address.
|
|
4895
6778
|
*
|
|
6779
|
+
* @remarks
|
|
6780
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6781
|
+
*
|
|
4896
6782
|
* @throws {@link FetchPublicProfileError}
|
|
4897
6783
|
* Thrown on failure.
|
|
4898
6784
|
*
|
|
@@ -4907,11 +6793,20 @@ declare const FetchPublicProfileError: {
|
|
|
4907
6793
|
*/
|
|
4908
6794
|
declare function fetchPublicProfile(client: BaseClient, request: FetchPublicProfileRequest): Promise<PublicProfile | null>;
|
|
4909
6795
|
|
|
6796
|
+
declare enum SearchSort {
|
|
6797
|
+
Volume = "volume",
|
|
6798
|
+
Volume24Hr = "volume_24hr",
|
|
6799
|
+
Liquidity = "liquidity",
|
|
6800
|
+
Competitive = "competitive",
|
|
6801
|
+
ClosedTime = "closed_time",
|
|
6802
|
+
StartDate = "start_date",
|
|
6803
|
+
EndDate = "end_date"
|
|
6804
|
+
}
|
|
4910
6805
|
declare const SearchRequestSchema: z.ZodObject<{
|
|
4911
6806
|
q: z.ZodString;
|
|
4912
6807
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
4913
6808
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
4914
|
-
cursor: z.ZodOptional<z.
|
|
6809
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4915
6810
|
eventsStatus: z.ZodOptional<z.ZodString>;
|
|
4916
6811
|
eventsTag: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4917
6812
|
excludeTagIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -4926,7 +6821,7 @@ declare const SearchRequestSchema: z.ZodObject<{
|
|
|
4926
6821
|
}>>;
|
|
4927
6822
|
searchProfiles: z.ZodOptional<z.ZodBoolean>;
|
|
4928
6823
|
searchTags: z.ZodOptional<z.ZodBoolean>;
|
|
4929
|
-
sort: z.ZodOptional<z.
|
|
6824
|
+
sort: z.ZodOptional<z.ZodEnum<typeof SearchSort>>;
|
|
4930
6825
|
}, z.core.$strip>;
|
|
4931
6826
|
type SearchRequest = z.input<typeof SearchRequestSchema>;
|
|
4932
6827
|
type SearchResults = {
|
|
@@ -4941,6 +6836,11 @@ declare const SearchError: {
|
|
|
4941
6836
|
/**
|
|
4942
6837
|
* Runs a public full-text search.
|
|
4943
6838
|
*
|
|
6839
|
+
* @remarks
|
|
6840
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6841
|
+
* `keepClosedMarkets` is an hour window for including recently closed markets
|
|
6842
|
+
* when searching active events.
|
|
6843
|
+
*
|
|
4944
6844
|
* @throws {@link SearchError}
|
|
4945
6845
|
* Thrown on failure.
|
|
4946
6846
|
*
|
|
@@ -4966,12 +6866,9 @@ declare function search(client: BaseClient, request: SearchRequest): Paginated<S
|
|
|
4966
6866
|
|
|
4967
6867
|
declare const ListSeriesRequestSchema: z.ZodObject<{
|
|
4968
6868
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
4969
|
-
categoriesIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4970
|
-
categoriesLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4971
6869
|
closed: z.ZodOptional<z.ZodBoolean>;
|
|
4972
|
-
cursor: z.ZodOptional<z.
|
|
6870
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
4973
6871
|
excludeEvents: z.ZodOptional<z.ZodBoolean>;
|
|
4974
|
-
includeChat: z.ZodOptional<z.ZodBoolean>;
|
|
4975
6872
|
locale: z.ZodOptional<z.ZodString>;
|
|
4976
6873
|
order: z.ZodOptional<z.ZodString>;
|
|
4977
6874
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -4984,7 +6881,6 @@ declare const ListSeriesRequestSchema: z.ZodObject<{
|
|
|
4984
6881
|
}, z.core.$strip>;
|
|
4985
6882
|
declare const FetchSeriesRequestSchema: z.ZodObject<{
|
|
4986
6883
|
id: z.ZodString;
|
|
4987
|
-
includeChat: z.ZodOptional<z.ZodBoolean>;
|
|
4988
6884
|
locale: z.ZodOptional<z.ZodString>;
|
|
4989
6885
|
}, z.core.$strip>;
|
|
4990
6886
|
type ListSeriesRequest = z.input<typeof ListSeriesRequestSchema>;
|
|
@@ -4996,6 +6892,9 @@ declare const ListSeriesError: {
|
|
|
4996
6892
|
/**
|
|
4997
6893
|
* Lists series.
|
|
4998
6894
|
*
|
|
6895
|
+
* @remarks
|
|
6896
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6897
|
+
*
|
|
4999
6898
|
* @throws {@link ListSeriesError}
|
|
5000
6899
|
* Thrown on failure.
|
|
5001
6900
|
*
|
|
@@ -5036,6 +6935,9 @@ declare const FetchSeriesError: {
|
|
|
5036
6935
|
/**
|
|
5037
6936
|
* Fetches a series.
|
|
5038
6937
|
*
|
|
6938
|
+
* @remarks
|
|
6939
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6940
|
+
*
|
|
5039
6941
|
* @throws {@link FetchSeriesError}
|
|
5040
6942
|
* Thrown on failure.
|
|
5041
6943
|
*
|
|
@@ -5043,7 +6945,7 @@ declare const FetchSeriesError: {
|
|
|
5043
6945
|
* ```ts
|
|
5044
6946
|
* const series = await fetchSeries(client, {
|
|
5045
6947
|
* id: 'fed-daily-series',
|
|
5046
|
-
*
|
|
6948
|
+
* locale: 'en',
|
|
5047
6949
|
* });
|
|
5048
6950
|
*
|
|
5049
6951
|
* // series === Series
|
|
@@ -5057,9 +6959,17 @@ type SportsEventType = SportsEvent['type'];
|
|
|
5057
6959
|
type CommentsEventType = CommentsEvent['type'];
|
|
5058
6960
|
type CryptoPricesEventType = CryptoPricesEvent['type'];
|
|
5059
6961
|
type EquityPricesEventType = EquityPricesEvent['type'];
|
|
6962
|
+
type PerpsMarketDataEventType = PerpsMarketDataEvent['type'];
|
|
6963
|
+
type PerpsStreamingCandleInterval = Exclude<PerpsKlineInterval, PerpsKlineInterval.OneSecond>;
|
|
6964
|
+
type PerpsInstrumentIdInput = number;
|
|
5060
6965
|
type MarketSubscription = {
|
|
5061
6966
|
topic: 'market';
|
|
6967
|
+
/** Token IDs whose market events should be delivered. */
|
|
5062
6968
|
tokenIds: readonly string[];
|
|
6969
|
+
/**
|
|
6970
|
+
* When `true`, the server additionally emits `MarketBestBidAskEvent`,
|
|
6971
|
+
* `NewMarketEvent`, and `MarketResolvedEvent`.
|
|
6972
|
+
*/
|
|
5063
6973
|
customFeatureEnabled?: boolean;
|
|
5064
6974
|
};
|
|
5065
6975
|
type UserSubscription = {
|
|
@@ -5084,9 +6994,35 @@ type EquityPricesSubscription = {
|
|
|
5084
6994
|
symbol: string;
|
|
5085
6995
|
types?: readonly EquityPricesEventType[];
|
|
5086
6996
|
};
|
|
5087
|
-
type
|
|
6997
|
+
type PerpsTradesSubscription = {
|
|
6998
|
+
topic: 'perps.trades';
|
|
6999
|
+
instrumentId: PerpsInstrumentIdInput;
|
|
7000
|
+
};
|
|
7001
|
+
type PerpsBboSubscription = {
|
|
7002
|
+
topic: 'perps.bbo';
|
|
7003
|
+
instrumentId: PerpsInstrumentIdInput;
|
|
7004
|
+
};
|
|
7005
|
+
type PerpsBookSubscription = {
|
|
7006
|
+
topic: 'perps.book';
|
|
7007
|
+
instrumentId: PerpsInstrumentIdInput;
|
|
7008
|
+
};
|
|
7009
|
+
type PerpsCandlesSubscription = {
|
|
7010
|
+
topic: 'perps.candles';
|
|
7011
|
+
instrumentId: PerpsInstrumentIdInput;
|
|
7012
|
+
interval: PerpsStreamingCandleInterval;
|
|
7013
|
+
};
|
|
7014
|
+
type PerpsTickersSubscription = {
|
|
7015
|
+
topic: 'perps.tickers';
|
|
7016
|
+
instrumentId?: PerpsInstrumentIdInput;
|
|
7017
|
+
};
|
|
7018
|
+
type PerpsStatisticsSubscription = {
|
|
7019
|
+
topic: 'perps.statistics';
|
|
7020
|
+
instrumentId?: PerpsInstrumentIdInput;
|
|
7021
|
+
};
|
|
7022
|
+
type PerpsMarketDataSubscription = PerpsTradesSubscription | PerpsBboSubscription | PerpsBookSubscription | PerpsCandlesSubscription | PerpsTickersSubscription | PerpsStatisticsSubscription;
|
|
7023
|
+
type PublicSubscriptionSpec = MarketSubscription | SportsSubscription | CommentsSubscription | CryptoPricesSubscription | EquityPricesSubscription | PerpsMarketDataSubscription;
|
|
5088
7024
|
type SecureSubscriptionSpec = PublicSubscriptionSpec | UserSubscription;
|
|
5089
|
-
type PublicRealtimeEvent = MarketEvent | SportsEvent | CommentsEvent | CryptoPricesEvent | EquityPricesEvent;
|
|
7025
|
+
type PublicRealtimeEvent = MarketEvent | SportsEvent | CommentsEvent | CryptoPricesEvent | EquityPricesEvent | PerpsMarketDataEvent;
|
|
5090
7026
|
type SecureRealtimeEvent = PublicRealtimeEvent | UserEvent;
|
|
5091
7027
|
type PublicRealtimeTopic = Prettify<PublicRealtimeEvent['topic']>;
|
|
5092
7028
|
type SecureRealtimeTopic = Prettify<SecureRealtimeEvent['topic']>;
|
|
@@ -5097,6 +7033,12 @@ type EventByTopic = {
|
|
|
5097
7033
|
'prices.crypto.binance': CryptoPricesBinanceEvent;
|
|
5098
7034
|
'prices.crypto.chainlink': CryptoPricesChainlinkEvent;
|
|
5099
7035
|
'prices.equity.pyth': EquityPricesEvent;
|
|
7036
|
+
'perps.trades': PerpsTradeEvent;
|
|
7037
|
+
'perps.bbo': PerpsBboEvent;
|
|
7038
|
+
'perps.book': PerpsBookEvent;
|
|
7039
|
+
'perps.candles': PerpsCandleEvent;
|
|
7040
|
+
'perps.tickers': PerpsTickerEvent;
|
|
7041
|
+
'perps.statistics': PerpsStatisticEvent;
|
|
5100
7042
|
};
|
|
5101
7043
|
type EventForMarketSubscription<TSpec extends MarketSubscription> = 'customFeatureEnabled' extends keyof TSpec ? true extends TSpec['customFeatureEnabled'] ? MarketEvent : StandardMarketEvent : StandardMarketEvent;
|
|
5102
7044
|
type EventForSubscriptionSpec<TSpec extends SecureSubscriptionSpec> = TSpec extends MarketSubscription ? EventForMarketSubscription<TSpec> : TSpec extends {
|
|
@@ -5115,6 +7057,9 @@ type SubscribeError = TransportError;
|
|
|
5115
7057
|
/**
|
|
5116
7058
|
* Starts one or more realtime subscriptions on this client.
|
|
5117
7059
|
*
|
|
7060
|
+
* @remarks
|
|
7061
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7062
|
+
*
|
|
5118
7063
|
* @throws {@link SubscribeError}
|
|
5119
7064
|
* Thrown when the realtime subscription cannot be established or fails.
|
|
5120
7065
|
*
|
|
@@ -5134,8 +7079,7 @@ declare function subscribe<const TSubscriptions extends readonly SecureSubscript
|
|
|
5134
7079
|
|
|
5135
7080
|
declare const ListTagsRequestSchema: z.ZodObject<{
|
|
5136
7081
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
5137
|
-
cursor: z.ZodOptional<z.
|
|
5138
|
-
includeChat: z.ZodOptional<z.ZodBoolean>;
|
|
7082
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5139
7083
|
includeTemplate: z.ZodOptional<z.ZodBoolean>;
|
|
5140
7084
|
isCarousel: z.ZodOptional<z.ZodBoolean>;
|
|
5141
7085
|
locale: z.ZodOptional<z.ZodString>;
|
|
@@ -5144,7 +7088,6 @@ declare const ListTagsRequestSchema: z.ZodObject<{
|
|
|
5144
7088
|
}, z.core.$strip>;
|
|
5145
7089
|
declare const FetchTagRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5146
7090
|
id: z.ZodString;
|
|
5147
|
-
includeChat: z.ZodOptional<z.ZodBoolean>;
|
|
5148
7091
|
includeTemplate: z.ZodOptional<z.ZodBoolean>;
|
|
5149
7092
|
locale: z.ZodOptional<z.ZodString>;
|
|
5150
7093
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -5194,6 +7137,9 @@ declare const ListTagsError: {
|
|
|
5194
7137
|
/**
|
|
5195
7138
|
* Lists tags.
|
|
5196
7139
|
*
|
|
7140
|
+
* @remarks
|
|
7141
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7142
|
+
*
|
|
5197
7143
|
* @throws {@link ListTagsError}
|
|
5198
7144
|
* Thrown on failure.
|
|
5199
7145
|
*
|
|
@@ -5234,6 +7180,9 @@ declare const FetchTagError: {
|
|
|
5234
7180
|
/**
|
|
5235
7181
|
* Fetches a tag by id or slug.
|
|
5236
7182
|
*
|
|
7183
|
+
* @remarks
|
|
7184
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7185
|
+
*
|
|
5237
7186
|
* @throws {@link FetchTagError}
|
|
5238
7187
|
* Thrown on failure.
|
|
5239
7188
|
*
|
|
@@ -5255,6 +7204,9 @@ declare const FetchRelatedTagsError: {
|
|
|
5255
7204
|
/**
|
|
5256
7205
|
* Fetches related tag relationships by id or slug.
|
|
5257
7206
|
*
|
|
7207
|
+
* @remarks
|
|
7208
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7209
|
+
*
|
|
5258
7210
|
* @throws {@link FetchRelatedTagsError}
|
|
5259
7211
|
* Thrown on failure.
|
|
5260
7212
|
*
|
|
@@ -5277,6 +7229,9 @@ declare const FetchRelatedTagResourcesError: {
|
|
|
5277
7229
|
/**
|
|
5278
7230
|
* Fetches resources linked from related tag relationships by id or slug.
|
|
5279
7231
|
*
|
|
7232
|
+
* @remarks
|
|
7233
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7234
|
+
*
|
|
5280
7235
|
* @throws {@link FetchRelatedTagResourcesError}
|
|
5281
7236
|
* Thrown on failure.
|
|
5282
7237
|
*
|
|
@@ -5296,7 +7251,7 @@ declare function fetchRelatedTagResources(client: BaseClient, request: FetchRela
|
|
|
5296
7251
|
declare const ListTeamsRequestSchema: z.ZodObject<{
|
|
5297
7252
|
abbreviation: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5298
7253
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
5299
|
-
cursor: z.ZodOptional<z.
|
|
7254
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
5300
7255
|
league: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5301
7256
|
name: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5302
7257
|
order: z.ZodOptional<z.ZodString>;
|
|
@@ -5311,6 +7266,9 @@ declare const ListTeamsError: {
|
|
|
5311
7266
|
/**
|
|
5312
7267
|
* Lists teams.
|
|
5313
7268
|
*
|
|
7269
|
+
* @remarks
|
|
7270
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7271
|
+
*
|
|
5314
7272
|
* @throws {@link ListTeamsError}
|
|
5315
7273
|
* Thrown on failure.
|
|
5316
7274
|
*
|
|
@@ -5362,14 +7320,14 @@ declare const PrepareErc20TransferError: {
|
|
|
5362
7320
|
* Starts an ERC-20 transfer workflow.
|
|
5363
7321
|
*
|
|
5364
7322
|
* @remarks
|
|
5365
|
-
* This is a low-level
|
|
7323
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
5366
7324
|
*
|
|
5367
7325
|
* @example
|
|
5368
7326
|
* ```ts
|
|
5369
7327
|
* const workflow = await prepareErc20Transfer(client, {
|
|
5370
7328
|
* amount: 1n,
|
|
5371
7329
|
* recipientAddress: client.account.signer,
|
|
5372
|
-
* tokenAddress: client.environment.collateralToken,
|
|
7330
|
+
* tokenAddress: client.environment.contracts.collateralToken,
|
|
5373
7331
|
* });
|
|
5374
7332
|
* ```
|
|
5375
7333
|
*
|
|
@@ -5377,13 +7335,16 @@ declare const PrepareErc20TransferError: {
|
|
|
5377
7335
|
* Thrown on failure.
|
|
5378
7336
|
*/
|
|
5379
7337
|
declare function prepareErc20Transfer(client: BaseSecureClient, request: PrepareErc20TransferRequest): Promise<Erc20TransferWorkflow>;
|
|
5380
|
-
type TransferErc20Error =
|
|
7338
|
+
type TransferErc20Error = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError | CancelledSigningError | SigningError;
|
|
5381
7339
|
declare const TransferErc20Error: {
|
|
5382
|
-
isError(error: unknown): error is SigningError | CancelledSigningError | UserInputError;
|
|
7340
|
+
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
5383
7341
|
};
|
|
5384
7342
|
/**
|
|
5385
7343
|
* Transfers ERC-20 tokens from the authenticated account.
|
|
5386
7344
|
*
|
|
7345
|
+
* @remarks
|
|
7346
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7347
|
+
*
|
|
5387
7348
|
* @throws {@link TransferErc20Error}
|
|
5388
7349
|
* Thrown on failure.
|
|
5389
7350
|
*/
|
|
@@ -5460,4 +7421,4 @@ type Signer = {
|
|
|
5460
7421
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
5461
7422
|
};
|
|
5462
7423
|
|
|
5463
|
-
export { FetchRewardPercentagesError as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type DataActions as D, type EnvironmentConfig as E, FetchClosedOnlyModeError as F, FetchLastTradePricesError as G, FetchMarketError as H, FetchMarketTagsError as I, FetchMidpointError as J, FetchMidpointsError as K, FetchNotificationsError as L, FetchOrderBookError as M, FetchOrderBooksError as N, FetchOrderError as O, FetchOrderScoringError as P, FetchOrdersScoringError as Q, FetchPortfolioValueError as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, FetchPriceError as V, FetchPriceHistoryError as W, FetchPricesError as X, FetchPublicProfileError as Y, FetchRelatedTagResourcesError as Z, FetchRelatedTagsError as _, type TypedData as a, SetupGaslessWalletError as a$, FetchSeriesError as a0, FetchSpreadError as a1, FetchSpreadsError as a2, FetchTagError as a3, FetchTotalEarningsForUserForDayError as a4, FetchTradedMarketCountError as a5, InsufficientLiquidityError as a6, IsGaslessReadyError as a7, ListAccountTradesError as a8, ListActivityError as a9, PostOrderError as aA, PostOrdersError as aB, type PublicAccountActions as aC, type PublicActions as aD, type PublicClient as aE, type PublicClientOptions as aF, type PublicRewardsActions as aG, type PublicSubscriptionsActions as aH, RateLimitError as aI, RedeemPositionsError as aJ, RequestRejectedError as aK, type RequestRejectedErrorOptions as aL, SearchError as aM, type SecureAccountActions as aN, type SecureActions as aO, type SecureClient as aP, type SecureClientOptions as aQ, type SecureDownloadAccountingSnapshotRequest as aR, type SecureFetchPortfolioValueRequest as aS, type SecureFetchTradedMarketCountRequest as aT, type SecureListActivityRequest as aU, type SecureListClosedPositionsRequest as aV, type SecureListPositionsRequest as aW, type SecureRewardsActions as aX, type SecureSubscriptionsActions as aY, type SecureTradingActions as aZ, type SecureWalletActions as a_, ListBuilderLeaderboardError as aa, ListBuilderTradesError as ab, ListBuilderVolumeError as ac, ListClosedPositionsError 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, ListPositionsError as ao, ListSeriesError as ap, ListTagsError as aq, ListTeamsError as ar, ListTraderLeaderboardError as as, ListTradesError as at, ListUserEarningsAndMarketsConfigError as au, ListUserEarningsForDayError as av, MergePositionsError as aw, type Page as ax, PageSizeSchema as ay, type Paginated as az, type TransactionCall as b, type FetchLastTradePricesRequest as b$, SetupTradingApprovalsError as b0, type SignerTransactionRequest as b1, SigningError as b2, SplitPositionError as b3, TimeoutError as b4, TransactionFailedError as b5, type TransactionHandle as b6, type TransactionOutcome as b7, TransferErc20Error as b8, TransportError as b9, type DownloadAccountingSnapshotRequest as bA, type DropNotificationsRequest as bB, type EquityPricesEventType as bC, type EquityPricesSubscription as bD, type Erc1155ApprovalForAllWorkflow as bE, type Erc1155ApprovalForAllWorkflowRequest as bF, type Erc20ApprovalWorkflow as bG, type Erc20ApprovalWorkflowRequest as bH, type Erc20TransferWorkflow as bI, type Erc20TransferWorkflowRequest as bJ, type EstimateMarketBuyPriceRequest as bK, type EstimateMarketPriceRequest as bL, type EstimateMarketSellPriceRequest as bM, type EventForSubscriptionSpec as bN, type EventForSubscriptionSpecs as bO, FetchBalanceAllowanceError as bP, type FetchBalanceAllowanceRequest as bQ, FetchBuilderFeeRatesError as bR, type FetchBuilderFeeRatesRequest as bS, type FetchCommentsByIdRequest as bT, type FetchEventLiveVolumeRequest as bU, type FetchEventRequest as bV, type FetchEventTagsRequest as bW, FetchExecuteParamsError as bX, type FetchExecuteParamsRequest as bY, type FetchGaslessTransactionRequest as bZ, type FetchLastTradePriceRequest as b_, type TypedDataDomain as ba, type TypedDataField as bb, UnexpectedResponseError as bc, WaitForTransactionError as bd, type WalletDerivationConfig as be, accountActions as bf, allActions as bg, analyticsActions as bh, createPublicClient as bi, createSecureClient as bj, dataActions as bk, discoveryActions as bl, makeErrorGuard as bm, production as bn, rewardsActions as bo, subscriptionsActions as bp, tradingActions as bq, walletActions as br, type CancelMarketOrdersRequest as bs, type CancelOrderRequest as bt, type CancelOrdersRequest as bu, type CommentsEventType as bv, type CommentsSubscription as bw, type CryptoPricesEventType as bx, type CryptoPricesSubscription as by, DeployDepositWalletError as bz, type AccountIdentity as c, type OrderWorkflowRequest as c$, FetchMarketInfoError as c0, type FetchMarketInfoRequest as c1, type FetchMarketRequest as c2, type FetchMarketTagsRequest as c3, type FetchMidpointRequest as c4, type FetchMidpointsRequest as c5, FetchNegRiskError as c6, type FetchNegRiskRequest as c7, type FetchOrderBookRequest as c8, type FetchOrderBooksRequest as c9, type ListBuilderVolumeRequest as cA, type ListClosedPositionsRequest as cB, type ListCommentsByUserAddressRequest as cC, type ListCommentsRequest as cD, type ListCurrentRewardsRequest as cE, type ListEventsRequest as cF, type ListMarketHoldersRequest as cG, type ListMarketPositionsRequest as cH, type ListMarketRewardsRequest as cI, type ListMarketsRequest as cJ, type ListOpenInterestRequest as cK, type ListOpenOrdersRequest as cL, type ListPositionsRequest as cM, type ListSeriesRequest as cN, type ListTagsRequest as cO, type ListTeamsRequest as cP, type ListTraderLeaderboardRequest as cQ, type ListTradesRequest as cR, type ListUserEarningsAndMarketsConfigRequest as cS, type ListUserEarningsForDayRequest as cT, type MarketEventType as cU, type MarketSubscription as cV, type MergePositionsWorkflow as cW, type MergePositionsWorkflowRequest as cX, type OrderDraft as cY, type OrderPostingWorkflow as cZ, type OrderWorkflow as c_, type FetchOrderRequest as ca, type FetchOrderScoringRequest as cb, type FetchOrdersScoringRequest as cc, type FetchPortfolioValueRequest as cd, type FetchPriceHistoryRequest as ce, type FetchPriceRequest as cf, type FetchPricesRequest as cg, type FetchPublicProfileRequest as ch, type FetchRelatedTagResourcesRequest as ci, type FetchRelatedTagsRequest as cj, type FetchSeriesRequest as ck, type FetchSpreadRequest as cl, type FetchSpreadsRequest as cm, type FetchTagRequest as cn, FetchTickSizeError as co, type FetchTickSizeRequest as cp, type FetchTotalEarningsForUserForDayRequest as cq, type FetchTradedMarketCountRequest as cr, GaslessTransactionMetadataSchema as cs, type GaslessWorkflow as ct, type GaslessWorkflowRequest as cu, type IsGaslessReadyRequest as cv, type ListAccountTradesRequest as cw, type ListActivityRequest as cx, type ListBuilderLeaderboardRequest as cy, type ListBuilderTradesRequest as cz, type AnalyticsActions as d, fetchEventLiveVolume as d$, type PostOrdersRequest as d0, PrepareErc1155ApprovalForAllError as d1, type PrepareErc1155ApprovalForAllRequest as d2, PrepareErc20ApprovalError as d3, type PrepareErc20ApprovalRequest as d4, PrepareErc20TransferError as d5, type PrepareErc20TransferRequest as d6, PrepareGaslessTransactionError as d7, type PrepareGaslessTransactionRequest as d8, type PrepareLimitOrderRequest as d9, type SportsEventType as dA, type SportsSubscription as dB, type SubscribeError as dC, type SubscriptionHandle as dD, type TradingApprovalsWorkflow as dE, type TradingApprovalsWorkflowRequest as dF, UpdateBalanceAllowanceError as dG, type UpdateBalanceAllowanceRequest as dH, type UserEventType as dI, type UserSubscription as dJ, WaitForGaslessTransactionError as dK, approveErc1155ForAll as dL, approveErc20 as dM, cancelAll as dN, cancelMarketOrders as dO, cancelOrder as dP, cancelOrders as dQ, deployDepositWallet as dR, downloadAccountingSnapshot as dS, dropNotifications as dT, estimateMarketPrice as dU, fetchBalanceAllowance as dV, fetchBuilderFeeRates as dW, fetchBuilderVolume as dX, fetchClosedOnlyMode as dY, fetchCommentsById as dZ, fetchEvent as d_, type PrepareMarketBuyOrderRequest as da, type PrepareMarketOrderRequest as db, type PrepareMarketSellOrderRequest as dc, PrepareMergePositionsError as dd, type PrepareMergePositionsRequest as de, PrepareRedeemPositionsError as df, type PrepareRedeemPositionsRequest as dg, PrepareSplitPositionError as dh, type PrepareSplitPositionRequest as di, PrepareTradingApprovalsError as dj, type PublicRealtimeEvent as dk, type PublicRealtimeTopic as dl, type PublicSubscriptionSpec as dm, type RedeemPositionsWorkflow as dn, type RedeemPositionsWorkflowRequest as dp, ResolveConditionByTokenError as dq, type ResolveConditionByTokenRequest as dr, type SearchRequest as ds, type SearchResults as dt, type SecureRealtimeEvent as du, type SecureRealtimeTopic as dv, type SecureSubscriptionSpec as dw, type SignedOrder as dx, type SplitPositionWorkflow as dy, type SplitPositionWorkflowRequest as dz, ApproveErc1155ForAllError as e, prepareMergePositions as e$, fetchEventTags as e0, fetchExecuteParams as e1, fetchLastTradePrice as e2, fetchLastTradePrices as e3, fetchMarket as e4, fetchMarketInfo as e5, fetchMarketTags as e6, fetchMidpoint as e7, fetchMidpoints as e8, fetchNegRisk as e9, listBuilderTrades as eA, listClosedPositions as eB, listComments as eC, listCommentsByUserAddress as eD, listCurrentRewards as eE, listEvents as eF, listMarketHolders as eG, listMarketPositions as eH, listMarketRewards as eI, listMarkets as eJ, listOpenInterest as eK, listOpenOrders as eL, listPositions as eM, listSeries as eN, listTags as eO, listTeams as eP, listTraderLeaderboard as eQ, listTrades as eR, listUserEarningsAndMarketsConfig as eS, listUserEarningsForDay as eT, mergePositions as eU, postOrder as eV, postOrders as eW, prepareErc1155ApprovalForAll as eX, prepareErc20Approval as eY, prepareErc20Transfer as eZ, prepareGaslessTransaction as e_, fetchNotifications as ea, fetchOrder as eb, fetchOrderBook as ec, fetchOrderBooks as ed, fetchOrderScoring as ee, fetchOrdersScoring as ef, fetchPortfolioValue as eg, fetchPrice as eh, fetchPriceHistory as ei, fetchPrices as ej, fetchPublicProfile as ek, fetchRelatedTagResources as el, fetchRelatedTags as em, fetchRewardPercentages as en, fetchSeries as eo, fetchSpread as ep, fetchSpreads as eq, fetchTag as er, fetchTickSize as es, fetchTotalEarningsForUserForDay as et, fetchTradedMarketCount as eu, fetchTransaction as ev, isGaslessReady as ew, listAccountTrades as ex, listActivity as ey, listBuilderLeaderboard as ez, ApproveErc20Error as f, prepareRedeemPositions as f0, prepareSplitPosition as f1, prepareTradingApprovals as f2, redeemPositions as f3, resolveConditionByToken as f4, search as f5, setupTradingApprovals as f6, splitPosition as f7, subscribe as f8, transferErc20 as f9, updateBalanceAllowance as fa, BasePublicClient as g, BaseSecureClient as h, 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, CreateSecureClientError as q, type DiscoveryActions as r, DownloadAccountingSnapshotError as s, DropNotificationsError as t, EstimateMarketPriceError as u, FetchCommentsByIdError as v, FetchEventError as w, FetchEventLiveVolumeError as x, FetchEventTagsError as y, FetchLastTradePriceError as z };
|
|
7424
|
+
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, subscriptionsActions as b$, RfqConfirmationRejectedError as b0, type RfqConfirmationRequestEvent as b1, type RfqEndpoints as b2, type RfqEvent as b3, RfqQuoteError as b4, type RfqQuoteReference as b5, RfqQuoteRejectedError as b6, type RfqQuoteRejectedErrorOptions as b7, type RfqQuoteRequestEvent as b8, type RfqQuoteResponse as b9, SplitPositionError as bA, TimeoutError as bB, TransactionFailedError as bC, type TransactionHandle as bD, type TransactionOutcome as bE, TransferErc20Error as bF, TransportError as bG, type TypedDataDomain as bH, type TypedDataField as bI, UnexpectedResponseError as bJ, UpdatePerpsLeverageError as bK, WaitForTransactionError as bL, type WalletDerivationConfig as bM, type WebSocketEndpoint as bN, accountActions as bO, allActions as bP, analyticsActions as bQ, createPublicClient as bR, createSecureClient as bS, dataActions as bT, discoveryActions as bU, forkEnvironmentConfig as bV, makeErrorGuard as bW, perpsActions as bX, production as bY, rewardsActions as bZ, rfqActions as b_, type RfqQuoteSource as ba, type RfqSession as bb, type RfqTradeEvent as bc, SearchError as bd, SearchSort as be, type SecureAccountActions as bf, type SecureActions as bg, type SecureClient as bh, type SecureClientOptions as bi, type SecureDownloadAccountingSnapshotRequest as bj, type SecureFetchPortfolioValueRequest as bk, type SecureFetchTradedMarketCountRequest as bl, type SecureListActivityRequest as bm, type SecureListClosedPositionsRequest as bn, type SecureListComboPositionsRequest as bo, type SecureListPositionsRequest as bp, type SecurePerpsActions as bq, type SecureRewardsActions as br, type SecureRfqActions as bs, type SecureSubscriptionsActions as bt, type SecureTradingActions as bu, type SecureWalletActions as bv, SetupGaslessWalletError as bw, SetupTradingApprovalsError as bx, type SignerTransactionRequest as by, SigningError as bz, type AccountIdentity as c, type FetchPerpsOpenOrdersRequest as c$, tradingActions as c0, walletActions as c1, type CancelMarketOrdersRequest as c2, type CancelOrderRequest as c3, type CancelOrdersRequest as c4, type CancelPerpsOrderRequest as c5, type CancelPerpsOrdersRequest as c6, type CommentsEventType as c7, type CommentsSubscription as c8, type CreatePerpsSessionRequest as c9, type FetchEventLiveVolumeRequest as cA, type FetchEventRequest as cB, type FetchEventTagsRequest as cC, FetchExecuteParamsError as cD, type FetchExecuteParamsRequest as cE, type FetchGaslessTransactionRequest as cF, type FetchLastTradePriceRequest as cG, type FetchLastTradePricesRequest as cH, FetchMarketInfoError as cI, type FetchMarketInfoRequest as cJ, type FetchMarketRequest as cK, type FetchMarketTagsRequest as cL, type FetchMidpointRequest as cM, type FetchMidpointsRequest as cN, FetchNegRiskError as cO, type FetchNegRiskRequest as cP, type FetchOrderBookRequest as cQ, type FetchOrderBooksRequest as cR, type FetchOrderRequest as cS, type FetchOrderScoringRequest as cT, type FetchOrdersScoringRequest as cU, type FetchPerpsAccountConfigRequest as cV, FetchPerpsBookError as cW, type FetchPerpsBookRequest as cX, FetchPerpsFeesError as cY, FetchPerpsInstrumentsError as cZ, type FetchPerpsInstrumentsRequest as c_, type CryptoPricesEventType as ca, type CryptoPricesSubscription as cb, DeployDepositWalletError as cc, DepositToPerpsError as cd, type DepositToPerpsRequest as ce, type DeprecatedTransactionHandle as cf, type DownloadAccountingSnapshotRequest as cg, type DropNotificationsRequest as ch, type EquityPricesEventType as ci, type EquityPricesSubscription as cj, type Erc1155ApprovalForAllWorkflow as ck, type Erc1155ApprovalForAllWorkflowRequest as cl, type Erc20ApprovalWorkflow as cm, type Erc20ApprovalWorkflowRequest as cn, type Erc20TransferWorkflow as co, type Erc20TransferWorkflowRequest as cp, type EstimateMarketBuyPriceRequest as cq, type EstimateMarketPriceRequest as cr, type EstimateMarketSellPriceRequest as cs, type EventForSubscriptionSpec as ct, type EventForSubscriptionSpecs as cu, FetchBalanceAllowanceError as cv, type FetchBalanceAllowanceRequest as cw, FetchBuilderFeeRatesError as cx, type FetchBuilderFeeRatesRequest as cy, type FetchCommentsByIdRequest as cz, type AnalyticsActions as d, type ListUserEarningsForDayRequest as d$, type FetchPerpsOrdersRequest as d0, FetchPerpsTickerError as d1, type FetchPerpsTickerRequest as d2, FetchPerpsTickersError as d3, type FetchPerpsTickersRequest as d4, type FetchPortfolioValueRequest as d5, type FetchPriceHistoryRequest as d6, type FetchPriceRequest as d7, type FetchPricesRequest as d8, type FetchPublicProfileRequest as d9, type ListCurrentRewardsRequest as dA, type ListEventsRequest as dB, type ListMarketHoldersRequest as dC, type ListMarketPositionsRequest as dD, type ListMarketRewardsRequest as dE, type ListMarketsRequest as dF, type ListOpenInterestRequest as dG, type ListOpenOrdersRequest as dH, ListPerpsCandlesError as dI, type ListPerpsCandlesRequest as dJ, type ListPerpsDepositsRequest as dK, type ListPerpsEquityHistoryRequest as dL, type ListPerpsFillsRequest as dM, ListPerpsFundingHistoryError as dN, type ListPerpsFundingHistoryRequest as dO, type ListPerpsFundingPaymentsRequest as dP, type ListPerpsPnlHistoryRequest as dQ, ListPerpsTradesError as dR, type ListPerpsTradesRequest as dS, type ListPerpsWithdrawalsRequest as dT, type ListPositionsRequest as dU, type ListSeriesRequest as dV, type ListTagsRequest as dW, type ListTeamsRequest as dX, type ListTraderLeaderboardRequest as dY, type ListTradesRequest as dZ, type ListUserEarningsAndMarketsConfigRequest as d_, type FetchRelatedTagResourcesRequest as da, type FetchRelatedTagsRequest as db, type FetchSeriesRequest as dc, type FetchSpreadRequest as dd, type FetchSpreadsRequest as de, type FetchTagRequest as df, FetchTickSizeError as dg, type FetchTickSizeRequest as dh, type FetchTotalEarningsForUserForDayRequest as di, type FetchTradedMarketCountRequest as dj, GaslessTransactionMetadataSchema as dk, type GaslessWorkflow as dl, type GaslessWorkflowRequest as dm, IsWalletDeployedError as dn, type IsWalletDeployedRequest as dp, type ListAccountTradesRequest as dq, type ListActivityRequest as dr, type ListBuilderLeaderboardRequest as ds, type ListBuilderTradesRequest as dt, type ListBuilderVolumeRequest as du, type ListClosedPositionsRequest as dv, type ListComboMarketsRequest as dw, type ListComboPositionsRequest as dx, type ListCommentsByUserAddressRequest as dy, type ListCommentsRequest as dz, ApproveErc1155ForAllError as e, PrepareTradingApprovalsError as e$, type MarketEventType as e0, type MarketSubscription as e1, MergeComboPositionError as e2, MergeMarketPositionError as e3, type MergePositionsWorkflow as e4, type MergePositionsWorkflowRequest as e5, OpenPerpsSessionError as e6, type OpenPerpsSessionRequest as e7, type OrderDraft as e8, type OrderPostingWorkflow as e9, PrepareGaslessTransactionError as eA, type PrepareGaslessTransactionRequest as eB, type PrepareLimitOrderRequest as eC, type PrepareMarketBuyOrderRequest as eD, type PrepareMarketOrderRequest as eE, type PrepareMarketSellOrderRequest as eF, PrepareMergeComboPositionError as eG, type PrepareMergeComboPositionRequest as eH, PrepareMergeMarketPositionError as eI, type PrepareMergeMarketPositionRequest as eJ, PrepareMergePositionsError as eK, type PrepareMergePositionsRequest as eL, PreparePerpsDepositError as eM, PrepareRedeemComboPositionError as eN, type PrepareRedeemComboPositionRequest as eO, type PrepareRedeemMarketPositionsByConditionIdRequest as eP, type PrepareRedeemMarketPositionsByMarketIdRequest as eQ, PrepareRedeemMarketPositionsError as eR, type PrepareRedeemMarketPositionsRequest as eS, PrepareRedeemPositionsError as eT, type PrepareRedeemPositionsRequest as eU, PrepareSplitComboPositionError as eV, type PrepareSplitComboPositionRequest as eW, PrepareSplitMarketPositionError as eX, type PrepareSplitMarketPositionRequest as eY, PrepareSplitPositionError as eZ, type PrepareSplitPositionRequest as e_, type OrderWorkflow as ea, type OrderWorkflowRequest as eb, type PerpsBboSubscription as ec, type PerpsBookDepth as ed, type PerpsBookSubscription as ee, type PerpsCandlesSubscription as ef, type PerpsDepositWorkflow as eg, type PerpsDepositWorkflowRequest as eh, type PerpsMarketDataEventType as ei, type PerpsMarketDataSubscription as ej, type PerpsPlaceFokOrderRequest as ek, type PerpsPlaceGtcOrderRequest as el, type PerpsPlaceIocOrderRequest as em, type PerpsStatisticsSubscription as en, type PerpsStreamingCandleInterval as eo, type PerpsTickersSubscription as ep, type PerpsTradesSubscription as eq, type PlacePerpsOrderRequest as er, type PostOrdersRequest as es, type PostPerpsOrdersRequest as et, PrepareErc1155ApprovalForAllError as eu, type PrepareErc1155ApprovalForAllRequest as ev, PrepareErc20ApprovalError as ew, type PrepareErc20ApprovalRequest as ex, PrepareErc20TransferError as ey, type PrepareErc20TransferRequest as ez, ApproveErc20Error as f, fetchNegRisk as f$, type PublicRealtimeEvent as f0, type PublicRealtimeTopic as f1, type PublicSubscriptionSpec as f2, type RedeemPositionsWorkflow as f3, type RedeemPositionsWorkflowRequest as f4, ResolveConditionByTokenError as f5, type ResolveConditionByTokenRequest as f6, type ResumePerpsSessionRequest as f7, RevokePerpsCredentialsError as f8, type RevokePerpsCredentialsRequest as f9, approveErc1155ForAll as fA, approveErc20 as fB, cancelAll as fC, cancelMarketOrders as fD, cancelOrder as fE, cancelOrders as fF, deployDepositWallet as fG, depositToPerps as fH, downloadAccountingSnapshot as fI, dropNotifications as fJ, estimateMarketPrice as fK, fetchBalanceAllowance as fL, fetchBuilderFeeRates as fM, fetchBuilderVolume as fN, fetchClosedOnlyMode as fO, fetchCommentsById as fP, fetchEvent as fQ, fetchEventLiveVolume as fR, fetchEventTags as fS, fetchExecuteParams as fT, fetchLastTradePrice as fU, fetchLastTradePrices as fV, fetchMarket as fW, fetchMarketInfo as fX, fetchMarketTags as fY, fetchMidpoint as fZ, fetchMidpoints as f_, 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 UpdatePerpsLeverageRequest as fu, type UserEventType as fv, type UserSubscription as fw, WaitForGaslessTransactionError as fx, WithdrawFromPerpsError as fy, type WithdrawFromPerpsRequest as fz, BasePublicClient as g, prepareErc1155ApprovalForAll as g$, fetchNotifications as g0, fetchOrder as g1, fetchOrderBook as g2, fetchOrderBooks as g3, fetchOrderScoring as g4, fetchOrdersScoring as g5, fetchPerpsBook as g6, fetchPerpsFees as g7, fetchPerpsInstruments as g8, fetchPerpsTicker as g9, listCommentsByUserAddress as gA, listCurrentRewards as gB, listEvents as gC, listMarketHolders as gD, listMarketPositions as gE, listMarketRewards as gF, listMarkets as gG, listOpenInterest as gH, listOpenOrders as gI, listPerpsCandles as gJ, listPerpsFundingHistory as gK, listPerpsTrades as gL, listPositions as gM, listSeries as gN, listTags as gO, listTeams as gP, listTraderLeaderboard as gQ, listTrades as gR, listUserEarningsAndMarketsConfig as gS, listUserEarningsForDay as gT, mergeComboPosition as gU, mergeMarketPosition as gV, mergePositions as gW, openPerpsSession as gX, openRfqSession as gY, postOrder as gZ, postOrders as g_, fetchPerpsTickers as ga, fetchPortfolioValue as gb, fetchPrice as gc, fetchPriceHistory as gd, fetchPrices as ge, fetchPublicProfile as gf, fetchRelatedTagResources as gg, fetchRelatedTags as gh, fetchRewardPercentages as gi, fetchSeries as gj, fetchSpread as gk, fetchSpreads as gl, fetchTag as gm, fetchTickSize as gn, fetchTotalEarningsForUserForDay as go, fetchTradedMarketCount as gp, fetchTransaction as gq, isWalletDeployed as gr, listAccountTrades as gs, listActivity as gt, listBuilderLeaderboard as gu, listBuilderTrades as gv, listClosedPositions as gw, listComboMarkets as gx, listComboPositions as gy, listComments as gz, BaseSecureClient as h, prepareErc20Approval as h0, prepareErc20Transfer as h1, prepareGaslessTransaction as h2, prepareMergeComboPosition as h3, prepareMergeMarketPosition as h4, prepareMergePositions as h5, preparePerpsDeposit as h6, prepareRedeemComboPosition as h7, prepareRedeemMarketPositions as h8, prepareRedeemPositions as h9, prepareSplitComboPosition as ha, prepareSplitMarketPosition as hb, prepareSplitPosition as hc, prepareTradingApprovals as hd, redeemPositions as he, resolveConditionByToken as hf, revokePerpsCredentials as hg, search as hh, setupTradingApprovals as hi, splitComboPosition as hj, splitMarketPosition as hk, splitPosition as hl, subscribe as hm, transferErc20 as hn, updateBalanceAllowance as ho, withdrawFromPerps as hp, 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 };
|