@polymarket/client 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +4 -4
- package/dist/actions/index.js +1 -1
- package/dist/chunk-LGU5PMHE.js +3 -0
- package/dist/chunk-LGU5PMHE.js.map +1 -0
- package/dist/ethers-v5.d.ts +1 -1
- package/dist/index.d.ts +7 -10
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{sports-CzWL97Kk.d.ts → sports-D5M6XUZP.d.ts} +7 -7
- package/dist/{types-DEAKEE6E.d.ts → types-BqK8Y3G5.d.ts} +1053 -644
- package/dist/viem.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-HBNTVXSW.js +0 -3
- package/dist/chunk-HBNTVXSW.js.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as _polymarket_bindings from '@polymarket/bindings';
|
|
2
2
|
import { TransactionId, PaginationCursor, DecimalString, BuilderCode, OrderSide, PositionId, EpochMilliseconds, TxHash, OrderType, TokenId, EvmAddress as EvmAddress$1, ConditionId, TickSizeValue, SessionSignerScope } from '@polymarket/bindings';
|
|
3
|
+
import * as _polymarket_types from '@polymarket/types';
|
|
3
4
|
import { PolymarketError, HexString, EvmAddress, EvmSignature, NonEmptyArray, Prettify, Erc1271Signature, SessionSignerSignature, TxHash as TxHash$1 } from '@polymarket/types';
|
|
4
5
|
import { WalletType, Event, TagReference, Market, Series, MarketClarification, Tag, RelatedTag, SportsMetadata, SportsMarketTypesResponse, Team, PublicProfile, Comment, MarketClarificationState, Profile, SearchTag } from '@polymarket/bindings/gamma';
|
|
5
6
|
import { RelayerTransactionType, RelayerExecuteParams, GaslessTransaction } from '@polymarket/bindings/relayer';
|
|
6
7
|
import { ZodError, z } from 'zod';
|
|
7
|
-
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForAsset,
|
|
8
|
+
import { ClobTrade, NotificationsResponse, BuilderTrade, Midpoints, Prices, OrderBook, Spreads, LastTradePrice, LastTradePriceForAsset, CurrentReward, MarketReward, OrdersScoringResponse, UserEarning, TotalUserEarning, UserRewardsEarning, RewardsPercentages, CancelOrdersResponse, SignatureType, OrderResponse, OrderResponses, AcceptedOrderResponse, OpenOrder, ApiKeyCreds, AssetType, BalanceAllowanceResponse, BuilderFeeRates, MarketInfo } from '@polymarket/bindings/clob';
|
|
8
9
|
import * as _polymarket_bindings_data from '@polymarket/bindings/data';
|
|
9
|
-
import { Activity, ComboActivity, Trade, ComboPositionStatus,
|
|
10
|
+
import { Activity, ComboActivity, Trade, ComboPositionStatus, PortfolioValue, UserPnlSeries, UserStats, UserVolume, ComboPosition, Position, TraderLeaderboardStanding, BuilderStanding, BuilderVolumePoint, TraderLeaderboardEntry, BiggestWinner, LiveVolume, Resolution, PriceHistoryPoint, OpenInterest, MetaHolder, PriceHistoryInterval } from '@polymarket/bindings/data';
|
|
10
11
|
import * as _polymarket_bindings_combos from '@polymarket/bindings/combos';
|
|
11
12
|
import { ComboMarket, RfqRejectionCode, RfqQuoteId, RfqId, ComboAcceptFailureReason, BuilderRfqError, RfqQuoteRequest, RfqRequestedSize, RfqSide, RfqQuoteAck, RfqConfirmationRequest, RfqConfirmationAck as RfqConfirmationAck$1, RfqExecutionUpdate, RfqTrade, RfqQuoteCancelAck, ComboQuoteUnavailableReason, RfqStatus, RfqErrorCode, BuilderRfqStatusResponse, CollateralReturnPlanResponse } from '@polymarket/bindings/combos';
|
|
12
13
|
import { PerpsInstrument, PerpsTicker, PerpsBook, PerpsCandle, PerpsFundingRate, PerpsPublicTrade, PerpsFeeScheduleEntry, PerpsWithdrawalId, PerpsSortDirection, PerpsDepositStatus, PerpsWithdrawalStatus, PerpsPnlInterval, PerpsDecimalInput, PerpsTimeInForce, PerpsOrder, PerpsOrderId, PerpsCredentials, PerpsBalance, PerpsPortfolio, PerpsAccountStats, PerpsAccountConfig, PerpsAutoCancelStatus, PerpsAccountFill, PerpsAccountFundingPayment, PerpsDeposit, PerpsWithdrawal, PerpsEquityPoint, PerpsPnlPoint, PerpsNotificationEntry, PerpsPostOrderAck, PerpsCancelOrderResult, PerpsUpdateLeverageResult, PerpsInstrumentCategory, PerpsKlineInterval } from '@polymarket/bindings/perps';
|
|
@@ -452,21 +453,23 @@ type Paginated<T> = AsyncIterable<Page<T>> & {
|
|
|
452
453
|
declare const ListTradesRequestSchema: z.ZodObject<{
|
|
453
454
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
454
455
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
456
|
+
user: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>>;
|
|
455
457
|
takerOnly: z.ZodOptional<z.ZodBoolean>;
|
|
456
|
-
filterType: z.ZodOptional<z.ZodEnum<
|
|
457
|
-
CASH: "CASH";
|
|
458
|
-
TOKENS: "TOKENS";
|
|
459
|
-
}>>;
|
|
458
|
+
filterType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.TradeFilterType>>;
|
|
460
459
|
filterAmount: z.ZodOptional<z.ZodNumber>;
|
|
461
|
-
|
|
462
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
460
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>]>>;
|
|
461
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>>;
|
|
462
|
+
side: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings.OrderSide>>;
|
|
463
|
+
window: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodObject<{
|
|
464
|
+
start: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
465
|
+
end: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
466
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
467
|
+
start?: number | undefined;
|
|
468
|
+
end?: number | undefined;
|
|
469
|
+
}, "full" | {
|
|
470
|
+
start?: number | undefined;
|
|
471
|
+
end?: number | undefined;
|
|
472
|
+
}>>>;
|
|
470
473
|
}, z.core.$strip>;
|
|
471
474
|
type ListTradesRequest = z.input<typeof ListTradesRequestSchema>;
|
|
472
475
|
type ListTradesError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -474,7 +477,16 @@ declare const ListTradesError: {
|
|
|
474
477
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
475
478
|
};
|
|
476
479
|
/**
|
|
477
|
-
* Lists trades for a wallet, market, or event
|
|
480
|
+
* Lists trades for a wallet, market, or event — or the global recent-trades
|
|
481
|
+
* feed when no filter is given.
|
|
482
|
+
*
|
|
483
|
+
* Only the taker side of each match is returned by default
|
|
484
|
+
* (`takerOnly: false` includes maker rows), and a dust filter of 0.01 shares
|
|
485
|
+
* applies unless `filterType`/`filterAmount` say otherwise — either may be
|
|
486
|
+
* sent alone. `conditionId` accepts at most 20 distinct ids. `pageSize`
|
|
487
|
+
* defaults to 100 (max 1000). `window: 'full'` requests the complete
|
|
488
|
+
* history; an omitted window serves the recent feed. Transient rate limits
|
|
489
|
+
* are retried automatically.
|
|
478
490
|
*
|
|
479
491
|
* @remarks
|
|
480
492
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -503,7 +515,7 @@ declare const ListTradesError: {
|
|
|
503
515
|
* ```ts
|
|
504
516
|
* const result = listTrades(client, {
|
|
505
517
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
506
|
-
*
|
|
518
|
+
* window: 'full',
|
|
507
519
|
* });
|
|
508
520
|
*
|
|
509
521
|
* for await (const page of result) {
|
|
@@ -515,25 +527,22 @@ declare function listTrades(client: BaseClient, request?: ListTradesRequest): Pa
|
|
|
515
527
|
declare const ListActivityRequestSchema: z.ZodObject<{
|
|
516
528
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
517
529
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
518
|
-
user: z.ZodString
|
|
519
|
-
|
|
520
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber
|
|
530
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
531
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>]>>;
|
|
532
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>>;
|
|
521
533
|
type: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof _polymarket_bindings_data.ActivityType>>>;
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
BUY: "BUY";
|
|
535
|
-
SELL: "SELL";
|
|
536
|
-
}>>;
|
|
534
|
+
side: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings.OrderSide>>;
|
|
535
|
+
sortDirection: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.SortDirection>>;
|
|
536
|
+
window: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodObject<{
|
|
537
|
+
start: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
538
|
+
end: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
539
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
540
|
+
start?: number | undefined;
|
|
541
|
+
end?: number | undefined;
|
|
542
|
+
}, "full" | {
|
|
543
|
+
start?: number | undefined;
|
|
544
|
+
end?: number | undefined;
|
|
545
|
+
}>>>;
|
|
537
546
|
}, z.core.$strip>;
|
|
538
547
|
type ListActivityRequest = z.input<typeof ListActivityRequestSchema>;
|
|
539
548
|
type ListActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -541,9 +550,14 @@ declare const ListActivityError: {
|
|
|
541
550
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
542
551
|
};
|
|
543
552
|
/**
|
|
544
|
-
* Lists wallet activity.
|
|
553
|
+
* Lists wallet activity, newest-first by default.
|
|
545
554
|
*
|
|
546
|
-
*
|
|
555
|
+
* Every activity type the service serves is included by default — deposits
|
|
556
|
+
* and withdrawals are not filtered out; use the `type` filter to narrow
|
|
557
|
+
* results. `window: 'full'`
|
|
558
|
+
* requests the complete history (an omitted window serves the service's
|
|
559
|
+
* default range — the most recent three years). `pageSize` defaults to 100
|
|
560
|
+
* (max 1000). Transient rate limits are retried automatically.
|
|
547
561
|
*
|
|
548
562
|
* @remarks
|
|
549
563
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -568,11 +582,11 @@ declare const ListActivityError: {
|
|
|
568
582
|
* ```
|
|
569
583
|
*
|
|
570
584
|
* @example
|
|
571
|
-
* Loop through
|
|
585
|
+
* Loop through the complete history with `for await`:
|
|
572
586
|
* ```ts
|
|
573
587
|
* const result = listActivity(client, {
|
|
574
588
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
575
|
-
*
|
|
589
|
+
* window: 'full',
|
|
576
590
|
* });
|
|
577
591
|
*
|
|
578
592
|
* for await (const page of result) {
|
|
@@ -584,8 +598,8 @@ declare function listActivity(client: BaseClient, request: ListActivityRequest):
|
|
|
584
598
|
declare const ListComboActivityRequestSchema: z.ZodObject<{
|
|
585
599
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
586
600
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
587
|
-
user: z.ZodString
|
|
588
|
-
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodArray<z.
|
|
601
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
602
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ComboConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ComboConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ComboConditionId[], _polymarket_bindings.ComboConditionId[]>>]>>;
|
|
589
603
|
}, z.core.$strip>;
|
|
590
604
|
type ListComboActivityRequest = z.input<typeof ListComboActivityRequestSchema>;
|
|
591
605
|
type ListComboActivityError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -593,7 +607,12 @@ declare const ListComboActivityError: {
|
|
|
593
607
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
594
608
|
};
|
|
595
609
|
/**
|
|
596
|
-
* Lists
|
|
610
|
+
* Lists Combo lifecycle activity for a wallet, ordered by on-chain position.
|
|
611
|
+
*
|
|
612
|
+
* Every row carries the Combo position id and its legs enriched with market
|
|
613
|
+
* metadata; redeem rows additionally carry payout semantics. `pageSize`
|
|
614
|
+
* defaults to 100 (max 1000). Transient rate limits are retried
|
|
615
|
+
* automatically.
|
|
597
616
|
*
|
|
598
617
|
* @remarks
|
|
599
618
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -619,38 +638,28 @@ declare const ListComboActivityError: {
|
|
|
619
638
|
*/
|
|
620
639
|
declare function listComboActivity(client: BaseClient, request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
621
640
|
|
|
622
|
-
declare enum ComboPositionSort {
|
|
623
|
-
CurrentValueDesc = "current_value_desc",
|
|
624
|
-
FirstEntryDesc = "first_entry_desc",
|
|
625
|
-
EntryCostDesc = "entry_cost_desc",
|
|
626
|
-
ResolvedAtDesc = "resolved_at_desc",
|
|
627
|
-
UpdatedAsc = "updated_asc"
|
|
628
|
-
}
|
|
629
641
|
declare const ListPositionsRequestSchema: z.ZodObject<{
|
|
630
642
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
631
|
-
user: z.ZodString;
|
|
632
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
633
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
634
|
-
sizeThreshold: z.ZodOptional<z.ZodNumber>;
|
|
635
|
-
redeemable: z.ZodOptional<z.ZodBoolean>;
|
|
636
|
-
mergeable: z.ZodOptional<z.ZodBoolean>;
|
|
637
643
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
644
|
+
user: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>>;
|
|
645
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>, z.ZodTransform<_polymarket_bindings.ConditionId, _polymarket_bindings.ConditionId>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>]>>;
|
|
646
|
+
status: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.PositionStatus>>;
|
|
647
|
+
eventId: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>>;
|
|
648
|
+
filterType: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.PositionFilterType>>;
|
|
649
|
+
filterAmount: z.ZodOptional<z.ZodNumber>;
|
|
650
|
+
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
651
|
+
sortBy: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.PositionSortBy>>;
|
|
652
|
+
sortDirection: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.SortDirection>>;
|
|
653
|
+
window: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodObject<{
|
|
654
|
+
start: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
655
|
+
end: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
656
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
657
|
+
start?: number | undefined;
|
|
658
|
+
end?: number | undefined;
|
|
659
|
+
}, "full" | {
|
|
660
|
+
start?: number | undefined;
|
|
661
|
+
end?: number | undefined;
|
|
662
|
+
}>>>;
|
|
654
663
|
}, z.core.$strip>;
|
|
655
664
|
type ListPositionsRequest = z.input<typeof ListPositionsRequestSchema>;
|
|
656
665
|
type ListPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -658,7 +667,17 @@ declare const ListPositionsError: {
|
|
|
658
667
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
659
668
|
};
|
|
660
669
|
/**
|
|
661
|
-
* Lists
|
|
670
|
+
* Lists positions for a wallet, or a market's holders when anchored on a
|
|
671
|
+
* single `conditionId` without a `user`.
|
|
672
|
+
*
|
|
673
|
+
* One method serves the whole lifecycle: `status: 'OPEN'` (the default) is
|
|
674
|
+
* the superset including settled-but-unredeemed winners, `'REDEEMABLE'`
|
|
675
|
+
* narrows to exactly those, and `'CLOSED'` lists exited positions. Every row
|
|
676
|
+
* carries `redeemable`/`mergeable` flags and fee-exclusive entry economics. A
|
|
677
|
+
* dust floor of 0.1 shares applies on OPEN/REDEEMABLE unless
|
|
678
|
+
* `filterType`/`filterAmount` say otherwise. `conditionId` accepts at most
|
|
679
|
+
* 20 distinct ids (with `user`). `pageSize` defaults to 100 (max 1000).
|
|
680
|
+
* Transient rate limits are retried automatically.
|
|
662
681
|
*
|
|
663
682
|
* @remarks
|
|
664
683
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -683,11 +702,11 @@ declare const ListPositionsError: {
|
|
|
683
702
|
* ```
|
|
684
703
|
*
|
|
685
704
|
* @example
|
|
686
|
-
* Loop through
|
|
705
|
+
* Loop through a wallet's exited positions with `for await`:
|
|
687
706
|
* ```ts
|
|
688
707
|
* const result = listPositions(client, {
|
|
689
708
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
690
|
-
*
|
|
709
|
+
* status: PositionStatus.Closed,
|
|
691
710
|
* });
|
|
692
711
|
*
|
|
693
712
|
* for await (const page of result) {
|
|
@@ -696,83 +715,24 @@ declare const ListPositionsError: {
|
|
|
696
715
|
* ```
|
|
697
716
|
*/
|
|
698
717
|
declare function listPositions(client: BaseClient, request: ListPositionsRequest): Paginated<Position[]>;
|
|
699
|
-
declare const ListClosedPositionsRequestSchema: z.ZodObject<{
|
|
700
|
-
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
701
|
-
user: z.ZodString;
|
|
702
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
703
|
-
title: z.ZodOptional<z.ZodString>;
|
|
704
|
-
eventId: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
705
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
706
|
-
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
707
|
-
TIMESTAMP: "TIMESTAMP";
|
|
708
|
-
TITLE: "TITLE";
|
|
709
|
-
PRICE: "PRICE";
|
|
710
|
-
AVGPRICE: "AVGPRICE";
|
|
711
|
-
REALIZEDPNL: "REALIZEDPNL";
|
|
712
|
-
}>>;
|
|
713
|
-
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
714
|
-
ASC: "ASC";
|
|
715
|
-
DESC: "DESC";
|
|
716
|
-
}>>;
|
|
717
|
-
}, z.core.$strip>;
|
|
718
|
-
type ListClosedPositionsRequest = z.input<typeof ListClosedPositionsRequestSchema>;
|
|
719
|
-
type ListClosedPositionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
720
|
-
declare const ListClosedPositionsError: {
|
|
721
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
722
|
-
};
|
|
723
718
|
/**
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
* @throws {@link ListClosedPositionsError}
|
|
730
|
-
* Thrown on failure.
|
|
731
|
-
*
|
|
732
|
-
* @example
|
|
733
|
-
* Fetch the first page of results:
|
|
734
|
-
* ```ts
|
|
735
|
-
* const result = listClosedPositions(client, {
|
|
736
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
737
|
-
* pageSize: 10,
|
|
738
|
-
* });
|
|
739
|
-
*
|
|
740
|
-
* const firstPage = await result.firstPage();
|
|
741
|
-
*
|
|
742
|
-
* // Optionally, fetch additional pages:
|
|
743
|
-
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
744
|
-
* // page.items: ClosedPosition[]
|
|
745
|
-
* }
|
|
746
|
-
* ```
|
|
747
|
-
*
|
|
748
|
-
* @example
|
|
749
|
-
* Loop through all pages with `for await`:
|
|
750
|
-
* ```ts
|
|
751
|
-
* const result = listClosedPositions(client, {
|
|
752
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
753
|
-
* pageSize: 10,
|
|
754
|
-
* });
|
|
755
|
-
*
|
|
756
|
-
* for await (const page of result) {
|
|
757
|
-
* // page.items: ClosedPosition[]
|
|
758
|
-
* }
|
|
759
|
-
* ```
|
|
760
|
-
*/
|
|
761
|
-
declare function listClosedPositions(client: BaseClient, request: ListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
762
|
-
/**
|
|
763
|
-
* One status or a non-empty ordered list of statuses for filtering combo positions.
|
|
764
|
-
* Pass multiple statuses as an array rather than a comma-separated string.
|
|
719
|
+
* One status or a non-empty ordered list of statuses. Pass multiple statuses
|
|
720
|
+
* as an array rather than a comma-separated string.
|
|
721
|
+
* `ComboPositionStatus.Redeemable` must be the sole value (scalar or a
|
|
722
|
+
* one-element array — both serialize identically) — it narrows to rows whose
|
|
723
|
+
* `redeemable` flag is set and cannot ride a multi-status list.
|
|
765
724
|
*/
|
|
766
725
|
type ComboPositionStatusFilter = ComboPositionStatus | readonly [ComboPositionStatus, ...ComboPositionStatus[]];
|
|
767
726
|
declare const ListComboPositionsRequestSchema: z.ZodObject<{
|
|
768
727
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
769
|
-
user: z.ZodString;
|
|
770
728
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
729
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
730
|
+
conditionId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ComboConditionId, string>>, z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ComboConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ComboConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ComboConditionId[], _polymarket_bindings.ComboConditionId[]>>]>>;
|
|
771
731
|
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof ComboPositionStatus>, z.ZodTuple<[z.ZodEnum<typeof ComboPositionStatus>], z.ZodEnum<typeof ComboPositionStatus>>]>>;
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
updatedAfter: z.ZodOptional<z.ZodNumber
|
|
775
|
-
updatedBefore: z.ZodOptional<z.ZodNumber
|
|
732
|
+
sortBy: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.ComboPositionSortBy>>;
|
|
733
|
+
sortDirection: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.SortDirection>>;
|
|
734
|
+
updatedAfter: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
735
|
+
updatedBefore: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
776
736
|
}, z.core.$strip>;
|
|
777
737
|
type ListComboPositionsRequest = Omit<z.input<typeof ListComboPositionsRequestSchema>, 'status'> & {
|
|
778
738
|
status?: ComboPositionStatusFilter;
|
|
@@ -782,7 +742,14 @@ declare const ListComboPositionsError: {
|
|
|
782
742
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
783
743
|
};
|
|
784
744
|
/**
|
|
785
|
-
* Lists
|
|
745
|
+
* Lists Combo positions for a wallet.
|
|
746
|
+
*
|
|
747
|
+
* `status: 'OPEN'` is the superset including custody-held redeemable
|
|
748
|
+
* positions; `'REDEEMABLE'` (sole value) narrows to exactly the rows whose
|
|
749
|
+
* `redeemable` flag is set. Every row carries its legs enriched with market
|
|
750
|
+
* metadata and exact entry economics. `updatedAfter`/`updatedBefore` bound
|
|
751
|
+
* the rows' change watermark for incremental sync. `pageSize` defaults to
|
|
752
|
+
* 100 (max 1000). Transient rate limits are retried automatically.
|
|
786
753
|
*
|
|
787
754
|
* @remarks
|
|
788
755
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -807,15 +774,6 @@ declare const ListComboPositionsError: {
|
|
|
807
774
|
* ```
|
|
808
775
|
*
|
|
809
776
|
* @example
|
|
810
|
-
* Filter to open combo positions:
|
|
811
|
-
* ```ts
|
|
812
|
-
* const result = listComboPositions(client, {
|
|
813
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
814
|
-
* status: ComboPositionStatus.Open,
|
|
815
|
-
* });
|
|
816
|
-
* ```
|
|
817
|
-
*
|
|
818
|
-
* @example
|
|
819
777
|
* Filter to any of several resolved statuses. Pass multiple statuses as an
|
|
820
778
|
* array rather than a comma-separated string:
|
|
821
779
|
* ```ts
|
|
@@ -830,20 +788,29 @@ declare const ListComboPositionsError: {
|
|
|
830
788
|
* ```
|
|
831
789
|
*
|
|
832
790
|
* @example
|
|
833
|
-
*
|
|
791
|
+
* List redeemable Combo positions, largest claims first:
|
|
792
|
+
* ```ts
|
|
793
|
+
* const result = listComboPositions(client, {
|
|
794
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
795
|
+
* status: 'REDEEMABLE',
|
|
796
|
+
* });
|
|
797
|
+
* ```
|
|
798
|
+
*
|
|
799
|
+
* @example
|
|
800
|
+
* Incrementally sync changed Combo positions:
|
|
834
801
|
* ```ts
|
|
835
802
|
* const result = listComboPositions(client, {
|
|
836
803
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
837
804
|
* updatedAfter: 1_797_360_000,
|
|
838
|
-
*
|
|
839
|
-
*
|
|
805
|
+
* sortBy: 'UPDATED',
|
|
806
|
+
* sortDirection: 'ASC',
|
|
840
807
|
* });
|
|
841
808
|
* ```
|
|
842
809
|
*/
|
|
843
810
|
declare function listComboPositions(client: BaseClient, request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
844
811
|
declare const FetchPortfolioValueRequestSchema: z.ZodObject<{
|
|
845
|
-
user: z.ZodString
|
|
846
|
-
|
|
812
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
813
|
+
conditionIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>>;
|
|
847
814
|
}, z.core.$strip>;
|
|
848
815
|
type FetchPortfolioValueRequest = z.input<typeof FetchPortfolioValueRequestSchema>;
|
|
849
816
|
type FetchPortfolioValueError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
@@ -853,6 +820,10 @@ declare const FetchPortfolioValueError: {
|
|
|
853
820
|
/**
|
|
854
821
|
* Fetches the total value for a wallet's positions.
|
|
855
822
|
*
|
|
823
|
+
* When `conditionIds` is present, only those single-market positions are
|
|
824
|
+
* included; portfolio-level combo positions are excluded. Accepts at most 20
|
|
825
|
+
* distinct condition IDs.
|
|
826
|
+
*
|
|
856
827
|
* @remarks
|
|
857
828
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
858
829
|
*
|
|
@@ -863,39 +834,117 @@ declare const FetchPortfolioValueError: {
|
|
|
863
834
|
* ```ts
|
|
864
835
|
* const value = await fetchPortfolioValue(client, {
|
|
865
836
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
837
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
866
838
|
* });
|
|
867
839
|
*
|
|
868
|
-
* // value:
|
|
840
|
+
* // value: PortfolioValue
|
|
869
841
|
* ```
|
|
870
842
|
*/
|
|
871
|
-
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<
|
|
872
|
-
declare const
|
|
873
|
-
user: z.ZodString
|
|
843
|
+
declare function fetchPortfolioValue(client: BaseClient, request: FetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
844
|
+
declare const FetchUserStatsRequestSchema: z.ZodObject<{
|
|
845
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
874
846
|
}, z.core.$strip>;
|
|
875
|
-
type
|
|
876
|
-
type
|
|
877
|
-
declare const
|
|
847
|
+
type FetchUserStatsRequest = z.input<typeof FetchUserStatsRequestSchema>;
|
|
848
|
+
type FetchUserStatsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
849
|
+
declare const FetchUserStatsError: {
|
|
878
850
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
879
851
|
};
|
|
880
852
|
/**
|
|
881
|
-
* Fetches
|
|
853
|
+
* Fetches profile and lifetime trading statistics for a wallet.
|
|
854
|
+
*
|
|
855
|
+
* `tradedMarketCount` is the exact number of distinct markets traded.
|
|
856
|
+
* `biggestWin` is the largest resolved position win, and `allTimePnl` is the
|
|
857
|
+
* latest published cumulative PnL observation. Returns `null` when the wallet
|
|
858
|
+
* is not a known user.
|
|
882
859
|
*
|
|
883
860
|
* @remarks
|
|
884
861
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
885
862
|
*
|
|
886
|
-
* @throws {@link
|
|
863
|
+
* @throws {@link FetchUserStatsError}
|
|
887
864
|
* Thrown on failure.
|
|
888
865
|
*
|
|
889
866
|
* @example
|
|
890
867
|
* ```ts
|
|
891
|
-
* const
|
|
868
|
+
* const stats = await fetchUserStats(client, {
|
|
892
869
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
893
870
|
* });
|
|
894
871
|
*
|
|
895
|
-
* //
|
|
872
|
+
* // stats: UserStats | null
|
|
896
873
|
* ```
|
|
897
874
|
*/
|
|
898
|
-
declare function
|
|
875
|
+
declare function fetchUserStats(client: BaseClient, request: FetchUserStatsRequest): Promise<UserStats | null>;
|
|
876
|
+
declare const FetchUserPnlRequestSchema: z.ZodObject<{
|
|
877
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
878
|
+
interval: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.UserPnlInterval>>;
|
|
879
|
+
fidelity: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.UserPnlFidelity>>;
|
|
880
|
+
}, z.core.$strip>;
|
|
881
|
+
type FetchUserPnlRequest = z.input<typeof FetchUserPnlRequestSchema>;
|
|
882
|
+
type FetchUserPnlError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
883
|
+
declare const FetchUserPnlError: {
|
|
884
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* Fetches a wallet's cumulative PnL series.
|
|
888
|
+
*
|
|
889
|
+
* `interval` defaults to one day and `fidelity` defaults to one hour. Each
|
|
890
|
+
* point is cumulative through its timestamp; nullable amounts mean the source
|
|
891
|
+
* was unavailable and are never coerced to zero.
|
|
892
|
+
*
|
|
893
|
+
* @remarks
|
|
894
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
895
|
+
*
|
|
896
|
+
* @throws {@link FetchUserPnlError}
|
|
897
|
+
* Thrown on failure.
|
|
898
|
+
*
|
|
899
|
+
* @example
|
|
900
|
+
* ```ts
|
|
901
|
+
* const pnl = await fetchUserPnl(client, {
|
|
902
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
903
|
+
* interval: UserPnlInterval.OneWeek,
|
|
904
|
+
* fidelity: UserPnlFidelity.ThreeHours,
|
|
905
|
+
* });
|
|
906
|
+
* ```
|
|
907
|
+
*/
|
|
908
|
+
declare function fetchUserPnl(client: BaseClient, request: FetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
909
|
+
declare const FetchUserVolumeRequestSchema: z.ZodObject<{
|
|
910
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
911
|
+
window: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"full">, z.ZodObject<{
|
|
912
|
+
start: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
913
|
+
end: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodDate]>, z.ZodTransform<number, number | Date>>>;
|
|
914
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
915
|
+
start?: number | undefined;
|
|
916
|
+
end?: number | undefined;
|
|
917
|
+
}, "full" | {
|
|
918
|
+
start?: number | undefined;
|
|
919
|
+
end?: number | undefined;
|
|
920
|
+
}>>>;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
type FetchUserVolumeRequest = z.input<typeof FetchUserVolumeRequestSchema>;
|
|
923
|
+
type FetchUserVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
924
|
+
declare const FetchUserVolumeError: {
|
|
925
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Fetches a wallet's trading volume for a time window.
|
|
929
|
+
*
|
|
930
|
+
* Volume is returned in shares and USD. Window bounds accept epoch seconds or
|
|
931
|
+
* `Date` values and are widened to whole UTC days.
|
|
932
|
+
*
|
|
933
|
+
* @remarks
|
|
934
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
935
|
+
*
|
|
936
|
+
* @throws {@link FetchUserVolumeError}
|
|
937
|
+
* Thrown on failure.
|
|
938
|
+
*
|
|
939
|
+
* @example
|
|
940
|
+
* ```ts
|
|
941
|
+
* const volume = await fetchUserVolume(client, {
|
|
942
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
943
|
+
* window: { start: new Date('2026-08-01T00:00:00Z') },
|
|
944
|
+
* });
|
|
945
|
+
* ```
|
|
946
|
+
*/
|
|
947
|
+
declare function fetchUserVolume(client: BaseClient, request: FetchUserVolumeRequest): Promise<UserVolume>;
|
|
899
948
|
declare const DownloadAccountingSnapshotRequestSchema: z.ZodObject<{
|
|
900
949
|
user: z.ZodString;
|
|
901
950
|
}, z.core.$strip>;
|
|
@@ -925,35 +974,37 @@ declare const DownloadAccountingSnapshotError: {
|
|
|
925
974
|
declare function downloadAccountingSnapshot(client: BaseClient, request: DownloadAccountingSnapshotRequest): Promise<Blob>;
|
|
926
975
|
|
|
927
976
|
type DefaultAccountWallet<TRequest extends {
|
|
928
|
-
user
|
|
977
|
+
user?: string;
|
|
929
978
|
}> = Prettify<Omit<TRequest, 'user'> & {
|
|
930
979
|
/**
|
|
931
980
|
* Wallet address to use.
|
|
932
981
|
*
|
|
933
982
|
* @defaultValue `client.account.wallet`
|
|
934
983
|
*/
|
|
935
|
-
user?:
|
|
984
|
+
user?: string;
|
|
936
985
|
}>;
|
|
937
986
|
type SecureListPositionsRequest = DefaultAccountWallet<ListPositionsRequest>;
|
|
938
|
-
type SecureListClosedPositionsRequest = DefaultAccountWallet<ListClosedPositionsRequest>;
|
|
939
987
|
type SecureListComboPositionsRequest = DefaultAccountWallet<ListComboPositionsRequest>;
|
|
940
988
|
type SecureFetchPortfolioValueRequest = DefaultAccountWallet<FetchPortfolioValueRequest>;
|
|
941
|
-
type
|
|
989
|
+
type SecureFetchTraderLeaderboardStandingRequest = DefaultAccountWallet<FetchTraderLeaderboardStandingRequest>;
|
|
990
|
+
type SecureFetchUserPnlRequest = DefaultAccountWallet<FetchUserPnlRequest>;
|
|
991
|
+
type SecureFetchUserStatsRequest = DefaultAccountWallet<FetchUserStatsRequest>;
|
|
992
|
+
type SecureFetchUserVolumeRequest = DefaultAccountWallet<FetchUserVolumeRequest>;
|
|
942
993
|
type SecureDownloadAccountingSnapshotRequest = DefaultAccountWallet<DownloadAccountingSnapshotRequest>;
|
|
943
994
|
type SecureListActivityRequest = DefaultAccountWallet<ListActivityRequest>;
|
|
944
995
|
type SecureListComboActivityRequest = DefaultAccountWallet<ListComboActivityRequest>;
|
|
945
|
-
type
|
|
996
|
+
type PublicAccountActions = Prettify<{
|
|
946
997
|
/**
|
|
947
|
-
* Lists positions for a
|
|
998
|
+
* Lists current positions for a wallet.
|
|
948
999
|
*
|
|
949
|
-
* @throws {@link
|
|
1000
|
+
* @throws {@link ListPositionsError}
|
|
950
1001
|
* Thrown on failure.
|
|
951
1002
|
*
|
|
952
1003
|
* @example
|
|
953
1004
|
* Fetch the first page of results:
|
|
954
1005
|
* ```ts
|
|
955
|
-
* const paginator = client.
|
|
956
|
-
*
|
|
1006
|
+
* const paginator = client.listPositions({
|
|
1007
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
957
1008
|
* pageSize: 10,
|
|
958
1009
|
* });
|
|
959
1010
|
*
|
|
@@ -961,157 +1012,148 @@ type CommonAccountActions = {
|
|
|
961
1012
|
*
|
|
962
1013
|
* // Optionally, fetch additional pages:
|
|
963
1014
|
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
964
|
-
* // page.items:
|
|
1015
|
+
* // page.items: Position[]
|
|
965
1016
|
* }
|
|
966
1017
|
* ```
|
|
967
1018
|
*
|
|
968
1019
|
* @example
|
|
969
1020
|
* Loop through all pages with `for await`:
|
|
970
1021
|
* ```ts
|
|
971
|
-
* const paginator = client.
|
|
972
|
-
*
|
|
1022
|
+
* const paginator = client.listPositions({
|
|
1023
|
+
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
973
1024
|
* pageSize: 10,
|
|
974
1025
|
* });
|
|
975
1026
|
*
|
|
976
1027
|
* for await (const page of paginator) {
|
|
977
|
-
* // page.items:
|
|
1028
|
+
* // page.items: Position[]
|
|
978
1029
|
* }
|
|
979
1030
|
* ```
|
|
980
1031
|
*/
|
|
981
|
-
|
|
982
|
-
};
|
|
983
|
-
type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
1032
|
+
listPositions(request: ListPositionsRequest): Paginated<Position[]>;
|
|
984
1033
|
/**
|
|
985
|
-
* Lists
|
|
1034
|
+
* Lists combo positions for a wallet.
|
|
986
1035
|
*
|
|
987
|
-
* @throws {@link
|
|
1036
|
+
* @throws {@link ListComboPositionsError}
|
|
988
1037
|
* Thrown on failure.
|
|
989
1038
|
*
|
|
990
1039
|
* @example
|
|
991
1040
|
* Fetch the first page of results:
|
|
992
1041
|
* ```ts
|
|
993
|
-
* const paginator = client.
|
|
1042
|
+
* const paginator = client.listComboPositions({
|
|
994
1043
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
995
1044
|
* pageSize: 10,
|
|
996
1045
|
* });
|
|
997
1046
|
*
|
|
998
1047
|
* const firstPage = await paginator.firstPage();
|
|
999
|
-
*
|
|
1000
|
-
* // Optionally, fetch additional pages:
|
|
1001
|
-
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
1002
|
-
* // page.items: Position[]
|
|
1003
|
-
* }
|
|
1004
1048
|
* ```
|
|
1005
1049
|
*
|
|
1006
1050
|
* @example
|
|
1007
|
-
*
|
|
1051
|
+
* Filter to any of several resolved statuses:
|
|
1008
1052
|
* ```ts
|
|
1009
|
-
* const paginator = client.
|
|
1053
|
+
* const paginator = client.listComboPositions({
|
|
1010
1054
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1011
|
-
*
|
|
1055
|
+
* status: [
|
|
1056
|
+
* ComboPositionStatus.ResolvedWin,
|
|
1057
|
+
* ComboPositionStatus.ResolvedPartial,
|
|
1058
|
+
* ComboPositionStatus.ResolvedLoss,
|
|
1059
|
+
* ],
|
|
1012
1060
|
* });
|
|
1013
|
-
*
|
|
1014
|
-
* for await (const page of paginator) {
|
|
1015
|
-
* // page.items: Position[]
|
|
1016
|
-
* }
|
|
1017
1061
|
* ```
|
|
1018
1062
|
*/
|
|
1019
|
-
|
|
1063
|
+
listComboPositions(request: ListComboPositionsRequest): Paginated<ComboPosition[]>;
|
|
1020
1064
|
/**
|
|
1021
|
-
*
|
|
1065
|
+
* Fetches the total value for a wallet's positions.
|
|
1066
|
+
*
|
|
1067
|
+
* When `conditionIds` is present, only those single-market positions are
|
|
1068
|
+
* included; portfolio-level combo positions are excluded. Accepts at most
|
|
1069
|
+
* 20 distinct condition IDs.
|
|
1022
1070
|
*
|
|
1023
|
-
* @throws {@link
|
|
1071
|
+
* @throws {@link FetchPortfolioValueError}
|
|
1024
1072
|
* Thrown on failure.
|
|
1025
1073
|
*
|
|
1026
1074
|
* @example
|
|
1027
|
-
* Fetch the first page of results:
|
|
1028
1075
|
* ```ts
|
|
1029
|
-
* const
|
|
1076
|
+
* const value = await client.fetchPortfolioValue({
|
|
1030
1077
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1031
|
-
*
|
|
1078
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
1032
1079
|
* });
|
|
1080
|
+
* ```
|
|
1081
|
+
*/
|
|
1082
|
+
fetchPortfolioValue(request: FetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Fetches one trader's standing on both the PnL and volume boards.
|
|
1033
1085
|
*
|
|
1034
|
-
*
|
|
1086
|
+
* `window` defaults to one day and `category` to overall. A `null` rank means
|
|
1087
|
+
* the trader is unranked on that board. Returns `null` for an unknown wallet.
|
|
1035
1088
|
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
* // page.items: ClosedPosition[]
|
|
1039
|
-
* }
|
|
1040
|
-
* ```
|
|
1089
|
+
* @throws {@link FetchTraderLeaderboardStandingError}
|
|
1090
|
+
* Thrown on failure.
|
|
1041
1091
|
*
|
|
1042
1092
|
* @example
|
|
1043
|
-
* Loop through all pages with `for await`:
|
|
1044
1093
|
* ```ts
|
|
1045
|
-
* const
|
|
1046
|
-
* user: '
|
|
1047
|
-
*
|
|
1094
|
+
* const standing = await client.fetchTraderLeaderboardStanding({
|
|
1095
|
+
* user: '0xa71093cafc0c099b4ccab24c3cb8018d817923c4',
|
|
1096
|
+
* window: LeaderboardWindow.All,
|
|
1048
1097
|
* });
|
|
1049
|
-
*
|
|
1050
|
-
* for await (const page of paginator) {
|
|
1051
|
-
* // page.items: ClosedPosition[]
|
|
1052
|
-
* }
|
|
1053
1098
|
* ```
|
|
1054
1099
|
*/
|
|
1055
|
-
|
|
1100
|
+
fetchTraderLeaderboardStanding(request: FetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
1056
1101
|
/**
|
|
1057
|
-
*
|
|
1102
|
+
* Fetches profile and lifetime trading statistics for a wallet.
|
|
1058
1103
|
*
|
|
1059
|
-
*
|
|
1060
|
-
* Thrown on failure.
|
|
1104
|
+
* `tradedMarketCount` is the exact number of distinct markets traded.
|
|
1061
1105
|
*
|
|
1062
|
-
*
|
|
1063
|
-
* Fetch the first page of results:
|
|
1064
|
-
* ```ts
|
|
1065
|
-
* const paginator = client.listComboPositions({
|
|
1066
|
-
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1067
|
-
* pageSize: 10,
|
|
1068
|
-
* });
|
|
1106
|
+
* Returns `null` when the wallet is not a known user.
|
|
1069
1107
|
*
|
|
1070
|
-
*
|
|
1071
|
-
*
|
|
1108
|
+
* @throws {@link FetchUserStatsError}
|
|
1109
|
+
* Thrown on failure.
|
|
1072
1110
|
*
|
|
1073
1111
|
* @example
|
|
1074
|
-
* Filter to any of several resolved statuses:
|
|
1075
1112
|
* ```ts
|
|
1076
|
-
* const
|
|
1113
|
+
* const stats = await client.fetchUserStats({
|
|
1077
1114
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1078
|
-
* status: [
|
|
1079
|
-
* ComboPositionStatus.ResolvedWin,
|
|
1080
|
-
* ComboPositionStatus.ResolvedPartial,
|
|
1081
|
-
* ComboPositionStatus.ResolvedLoss,
|
|
1082
|
-
* ],
|
|
1083
1115
|
* });
|
|
1084
1116
|
* ```
|
|
1085
1117
|
*/
|
|
1086
|
-
|
|
1118
|
+
fetchUserStats(request: FetchUserStatsRequest): Promise<UserStats | null>;
|
|
1087
1119
|
/**
|
|
1088
|
-
* Fetches
|
|
1120
|
+
* Fetches a wallet's cumulative PnL series.
|
|
1089
1121
|
*
|
|
1090
|
-
*
|
|
1122
|
+
* `interval` defaults to one day and `fidelity` defaults to one hour. Each
|
|
1123
|
+
* point is cumulative through its timestamp; nullable amounts mean the
|
|
1124
|
+
* source was unavailable and are never coerced to zero.
|
|
1125
|
+
*
|
|
1126
|
+
* @throws {@link FetchUserPnlError}
|
|
1091
1127
|
* Thrown on failure.
|
|
1092
1128
|
*
|
|
1093
1129
|
* @example
|
|
1094
1130
|
* ```ts
|
|
1095
|
-
* const
|
|
1131
|
+
* const pnl = await client.fetchUserPnl({
|
|
1096
1132
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1133
|
+
* interval: UserPnlInterval.OneWeek,
|
|
1134
|
+
* fidelity: UserPnlFidelity.ThreeHours,
|
|
1097
1135
|
* });
|
|
1098
1136
|
* ```
|
|
1099
1137
|
*/
|
|
1100
|
-
|
|
1138
|
+
fetchUserPnl(request: FetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
1101
1139
|
/**
|
|
1102
|
-
* Fetches
|
|
1140
|
+
* Fetches a wallet's trading volume for a time window.
|
|
1141
|
+
*
|
|
1142
|
+
* Volume is returned in shares and USD. Window bounds accept epoch seconds
|
|
1143
|
+
* or `Date` values and are widened to whole UTC days.
|
|
1103
1144
|
*
|
|
1104
|
-
* @throws {@link
|
|
1145
|
+
* @throws {@link FetchUserVolumeError}
|
|
1105
1146
|
* Thrown on failure.
|
|
1106
1147
|
*
|
|
1107
1148
|
* @example
|
|
1108
1149
|
* ```ts
|
|
1109
|
-
* const
|
|
1150
|
+
* const volume = await client.fetchUserVolume({
|
|
1110
1151
|
* user: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b',
|
|
1152
|
+
* window: { start: new Date('2026-08-01T00:00:00Z') },
|
|
1111
1153
|
* });
|
|
1112
1154
|
* ```
|
|
1113
1155
|
*/
|
|
1114
|
-
|
|
1156
|
+
fetchUserVolume(request: FetchUserVolumeRequest): Promise<UserVolume>;
|
|
1115
1157
|
/**
|
|
1116
1158
|
* Downloads an accounting snapshot archive for a wallet.
|
|
1117
1159
|
*
|
|
@@ -1129,7 +1171,12 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
1129
1171
|
/**
|
|
1130
1172
|
* Lists wallet activity.
|
|
1131
1173
|
*
|
|
1132
|
-
*
|
|
1174
|
+
* Every activity type is included by default, including deposits and
|
|
1175
|
+
* withdrawals; use the `type` filter to narrow results. An omitted `window`
|
|
1176
|
+
* serves the most recent three years; `window: 'full'` requests the complete
|
|
1177
|
+
* history. Window bounds accept Unix epoch seconds or `Date` values. Results
|
|
1178
|
+
* are newest-first by default. `pageSize` defaults to 100 (max 1000), and
|
|
1179
|
+
* transient rate limits are retried automatically.
|
|
1133
1180
|
*
|
|
1134
1181
|
* @throws {@link ListActivityError}
|
|
1135
1182
|
* Thrown on failure.
|
|
@@ -1183,11 +1230,13 @@ type PublicAccountActions = Prettify<CommonAccountActions & {
|
|
|
1183
1230
|
*/
|
|
1184
1231
|
listComboActivity(request: ListComboActivityRequest): Paginated<ComboActivity[]>;
|
|
1185
1232
|
}>;
|
|
1186
|
-
type SecureAccountActions = Prettify<
|
|
1233
|
+
type SecureAccountActions = Prettify<{
|
|
1187
1234
|
/**
|
|
1188
1235
|
* Lists current positions for a wallet.
|
|
1189
1236
|
*
|
|
1190
1237
|
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1238
|
+
* To list a market's holders (a `conditionId` anchor with no wallet), use
|
|
1239
|
+
* a public client's `listPositions` instead.
|
|
1191
1240
|
*
|
|
1192
1241
|
* @throws {@link ListPositionsError}
|
|
1193
1242
|
* Thrown on failure.
|
|
@@ -1203,15 +1252,6 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1203
1252
|
* ```
|
|
1204
1253
|
*/
|
|
1205
1254
|
listPositions(request?: SecureListPositionsRequest): Paginated<Position[]>;
|
|
1206
|
-
/**
|
|
1207
|
-
* Lists closed positions for a wallet.
|
|
1208
|
-
*
|
|
1209
|
-
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1210
|
-
*
|
|
1211
|
-
* @throws {@link ListClosedPositionsError}
|
|
1212
|
-
* Thrown on failure.
|
|
1213
|
-
*/
|
|
1214
|
-
listClosedPositions(request?: SecureListClosedPositionsRequest): Paginated<ClosedPosition[]>;
|
|
1215
1255
|
/**
|
|
1216
1256
|
* Lists combo positions for a wallet.
|
|
1217
1257
|
*
|
|
@@ -1235,21 +1275,67 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1235
1275
|
/**
|
|
1236
1276
|
* Fetches the total value for a wallet's positions.
|
|
1237
1277
|
*
|
|
1278
|
+
* When `conditionIds` is present, only those single-market positions are
|
|
1279
|
+
* included; portfolio-level combo positions are excluded. Accepts at most
|
|
1280
|
+
* 20 distinct condition IDs.
|
|
1281
|
+
*
|
|
1238
1282
|
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1239
1283
|
*
|
|
1240
1284
|
* @throws {@link FetchPortfolioValueError}
|
|
1241
1285
|
* Thrown on failure.
|
|
1242
1286
|
*/
|
|
1243
|
-
fetchPortfolioValue(request?: SecureFetchPortfolioValueRequest): Promise<
|
|
1287
|
+
fetchPortfolioValue(request?: SecureFetchPortfolioValueRequest): Promise<PortfolioValue>;
|
|
1244
1288
|
/**
|
|
1245
|
-
* Fetches
|
|
1289
|
+
* Fetches one trader's standing on both the PnL and volume boards.
|
|
1246
1290
|
*
|
|
1247
1291
|
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1292
|
+
* `window` defaults to one day and `category` to overall. A `null` rank means
|
|
1293
|
+
* the trader is unranked on that board. Returns `null` for an unknown wallet.
|
|
1248
1294
|
*
|
|
1249
|
-
* @throws {@link
|
|
1295
|
+
* @throws {@link FetchTraderLeaderboardStandingError}
|
|
1250
1296
|
* Thrown on failure.
|
|
1297
|
+
*
|
|
1298
|
+
* @example
|
|
1299
|
+
* ```ts
|
|
1300
|
+
* const standing = await client.fetchTraderLeaderboardStanding({
|
|
1301
|
+
* window: LeaderboardWindow.All,
|
|
1302
|
+
* });
|
|
1303
|
+
* ```
|
|
1251
1304
|
*/
|
|
1252
|
-
|
|
1305
|
+
fetchTraderLeaderboardStanding(request?: SecureFetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
1306
|
+
/**
|
|
1307
|
+
* Fetches profile and lifetime trading statistics for a wallet.
|
|
1308
|
+
*
|
|
1309
|
+
* `tradedMarketCount` is the exact number of distinct markets traded.
|
|
1310
|
+
*
|
|
1311
|
+
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1312
|
+
* Returns `null` when the wallet is not a known user.
|
|
1313
|
+
*
|
|
1314
|
+
* @throws {@link FetchUserStatsError}
|
|
1315
|
+
* Thrown on failure.
|
|
1316
|
+
*/
|
|
1317
|
+
fetchUserStats(request?: SecureFetchUserStatsRequest): Promise<UserStats | null>;
|
|
1318
|
+
/**
|
|
1319
|
+
* Fetches the cumulative PnL series for a wallet.
|
|
1320
|
+
*
|
|
1321
|
+
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1322
|
+
* `interval` defaults to one day and `fidelity` defaults to one hour.
|
|
1323
|
+
*
|
|
1324
|
+
* @throws {@link FetchUserPnlError}
|
|
1325
|
+
* Thrown on failure.
|
|
1326
|
+
*/
|
|
1327
|
+
fetchUserPnl(request?: SecureFetchUserPnlRequest): Promise<UserPnlSeries>;
|
|
1328
|
+
/**
|
|
1329
|
+
* Fetches trading volume for a wallet over a time window.
|
|
1330
|
+
*
|
|
1331
|
+
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1332
|
+
* Window bounds accept epoch seconds or `Date` values and are widened to
|
|
1333
|
+
* whole UTC days.
|
|
1334
|
+
*
|
|
1335
|
+
* @throws {@link FetchUserVolumeError}
|
|
1336
|
+
* Thrown on failure.
|
|
1337
|
+
*/
|
|
1338
|
+
fetchUserVolume(request?: SecureFetchUserVolumeRequest): Promise<UserVolume>;
|
|
1253
1339
|
/**
|
|
1254
1340
|
* Downloads an accounting snapshot archive for a wallet.
|
|
1255
1341
|
*
|
|
@@ -1264,7 +1350,12 @@ type SecureAccountActions = Prettify<CommonAccountActions & {
|
|
|
1264
1350
|
*
|
|
1265
1351
|
* Defaults to the authenticated account's wallet when `user` is omitted.
|
|
1266
1352
|
*
|
|
1267
|
-
*
|
|
1353
|
+
* Every activity type is included by default, including deposits and
|
|
1354
|
+
* withdrawals; use the `type` filter to narrow results. An omitted `window`
|
|
1355
|
+
* serves the most recent three years; `window: 'full'` requests the complete
|
|
1356
|
+
* history. Window bounds accept Unix epoch seconds or `Date` values. Results
|
|
1357
|
+
* are newest-first by default. `pageSize` defaults to 100 (max 1000), and
|
|
1358
|
+
* transient rate limits are retried automatically.
|
|
1268
1359
|
*
|
|
1269
1360
|
* @throws {@link ListActivityError}
|
|
1270
1361
|
* Thrown on failure.
|
|
@@ -1394,6 +1485,11 @@ type AnalyticsActions = {
|
|
|
1394
1485
|
/**
|
|
1395
1486
|
* Lists builder leaderboard rankings.
|
|
1396
1487
|
*
|
|
1488
|
+
* Builders are ranked by attributed share volume within `window`, which
|
|
1489
|
+
* defaults to one day. `builderCode` is the stable identifier; names and
|
|
1490
|
+
* profile images are display metadata. `pageSize` defaults to 100 (max 1000).
|
|
1491
|
+
* Transient rate limits are retried automatically.
|
|
1492
|
+
*
|
|
1397
1493
|
* @throws {@link ListBuilderLeaderboardError}
|
|
1398
1494
|
* Thrown on failure.
|
|
1399
1495
|
*
|
|
@@ -1402,14 +1498,14 @@ type AnalyticsActions = {
|
|
|
1402
1498
|
* ```ts
|
|
1403
1499
|
* const paginator = client.listBuilderLeaderboard({
|
|
1404
1500
|
* pageSize: 10,
|
|
1405
|
-
*
|
|
1501
|
+
* window: LeaderboardWindow.Day,
|
|
1406
1502
|
* });
|
|
1407
1503
|
*
|
|
1408
1504
|
* const firstPage = await paginator.firstPage();
|
|
1409
1505
|
*
|
|
1410
1506
|
* // Optionally, fetch additional pages:
|
|
1411
1507
|
* for await (const page of paginator.from(firstPage.nextCursor)) {
|
|
1412
|
-
* // page.items:
|
|
1508
|
+
* // page.items: BuilderStanding[]
|
|
1413
1509
|
* }
|
|
1414
1510
|
* ```
|
|
1415
1511
|
*
|
|
@@ -1418,32 +1514,44 @@ type AnalyticsActions = {
|
|
|
1418
1514
|
* ```ts
|
|
1419
1515
|
* const paginator = client.listBuilderLeaderboard({
|
|
1420
1516
|
* pageSize: 10,
|
|
1421
|
-
*
|
|
1517
|
+
* window: LeaderboardWindow.Day,
|
|
1422
1518
|
* });
|
|
1423
1519
|
*
|
|
1424
1520
|
* for await (const page of paginator) {
|
|
1425
|
-
* // page.items:
|
|
1521
|
+
* // page.items: BuilderStanding[]
|
|
1426
1522
|
* }
|
|
1427
1523
|
* ```
|
|
1428
1524
|
*/
|
|
1429
|
-
listBuilderLeaderboard(request?: ListBuilderLeaderboardRequest): Paginated<
|
|
1525
|
+
listBuilderLeaderboard(request?: ListBuilderLeaderboardRequest): Paginated<BuilderStanding[]>;
|
|
1430
1526
|
/**
|
|
1431
|
-
*
|
|
1527
|
+
* Fetches the per-builder volume time series.
|
|
1432
1528
|
*
|
|
1433
|
-
*
|
|
1529
|
+
* `interval` controls bucket width and defaults to daily; use
|
|
1530
|
+
* {@link BuilderVolumeInterval.Year} for one bucket per calendar year.
|
|
1531
|
+
* `bucketLimit` returns that many complete recent buckets (default 30, max 90),
|
|
1532
|
+
* not that many builder rows. Results are newest bucket first, and volume is
|
|
1533
|
+
* measured in shares. Transient rate limits are retried automatically.
|
|
1534
|
+
*
|
|
1535
|
+
* @throws {@link FetchBuilderVolumeError}
|
|
1434
1536
|
* Thrown on failure.
|
|
1435
1537
|
*
|
|
1436
1538
|
* @example
|
|
1437
1539
|
* ```ts
|
|
1438
1540
|
* const volume = await client.fetchBuilderVolume({
|
|
1439
|
-
*
|
|
1541
|
+
* interval: BuilderVolumeInterval.Day,
|
|
1542
|
+
* bucketLimit: 7,
|
|
1440
1543
|
* });
|
|
1441
1544
|
* ```
|
|
1442
1545
|
*/
|
|
1443
|
-
fetchBuilderVolume(request?:
|
|
1546
|
+
fetchBuilderVolume(request?: FetchBuilderVolumeRequest): Promise<BuilderVolumePoint[]>;
|
|
1444
1547
|
/**
|
|
1445
1548
|
* Lists trader leaderboard rankings.
|
|
1446
1549
|
*
|
|
1550
|
+
* `window` defaults to one day, `category` to overall, and `sortBy` to PnL.
|
|
1551
|
+
* Finite-window PnL is marked equity change net of flows, while all-time PnL
|
|
1552
|
+
* is realized only. Volume is measured in shares. Tied traders share a rank
|
|
1553
|
+
* and the next rank skips. `pageSize` defaults to 100 (max 1000).
|
|
1554
|
+
*
|
|
1447
1555
|
* @throws {@link ListTraderLeaderboardError}
|
|
1448
1556
|
* Thrown on failure.
|
|
1449
1557
|
*
|
|
@@ -1451,9 +1559,9 @@ type AnalyticsActions = {
|
|
|
1451
1559
|
* Fetch the first page of results:
|
|
1452
1560
|
* ```ts
|
|
1453
1561
|
* const paginator = client.listTraderLeaderboard({
|
|
1454
|
-
* orderBy: 'PNL',
|
|
1455
1562
|
* pageSize: 10,
|
|
1456
|
-
*
|
|
1563
|
+
* sortBy: TraderLeaderboardSort.Pnl,
|
|
1564
|
+
* window: LeaderboardWindow.Week,
|
|
1457
1565
|
* });
|
|
1458
1566
|
*
|
|
1459
1567
|
* const firstPage = await paginator.firstPage();
|
|
@@ -1468,9 +1576,9 @@ type AnalyticsActions = {
|
|
|
1468
1576
|
* Loop through all pages with `for await`:
|
|
1469
1577
|
* ```ts
|
|
1470
1578
|
* const paginator = client.listTraderLeaderboard({
|
|
1471
|
-
* orderBy: 'PNL',
|
|
1472
1579
|
* pageSize: 10,
|
|
1473
|
-
*
|
|
1580
|
+
* sortBy: TraderLeaderboardSort.Pnl,
|
|
1581
|
+
* window: LeaderboardWindow.Week,
|
|
1474
1582
|
* });
|
|
1475
1583
|
*
|
|
1476
1584
|
* for await (const page of paginator) {
|
|
@@ -1479,23 +1587,76 @@ type AnalyticsActions = {
|
|
|
1479
1587
|
* ```
|
|
1480
1588
|
*/
|
|
1481
1589
|
listTraderLeaderboard(request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Lists the largest individual winning positions.
|
|
1592
|
+
*
|
|
1593
|
+
* The board has one row per position, ranked by its resolution profit.
|
|
1594
|
+
* `window` applies to resolution time and defaults to one day; `category`
|
|
1595
|
+
* defaults to overall. Equal profits retain distinct row ordinals. Combo rows
|
|
1596
|
+
* have no parent event, so branch on `kind` before using event metadata.
|
|
1597
|
+
* `pageSize` defaults to 100 (max 1000).
|
|
1598
|
+
*
|
|
1599
|
+
* @throws {@link ListBiggestWinnersError}
|
|
1600
|
+
* Thrown on failure.
|
|
1601
|
+
*
|
|
1602
|
+
* @example
|
|
1603
|
+
* ```ts
|
|
1604
|
+
* const paginator = client.listBiggestWinners({
|
|
1605
|
+
* category: 'sports',
|
|
1606
|
+
* pageSize: 10,
|
|
1607
|
+
* window: LeaderboardWindow.Week,
|
|
1608
|
+
* });
|
|
1609
|
+
*
|
|
1610
|
+
* for await (const page of paginator) {
|
|
1611
|
+
* // page.items: BiggestWinner[]
|
|
1612
|
+
* }
|
|
1613
|
+
* ```
|
|
1614
|
+
*/
|
|
1615
|
+
listBiggestWinners(request?: ListBiggestWinnersRequest): Paginated<BiggestWinner[]>;
|
|
1482
1616
|
};
|
|
1483
1617
|
declare function analyticsActions(client: BasePublicClient): AnalyticsActions;
|
|
1484
1618
|
declare function analyticsActions(client: BaseSecureClient): AnalyticsActions;
|
|
1485
1619
|
|
|
1486
1620
|
type DataActions = {
|
|
1487
1621
|
/**
|
|
1488
|
-
* Fetches
|
|
1622
|
+
* Fetches cumulative taker volume for one or more events.
|
|
1623
|
+
*
|
|
1624
|
+
* Results contain one row per market, ordered by taker volume descending, and
|
|
1625
|
+
* a total across all returned markets. Volume is measured in shares. Event
|
|
1626
|
+
* IDs must be positive 32-bit integers. Transient rate limits are retried
|
|
1627
|
+
* automatically.
|
|
1489
1628
|
*
|
|
1490
1629
|
* @throws {@link FetchEventLiveVolumeError}
|
|
1491
1630
|
* Thrown on failure.
|
|
1492
1631
|
*
|
|
1493
1632
|
* @example
|
|
1494
1633
|
* ```ts
|
|
1495
|
-
* const volume = await client.fetchEventLiveVolume({
|
|
1634
|
+
* const volume = await client.fetchEventLiveVolume({
|
|
1635
|
+
* eventIds: ['160707'],
|
|
1636
|
+
* });
|
|
1496
1637
|
* ```
|
|
1497
1638
|
*/
|
|
1498
|
-
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume
|
|
1639
|
+
fetchEventLiveVolume(request: FetchEventLiveVolumeRequest): Promise<LiveVolume>;
|
|
1640
|
+
/**
|
|
1641
|
+
* Fetches resolution lifecycle rows by question, condition, or event.
|
|
1642
|
+
*
|
|
1643
|
+
* Provide exactly one selector. Condition and event lookups accept at most
|
|
1644
|
+
* 20 distinct IDs and return one row per matching condition. Missing
|
|
1645
|
+
* resolutions return an empty array. A 31-byte protocol v2 market condition
|
|
1646
|
+
* ID is right-padded to its canonical 32-byte form. A 31-byte combo condition
|
|
1647
|
+
* ID is rejected.
|
|
1648
|
+
*
|
|
1649
|
+
* @throws {@link FetchResolutionsError}
|
|
1650
|
+
* Thrown on failure.
|
|
1651
|
+
*
|
|
1652
|
+
* @example
|
|
1653
|
+
* ```ts
|
|
1654
|
+
* const resolutions = await client.fetchResolutions({
|
|
1655
|
+
* eventIds: ['903193'],
|
|
1656
|
+
* });
|
|
1657
|
+
* ```
|
|
1658
|
+
*/
|
|
1659
|
+
fetchResolutions(request: FetchResolutionsRequest): Promise<Resolution[]>;
|
|
1499
1660
|
/**
|
|
1500
1661
|
* Fetches the midpoint price for an exchange asset as a decimal string.
|
|
1501
1662
|
*
|
|
@@ -1504,7 +1665,7 @@ type DataActions = {
|
|
|
1504
1665
|
*
|
|
1505
1666
|
* @example
|
|
1506
1667
|
* ```ts
|
|
1507
|
-
* const midpoint = await client.fetchMidpoint({ assetId: '
|
|
1668
|
+
* const midpoint = await client.fetchMidpoint({ assetId: '0x0122…0000' });
|
|
1508
1669
|
* ```
|
|
1509
1670
|
*/
|
|
1510
1671
|
fetchMidpoint(request: FetchMidpointRequest): Promise<DecimalString>;
|
|
@@ -1516,7 +1677,7 @@ type DataActions = {
|
|
|
1516
1677
|
*
|
|
1517
1678
|
* @example
|
|
1518
1679
|
* ```ts
|
|
1519
|
-
* const midpoints = await client.fetchMidpoints([{ assetId: '
|
|
1680
|
+
* const midpoints = await client.fetchMidpoints([{ assetId: '0x0122…0000' }]);
|
|
1520
1681
|
* ```
|
|
1521
1682
|
*/
|
|
1522
1683
|
fetchMidpoints(request: FetchMidpointsRequest): Promise<Midpoints>;
|
|
@@ -1528,7 +1689,7 @@ type DataActions = {
|
|
|
1528
1689
|
*
|
|
1529
1690
|
* @example
|
|
1530
1691
|
* ```ts
|
|
1531
|
-
* const price = await client.fetchPrice({ assetId: '
|
|
1692
|
+
* const price = await client.fetchPrice({ assetId: '0x0122…0000', side: OrderSide.BUY });
|
|
1532
1693
|
* ```
|
|
1533
1694
|
*/
|
|
1534
1695
|
fetchPrice(request: FetchPriceRequest): Promise<DecimalString>;
|
|
@@ -1540,7 +1701,7 @@ type DataActions = {
|
|
|
1540
1701
|
*
|
|
1541
1702
|
* @example
|
|
1542
1703
|
* ```ts
|
|
1543
|
-
* const prices = await client.fetchPrices([{ assetId: '
|
|
1704
|
+
* const prices = await client.fetchPrices([{ assetId: '0x0122…0000', side: OrderSide.BUY }]);
|
|
1544
1705
|
* ```
|
|
1545
1706
|
*/
|
|
1546
1707
|
fetchPrices(request: FetchPricesRequest): Promise<Prices>;
|
|
@@ -1552,7 +1713,7 @@ type DataActions = {
|
|
|
1552
1713
|
*
|
|
1553
1714
|
* @example
|
|
1554
1715
|
* ```ts
|
|
1555
|
-
* const book = await client.fetchOrderBook({ assetId: '
|
|
1716
|
+
* const book = await client.fetchOrderBook({ assetId: '0x0122…0000' });
|
|
1556
1717
|
* ```
|
|
1557
1718
|
*/
|
|
1558
1719
|
fetchOrderBook(request: FetchOrderBookRequest): Promise<OrderBook>;
|
|
@@ -1564,7 +1725,7 @@ type DataActions = {
|
|
|
1564
1725
|
*
|
|
1565
1726
|
* @example
|
|
1566
1727
|
* ```ts
|
|
1567
|
-
* const books = await client.fetchOrderBooks([{ assetId: '
|
|
1728
|
+
* const books = await client.fetchOrderBooks([{ assetId: '0x0122…0000' }]);
|
|
1568
1729
|
* ```
|
|
1569
1730
|
*/
|
|
1570
1731
|
fetchOrderBooks(request: FetchOrderBooksRequest): Promise<OrderBook[]>;
|
|
@@ -1576,7 +1737,7 @@ type DataActions = {
|
|
|
1576
1737
|
*
|
|
1577
1738
|
* @example
|
|
1578
1739
|
* ```ts
|
|
1579
|
-
* const spread = await client.fetchSpread({ assetId: '
|
|
1740
|
+
* const spread = await client.fetchSpread({ assetId: '0x0122…0000' });
|
|
1580
1741
|
* ```
|
|
1581
1742
|
*/
|
|
1582
1743
|
fetchSpread(request: FetchSpreadRequest): Promise<DecimalString>;
|
|
@@ -1588,7 +1749,7 @@ type DataActions = {
|
|
|
1588
1749
|
*
|
|
1589
1750
|
* @example
|
|
1590
1751
|
* ```ts
|
|
1591
|
-
* const spreads = await client.fetchSpreads([{ assetId: '
|
|
1752
|
+
* const spreads = await client.fetchSpreads([{ assetId: '0x0122…0000' }]);
|
|
1592
1753
|
* ```
|
|
1593
1754
|
*/
|
|
1594
1755
|
fetchSpreads(request: FetchSpreadsRequest): Promise<Spreads>;
|
|
@@ -1602,7 +1763,7 @@ type DataActions = {
|
|
|
1602
1763
|
*
|
|
1603
1764
|
* @example
|
|
1604
1765
|
* ```ts
|
|
1605
|
-
* const trade = await client.fetchLastTradePrice({ assetId: '
|
|
1766
|
+
* const trade = await client.fetchLastTradePrice({ assetId: '0x0122…0000' });
|
|
1606
1767
|
*
|
|
1607
1768
|
* // trade === LastTradePrice | null
|
|
1608
1769
|
* ```
|
|
@@ -1619,23 +1780,43 @@ type DataActions = {
|
|
|
1619
1780
|
*
|
|
1620
1781
|
* @example
|
|
1621
1782
|
* ```ts
|
|
1622
|
-
* const trades = await client.fetchLastTradePrices([{ assetId: '
|
|
1623
|
-
* const trade = trades.find((candidate) => candidate.assetId === '
|
|
1783
|
+
* const trades = await client.fetchLastTradePrices([{ assetId: '0x0122…0000' }]);
|
|
1784
|
+
* const trade = trades.find((candidate) => candidate.assetId === '0x0122…0000');
|
|
1624
1785
|
* ```
|
|
1625
1786
|
*/
|
|
1626
1787
|
fetchLastTradePrices(request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
1627
1788
|
/**
|
|
1628
|
-
*
|
|
1789
|
+
* Lists historical price observations for an exchange asset.
|
|
1790
|
+
*
|
|
1791
|
+
* Select exactly one time form: a relative `interval`, an explicit `start`
|
|
1792
|
+
* with optional `end`, or the latest observation at or before an `asOf`
|
|
1793
|
+
* instant. Time inputs accept Unix epoch seconds or `Date` values. When
|
|
1794
|
+
* `bucketSeconds` is omitted, resolution is selected automatically for the
|
|
1795
|
+
* requested window and reported on each point as `resolutionSeconds`. An
|
|
1796
|
+
* explicit bucket is used exactly as requested and may produce an empty series
|
|
1797
|
+
* when that resolution is unavailable for the window. Prices are decimal
|
|
1798
|
+
* strings and returned timestamps are Unix epoch milliseconds. Series pages
|
|
1799
|
+
* are ordered oldest first; an `asOf` request returns at most one item. Series
|
|
1800
|
+
* page sizes default to and are capped at 10,000 points. Transient rate limits
|
|
1801
|
+
* are retried automatically.
|
|
1629
1802
|
*
|
|
1630
|
-
* @throws {@link
|
|
1803
|
+
* @throws {@link ListPriceHistoryError}
|
|
1631
1804
|
* Thrown on failure.
|
|
1632
1805
|
*
|
|
1633
1806
|
* @example
|
|
1634
1807
|
* ```ts
|
|
1635
|
-
* const history =
|
|
1808
|
+
* const history = client.listPriceHistory({
|
|
1809
|
+
* assetId: '17023124228269928849020611259015948850061676830917875073785033885105715180702',
|
|
1810
|
+
* interval: PriceHistoryInterval.OneDay,
|
|
1811
|
+
* bucketSeconds: 3600,
|
|
1812
|
+
* });
|
|
1813
|
+
*
|
|
1814
|
+
* for await (const page of history) {
|
|
1815
|
+
* // page.items: PriceHistoryPoint[]
|
|
1816
|
+
* }
|
|
1636
1817
|
* ```
|
|
1637
1818
|
*/
|
|
1638
|
-
|
|
1819
|
+
listPriceHistory(request: ListPriceHistoryRequest): Paginated<PriceHistoryPoint[]>;
|
|
1639
1820
|
/**
|
|
1640
1821
|
* Estimates the price level a market order would cross at current book depth.
|
|
1641
1822
|
*
|
|
@@ -1648,53 +1829,73 @@ type DataActions = {
|
|
|
1648
1829
|
* @example
|
|
1649
1830
|
* ```ts
|
|
1650
1831
|
* const price = await client.estimateMarketPrice({
|
|
1651
|
-
*
|
|
1832
|
+
* assetId: '0x0122…0000',
|
|
1652
1833
|
* side: OrderSide.BUY,
|
|
1653
1834
|
* amount: 10,
|
|
1654
1835
|
* });
|
|
1655
1836
|
* ```
|
|
1656
|
-
*
|
|
1657
|
-
* @example Position-backed outcome
|
|
1658
|
-
* ```ts
|
|
1659
|
-
* const price = await client.estimateMarketPrice({
|
|
1660
|
-
* positionId: '456',
|
|
1661
|
-
* side: OrderSide.SELL,
|
|
1662
|
-
* shares: 10,
|
|
1663
|
-
* });
|
|
1664
|
-
* ```
|
|
1665
1837
|
*/
|
|
1666
1838
|
estimateMarketPrice(request: EstimateMarketPriceRequest): Promise<number>;
|
|
1667
1839
|
/**
|
|
1668
|
-
*
|
|
1840
|
+
* Fetches priced gross open interest for selected markets or globally.
|
|
1669
1841
|
*
|
|
1670
|
-
*
|
|
1842
|
+
* `conditionIds` accepts up to 20 distinct market condition IDs. Omit it for
|
|
1843
|
+
* the global aggregate, whose `conditionId` is `null`. A requested servable
|
|
1844
|
+
* market with no holdings has a zero value; an absent row means the market
|
|
1845
|
+
* is not servable. Values are in USDC. Transient rate limits are retried
|
|
1846
|
+
* automatically.
|
|
1847
|
+
*
|
|
1848
|
+
* @throws {@link FetchOpenInterestError}
|
|
1671
1849
|
* Thrown on failure.
|
|
1672
1850
|
*
|
|
1673
1851
|
* @example
|
|
1674
1852
|
* ```ts
|
|
1675
|
-
* const openInterest = await client.
|
|
1676
|
-
*
|
|
1853
|
+
* const openInterest = await client.fetchOpenInterest({
|
|
1854
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
1677
1855
|
* });
|
|
1678
1856
|
* ```
|
|
1679
1857
|
*/
|
|
1680
|
-
|
|
1858
|
+
fetchOpenInterest(request?: FetchOpenInterestRequest): Promise<OpenInterest[]>;
|
|
1681
1859
|
/**
|
|
1682
|
-
* Lists
|
|
1860
|
+
* Lists top holders grouped by outcome for one or more markets.
|
|
1861
|
+
*
|
|
1862
|
+
* `conditionIds` accepts up to 20 distinct market condition IDs. `pageSize`
|
|
1863
|
+
* defaults to 100 (max 1000) and applies separately to each outcome. Merge
|
|
1864
|
+
* matching `assetId` groups across pages rather than relying on array position.
|
|
1865
|
+
* `minBalance` uses display shares and defaults to `0`; `1` means one share,
|
|
1866
|
+
* equivalent to 1,000,000 base units.
|
|
1867
|
+
* Amounts are net holdings by default. `includePnl` switches to per-outcome
|
|
1868
|
+
* gross holdings and adds position economics; it requires one condition ID and
|
|
1869
|
+
* a page size of at most 100. Transient rate limits are retried automatically.
|
|
1683
1870
|
*
|
|
1684
1871
|
* @throws {@link ListMarketHoldersError}
|
|
1685
1872
|
* Thrown on failure.
|
|
1686
1873
|
*
|
|
1687
1874
|
* @example
|
|
1688
1875
|
* ```ts
|
|
1689
|
-
* const
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1876
|
+
* const result = client.listMarketHolders({
|
|
1877
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
1878
|
+
* pageSize: 5,
|
|
1692
1879
|
* });
|
|
1880
|
+
*
|
|
1881
|
+
* for await (const page of result) {
|
|
1882
|
+
* // page.items: MetaHolder[]
|
|
1883
|
+
* }
|
|
1693
1884
|
* ```
|
|
1694
1885
|
*/
|
|
1695
|
-
listMarketHolders(request: ListMarketHoldersRequest):
|
|
1886
|
+
listMarketHolders(request: ListMarketHoldersRequest): Paginated<MetaHolder[]>;
|
|
1696
1887
|
/**
|
|
1697
|
-
* Lists trades for a wallet, market, or event
|
|
1888
|
+
* Lists trades for a wallet, market, or event — or the global recent-trades
|
|
1889
|
+
* feed when no filter is given.
|
|
1890
|
+
*
|
|
1891
|
+
* Only the taker side of each match is returned by default
|
|
1892
|
+
* (`takerOnly: false` includes maker rows), and a dust filter of 0.01
|
|
1893
|
+
* shares applies unless `filterType`/`filterAmount` say otherwise (either
|
|
1894
|
+
* may be sent alone). `conditionId` accepts at most 20 distinct ids. `pageSize`
|
|
1895
|
+
* defaults to 100 (max 1000). `window: 'full'` requests the complete
|
|
1896
|
+
* history; an omitted window serves the recent feed. Window bounds accept
|
|
1897
|
+
* Unix epoch seconds or `Date` values. Transient rate limits are retried
|
|
1898
|
+
* automatically.
|
|
1698
1899
|
*
|
|
1699
1900
|
* @throws {@link ListTradesError}
|
|
1700
1901
|
* Thrown on failure.
|
|
@@ -3503,13 +3704,13 @@ type SessionKeyActions = {
|
|
|
3503
3704
|
/**
|
|
3504
3705
|
* Revokes a session key authorized for the Deposit Wallet.
|
|
3505
3706
|
*
|
|
3506
|
-
*
|
|
3507
|
-
*
|
|
3707
|
+
* Returns once the session key is removed from the active-key registry and can
|
|
3708
|
+
* no longer be used. The on-chain transaction may still be pending.
|
|
3508
3709
|
* Requires API-key authentication that supports gasless transactions.
|
|
3509
3710
|
*
|
|
3510
3711
|
* @example
|
|
3511
3712
|
* ```ts
|
|
3512
|
-
*
|
|
3713
|
+
* await client.revokeSessionKey({
|
|
3513
3714
|
* address: sessionAddress,
|
|
3514
3715
|
* });
|
|
3515
3716
|
* ```
|
|
@@ -3517,7 +3718,7 @@ type SessionKeyActions = {
|
|
|
3517
3718
|
* @throws {@link RevokeSessionKeyError}
|
|
3518
3719
|
* Thrown on failure.
|
|
3519
3720
|
*/
|
|
3520
|
-
revokeSessionKey(request: RevokeSessionKeyRequest): Promise<
|
|
3721
|
+
revokeSessionKey(request: RevokeSessionKeyRequest): Promise<void>;
|
|
3521
3722
|
};
|
|
3522
3723
|
declare function sessionKeyActions(client: BaseSecureClient): SessionKeyActions;
|
|
3523
3724
|
|
|
@@ -3676,20 +3877,24 @@ declare const CancelMarketOrdersError: {
|
|
|
3676
3877
|
*/
|
|
3677
3878
|
declare function cancelMarketOrders(client: BaseSecureClient, request: CancelMarketOrdersRequest): Promise<CancelOrdersResponse>;
|
|
3678
3879
|
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
type OrderAsset = {
|
|
3683
|
-
/** CTF token identifier. */
|
|
3684
|
-
tokenId: string;
|
|
3685
|
-
positionId?: never;
|
|
3686
|
-
} | {
|
|
3687
|
-
/** Polymarket V2 position identifier. */
|
|
3688
|
-
positionId: string;
|
|
3880
|
+
type EstimateMarketBuyPriceRequest = {
|
|
3881
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
3882
|
+
assetId: string;
|
|
3689
3883
|
tokenId?: never;
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3884
|
+
/** Buy side of the estimate. */
|
|
3885
|
+
side: OrderSide.BUY;
|
|
3886
|
+
/** Desired USD buy notional to match against current ask depth. */
|
|
3887
|
+
amount: number | string;
|
|
3888
|
+
/**
|
|
3889
|
+
* Market order execution type to model.
|
|
3890
|
+
*
|
|
3891
|
+
* @defaultValue OrderType.FOK
|
|
3892
|
+
*/
|
|
3893
|
+
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3894
|
+
} | {
|
|
3895
|
+
assetId?: never;
|
|
3896
|
+
/** @deprecated Use `assetId`. */
|
|
3897
|
+
tokenId: string;
|
|
3693
3898
|
/** Buy side of the estimate. */
|
|
3694
3899
|
side: OrderSide.BUY;
|
|
3695
3900
|
/** Desired USD buy notional to match against current ask depth. */
|
|
@@ -3701,10 +3906,27 @@ type EstimateMarketBuyPriceRequest = OrderAsset & {
|
|
|
3701
3906
|
*/
|
|
3702
3907
|
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3703
3908
|
};
|
|
3704
|
-
type EstimateMarketSellPriceRequest =
|
|
3909
|
+
type EstimateMarketSellPriceRequest = {
|
|
3910
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
3911
|
+
assetId: string;
|
|
3912
|
+
tokenId?: never;
|
|
3705
3913
|
/** Sell side of the estimate. */
|
|
3706
3914
|
side: OrderSide.SELL;
|
|
3707
|
-
/** Number of
|
|
3915
|
+
/** Number of outcome shares to match against current bid depth. */
|
|
3916
|
+
shares: number | string;
|
|
3917
|
+
/**
|
|
3918
|
+
* Market order execution type to model.
|
|
3919
|
+
*
|
|
3920
|
+
* @defaultValue OrderType.FOK
|
|
3921
|
+
*/
|
|
3922
|
+
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3923
|
+
} | {
|
|
3924
|
+
assetId?: never;
|
|
3925
|
+
/** @deprecated Use `assetId`. */
|
|
3926
|
+
tokenId: string;
|
|
3927
|
+
/** Sell side of the estimate. */
|
|
3928
|
+
side: OrderSide.SELL;
|
|
3929
|
+
/** Number of outcome shares to match against current bid depth. */
|
|
3708
3930
|
shares: number | string;
|
|
3709
3931
|
/**
|
|
3710
3932
|
* Market order execution type to model.
|
|
@@ -3737,8 +3959,7 @@ declare const EstimateMarketPriceError: {
|
|
|
3737
3959
|
* @example
|
|
3738
3960
|
* ```ts
|
|
3739
3961
|
* const price = await estimateMarketPrice(client, {
|
|
3740
|
-
*
|
|
3741
|
-
* '8501497159083948713316135768103773293754490207922884688769443031624417212426',
|
|
3962
|
+
* assetId: '0x0122…0000',
|
|
3742
3963
|
* side: OrderSide.BUY,
|
|
3743
3964
|
* amount: 10,
|
|
3744
3965
|
* });
|
|
@@ -3746,117 +3967,128 @@ declare const EstimateMarketPriceError: {
|
|
|
3746
3967
|
* // price === 0.53
|
|
3747
3968
|
* ```
|
|
3748
3969
|
*
|
|
3749
|
-
* @example Position-backed outcome
|
|
3750
|
-
* ```ts
|
|
3751
|
-
* const price = await estimateMarketPrice(client, {
|
|
3752
|
-
* positionId: '456',
|
|
3753
|
-
* side: OrderSide.SELL,
|
|
3754
|
-
* shares: 10,
|
|
3755
|
-
* });
|
|
3756
|
-
* ```
|
|
3757
|
-
*
|
|
3758
3970
|
* @throws {@link EstimateMarketPriceError}
|
|
3759
3971
|
* Thrown on failure.
|
|
3760
3972
|
*/
|
|
3761
3973
|
declare function estimateMarketPrice(client: BaseClient, request: EstimateMarketPriceRequest): Promise<number>;
|
|
3762
3974
|
|
|
3763
|
-
type
|
|
3764
|
-
/**
|
|
3765
|
-
|
|
3975
|
+
type PrepareMarketBuyOrderRequest = {
|
|
3976
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
3977
|
+
assetId: string;
|
|
3978
|
+
tokenId?: never;
|
|
3979
|
+
/** Buy side of the order. */
|
|
3980
|
+
side: OrderSide.BUY;
|
|
3766
3981
|
/**
|
|
3767
|
-
*
|
|
3768
|
-
*
|
|
3769
|
-
* - FAK (Fill and Kill): partially fills, cancels any unfilled remainder
|
|
3770
|
-
*
|
|
3771
|
-
* @defaultValue OrderType.FAK
|
|
3982
|
+
* Desired USD notional to buy, before market and builder taker fees.
|
|
3983
|
+
* Fees are paid on top unless `maxSpend` limits the all-in spend.
|
|
3772
3984
|
*/
|
|
3985
|
+
amount: number | string;
|
|
3986
|
+
/**
|
|
3987
|
+
* Optional estimated all-in USD spend target, including applicable fees.
|
|
3988
|
+
* The SDK reduces the signed buy amount when necessary to stay within it.
|
|
3989
|
+
*/
|
|
3990
|
+
maxSpend?: number | string;
|
|
3991
|
+
/** Highest acceptable price per share; the order only fills at this price or better. */
|
|
3992
|
+
maxPrice?: number | string;
|
|
3993
|
+
/** Optional builder attribution code. */
|
|
3994
|
+
builderCode?: string;
|
|
3995
|
+
/** @defaultValue OrderType.FAK */
|
|
3773
3996
|
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3774
|
-
}
|
|
3775
|
-
|
|
3997
|
+
} | {
|
|
3998
|
+
assetId?: never;
|
|
3999
|
+
/** @deprecated Use `assetId`. */
|
|
4000
|
+
tokenId: string;
|
|
3776
4001
|
/** Buy side of the order. */
|
|
3777
4002
|
side: OrderSide.BUY;
|
|
3778
4003
|
/**
|
|
3779
4004
|
* Desired USD notional to buy, before market and builder taker fees.
|
|
3780
|
-
*
|
|
3781
|
-
* By default, the SDK prepares the order for this full buy amount and applicable
|
|
3782
|
-
* fees are paid on top. Set `maxSpend` to let the SDK resize the amount against
|
|
3783
|
-
* an estimated all-in spend target.
|
|
4005
|
+
* Fees are paid on top unless `maxSpend` limits the all-in spend.
|
|
3784
4006
|
*/
|
|
3785
4007
|
amount: number | string;
|
|
3786
4008
|
/**
|
|
3787
|
-
* Optional estimated all-in USD spend target
|
|
3788
|
-
*
|
|
3789
|
-
*
|
|
3790
|
-
* When provided, the SDK keeps `amount` unchanged if `maxSpend` covers the
|
|
3791
|
-
* requested buy amount plus estimated fees. Otherwise, the SDK reduces the
|
|
3792
|
-
* signed buy amount using the order price and recently resolved fee rates.
|
|
3793
|
-
*
|
|
3794
|
-
* Set `maxSpend` equal to `amount` when the requested amount should include
|
|
3795
|
-
* fees. Leave it unset to pay fees on top of `amount`.
|
|
4009
|
+
* Optional estimated all-in USD spend target, including applicable fees.
|
|
4010
|
+
* The SDK reduces the signed buy amount when necessary to stay within it.
|
|
3796
4011
|
*/
|
|
3797
4012
|
maxSpend?: number | string;
|
|
3798
|
-
/**
|
|
3799
|
-
* Highest acceptable price per share for the BUY.
|
|
3800
|
-
*
|
|
3801
|
-
* The order may only fill at this price or better. For FOK, the full
|
|
3802
|
-
* `amount` must fill within this bound or the order is killed. For FAK, any
|
|
3803
|
-
* immediately available liquidity within this bound fills and the remainder
|
|
3804
|
-
* is canceled.
|
|
3805
|
-
*/
|
|
4013
|
+
/** Highest acceptable price per share; the order only fills at this price or better. */
|
|
3806
4014
|
maxPrice?: number | string;
|
|
4015
|
+
/** Optional builder attribution code. */
|
|
4016
|
+
builderCode?: string;
|
|
4017
|
+
/** @defaultValue OrderType.FAK */
|
|
4018
|
+
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3807
4019
|
};
|
|
3808
|
-
type PrepareMarketSellOrderRequest =
|
|
4020
|
+
type PrepareMarketSellOrderRequest = {
|
|
4021
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
4022
|
+
assetId: string;
|
|
4023
|
+
tokenId?: never;
|
|
3809
4024
|
/** Sell side of the order. */
|
|
3810
4025
|
side: OrderSide.SELL;
|
|
3811
|
-
/**
|
|
3812
|
-
* Number of outcome shares to sell.
|
|
3813
|
-
*
|
|
3814
|
-
* This is the human-readable token amount: `1` means one full share, not one
|
|
3815
|
-
* 6-decimal base unit.
|
|
3816
|
-
*/
|
|
4026
|
+
/** Number of outcome shares to sell in human-readable units. */
|
|
3817
4027
|
shares: number | string;
|
|
3818
|
-
/**
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
4028
|
+
/** Lowest acceptable price per share; the order only fills at this price or better. */
|
|
4029
|
+
minPrice?: number | string;
|
|
4030
|
+
/** Optional builder attribution code. */
|
|
4031
|
+
builderCode?: string;
|
|
4032
|
+
/** @defaultValue OrderType.FAK */
|
|
4033
|
+
orderType?: OrderType.FAK | OrderType.FOK;
|
|
4034
|
+
} | {
|
|
4035
|
+
assetId?: never;
|
|
4036
|
+
/** @deprecated Use `assetId`. */
|
|
4037
|
+
tokenId: string;
|
|
4038
|
+
/** Sell side of the order. */
|
|
4039
|
+
side: OrderSide.SELL;
|
|
4040
|
+
/** Number of outcome shares to sell in human-readable units. */
|
|
4041
|
+
shares: number | string;
|
|
4042
|
+
/** Lowest acceptable price per share; the order only fills at this price or better. */
|
|
3826
4043
|
minPrice?: number | string;
|
|
4044
|
+
/** Optional builder attribution code. */
|
|
4045
|
+
builderCode?: string;
|
|
4046
|
+
/** @defaultValue OrderType.FAK */
|
|
4047
|
+
orderType?: OrderType.FAK | OrderType.FOK;
|
|
3827
4048
|
};
|
|
3828
4049
|
type PrepareMarketOrderRequest = PrepareMarketBuyOrderRequest | PrepareMarketSellOrderRequest;
|
|
3829
|
-
type PrepareLimitOrderRequest =
|
|
3830
|
-
/**
|
|
4050
|
+
type PrepareLimitOrderRequest = {
|
|
4051
|
+
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
4052
|
+
assetId: string;
|
|
4053
|
+
tokenId?: never;
|
|
4054
|
+
/** Price used to create the order. */
|
|
3831
4055
|
price: number | string;
|
|
4056
|
+
/** Order size in outcome shares, expressed in human-readable units. */
|
|
4057
|
+
size: number | string;
|
|
4058
|
+
/** Side of the order. */
|
|
4059
|
+
side: OrderSide;
|
|
4060
|
+
/** Optional builder attribution code. */
|
|
4061
|
+
builderCode?: string;
|
|
3832
4062
|
/**
|
|
3833
|
-
*
|
|
3834
|
-
*
|
|
3835
|
-
|
|
3836
|
-
|
|
4063
|
+
* Posts the prepared order as post-only when submitted.
|
|
4064
|
+
* @defaultValue false
|
|
4065
|
+
*/
|
|
4066
|
+
postOnly?: boolean;
|
|
4067
|
+
/**
|
|
4068
|
+
* Unix timestamp in seconds after which the order expires. When provided,
|
|
4069
|
+
* it must be at least 3 minutes in the future and creates a GTD order.
|
|
3837
4070
|
*/
|
|
4071
|
+
expiration?: number;
|
|
4072
|
+
} | {
|
|
4073
|
+
assetId?: never;
|
|
4074
|
+
/** @deprecated Use `assetId`. */
|
|
4075
|
+
tokenId: string;
|
|
4076
|
+
/** Price used to create the order. */
|
|
4077
|
+
price: number | string;
|
|
4078
|
+
/** Order size in outcome shares, expressed in human-readable units. */
|
|
3838
4079
|
size: number | string;
|
|
3839
|
-
/** Side of the order */
|
|
4080
|
+
/** Side of the order. */
|
|
3840
4081
|
side: OrderSide;
|
|
3841
4082
|
/** Optional builder attribution code. */
|
|
3842
|
-
builderCode?:
|
|
4083
|
+
builderCode?: string;
|
|
3843
4084
|
/**
|
|
3844
4085
|
* Posts the prepared order as post-only when submitted.
|
|
3845
|
-
*
|
|
3846
4086
|
* @defaultValue false
|
|
3847
4087
|
*/
|
|
3848
4088
|
postOnly?: boolean;
|
|
3849
4089
|
/**
|
|
3850
|
-
* Unix timestamp in seconds after which the order expires.
|
|
3851
|
-
*
|
|
3852
|
-
* When provided, the SDK prepares a Good-Til-Date (GTD) limit order that
|
|
3853
|
-
* expires at the given timestamp.
|
|
3854
|
-
*
|
|
3855
|
-
* The timestamp must be at least 3 minutes in the future. Add your own
|
|
3856
|
-
* buffer for network latency and clock skew when deriving it from the
|
|
3857
|
-
* current time.
|
|
3858
|
-
*
|
|
3859
|
-
* When omitted, the SDK prepares a Good-Til-Cancelled (GTC) limit order.
|
|
4090
|
+
* Unix timestamp in seconds after which the order expires. When provided,
|
|
4091
|
+
* it must be at least 3 minutes in the future and creates a GTD order.
|
|
3860
4092
|
*/
|
|
3861
4093
|
expiration?: number;
|
|
3862
4094
|
};
|
|
@@ -3904,9 +4136,9 @@ declare const PostOrdersError: {
|
|
|
3904
4136
|
* @example
|
|
3905
4137
|
* ```ts
|
|
3906
4138
|
* const order = await client.createMarketOrder({
|
|
4139
|
+
* assetId: '0x0122…0000',
|
|
3907
4140
|
* amount: 10,
|
|
3908
4141
|
* side: OrderSide.BUY,
|
|
3909
|
-
* tokenId: '123',
|
|
3910
4142
|
* });
|
|
3911
4143
|
* const response = await postOrder(client)(order);
|
|
3912
4144
|
* ```
|
|
@@ -3963,9 +4195,9 @@ declare const WaitForOrderFillSettlementError: {
|
|
|
3963
4195
|
* @example
|
|
3964
4196
|
* ```ts
|
|
3965
4197
|
* const response = await client.placeMarketOrder({
|
|
4198
|
+
* assetId: '0x0122…0000',
|
|
3966
4199
|
* amount: 10,
|
|
3967
4200
|
* side: OrderSide.BUY,
|
|
3968
|
-
* tokenId: '123',
|
|
3969
4201
|
* });
|
|
3970
4202
|
*
|
|
3971
4203
|
* if (response.ok) {
|
|
@@ -3988,27 +4220,27 @@ type SecureTradingActions = {
|
|
|
3988
4220
|
* @example Basic market buy
|
|
3989
4221
|
* ```ts
|
|
3990
4222
|
* const order = await client.createMarketOrder({
|
|
4223
|
+
* assetId: '0x0122…0000',
|
|
3991
4224
|
* amount: 10,
|
|
3992
4225
|
* side: OrderSide.BUY,
|
|
3993
|
-
* tokenId: '123',
|
|
3994
4226
|
* });
|
|
3995
4227
|
* ```
|
|
3996
4228
|
*
|
|
3997
4229
|
* @example Protected market buy
|
|
3998
4230
|
* ```ts
|
|
3999
4231
|
* const order = await client.createMarketOrder({
|
|
4232
|
+
* assetId: '0x0122…0000',
|
|
4000
4233
|
* amount: 10,
|
|
4001
4234
|
* maxPrice: '0.55',
|
|
4002
4235
|
* side: OrderSide.BUY,
|
|
4003
|
-
* tokenId: '123',
|
|
4004
4236
|
* });
|
|
4005
4237
|
* ```
|
|
4006
4238
|
*
|
|
4007
|
-
* @example
|
|
4239
|
+
* @example Polymarket V2 market buy
|
|
4008
4240
|
* ```ts
|
|
4009
4241
|
* const order = await client.createMarketOrder({
|
|
4242
|
+
* assetId: '0x0122…0000',
|
|
4010
4243
|
* amount: 10,
|
|
4011
|
-
* positionId: '456',
|
|
4012
4244
|
* side: OrderSide.BUY,
|
|
4013
4245
|
* });
|
|
4014
4246
|
* ```
|
|
@@ -4028,9 +4260,9 @@ type SecureTradingActions = {
|
|
|
4028
4260
|
* @example Basic market buy
|
|
4029
4261
|
* ```ts
|
|
4030
4262
|
* const response = await client.placeMarketOrder({
|
|
4263
|
+
* assetId: '0x0122…0000',
|
|
4031
4264
|
* amount: 10,
|
|
4032
4265
|
* side: OrderSide.BUY,
|
|
4033
|
-
* tokenId: '123',
|
|
4034
4266
|
* });
|
|
4035
4267
|
*
|
|
4036
4268
|
* // response: OrderResponse
|
|
@@ -4039,10 +4271,10 @@ type SecureTradingActions = {
|
|
|
4039
4271
|
* @example Protected market sell
|
|
4040
4272
|
* ```ts
|
|
4041
4273
|
* const response = await client.placeMarketOrder({
|
|
4274
|
+
* assetId: '0x0122…0000',
|
|
4042
4275
|
* minPrice: '0.54',
|
|
4043
4276
|
* shares: 10,
|
|
4044
4277
|
* side: OrderSide.SELL,
|
|
4045
|
-
* tokenId: '123',
|
|
4046
4278
|
* });
|
|
4047
4279
|
*
|
|
4048
4280
|
* // response: OrderResponse
|
|
@@ -4051,9 +4283,9 @@ type SecureTradingActions = {
|
|
|
4051
4283
|
* @example Market buy followed to settlement
|
|
4052
4284
|
* ```ts
|
|
4053
4285
|
* const response = await client.placeMarketOrder({
|
|
4286
|
+
* assetId: '0x0122…0000',
|
|
4054
4287
|
* amount: 10,
|
|
4055
4288
|
* side: OrderSide.BUY,
|
|
4056
|
-
* tokenId: '123',
|
|
4057
4289
|
* });
|
|
4058
4290
|
*
|
|
4059
4291
|
* if (response.ok) {
|
|
@@ -4074,22 +4306,22 @@ type SecureTradingActions = {
|
|
|
4074
4306
|
* @throws {@link CreateLimitOrderError}
|
|
4075
4307
|
* Thrown on failure.
|
|
4076
4308
|
*
|
|
4077
|
-
* @example
|
|
4309
|
+
* @example CTF limit order
|
|
4078
4310
|
* ```ts
|
|
4079
4311
|
* const order = await client.createLimitOrder({
|
|
4312
|
+
* assetId: '0x0122…0000',
|
|
4080
4313
|
* postOnly: true,
|
|
4081
4314
|
* price: 0.52,
|
|
4082
4315
|
* side: OrderSide.BUY,
|
|
4083
4316
|
* size: 10,
|
|
4084
|
-
* tokenId: '123',
|
|
4085
4317
|
* });
|
|
4086
4318
|
* ```
|
|
4087
4319
|
*
|
|
4088
|
-
* @example
|
|
4320
|
+
* @example Polymarket V2 limit order
|
|
4089
4321
|
* ```ts
|
|
4090
4322
|
* const order = await client.createLimitOrder({
|
|
4323
|
+
* assetId: '0x0122…0000',
|
|
4091
4324
|
* postOnly: true,
|
|
4092
|
-
* positionId: '456',
|
|
4093
4325
|
* price: 0.52,
|
|
4094
4326
|
* side: OrderSide.BUY,
|
|
4095
4327
|
* size: 10,
|
|
@@ -4111,11 +4343,11 @@ type SecureTradingActions = {
|
|
|
4111
4343
|
* @example
|
|
4112
4344
|
* ```ts
|
|
4113
4345
|
* const response = await client.placeLimitOrder({
|
|
4346
|
+
* assetId: '0x0122…0000',
|
|
4114
4347
|
* postOnly: true,
|
|
4115
4348
|
* price: 0.52,
|
|
4116
4349
|
* side: OrderSide.BUY,
|
|
4117
4350
|
* size: 10,
|
|
4118
|
-
* tokenId: '123',
|
|
4119
4351
|
* });
|
|
4120
4352
|
*
|
|
4121
4353
|
* // response: OrderResponse
|
|
@@ -4165,9 +4397,9 @@ type SecureTradingActions = {
|
|
|
4165
4397
|
* @example
|
|
4166
4398
|
* ```ts
|
|
4167
4399
|
* const response = await client.placeMarketOrder({
|
|
4400
|
+
* assetId: '0x0122…0000',
|
|
4168
4401
|
* amount: 10,
|
|
4169
4402
|
* side: OrderSide.BUY,
|
|
4170
|
-
* tokenId: '123',
|
|
4171
4403
|
* });
|
|
4172
4404
|
*
|
|
4173
4405
|
* if (response.ok) {
|
|
@@ -4284,7 +4516,41 @@ type SecureTradingActions = {
|
|
|
4284
4516
|
};
|
|
4285
4517
|
declare function tradingActions(client: BaseSecureClient): SecureTradingActions;
|
|
4286
4518
|
|
|
4519
|
+
type PublicWalletActions = {
|
|
4520
|
+
/**
|
|
4521
|
+
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
4522
|
+
*
|
|
4523
|
+
* This method only reads on-chain state. It does not require a signer or
|
|
4524
|
+
* submit transactions.
|
|
4525
|
+
*
|
|
4526
|
+
* @throws {@link FetchTradingApprovalsStateError}
|
|
4527
|
+
* Thrown on failure.
|
|
4528
|
+
*
|
|
4529
|
+
* @example
|
|
4530
|
+
* ```ts
|
|
4531
|
+
* const state = await client.fetchTradingApprovalsState({
|
|
4532
|
+
* user: '0x1234…',
|
|
4533
|
+
* });
|
|
4534
|
+
* ```
|
|
4535
|
+
*/
|
|
4536
|
+
fetchTradingApprovalsState(request: FetchTradingApprovalsStateRequest): Promise<TradingApprovalsState>;
|
|
4537
|
+
};
|
|
4287
4538
|
type SecureWalletActions = {
|
|
4539
|
+
/**
|
|
4540
|
+
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
4541
|
+
*
|
|
4542
|
+
* This method reads the authenticated account's wallet state. It only reads
|
|
4543
|
+
* on-chain state and does not submit transactions.
|
|
4544
|
+
*
|
|
4545
|
+
* @throws {@link FetchTradingApprovalsStateError}
|
|
4546
|
+
* Thrown on failure.
|
|
4547
|
+
*
|
|
4548
|
+
* @example
|
|
4549
|
+
* ```ts
|
|
4550
|
+
* const state = await client.fetchTradingApprovalsState();
|
|
4551
|
+
* ```
|
|
4552
|
+
*/
|
|
4553
|
+
fetchTradingApprovalsState(): Promise<TradingApprovalsState>;
|
|
4288
4554
|
/**
|
|
4289
4555
|
* Sets up the approvals required for trading and supported position lifecycle workflows.
|
|
4290
4556
|
*
|
|
@@ -4512,9 +4778,10 @@ type SecureWalletActions = {
|
|
|
4512
4778
|
*/
|
|
4513
4779
|
executeCollateralReturnPlan(request: ExecuteCollateralReturnPlanRequest): Promise<TransactionHandle>;
|
|
4514
4780
|
};
|
|
4781
|
+
declare function walletActions(client: BasePublicClient): PublicWalletActions;
|
|
4515
4782
|
declare function walletActions(client: BaseSecureClient): SecureWalletActions;
|
|
4516
4783
|
|
|
4517
|
-
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions>;
|
|
4784
|
+
type PublicActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & PublicPerpsActions & PublicAccountActions & PublicRewardsActions & PublicSubscriptionsActions & PublicWalletActions>;
|
|
4518
4785
|
type SecureActions = Prettify<DiscoveryActions & DataActions & AnalyticsActions & SecurePerpsActions & SecureAccountActions & SecureRewardsActions & SecureRfqActions & SessionKeyActions & SecureSubscriptionsActions & SecureWalletActions & SecureTradingActions>;
|
|
4519
4786
|
declare function allActions(client: BasePublicClient): PublicActions;
|
|
4520
4787
|
declare function allActions(client: BaseSecureClient): SecureActions;
|
|
@@ -5438,6 +5705,66 @@ type PrepareTradingApprovalsError = RequestRejectedError | TransportError | Unex
|
|
|
5438
5705
|
declare const PrepareTradingApprovalsError: {
|
|
5439
5706
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
5440
5707
|
};
|
|
5708
|
+
/** An ERC-20 allowance required for supported trading workflows. */
|
|
5709
|
+
type Erc20TradingApproval = {
|
|
5710
|
+
/** Required allowance target, not the difference from the current allowance. */
|
|
5711
|
+
amount: bigint;
|
|
5712
|
+
/** Address that must be allowed to spend the token. */
|
|
5713
|
+
spenderAddress: EvmAddress$1;
|
|
5714
|
+
/** ERC-20 token whose allowance is required. */
|
|
5715
|
+
tokenAddress: EvmAddress$1;
|
|
5716
|
+
};
|
|
5717
|
+
/** An ERC-1155 operator approval required for supported trading workflows. */
|
|
5718
|
+
type Erc1155TradingApproval = {
|
|
5719
|
+
/** Address that must be approved to operate the token. */
|
|
5720
|
+
operatorAddress: EvmAddress$1;
|
|
5721
|
+
/** ERC-1155 token whose operator approval is required. */
|
|
5722
|
+
tokenAddress: EvmAddress$1;
|
|
5723
|
+
};
|
|
5724
|
+
/** Trading approval requirements grouped by token standard. */
|
|
5725
|
+
type TradingApprovalRequirements = {
|
|
5726
|
+
/** Required ERC-20 allowances. */
|
|
5727
|
+
erc20: Erc20TradingApproval[];
|
|
5728
|
+
/** Required ERC-1155 operator approvals. */
|
|
5729
|
+
erc1155: Erc1155TradingApproval[];
|
|
5730
|
+
};
|
|
5731
|
+
/** Parameters for reading a wallet's trading approval state. */
|
|
5732
|
+
type FetchTradingApprovalsStateRequest = {
|
|
5733
|
+
/** Wallet address whose trading approval state should be inspected. */
|
|
5734
|
+
user: string;
|
|
5735
|
+
};
|
|
5736
|
+
/** The current trading approval state for a wallet. */
|
|
5737
|
+
type TradingApprovalsState = {
|
|
5738
|
+
/** Whether the wallet satisfies every required trading approval. */
|
|
5739
|
+
isFullyApproved: boolean;
|
|
5740
|
+
/** Approvals the wallet must grant to become fully approved. */
|
|
5741
|
+
missing: TradingApprovalRequirements;
|
|
5742
|
+
};
|
|
5743
|
+
type FetchTradingApprovalsStateError = RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
5744
|
+
declare const FetchTradingApprovalsStateError: {
|
|
5745
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError;
|
|
5746
|
+
};
|
|
5747
|
+
/**
|
|
5748
|
+
* Reads the approvals a wallet is missing for supported trading workflows.
|
|
5749
|
+
*
|
|
5750
|
+
* This action only reads on-chain state. It does not require a signer or submit
|
|
5751
|
+
* transactions.
|
|
5752
|
+
*
|
|
5753
|
+
* @example
|
|
5754
|
+
* ```ts
|
|
5755
|
+
* const state = await fetchTradingApprovalsState(client, {
|
|
5756
|
+
* user: '0x1234…',
|
|
5757
|
+
* });
|
|
5758
|
+
*
|
|
5759
|
+
* if (!state.isFullyApproved) {
|
|
5760
|
+
* console.log(state.missing);
|
|
5761
|
+
* }
|
|
5762
|
+
* ```
|
|
5763
|
+
*
|
|
5764
|
+
* @throws {@link FetchTradingApprovalsStateError}
|
|
5765
|
+
* Thrown on failure.
|
|
5766
|
+
*/
|
|
5767
|
+
declare function fetchTradingApprovalsState(client: BaseClient, request: FetchTradingApprovalsStateRequest): Promise<TradingApprovalsState>;
|
|
5441
5768
|
/**
|
|
5442
5769
|
* Starts a trading-setup approval workflow.
|
|
5443
5770
|
*
|
|
@@ -5552,7 +5879,7 @@ declare const FetchMidpointError: {
|
|
|
5552
5879
|
* @example
|
|
5553
5880
|
* ```ts
|
|
5554
5881
|
* const midpoint = await fetchMidpoint(client, {
|
|
5555
|
-
* assetId: '
|
|
5882
|
+
* assetId: '0x0122…0000',
|
|
5556
5883
|
* });
|
|
5557
5884
|
*
|
|
5558
5885
|
* // midpoint === '0.53'
|
|
@@ -5586,11 +5913,11 @@ declare const FetchMidpointsError: {
|
|
|
5586
5913
|
* ```ts
|
|
5587
5914
|
* const midpoints = await fetchMidpoints(client, [
|
|
5588
5915
|
* {
|
|
5589
|
-
* assetId: '
|
|
5916
|
+
* assetId: '0x0122…0000',
|
|
5590
5917
|
* },
|
|
5591
5918
|
* ]);
|
|
5592
5919
|
*
|
|
5593
|
-
* // midpoints['
|
|
5920
|
+
* // midpoints['0x0122…0000'] === '0.53'
|
|
5594
5921
|
* ```
|
|
5595
5922
|
*
|
|
5596
5923
|
*/
|
|
@@ -5620,7 +5947,7 @@ declare const FetchTickSizeError: {
|
|
|
5620
5947
|
* @example
|
|
5621
5948
|
* ```ts
|
|
5622
5949
|
* const tickSize = await fetchTickSize(client, {
|
|
5623
|
-
* assetId: '
|
|
5950
|
+
* assetId: '0x0122…0000',
|
|
5624
5951
|
* });
|
|
5625
5952
|
*
|
|
5626
5953
|
* // tickSize === 0.01
|
|
@@ -5652,7 +5979,7 @@ declare const FetchNegRiskError: {
|
|
|
5652
5979
|
* @example
|
|
5653
5980
|
* ```ts
|
|
5654
5981
|
* const negRisk = await fetchNegRisk(client, {
|
|
5655
|
-
* assetId: '
|
|
5982
|
+
* assetId: '0x0122…0000',
|
|
5656
5983
|
* });
|
|
5657
5984
|
*
|
|
5658
5985
|
* // negRisk === false
|
|
@@ -5745,7 +6072,7 @@ declare const FetchPriceError: {
|
|
|
5745
6072
|
* @example
|
|
5746
6073
|
* ```ts
|
|
5747
6074
|
* const price = await fetchPrice(client, {
|
|
5748
|
-
* assetId: '
|
|
6075
|
+
* assetId: '0x0122…0000',
|
|
5749
6076
|
* side: OrderSide.BUY,
|
|
5750
6077
|
* });
|
|
5751
6078
|
*
|
|
@@ -5782,12 +6109,12 @@ declare const FetchPricesError: {
|
|
|
5782
6109
|
* ```ts
|
|
5783
6110
|
* const prices = await fetchPrices(client, [
|
|
5784
6111
|
* {
|
|
5785
|
-
* assetId: '
|
|
6112
|
+
* assetId: '0x0122…0000',
|
|
5786
6113
|
* side: OrderSide.BUY,
|
|
5787
6114
|
* },
|
|
5788
6115
|
* ]);
|
|
5789
6116
|
*
|
|
5790
|
-
* // prices['
|
|
6117
|
+
* // prices['0x0122…0000']?.BUY === '0.52'
|
|
5791
6118
|
* ```
|
|
5792
6119
|
*
|
|
5793
6120
|
*/
|
|
@@ -5817,7 +6144,7 @@ declare const FetchOrderBookError: {
|
|
|
5817
6144
|
* @example
|
|
5818
6145
|
* ```ts
|
|
5819
6146
|
* const orderBook = await fetchOrderBook(client, {
|
|
5820
|
-
* assetId: '
|
|
6147
|
+
* assetId: '0x0122…0000',
|
|
5821
6148
|
* });
|
|
5822
6149
|
*
|
|
5823
6150
|
* // orderBook.bids / orderBook.asks
|
|
@@ -5850,7 +6177,7 @@ declare const FetchOrderBooksError: {
|
|
|
5850
6177
|
* ```ts
|
|
5851
6178
|
* const books = await fetchOrderBooks(client, [
|
|
5852
6179
|
* {
|
|
5853
|
-
* assetId: '
|
|
6180
|
+
* assetId: '0x0122…0000',
|
|
5854
6181
|
* },
|
|
5855
6182
|
* ])
|
|
5856
6183
|
*
|
|
@@ -5883,7 +6210,7 @@ declare const FetchSpreadError: {
|
|
|
5883
6210
|
* @example
|
|
5884
6211
|
* ```ts
|
|
5885
6212
|
* const spread = await fetchSpread(client, {
|
|
5886
|
-
* assetId: '
|
|
6213
|
+
* assetId: '0x0122…0000',
|
|
5887
6214
|
* });
|
|
5888
6215
|
*
|
|
5889
6216
|
* // spread === '0.02'
|
|
@@ -5917,11 +6244,11 @@ declare const FetchSpreadsError: {
|
|
|
5917
6244
|
* ```ts
|
|
5918
6245
|
* const spreads = await fetchSpreads(client, [
|
|
5919
6246
|
* {
|
|
5920
|
-
* assetId: '
|
|
6247
|
+
* assetId: '0x0122…0000',
|
|
5921
6248
|
* },
|
|
5922
6249
|
* ]);
|
|
5923
6250
|
*
|
|
5924
|
-
* // spreads['
|
|
6251
|
+
* // spreads['0x0122…0000'] === '0.02'
|
|
5925
6252
|
* ```
|
|
5926
6253
|
*
|
|
5927
6254
|
*/
|
|
@@ -5953,7 +6280,7 @@ declare const FetchLastTradePriceError: {
|
|
|
5953
6280
|
* @example
|
|
5954
6281
|
* ```ts
|
|
5955
6282
|
* const trade = await fetchLastTradePrice(client, {
|
|
5956
|
-
* assetId: '
|
|
6283
|
+
* assetId: '0x0122…0000',
|
|
5957
6284
|
* });
|
|
5958
6285
|
*
|
|
5959
6286
|
* // trade === LastTradePrice | null
|
|
@@ -5988,56 +6315,13 @@ declare const FetchLastTradePricesError: {
|
|
|
5988
6315
|
*
|
|
5989
6316
|
* @example
|
|
5990
6317
|
* ```ts
|
|
5991
|
-
* const trades = await fetchLastTradePrices(client, [{ assetId: '
|
|
6318
|
+
* const trades = await fetchLastTradePrices(client, [{ assetId: '0x0122…0000' }]);
|
|
5992
6319
|
*
|
|
5993
|
-
* const trade = trades.find((candidate) => candidate.assetId === '
|
|
6320
|
+
* const trade = trades.find((candidate) => candidate.assetId === '0x0122…0000');
|
|
5994
6321
|
* ```
|
|
5995
6322
|
*
|
|
5996
6323
|
*/
|
|
5997
6324
|
declare function fetchLastTradePrices(client: BaseClient, request: FetchLastTradePricesRequest): Promise<LastTradePriceForAsset[]>;
|
|
5998
|
-
type FetchPriceHistoryRequest = {
|
|
5999
|
-
/** Identifier for a CTF token or Polymarket V2 position. */
|
|
6000
|
-
assetId: string;
|
|
6001
|
-
tokenId?: never;
|
|
6002
|
-
startTs?: number;
|
|
6003
|
-
endTs?: number;
|
|
6004
|
-
fidelity?: number;
|
|
6005
|
-
interval?: PriceHistoryInterval;
|
|
6006
|
-
} | {
|
|
6007
|
-
assetId?: never;
|
|
6008
|
-
/** @deprecated Use `assetId`. */
|
|
6009
|
-
tokenId: string;
|
|
6010
|
-
startTs?: number;
|
|
6011
|
-
endTs?: number;
|
|
6012
|
-
fidelity?: number;
|
|
6013
|
-
interval?: PriceHistoryInterval;
|
|
6014
|
-
};
|
|
6015
|
-
type FetchPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6016
|
-
declare const FetchPriceHistoryError: {
|
|
6017
|
-
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6018
|
-
};
|
|
6019
|
-
/**
|
|
6020
|
-
* Fetches historical price points for an exchange asset.
|
|
6021
|
-
*
|
|
6022
|
-
* @remarks
|
|
6023
|
-
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6024
|
-
*
|
|
6025
|
-
* @throws {@link FetchPriceHistoryError}
|
|
6026
|
-
* Thrown on failure.
|
|
6027
|
-
*
|
|
6028
|
-
* @example
|
|
6029
|
-
* ```ts
|
|
6030
|
-
* const history = await fetchPriceHistory(client, {
|
|
6031
|
-
* assetId: '123',
|
|
6032
|
-
* interval: PriceHistoryInterval.ONE_DAY,
|
|
6033
|
-
* fidelity: 60,
|
|
6034
|
-
* });
|
|
6035
|
-
*
|
|
6036
|
-
* // history === PriceHistoryPoint[]
|
|
6037
|
-
* ```
|
|
6038
|
-
*
|
|
6039
|
-
*/
|
|
6040
|
-
declare function fetchPriceHistory(client: BaseClient, request: FetchPriceHistoryRequest): Promise<PriceHistoryPoint[]>;
|
|
6041
6325
|
declare const ListCurrentRewardsRequestSchema: z.ZodDefault<z.ZodObject<{
|
|
6042
6326
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6043
6327
|
sponsored: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -6405,10 +6689,6 @@ declare const FetchEventTagsRequestSchema: z.ZodObject<{
|
|
|
6405
6689
|
id: z.ZodString;
|
|
6406
6690
|
}, z.core.$strip>;
|
|
6407
6691
|
type FetchEventTagsRequest = z.input<typeof FetchEventTagsRequestSchema>;
|
|
6408
|
-
declare const FetchEventLiveVolumeRequestSchema: z.ZodObject<{
|
|
6409
|
-
id: z.ZodString;
|
|
6410
|
-
}, z.core.$strip>;
|
|
6411
|
-
type FetchEventLiveVolumeRequest = z.input<typeof FetchEventLiveVolumeRequestSchema>;
|
|
6412
6692
|
type ListEventsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6413
6693
|
declare const ListEventsError: {
|
|
6414
6694
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -6508,12 +6788,66 @@ declare const FetchEventTagsError: {
|
|
|
6508
6788
|
* ```
|
|
6509
6789
|
*/
|
|
6510
6790
|
declare function fetchEventTags(client: BaseClient, request: FetchEventTagsRequest): Promise<TagReference[]>;
|
|
6791
|
+
type FetchResolutionsByQuestionRequest = {
|
|
6792
|
+
questionId: string;
|
|
6793
|
+
conditionIds?: never;
|
|
6794
|
+
eventIds?: never;
|
|
6795
|
+
};
|
|
6796
|
+
type FetchResolutionsByConditionRequest = {
|
|
6797
|
+
questionId?: never;
|
|
6798
|
+
conditionIds: string[];
|
|
6799
|
+
eventIds?: never;
|
|
6800
|
+
};
|
|
6801
|
+
type FetchResolutionsByEventRequest = {
|
|
6802
|
+
questionId?: never;
|
|
6803
|
+
conditionIds?: never;
|
|
6804
|
+
eventIds: Array<number | string>;
|
|
6805
|
+
};
|
|
6806
|
+
type FetchResolutionsRequest = FetchResolutionsByQuestionRequest | FetchResolutionsByConditionRequest | FetchResolutionsByEventRequest;
|
|
6807
|
+
type FetchResolutionsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6808
|
+
declare const FetchResolutionsError: {
|
|
6809
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6810
|
+
};
|
|
6811
|
+
/**
|
|
6812
|
+
* Fetches resolution lifecycle rows by question, condition, or event.
|
|
6813
|
+
*
|
|
6814
|
+
* Provide exactly one selector. Condition and event lookups accept at most 20
|
|
6815
|
+
* distinct IDs and return one row per matching condition. Missing resolutions
|
|
6816
|
+
* return an empty array. A 31-byte protocol v2 market condition ID is
|
|
6817
|
+
* right-padded to its canonical 32-byte form. A 31-byte combo condition ID is
|
|
6818
|
+
* rejected.
|
|
6819
|
+
*
|
|
6820
|
+
* @remarks
|
|
6821
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6822
|
+
*
|
|
6823
|
+
* @throws {@link FetchResolutionsError}
|
|
6824
|
+
* Thrown on failure.
|
|
6825
|
+
*
|
|
6826
|
+
* @example
|
|
6827
|
+
* ```ts
|
|
6828
|
+
* const resolutions = await fetchResolutions(client, {
|
|
6829
|
+
* eventIds: ['903193'],
|
|
6830
|
+
* });
|
|
6831
|
+
*
|
|
6832
|
+
* // resolutions: Resolution[]
|
|
6833
|
+
* ```
|
|
6834
|
+
*/
|
|
6835
|
+
declare function fetchResolutions(client: BaseClient, request: FetchResolutionsRequest): Promise<Resolution[]>;
|
|
6836
|
+
declare const FetchEventLiveVolumeRequestSchema: z.ZodObject<{
|
|
6837
|
+
eventIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodNumber, z.ZodTransform<string, number>>]>, z.ZodTransform<_polymarket_bindings.EventId, string>>>, z.ZodTransform<_polymarket_bindings.EventId[], _polymarket_bindings.EventId[]>>;
|
|
6838
|
+
}, z.core.$strip>;
|
|
6839
|
+
type FetchEventLiveVolumeRequest = z.input<typeof FetchEventLiveVolumeRequestSchema>;
|
|
6511
6840
|
type FetchEventLiveVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6512
6841
|
declare const FetchEventLiveVolumeError: {
|
|
6513
6842
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6514
6843
|
};
|
|
6515
6844
|
/**
|
|
6516
|
-
* Fetches
|
|
6845
|
+
* Fetches cumulative taker volume for one or more events.
|
|
6846
|
+
*
|
|
6847
|
+
* Results contain one row per market, ordered by taker volume descending, and
|
|
6848
|
+
* a total across all returned markets. Volume is measured in shares. Event IDs
|
|
6849
|
+
* must be positive 32-bit integers. Transient rate limits are retried
|
|
6850
|
+
* automatically.
|
|
6517
6851
|
*
|
|
6518
6852
|
* @remarks
|
|
6519
6853
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -6524,63 +6858,20 @@ declare const FetchEventLiveVolumeError: {
|
|
|
6524
6858
|
* @example
|
|
6525
6859
|
* ```ts
|
|
6526
6860
|
* const volume = await fetchEventLiveVolume(client, {
|
|
6527
|
-
*
|
|
6861
|
+
* eventIds: ['160707'],
|
|
6528
6862
|
* });
|
|
6529
6863
|
*
|
|
6530
|
-
* // volume: LiveVolume
|
|
6864
|
+
* // volume: LiveVolume
|
|
6531
6865
|
* ```
|
|
6532
6866
|
*/
|
|
6533
|
-
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume
|
|
6867
|
+
declare function fetchEventLiveVolume(client: BaseClient, request: FetchEventLiveVolumeRequest): Promise<LiveVolume>;
|
|
6534
6868
|
|
|
6535
6869
|
declare const ListBuilderLeaderboardRequestSchema: z.ZodObject<{
|
|
6536
6870
|
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6537
6871
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6538
|
-
|
|
6539
|
-
ALL: "ALL";
|
|
6540
|
-
DAY: "DAY";
|
|
6541
|
-
WEEK: "WEEK";
|
|
6542
|
-
MONTH: "MONTH";
|
|
6543
|
-
}>>;
|
|
6544
|
-
}, z.core.$strip>;
|
|
6545
|
-
declare const ListBuilderVolumeRequestSchema: z.ZodObject<{
|
|
6546
|
-
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6547
|
-
ALL: "ALL";
|
|
6548
|
-
DAY: "DAY";
|
|
6549
|
-
WEEK: "WEEK";
|
|
6550
|
-
MONTH: "MONTH";
|
|
6551
|
-
}>>;
|
|
6552
|
-
}, z.core.$strip>;
|
|
6553
|
-
declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
6554
|
-
category: z.ZodOptional<z.ZodEnum<{
|
|
6555
|
-
OVERALL: "OVERALL";
|
|
6556
|
-
POLITICS: "POLITICS";
|
|
6557
|
-
SPORTS: "SPORTS";
|
|
6558
|
-
CRYPTO: "CRYPTO";
|
|
6559
|
-
CULTURE: "CULTURE";
|
|
6560
|
-
MENTIONS: "MENTIONS";
|
|
6561
|
-
WEATHER: "WEATHER";
|
|
6562
|
-
ECONOMICS: "ECONOMICS";
|
|
6563
|
-
TECH: "TECH";
|
|
6564
|
-
FINANCE: "FINANCE";
|
|
6565
|
-
}>>;
|
|
6566
|
-
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6567
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6568
|
-
timePeriod: z.ZodOptional<z.ZodEnum<{
|
|
6569
|
-
ALL: "ALL";
|
|
6570
|
-
DAY: "DAY";
|
|
6571
|
-
WEEK: "WEEK";
|
|
6572
|
-
MONTH: "MONTH";
|
|
6573
|
-
}>>;
|
|
6574
|
-
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
6575
|
-
PNL: "PNL";
|
|
6576
|
-
VOL: "VOL";
|
|
6577
|
-
}>>;
|
|
6578
|
-
user: z.ZodOptional<z.ZodString>;
|
|
6579
|
-
userName: z.ZodOptional<z.ZodString>;
|
|
6872
|
+
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
6580
6873
|
}, z.core.$strip>;
|
|
6581
6874
|
type ListBuilderLeaderboardRequest = z.input<typeof ListBuilderLeaderboardRequestSchema>;
|
|
6582
|
-
type ListBuilderVolumeRequest = z.input<typeof ListBuilderVolumeRequestSchema>;
|
|
6583
|
-
type ListTraderLeaderboardRequest = z.input<typeof ListTraderLeaderboardRequestSchema>;
|
|
6584
6875
|
type ListBuilderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6585
6876
|
declare const ListBuilderLeaderboardError: {
|
|
6586
6877
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -6588,6 +6879,11 @@ declare const ListBuilderLeaderboardError: {
|
|
|
6588
6879
|
/**
|
|
6589
6880
|
* Lists builder leaderboard rankings.
|
|
6590
6881
|
*
|
|
6882
|
+
* Builders are ranked by attributed share volume within `window`, which
|
|
6883
|
+
* defaults to one day. `builderCode` is the stable identifier; names and
|
|
6884
|
+
* profile images are display metadata. `pageSize` defaults to 100 (max 1000).
|
|
6885
|
+
* Transient rate limits are retried automatically.
|
|
6886
|
+
*
|
|
6591
6887
|
* @remarks
|
|
6592
6888
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6593
6889
|
*
|
|
@@ -6599,14 +6895,14 @@ declare const ListBuilderLeaderboardError: {
|
|
|
6599
6895
|
* ```ts
|
|
6600
6896
|
* const result = listBuilderLeaderboard(client, {
|
|
6601
6897
|
* pageSize: 10,
|
|
6602
|
-
*
|
|
6898
|
+
* window: LeaderboardWindow.Day,
|
|
6603
6899
|
* });
|
|
6604
6900
|
*
|
|
6605
6901
|
* const firstPage = await result.firstPage();
|
|
6606
6902
|
*
|
|
6607
6903
|
* // Optionally, fetch additional pages:
|
|
6608
6904
|
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
6609
|
-
* // page.items:
|
|
6905
|
+
* // page.items: BuilderStanding[]
|
|
6610
6906
|
* }
|
|
6611
6907
|
* ```
|
|
6612
6908
|
*
|
|
@@ -6615,38 +6911,58 @@ declare const ListBuilderLeaderboardError: {
|
|
|
6615
6911
|
* ```ts
|
|
6616
6912
|
* const result = listBuilderLeaderboard(client, {
|
|
6617
6913
|
* pageSize: 10,
|
|
6618
|
-
*
|
|
6914
|
+
* window: LeaderboardWindow.Day,
|
|
6619
6915
|
* });
|
|
6620
6916
|
*
|
|
6621
6917
|
* for await (const page of result) {
|
|
6622
|
-
* // page.items:
|
|
6918
|
+
* // page.items: BuilderStanding[]
|
|
6623
6919
|
* }
|
|
6624
6920
|
* ```
|
|
6625
6921
|
*/
|
|
6626
|
-
declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest): Paginated<
|
|
6627
|
-
|
|
6628
|
-
|
|
6922
|
+
declare function listBuilderLeaderboard(client: BaseClient, request?: ListBuilderLeaderboardRequest): Paginated<BuilderStanding[]>;
|
|
6923
|
+
declare const FetchBuilderVolumeRequestSchema: z.ZodObject<{
|
|
6924
|
+
interval: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.BuilderVolumeInterval>>;
|
|
6925
|
+
bucketLimit: z.ZodOptional<z.ZodNumber>;
|
|
6926
|
+
}, z.core.$strip>;
|
|
6927
|
+
type FetchBuilderVolumeRequest = z.input<typeof FetchBuilderVolumeRequestSchema>;
|
|
6928
|
+
type FetchBuilderVolumeError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6929
|
+
declare const FetchBuilderVolumeError: {
|
|
6629
6930
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6630
6931
|
};
|
|
6631
6932
|
/**
|
|
6632
|
-
*
|
|
6933
|
+
* Fetches the per-builder volume time series.
|
|
6934
|
+
*
|
|
6935
|
+
* `interval` controls bucket width and defaults to daily; use
|
|
6936
|
+
* {@link BuilderVolumeInterval.Year} for one bucket per calendar year.
|
|
6937
|
+
* `bucketLimit` returns that many complete recent buckets (default 30, max 90),
|
|
6938
|
+
* not that many builder rows. Results are newest bucket first, and volume is
|
|
6939
|
+
* measured in shares. Transient rate limits are retried automatically.
|
|
6633
6940
|
*
|
|
6634
6941
|
* @remarks
|
|
6635
6942
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6636
6943
|
*
|
|
6637
|
-
* @throws {@link
|
|
6944
|
+
* @throws {@link FetchBuilderVolumeError}
|
|
6638
6945
|
* Thrown on failure.
|
|
6639
6946
|
*
|
|
6640
6947
|
* @example
|
|
6641
6948
|
* ```ts
|
|
6642
6949
|
* const volume = await fetchBuilderVolume(client, {
|
|
6643
|
-
*
|
|
6950
|
+
* interval: BuilderVolumeInterval.Day,
|
|
6951
|
+
* bucketLimit: 7,
|
|
6644
6952
|
* });
|
|
6645
6953
|
*
|
|
6646
|
-
* // volume:
|
|
6954
|
+
* // volume: BuilderVolumePoint[]
|
|
6647
6955
|
* ```
|
|
6648
6956
|
*/
|
|
6649
|
-
declare function fetchBuilderVolume(client: BaseClient, request?:
|
|
6957
|
+
declare function fetchBuilderVolume(client: BaseClient, request?: FetchBuilderVolumeRequest): Promise<BuilderVolumePoint[]>;
|
|
6958
|
+
declare const ListTraderLeaderboardRequestSchema: z.ZodObject<{
|
|
6959
|
+
category: z.ZodOptional<z.ZodString>;
|
|
6960
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6961
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6962
|
+
sortBy: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.TraderLeaderboardSort>>;
|
|
6963
|
+
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
6964
|
+
}, z.core.$strip>;
|
|
6965
|
+
type ListTraderLeaderboardRequest = z.input<typeof ListTraderLeaderboardRequestSchema>;
|
|
6650
6966
|
type ListTraderLeaderboardError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6651
6967
|
declare const ListTraderLeaderboardError: {
|
|
6652
6968
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -6654,6 +6970,11 @@ declare const ListTraderLeaderboardError: {
|
|
|
6654
6970
|
/**
|
|
6655
6971
|
* Lists trader leaderboard rankings.
|
|
6656
6972
|
*
|
|
6973
|
+
* `window` defaults to one day, `category` to overall, and `sortBy` to PnL.
|
|
6974
|
+
* Finite-window PnL is marked equity change net of flows, while all-time PnL
|
|
6975
|
+
* is realized only. Volume is measured in shares. Tied traders share a rank
|
|
6976
|
+
* and the next rank skips. `pageSize` defaults to 100 (max 1000).
|
|
6977
|
+
*
|
|
6657
6978
|
* @remarks
|
|
6658
6979
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
6659
6980
|
*
|
|
@@ -6664,9 +6985,9 @@ declare const ListTraderLeaderboardError: {
|
|
|
6664
6985
|
* Fetch the first page of results:
|
|
6665
6986
|
* ```ts
|
|
6666
6987
|
* const result = listTraderLeaderboard(client, {
|
|
6667
|
-
* orderBy: 'PNL',
|
|
6668
6988
|
* pageSize: 10,
|
|
6669
|
-
*
|
|
6989
|
+
* sortBy: TraderLeaderboardSort.Pnl,
|
|
6990
|
+
* window: LeaderboardWindow.Week,
|
|
6670
6991
|
* });
|
|
6671
6992
|
*
|
|
6672
6993
|
* const firstPage = await result.firstPage();
|
|
@@ -6681,9 +7002,9 @@ declare const ListTraderLeaderboardError: {
|
|
|
6681
7002
|
* Loop through all pages with `for await`:
|
|
6682
7003
|
* ```ts
|
|
6683
7004
|
* const result = listTraderLeaderboard(client, {
|
|
6684
|
-
* orderBy: 'PNL',
|
|
6685
7005
|
* pageSize: 10,
|
|
6686
|
-
*
|
|
7006
|
+
* sortBy: TraderLeaderboardSort.Pnl,
|
|
7007
|
+
* window: LeaderboardWindow.Week,
|
|
6687
7008
|
* });
|
|
6688
7009
|
*
|
|
6689
7010
|
* for await (const page of result) {
|
|
@@ -6692,6 +7013,79 @@ declare const ListTraderLeaderboardError: {
|
|
|
6692
7013
|
* ```
|
|
6693
7014
|
*/
|
|
6694
7015
|
declare function listTraderLeaderboard(client: BaseClient, request?: ListTraderLeaderboardRequest): Paginated<TraderLeaderboardEntry[]>;
|
|
7016
|
+
declare const FetchTraderLeaderboardStandingRequestSchema: z.ZodObject<{
|
|
7017
|
+
category: z.ZodOptional<z.ZodString>;
|
|
7018
|
+
user: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
7019
|
+
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
7020
|
+
}, z.core.$strip>;
|
|
7021
|
+
type FetchTraderLeaderboardStandingRequest = z.input<typeof FetchTraderLeaderboardStandingRequestSchema>;
|
|
7022
|
+
type FetchTraderLeaderboardStandingError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7023
|
+
declare const FetchTraderLeaderboardStandingError: {
|
|
7024
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7025
|
+
};
|
|
7026
|
+
/**
|
|
7027
|
+
* Fetches one trader's standing on both the PnL and volume boards.
|
|
7028
|
+
*
|
|
7029
|
+
* `window` defaults to one day and `category` to overall. A `null` rank means
|
|
7030
|
+
* the trader is unranked on that board. Returns `null` for an unknown wallet.
|
|
7031
|
+
*
|
|
7032
|
+
* @remarks
|
|
7033
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7034
|
+
*
|
|
7035
|
+
* @throws {@link FetchTraderLeaderboardStandingError}
|
|
7036
|
+
* Thrown on failure.
|
|
7037
|
+
*
|
|
7038
|
+
* @example
|
|
7039
|
+
* ```ts
|
|
7040
|
+
* const standing = await fetchTraderLeaderboardStanding(client, {
|
|
7041
|
+
* user: '0xa71093cafc0c099b4ccab24c3cb8018d817923c4',
|
|
7042
|
+
* window: LeaderboardWindow.All,
|
|
7043
|
+
* });
|
|
7044
|
+
*
|
|
7045
|
+
* // standing: TraderLeaderboardStanding | null
|
|
7046
|
+
* ```
|
|
7047
|
+
*/
|
|
7048
|
+
declare function fetchTraderLeaderboardStanding(client: BaseClient, request: FetchTraderLeaderboardStandingRequest): Promise<TraderLeaderboardStanding | null>;
|
|
7049
|
+
declare const ListBiggestWinnersRequestSchema: z.ZodObject<{
|
|
7050
|
+
category: z.ZodOptional<z.ZodString>;
|
|
7051
|
+
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
7052
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
7053
|
+
window: z.ZodOptional<z.ZodEnum<typeof _polymarket_bindings_data.LeaderboardWindow>>;
|
|
7054
|
+
}, z.core.$strip>;
|
|
7055
|
+
type ListBiggestWinnersRequest = z.input<typeof ListBiggestWinnersRequestSchema>;
|
|
7056
|
+
type ListBiggestWinnersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7057
|
+
declare const ListBiggestWinnersError: {
|
|
7058
|
+
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7059
|
+
};
|
|
7060
|
+
/**
|
|
7061
|
+
* Lists the largest individual winning positions.
|
|
7062
|
+
*
|
|
7063
|
+
* The board has one row per position, ranked by its resolution profit.
|
|
7064
|
+
* `window` applies to resolution time and defaults to one day; `category`
|
|
7065
|
+
* defaults to overall. Equal profits retain distinct row ordinals. Combo rows
|
|
7066
|
+
* have no parent event, so branch on `kind` before using event metadata.
|
|
7067
|
+
* `pageSize` defaults to 100 (max 1000).
|
|
7068
|
+
*
|
|
7069
|
+
* @remarks
|
|
7070
|
+
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7071
|
+
*
|
|
7072
|
+
* @throws {@link ListBiggestWinnersError}
|
|
7073
|
+
* Thrown on failure.
|
|
7074
|
+
*
|
|
7075
|
+
* @example
|
|
7076
|
+
* ```ts
|
|
7077
|
+
* const result = listBiggestWinners(client, {
|
|
7078
|
+
* category: 'sports',
|
|
7079
|
+
* pageSize: 10,
|
|
7080
|
+
* window: LeaderboardWindow.Week,
|
|
7081
|
+
* });
|
|
7082
|
+
*
|
|
7083
|
+
* for await (const page of result) {
|
|
7084
|
+
* // page.items: BiggestWinner[]
|
|
7085
|
+
* }
|
|
7086
|
+
* ```
|
|
7087
|
+
*/
|
|
7088
|
+
declare function listBiggestWinners(client: BaseClient, request?: ListBiggestWinnersRequest): Paginated<BiggestWinner[]>;
|
|
6695
7089
|
|
|
6696
7090
|
declare const ListMarketClarificationsRequestSchema: z.ZodObject<{
|
|
6697
7091
|
marketId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
@@ -6754,7 +7148,7 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
6754
7148
|
ascending: z.ZodOptional<z.ZodBoolean>;
|
|
6755
7149
|
closed: z.ZodOptional<z.ZodBoolean>;
|
|
6756
7150
|
clobTokenIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6757
|
-
cursor: z.ZodOptional<z.ZodCustom<
|
|
7151
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
6758
7152
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
6759
7153
|
conditionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>>>;
|
|
6760
7154
|
cyom: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -6767,7 +7161,6 @@ declare const ListMarketsRequestSchema: z.ZodObject<{
|
|
|
6767
7161
|
liquidityNumMax: z.ZodOptional<z.ZodNumber>;
|
|
6768
7162
|
liquidityNumMin: z.ZodOptional<z.ZodNumber>;
|
|
6769
7163
|
locale: z.ZodOptional<z.ZodString>;
|
|
6770
|
-
marketMakerAddresses: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6771
7164
|
order: z.ZodOptional<z.ZodString>;
|
|
6772
7165
|
positionIds: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.PositionId, string>>>>;
|
|
6773
7166
|
questionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -6806,38 +7199,6 @@ declare const FetchMarketTagsRequestSchema: z.ZodObject<{
|
|
|
6806
7199
|
id: z.ZodString;
|
|
6807
7200
|
}, z.core.$strip>;
|
|
6808
7201
|
type FetchMarketTagsRequest = z.input<typeof FetchMarketTagsRequestSchema>;
|
|
6809
|
-
declare const ListMarketHoldersRequestSchema: z.ZodObject<{
|
|
6810
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
6811
|
-
market: z.ZodArray<z.ZodString>;
|
|
6812
|
-
minBalance: z.ZodOptional<z.ZodNumber>;
|
|
6813
|
-
}, z.core.$strip>;
|
|
6814
|
-
declare const ListOpenInterestRequestSchema: z.ZodObject<{
|
|
6815
|
-
market: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6816
|
-
}, z.core.$strip>;
|
|
6817
|
-
declare const ListMarketPositionsRequestSchema: z.ZodObject<{
|
|
6818
|
-
cursor: z.ZodOptional<z.ZodCustom<_polymarket_bindings.PaginationCursor, _polymarket_bindings.PaginationCursor>>;
|
|
6819
|
-
market: z.ZodString;
|
|
6820
|
-
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
6821
|
-
user: z.ZodOptional<z.ZodString>;
|
|
6822
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
6823
|
-
OPEN: "OPEN";
|
|
6824
|
-
CLOSED: "CLOSED";
|
|
6825
|
-
ALL: "ALL";
|
|
6826
|
-
}>>;
|
|
6827
|
-
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
6828
|
-
TOKENS: "TOKENS";
|
|
6829
|
-
CASH_PNL: "CASH_PNL";
|
|
6830
|
-
REALIZED_PNL: "REALIZED_PNL";
|
|
6831
|
-
TOTAL_PNL: "TOTAL_PNL";
|
|
6832
|
-
}>>;
|
|
6833
|
-
sortDirection: z.ZodOptional<z.ZodEnum<{
|
|
6834
|
-
ASC: "ASC";
|
|
6835
|
-
DESC: "DESC";
|
|
6836
|
-
}>>;
|
|
6837
|
-
}, z.core.$strip>;
|
|
6838
|
-
type ListMarketHoldersRequest = z.input<typeof ListMarketHoldersRequestSchema>;
|
|
6839
|
-
type ListOpenInterestRequest = z.input<typeof ListOpenInterestRequestSchema>;
|
|
6840
|
-
type ListMarketPositionsRequest = z.input<typeof ListMarketPositionsRequestSchema>;
|
|
6841
7202
|
type ListMarketsError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6842
7203
|
declare const ListMarketsError: {
|
|
6843
7204
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
@@ -6885,7 +7246,7 @@ declare const ListMarketsError: {
|
|
|
6885
7246
|
*/
|
|
6886
7247
|
declare function listMarkets(client: BaseClient, request?: ListMarketsRequest): Paginated<Market[]>;
|
|
6887
7248
|
declare const ListComboMarketsRequestSchema: z.ZodObject<{
|
|
6888
|
-
cursor: z.ZodOptional<z.ZodCustom<
|
|
7249
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
6889
7250
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
6890
7251
|
exclude: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_bindings.ConditionId, string>>>>;
|
|
6891
7252
|
}, z.core.$strip>;
|
|
@@ -6986,12 +7347,29 @@ declare const FetchMarketTagsError: {
|
|
|
6986
7347
|
* ```
|
|
6987
7348
|
*/
|
|
6988
7349
|
declare function fetchMarketTags(client: BaseClient, request: FetchMarketTagsRequest): Promise<TagReference[]>;
|
|
7350
|
+
declare const ListMarketHoldersRequestSchema: z.ZodObject<{
|
|
7351
|
+
conditionIds: z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>;
|
|
7352
|
+
cursor: z.ZodOptional<z.ZodCustom<PaginationCursor, PaginationCursor>>;
|
|
7353
|
+
includePnl: z.ZodOptional<z.ZodBoolean>;
|
|
7354
|
+
minBalance: z.ZodOptional<z.ZodNumber>;
|
|
7355
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
7356
|
+
}, z.core.$strip>;
|
|
7357
|
+
type ListMarketHoldersRequest = z.input<typeof ListMarketHoldersRequestSchema>;
|
|
6989
7358
|
type ListMarketHoldersError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
6990
7359
|
declare const ListMarketHoldersError: {
|
|
6991
7360
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
6992
7361
|
};
|
|
6993
7362
|
/**
|
|
6994
|
-
* Lists
|
|
7363
|
+
* Lists top holders grouped by outcome for one or more markets.
|
|
7364
|
+
*
|
|
7365
|
+
* `conditionIds` accepts up to 20 distinct market condition IDs. `pageSize`
|
|
7366
|
+
* defaults to 100 (max 1000) and applies separately to each outcome. Merge
|
|
7367
|
+
* matching `assetId` groups across pages rather than relying on array position.
|
|
7368
|
+
* `minBalance` uses display shares and defaults to `0`; `1` means one share,
|
|
7369
|
+
* equivalent to 1,000,000 base units.
|
|
7370
|
+
* Amounts are net holdings by default. `includePnl` switches to per-outcome
|
|
7371
|
+
* gross holdings and adds position economics; it requires one condition ID and
|
|
7372
|
+
* a page size of at most 100. Transient rate limits are retried automatically.
|
|
6995
7373
|
*
|
|
6996
7374
|
* @remarks
|
|
6997
7375
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
@@ -7001,81 +7379,117 @@ declare const ListMarketHoldersError: {
|
|
|
7001
7379
|
*
|
|
7002
7380
|
* @example
|
|
7003
7381
|
* ```ts
|
|
7004
|
-
* const
|
|
7005
|
-
*
|
|
7006
|
-
*
|
|
7382
|
+
* const result = listMarketHolders(client, {
|
|
7383
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
7384
|
+
* pageSize: 5,
|
|
7007
7385
|
* });
|
|
7008
7386
|
*
|
|
7009
|
-
*
|
|
7387
|
+
* for await (const page of result) {
|
|
7388
|
+
* // page.items: MetaHolder[]
|
|
7389
|
+
* }
|
|
7010
7390
|
* ```
|
|
7011
7391
|
*/
|
|
7012
|
-
declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest):
|
|
7013
|
-
type
|
|
7014
|
-
|
|
7392
|
+
declare function listMarketHolders(client: BaseClient, request: ListMarketHoldersRequest): Paginated<MetaHolder[]>;
|
|
7393
|
+
type ListPriceHistoryRequest = {
|
|
7394
|
+
assetId: string;
|
|
7395
|
+
interval: PriceHistoryInterval;
|
|
7396
|
+
bucketSeconds?: number;
|
|
7397
|
+
cursor?: PaginationCursor;
|
|
7398
|
+
pageSize?: number;
|
|
7399
|
+
start?: never;
|
|
7400
|
+
end?: never;
|
|
7401
|
+
asOf?: never;
|
|
7402
|
+
} | {
|
|
7403
|
+
assetId: string;
|
|
7404
|
+
start: number | Date;
|
|
7405
|
+
end?: number | Date;
|
|
7406
|
+
bucketSeconds?: number;
|
|
7407
|
+
cursor?: PaginationCursor;
|
|
7408
|
+
pageSize?: number;
|
|
7409
|
+
interval?: never;
|
|
7410
|
+
asOf?: never;
|
|
7411
|
+
} | {
|
|
7412
|
+
assetId: string;
|
|
7413
|
+
asOf: number | Date;
|
|
7414
|
+
interval?: never;
|
|
7415
|
+
start?: never;
|
|
7416
|
+
end?: never;
|
|
7417
|
+
bucketSeconds?: never;
|
|
7418
|
+
cursor?: never;
|
|
7419
|
+
pageSize?: never;
|
|
7420
|
+
};
|
|
7421
|
+
type ListPriceHistoryError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7422
|
+
declare const ListPriceHistoryError: {
|
|
7015
7423
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7016
7424
|
};
|
|
7017
7425
|
/**
|
|
7018
|
-
* Lists
|
|
7426
|
+
* Lists historical price observations for an exchange asset.
|
|
7427
|
+
*
|
|
7428
|
+
* Select exactly one time form: a relative `interval`, an explicit `start`
|
|
7429
|
+
* with optional `end`, or the latest observation at or before an `asOf`
|
|
7430
|
+
* instant. Time inputs accept Unix epoch seconds or `Date` values. When
|
|
7431
|
+
* `bucketSeconds` is omitted, resolution is selected automatically for the
|
|
7432
|
+
* requested window and reported on each point as `resolutionSeconds`. An
|
|
7433
|
+
* explicit bucket is used exactly as requested and may produce an empty series
|
|
7434
|
+
* when that resolution is unavailable for the window. Prices are decimal
|
|
7435
|
+
* strings and returned timestamps are Unix epoch milliseconds. Series pages
|
|
7436
|
+
* are ordered oldest first; an `asOf` request returns at most one item. Series
|
|
7437
|
+
* page sizes default to and are capped at 10,000 points. Transient rate limits
|
|
7438
|
+
* are retried automatically.
|
|
7019
7439
|
*
|
|
7020
7440
|
* @remarks
|
|
7021
7441
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7022
7442
|
*
|
|
7023
|
-
* @throws {@link
|
|
7443
|
+
* @throws {@link ListPriceHistoryError}
|
|
7024
7444
|
* Thrown on failure.
|
|
7025
7445
|
*
|
|
7026
7446
|
* @example
|
|
7027
7447
|
* ```ts
|
|
7028
|
-
* const
|
|
7029
|
-
*
|
|
7448
|
+
* const history = listPriceHistory(client, {
|
|
7449
|
+
* assetId: '17023124228269928849020611259015948850061676830917875073785033885105715180702',
|
|
7450
|
+
* interval: PriceHistoryInterval.OneDay,
|
|
7451
|
+
* bucketSeconds: 3600,
|
|
7030
7452
|
* });
|
|
7031
7453
|
*
|
|
7032
|
-
*
|
|
7454
|
+
* for await (const page of history) {
|
|
7455
|
+
* // page.items: PriceHistoryPoint[]
|
|
7456
|
+
* }
|
|
7033
7457
|
* ```
|
|
7034
7458
|
*/
|
|
7035
|
-
declare function
|
|
7036
|
-
|
|
7037
|
-
|
|
7459
|
+
declare function listPriceHistory(client: BaseClient, request: ListPriceHistoryRequest): Paginated<PriceHistoryPoint[]>;
|
|
7460
|
+
declare const FetchOpenInterestRequestSchema: z.ZodObject<{
|
|
7461
|
+
conditionIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodType<_polymarket_bindings.ConditionId, string, z.core.$ZodTypeInternals<_polymarket_bindings.ConditionId, string>>>, z.ZodTransform<_polymarket_bindings.ConditionId[], _polymarket_bindings.ConditionId[]>>>;
|
|
7462
|
+
}, z.core.$strip>;
|
|
7463
|
+
type FetchOpenInterestRequest = z.input<typeof FetchOpenInterestRequestSchema>;
|
|
7464
|
+
type FetchOpenInterestError = RateLimitError | RequestRejectedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
7465
|
+
declare const FetchOpenInterestError: {
|
|
7038
7466
|
isError(error: unknown): error is TransportError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError;
|
|
7039
7467
|
};
|
|
7040
7468
|
/**
|
|
7041
|
-
*
|
|
7469
|
+
* Fetches priced gross open interest for selected markets or globally.
|
|
7470
|
+
*
|
|
7471
|
+
* `conditionIds` accepts up to 20 distinct market condition IDs. Omit it for
|
|
7472
|
+
* the global aggregate, whose `conditionId` is `null`. A requested servable
|
|
7473
|
+
* market with no holdings has a zero value; an absent row means the market is
|
|
7474
|
+
* not servable. Values are in USDC. Transient rate limits are retried
|
|
7475
|
+
* automatically.
|
|
7042
7476
|
*
|
|
7043
7477
|
* @remarks
|
|
7044
7478
|
* This is a low-level function. Most SDK consumers should prefer the client instance API.
|
|
7045
7479
|
*
|
|
7046
|
-
* @throws {@link
|
|
7480
|
+
* @throws {@link FetchOpenInterestError}
|
|
7047
7481
|
* Thrown on failure.
|
|
7048
7482
|
*
|
|
7049
7483
|
* @example
|
|
7050
|
-
* Fetch the first page of results:
|
|
7051
|
-
* ```ts
|
|
7052
|
-
* const result = listMarketPositions(client, {
|
|
7053
|
-
* market: '0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093',
|
|
7054
|
-
* pageSize: 10,
|
|
7055
|
-
* });
|
|
7056
|
-
*
|
|
7057
|
-
* const firstPage = await result.firstPage();
|
|
7058
|
-
*
|
|
7059
|
-
* // Optionally, fetch additional pages:
|
|
7060
|
-
* for await (const page of result.from(firstPage.nextCursor)) {
|
|
7061
|
-
* // page.items: MetaMarketPosition[]
|
|
7062
|
-
* }
|
|
7063
|
-
* ```
|
|
7064
|
-
*
|
|
7065
|
-
* @example
|
|
7066
|
-
* Loop through all pages with `for await`:
|
|
7067
7484
|
* ```ts
|
|
7068
|
-
* const
|
|
7069
|
-
*
|
|
7070
|
-
* pageSize: 10,
|
|
7485
|
+
* const openInterest = await fetchOpenInterest(client, {
|
|
7486
|
+
* conditionIds: ['0xe546672750517f62c45a5a00067481981e62b9c20fa8220203232c9dc8fd2093'],
|
|
7071
7487
|
* });
|
|
7072
7488
|
*
|
|
7073
|
-
*
|
|
7074
|
-
* // page.items: MetaMarketPosition[]
|
|
7075
|
-
* }
|
|
7489
|
+
* // openInterest: OpenInterest[]
|
|
7076
7490
|
* ```
|
|
7077
7491
|
*/
|
|
7078
|
-
declare function
|
|
7492
|
+
declare function fetchOpenInterest(client: BaseClient, request?: FetchOpenInterestRequest): Promise<OpenInterest[]>;
|
|
7079
7493
|
|
|
7080
7494
|
/**
|
|
7081
7495
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
@@ -9289,11 +9703,6 @@ type RevokeSessionKeyRequest = {
|
|
|
9289
9703
|
/** Stable key to reuse when retrying the same signed revocation. */
|
|
9290
9704
|
idempotencyKey?: string;
|
|
9291
9705
|
};
|
|
9292
|
-
/** Result of a confirmed session-key revocation. */
|
|
9293
|
-
type RevokeSessionKeyResult = {
|
|
9294
|
-
/** Confirmed transaction that applied the revocation. */
|
|
9295
|
-
transaction: TransactionOutcome;
|
|
9296
|
-
};
|
|
9297
9706
|
type RevokeSessionKeyError = CancelledSigningError | RateLimitError | RequestRejectedError | SigningError | TimeoutError | TransactionFailedError | TransportError | UnexpectedResponseError | UserInputError;
|
|
9298
9707
|
declare const RevokeSessionKeyError: {
|
|
9299
9708
|
isError(error: unknown): error is SigningError | CancelledSigningError | TransportError | TransactionFailedError | UserInputError | UnexpectedResponseError | RequestRejectedError | RateLimitError | TimeoutError;
|
|
@@ -9301,8 +9710,8 @@ declare const RevokeSessionKeyError: {
|
|
|
9301
9710
|
/**
|
|
9302
9711
|
* Revokes a session key authorized for the Deposit Wallet.
|
|
9303
9712
|
*
|
|
9304
|
-
*
|
|
9305
|
-
*
|
|
9713
|
+
* Returns once the session key is removed from the active-key registry and can
|
|
9714
|
+
* no longer be used. The on-chain transaction may still be pending.
|
|
9306
9715
|
* Requires API-key authentication that supports gasless transactions.
|
|
9307
9716
|
*
|
|
9308
9717
|
* @remarks
|
|
@@ -9310,7 +9719,7 @@ declare const RevokeSessionKeyError: {
|
|
|
9310
9719
|
*
|
|
9311
9720
|
* @example
|
|
9312
9721
|
* ```ts
|
|
9313
|
-
*
|
|
9722
|
+
* await revokeSessionKey(client, {
|
|
9314
9723
|
* address: sessionAddress,
|
|
9315
9724
|
* });
|
|
9316
9725
|
* ```
|
|
@@ -9318,7 +9727,7 @@ declare const RevokeSessionKeyError: {
|
|
|
9318
9727
|
* @throws {@link RevokeSessionKeyError}
|
|
9319
9728
|
* Thrown on failure.
|
|
9320
9729
|
*/
|
|
9321
|
-
declare function revokeSessionKey(client: BaseSecureClient, request: RevokeSessionKeyRequest): Promise<
|
|
9730
|
+
declare function revokeSessionKey(client: BaseSecureClient, request: RevokeSessionKeyRequest): Promise<void>;
|
|
9322
9731
|
|
|
9323
9732
|
type MarketEventType = MarketEvent['type'];
|
|
9324
9733
|
type UserEventType = UserEvent['type'];
|
|
@@ -9842,4 +10251,4 @@ type Signer = {
|
|
|
9842
10251
|
sendTransaction(request: SignerTransactionRequest): Promise<TransactionHandle>;
|
|
9843
10252
|
};
|
|
9844
10253
|
|
|
9845
|
-
export { type EnvironmentContracts as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type ClientActions as D, type ClientDecorator as E, type ClobEndpoints as F, ComboPositionSort as G, type ComboPositionStatusFilter as H, type ComboQuote as I, type CombosEndpoints as J, ConnectionLostError as K, type ConnectionLostErrorOptions as L, type CreatePerpsSessionRequest as M, CreateSecureClientError as N, type CryptoPricesChainlinkTwapSubscription as O, type DataActions as P, DepositToPerpsError as Q, type DepositToPerpsRequest as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type DisarmPerpsAutoCancelRequest as V, type DiscoveryActions as W, DownloadAccountingSnapshotError as X, DropNotificationsError as Y, type EnvironmentConfig as Z, type EnvironmentConfigFork as _, type TypedData as a, ListMarketHoldersError as a$, EstimateMarketPriceError as a0, ExecuteCollateralReturnPlanError as a1, type ExecuteCollateralReturnPlanRequest as a2, FetchClosedOnlyModeError as a3, FetchCommentsByIdError as a4, FetchEventError as a5, FetchEventLiveVolumeError as a6, FetchEventTagsError as a7, FetchLastTradePriceError as a8, FetchLastTradePricesError as a9, FetchPublicProfileError as aA, FetchRelatedTagResourcesError as aB, FetchRelatedTagsError as aC, FetchRewardPercentagesError as aD, FetchRfqStatusError as aE, type FetchRfqStatusParams as aF, FetchSeriesError as aG, FetchSessionKeysError as aH, FetchSpreadError as aI, FetchSpreadsError as aJ, FetchTagError as aK, FetchTotalEarningsForUserForDayError as aL, FetchTradedMarketCountError as aM, InsufficientLiquidityError as aN, ListAccountTradesError as aO, ListActivityError as aP, ListBuilderLeaderboardError as aQ, ListBuilderTradesError as aR, ListBuilderVolumeError as aS, ListClosedPositionsError as aT, ListComboActivityError as aU, ListComboMarketsError as aV, ListComboPositionsError as aW, ListCommentsByUserAddressError as aX, ListCommentsError as aY, ListCurrentRewardsError as aZ, ListEventsError as a_, FetchMarketError as aa, FetchMarketTagsError as ab, FetchMidpointError as ac, FetchMidpointsError as ad, FetchNotificationsError as ae, FetchOrderBookError as af, FetchOrderBooksError as ag, FetchOrderError as ah, FetchOrderScoringError as ai, FetchOrdersScoringError as aj, type FetchPerpsAccountConfigRequest as ak, FetchPerpsBookError as al, type FetchPerpsBookRequest as am, FetchPerpsFeesError as an, FetchPerpsInstrumentsError as ao, type FetchPerpsInstrumentsRequest as ap, type FetchPerpsOpenOrdersRequest as aq, type FetchPerpsOrdersRequest as ar, FetchPerpsTickerError as as, type FetchPerpsTickerRequest as at, FetchPerpsTickersError as au, type FetchPerpsTickersRequest as av, FetchPortfolioValueError as aw, FetchPriceError as ax, FetchPriceHistoryError as ay, FetchPricesError as az, type TransactionCall as b, type PublicClient as b$, ListMarketPositionsError as b0, ListMarketRewardsError as b1, ListMarketsError as b2, ListOpenInterestError as b3, ListOpenOrdersError as b4, ListPerpsCandlesError as b5, type ListPerpsCandlesRequest as b6, type ListPerpsDepositsRequest as b7, type ListPerpsEquityHistoryRequest as b8, type ListPerpsFillsRequest as b9, type PerpsActions as bA, type PerpsBookDepth as bB, type PerpsEndpoints as bC, type PerpsOrderRequest as bD, type PerpsPlaceFokOrderRequest as bE, type PerpsPlaceGtcOrderRequest as bF, type PerpsPlaceIocOrderRequest as bG, type PerpsPlacedTpSlOrder as bH, type PerpsPlacedTpSlOrders as bI, type PerpsPositionTpSlTrigger as bJ, PerpsSession as bK, type PerpsSessionAccountError as bL, type PerpsSessionLifecycleError as bM, type PerpsSessionTradingError as bN, type PerpsTpSlTrigger as bO, type PlacePerpsOrderRequest as bP, type PlacePerpsOrderResult as bQ, type PlacePerpsOrderWithTpSlRequest as bR, type PlacePerpsOrderWithTpSlResult as bS, type PlacePerpsPositionTpSlRequest as bT, type PlacePerpsPositionTpSlResult as bU, PlanCollateralReturnError as bV, PostOrderError as bW, PostOrdersError as bX, type PostPerpsOrdersRequest as bY, type PublicAccountActions as bZ, type PublicActions as b_, ListPerpsFundingHistoryError as ba, type ListPerpsFundingHistoryRequest as bb, type ListPerpsFundingPaymentsRequest as bc, type ListPerpsNotificationsRequest as bd, type ListPerpsPnlHistoryRequest as be, ListPerpsTradesError as bf, type ListPerpsTradesRequest as bg, type ListPerpsWithdrawalsRequest as bh, ListPositionsError as bi, ListSeriesError as bj, ListTagsError as bk, ListTeamsError as bl, ListTraderLeaderboardError as bm, ListTradesError as bn, ListUserEarningsAndMarketsConfigError as bo, ListUserEarningsForDayError as bp, type MarkPerpsNotificationsReadRequest as bq, MergePositionsError as br, OpenPerpsSessionError as bs, type OpenPerpsSessionRequest as bt, OpenRfqSessionError as bu, type OrderAsset as bv, type OrderSignature as bw, type Page as bx, PageSizeSchema as by, type Paginated as bz, AcceptComboQuoteError as c, type SessionKey as c$, type PublicClientOptions as c0, type PublicPerpsActions as c1, type PublicRewardsActions as c2, type PublicSubscriptionsActions as c3, type RateLimitBucket as c4, RateLimitError as c5, type RateLimitErrorOptions as c6, type RateLimitUpdate as c7, type RateLimitUpdateListener as c8, RedeemPositionsError as c9, type RfqQuoteResponse as cA, type RfqQuoteSource as cB, RfqRequestRejectedError as cC, type RfqRequestRejectedErrorOptions as cD, type RfqSession as cE, type RfqStatusResult as cF, type RfqTradeEvent as cG, SearchError as cH, SearchSort as cI, type SecureAccountActions as cJ, type SecureActions as cK, type SecureClient as cL, type SecureClientOptions as cM, type SecureDownloadAccountingSnapshotRequest as cN, type SecureFetchPortfolioValueRequest as cO, type SecureFetchTradedMarketCountRequest as cP, type SecureListActivityRequest as cQ, type SecureListClosedPositionsRequest as cR, type SecureListComboActivityRequest as cS, type SecureListComboPositionsRequest as cT, type SecureListPositionsRequest as cU, type SecurePerpsActions as cV, type SecureRewardsActions as cW, type SecureRfqActions as cX, type SecureSubscriptionsActions as cY, type SecureTradingActions as cZ, type SecureWalletActions as c_, RequestComboQuoteError as ca, type RequestComboQuoteParams as cb, type RequestComboQuoteResult as cc, RequestRejectedError as cd, type RequestRejectedErrorOptions as ce, type RestEndpoint as cf, type ResumePerpsSessionRequest as cg, RevokePerpsCredentialsError as ch, type RevokePerpsCredentialsRequest as ci, RevokeSessionKeyError as cj, type RevokeSessionKeyRequest as ck, type RevokeSessionKeyResult as cl, type RfqCancelQuoteAck as cm, RfqCancelQuoteError as cn, RfqCancelQuoteRejectedError as co, type RfqCancelQuoteRejectedErrorOptions as cp, type RfqConfirmationAck as cq, RfqConfirmationError as cr, RfqConfirmationRejectedError as cs, type RfqConfirmationRequestEvent as ct, type RfqEvent as cu, RfqQuoteError as cv, type RfqQuoteReference as cw, RfqQuoteRejectedError as cx, type RfqQuoteRejectedErrorOptions as cy, type RfqQuoteRequestEvent as cz, type AcceptComboQuoteParams as d, type EquityPricesEventType as d$, type SessionKeyActions as d0, SetupGaslessWalletError as d1, SetupTradingApprovalsError as d2, type SignedOrder as d3, type SignerTransactionRequest as d4, SignerType as d5, SigningError as d6, SplitPositionError as d7, SubscribeError as d8, TimeoutError as d9, allActions as dA, analyticsActions as dB, createPublicClient as dC, createSecureClient as dD, dataActions as dE, discoveryActions as dF, forkEnvironmentConfig as dG, makeErrorGuard as dH, perpsActions as dI, production as dJ, rewardsActions as dK, rfqActions as dL, sessionKeyActions as dM, subscriptionsActions as dN, tradingActions as dO, walletActions as dP, type CancelMarketOrdersRequest as dQ, type CancelOrderRequest as dR, type CancelOrdersRequest as dS, type CollateralReturnExecutionWorkflow as dT, type CommentsEventType as dU, type CommentsSubscription as dV, type CryptoPricesEventType as dW, type CryptoPricesSubscription as dX, DeployDepositWalletError as dY, type DownloadAccountingSnapshotRequest as dZ, type DropNotificationsRequest as d_, TradingRestriction as da, TransactionFailedError as db, type TransactionHandle as dc, type TransactionOutcome as dd, TransferErc20Error as de, TransportError as df, type TypedDataDomain as dg, type TypedDataField as dh, UnexpectedResponseError as di, UpdatePerpsLeverageError as dj, type UpdatePerpsLeverageRequest as dk, UpdatePerpsMarginError as dl, type UpdatePerpsMarginRequest as dm, WaitForComboFillError as dn, type WaitForComboFillParams as dp, type WaitForComboFillResult as dq, WaitForOrderFillSettlementError as dr, WaitForTransactionError as ds, type WalletDerivationConfig as dt, type WebSocketCloseCode as du, type WebSocketEndpoint as dv, WebSocketKnownCloseCode as dw, WithdrawFromPerpsError as dx, type WithdrawFromPerpsRequest as dy, accountActions as dz, type AcceptComboQuoteResult as e, type ListClosedPositionsRequest as e$, type EquityPricesSubscription as e0, type Erc1155ApprovalForAllWorkflow as e1, type Erc1155ApprovalForAllWorkflowRequest as e2, type Erc20ApprovalWorkflow as e3, type Erc20ApprovalWorkflowRequest as e4, type Erc20TransferWorkflow as e5, type Erc20TransferWorkflowRequest as e6, type EstimateMarketBuyPriceRequest as e7, type EstimateMarketPriceRequest as e8, type EstimateMarketSellPriceRequest as e9, type FetchOrderScoringRequest as eA, type FetchOrdersScoringRequest as eB, type FetchPortfolioValueRequest as eC, type FetchPriceHistoryRequest as eD, type FetchPriceRequest as eE, type FetchPricesRequest as eF, type FetchPublicProfileRequest as eG, type FetchRelatedTagResourcesRequest as eH, type FetchRelatedTagsRequest as eI, type FetchSeriesRequest as eJ, type FetchSpreadRequest as eK, type FetchSpreadsRequest as eL, type FetchTagRequest as eM, FetchTickSizeError as eN, type FetchTickSizeRequest as eO, type FetchTotalEarningsForUserForDayRequest as eP, type FetchTradedMarketCountRequest as eQ, GaslessTransactionMetadataSchema as eR, type GaslessWorkflow as eS, type GaslessWorkflowRequest as eT, IsWalletDeployedError as eU, type IsWalletDeployedRequest as eV, type ListAccountTradesRequest as eW, type ListActivityRequest as eX, type ListBuilderLeaderboardRequest as eY, type ListBuilderTradesRequest as eZ, type ListBuilderVolumeRequest as e_, type EventForSubscriptionSpec as ea, type EventForSubscriptionSpecs as eb, FetchBalanceAllowanceError as ec, type FetchBalanceAllowanceRequest as ed, FetchBuilderFeeRatesError as ee, type FetchBuilderFeeRatesRequest as ef, type FetchCommentsByIdRequest as eg, type FetchEventLiveVolumeRequest as eh, type FetchEventRequest as ei, type FetchEventTagsRequest as ej, FetchExecuteParamsError as ek, type FetchExecuteParamsRequest as el, type FetchGaslessTransactionRequest as em, type FetchLastTradePriceRequest as en, type FetchLastTradePricesRequest as eo, FetchMarketInfoError as ep, type FetchMarketInfoRequest as eq, type FetchMarketRequest as er, type FetchMarketTagsRequest as es, type FetchMidpointRequest as et, type FetchMidpointsRequest as eu, FetchNegRiskError as ev, type FetchNegRiskRequest as ew, type FetchOrderBookRequest as ex, type FetchOrderBooksRequest as ey, type FetchOrderRequest as ez, type AccountIdentity as f, PreparePerpsDepositError as f$, type ListComboActivityRequest as f0, type ListComboMarketsRequest as f1, type ListComboPositionsRequest as f2, type ListCommentsByUserAddressRequest as f3, type ListCommentsRequest as f4, type ListCurrentRewardsRequest as f5, type ListEventsRequest as f6, ListMarketClarificationsError as f7, type ListMarketClarificationsRequest as f8, type ListMarketHoldersRequest as f9, type PerpsDepositWorkflowRequest as fA, type PerpsMarketDataEventType as fB, type PerpsMarketDataSubscription as fC, type PerpsStatisticsSubscription as fD, type PerpsStreamingCandleInterval as fE, type PerpsTickersSubscription as fF, type PerpsTradesSubscription as fG, type PostOrdersRequest as fH, PrepareCollateralReturnExecutionError as fI, PrepareErc1155ApprovalForAllError as fJ, type PrepareErc1155ApprovalForAllRequest as fK, PrepareErc20ApprovalError as fL, type PrepareErc20ApprovalRequest as fM, PrepareErc20TransferError as fN, type PrepareErc20TransferRequest as fO, PrepareGaslessTransactionError as fP, type PrepareGaslessTransactionRequest as fQ, type PrepareLimitOrderRequest as fR, type PrepareMarketBuyOrderRequest as fS, type PrepareMarketOrderRequest as fT, type PrepareMarketSellOrderRequest as fU, PrepareMergeComboPositionError as fV, type PrepareMergeComboPositionRequest as fW, PrepareMergeMarketPositionError as fX, type PrepareMergeMarketPositionRequest as fY, PrepareMergePositionsError as fZ, type PrepareMergePositionsRequest as f_, type ListMarketPositionsRequest as fa, type ListMarketRewardsRequest as fb, type ListMarketsRequest as fc, type ListOpenInterestRequest as fd, type ListOpenOrdersRequest as fe, type ListPositionsRequest as ff, type ListSeriesRequest as fg, type ListTagsRequest as fh, type ListTeamsRequest as fi, type ListTraderLeaderboardRequest as fj, type ListTradesRequest as fk, type ListUserEarningsAndMarketsConfigRequest as fl, type ListUserEarningsForDayRequest as fm, type MarketEventType as fn, type MarketSubscription as fo, MergeComboPositionError as fp, MergeMarketPositionError as fq, type MergePositionsWorkflow as fr, type MergePositionsWorkflowRequest as fs, type OrderPostingWorkflow as ft, type OrderWorkflow as fu, type OrderWorkflowRequest as fv, type PerpsBboSubscription as fw, type PerpsBookSubscription as fx, type PerpsCandlesSubscription as fy, type PerpsDepositWorkflow as fz, type AnalyticsActions as g, fetchCommentsById as g$, PrepareRedeemComboPositionError as g0, type PrepareRedeemComboPositionRequest as g1, type PrepareRedeemMarketPositionsByConditionIdRequest as g2, type PrepareRedeemMarketPositionsByMarketIdRequest as g3, PrepareRedeemMarketPositionsError as g4, type PrepareRedeemMarketPositionsRequest as g5, type PrepareRedeemPositionRequest as g6, PrepareRedeemPositionsError as g7, type PrepareRedeemPositionsRequest as g8, PrepareSplitComboPositionError as g9, type SubscriptionHandle as gA, type TradingApprovalsWorkflow as gB, type TradingApprovalsWorkflowRequest as gC, UpdateBalanceAllowanceError as gD, type UpdateBalanceAllowanceRequest as gE, type UserEventType as gF, type UserSubscription as gG, WaitForGaslessTransactionError as gH, type WaitForOrderFillSettlementRequest as gI, acceptComboQuote as gJ, approveErc1155ForAll as gK, approveErc20 as gL, authorizeSessionKey as gM, cancelAll as gN, cancelMarketOrders as gO, cancelOrder as gP, cancelOrders as gQ, deployDepositWallet as gR, depositToPerps as gS, downloadAccountingSnapshot as gT, dropNotifications as gU, estimateMarketPrice as gV, executeCollateralReturnPlan as gW, fetchBalanceAllowance as gX, fetchBuilderFeeRates as gY, fetchBuilderVolume as gZ, fetchClosedOnlyMode as g_, type PrepareSplitComboPositionRequest as ga, PrepareSplitMarketPositionError as gb, type PrepareSplitMarketPositionRequest as gc, PrepareSplitPositionError as gd, type PrepareSplitPositionRequest as ge, PrepareTradingApprovalsError as gf, type PublicRealtimeEvent as gg, type PublicRealtimeTopic as gh, type PublicSubscriptionSpec as gi, type RedeemPositionsWorkflow as gj, type RedeemPositionsWorkflowRequest as gk, ResolveConditionByTokenError as gl, type ResolveConditionByTokenRequest as gm, type RfqConfirmationRejectedErrorOptions as gn, type RfqExecutionUpdateEvent as go, type SearchRequest as gp, type SearchResults as gq, type SecureRealtimeEvent as gr, type SecureRealtimeTopic as gs, type SecureSubscriptionSpec as gt, SplitComboPositionError as gu, SplitMarketPositionError as gv, type SplitPositionWorkflow as gw, type SplitPositionWorkflowRequest as gx, type SportsEventType as gy, type SportsSubscription as gz, ApproveErc1155ForAllError as h, listPerpsTrades as h$, fetchEvent as h0, fetchEventLiveVolume as h1, fetchEventTags as h2, fetchExecuteParams as h3, fetchLastTradePrice as h4, fetchLastTradePrices as h5, fetchMarket as h6, fetchMarketInfo as h7, fetchMarketTags as h8, fetchMidpoint as h9, fetchTag as hA, fetchTickSize as hB, fetchTotalEarningsForUserForDay as hC, fetchTradedMarketCount as hD, fetchTransaction as hE, isWalletDeployed as hF, listAccountTrades as hG, listActivity as hH, listBuilderLeaderboard as hI, listBuilderTrades as hJ, listClosedPositions as hK, listComboActivity as hL, listComboMarkets as hM, listComboPositions as hN, listComments as hO, listCommentsByUserAddress as hP, listCurrentRewards as hQ, listEvents as hR, listMarketClarifications as hS, listMarketHolders as hT, listMarketPositions as hU, listMarketRewards as hV, listMarkets as hW, listOpenInterest as hX, listOpenOrders as hY, listPerpsCandles as hZ, listPerpsFundingHistory as h_, fetchMidpoints as ha, fetchNegRisk as hb, fetchNotifications as hc, fetchOrder as hd, fetchOrderBook as he, fetchOrderBooks as hf, fetchOrderScoring as hg, fetchOrdersScoring as hh, fetchPerpsBook as hi, fetchPerpsFees as hj, fetchPerpsInstruments as hk, fetchPerpsTicker as hl, fetchPerpsTickers as hm, fetchPortfolioValue as hn, fetchPrice as ho, fetchPriceHistory as hp, fetchPrices as hq, fetchPublicProfile as hr, fetchRelatedTagResources as hs, fetchRelatedTags as ht, fetchRewardPercentages as hu, fetchRfqStatus as hv, fetchSeries as hw, fetchSessionKeys as hx, fetchSpread as hy, fetchSpreads as hz, ApproveErc20Error as i, listPositions as i0, listSeries as i1, listTags as i2, listTeams as i3, listTraderLeaderboard as i4, listTrades as i5, listUserEarningsAndMarketsConfig as i6, listUserEarningsForDay as i7, mergeComboPosition as i8, mergeMarketPosition as i9, requestComboQuote as iA, resolveConditionByToken as iB, revokePerpsCredentials as iC, revokeSessionKey as iD, search as iE, setupTradingApprovals as iF, splitComboPosition as iG, splitMarketPosition as iH, splitPosition as iI, subscribe as iJ, transferErc20 as iK, updateBalanceAllowance as iL, waitForComboFill as iM, waitForOrderFillSettlement as iN, withdrawFromPerps as iO, mergePositions as ia, openPerpsSession as ib, openRfqSession as ic, planCollateralReturn as id, postOrder as ie, postOrders as ig, prepareCollateralReturnExecution as ih, prepareErc1155ApprovalForAll as ii, prepareErc20Approval as ij, prepareErc20Transfer as ik, prepareGaslessTransaction as il, prepareMergeComboPosition as im, prepareMergeMarketPosition as io, prepareMergePositions as ip, preparePerpsDeposit as iq, prepareRedeemComboPosition as ir, prepareRedeemMarketPositions as is, prepareRedeemPosition as it, prepareRedeemPositions as iu, prepareSplitComboPosition as iv, prepareSplitMarketPosition as iw, prepareSplitPosition as ix, prepareTradingApprovals as iy, redeemPositions as iz, ArmPerpsAutoCancelError as j, type ArmPerpsAutoCancelRequest as k, AuthorizeSessionKeyError as l, type AuthorizeSessionKeyRequest as m, type AuthorizeSessionKeyResult as n, AutoCancelDailyLimitError as o, BasePublicClient as p, BaseSecureClient as q, type BeginAuthenticationRequest as r, type CancelAllPerpsOrdersRequest as s, CancelMarketOrdersError as t, CancelOrderError as u, CancelOrdersError as v, type CancelPerpsOrderRequest as w, type CancelPerpsOrdersRequest as x, CancelledSigningError as y, type Client as z };
|
|
10254
|
+
export { type Erc1155TradingApproval as $, type ApiKeyAuthorization as A, type BaseClient as B, CancelAllError as C, type ClientActions as D, type ClientDecorator as E, type ClobEndpoints as F, type ComboPositionStatusFilter as G, type ComboQuote as H, type CombosEndpoints as I, ConnectionLostError as J, type ConnectionLostErrorOptions as K, type CreatePerpsSessionRequest as L, CreateSecureClientError as M, type CryptoPricesChainlinkTwapSubscription as N, type DataActions as O, DepositToPerpsError as P, type DepositToPerpsRequest as Q, type DisarmPerpsAutoCancelRequest as R, type Signer as S, type TypedDataPayload as T, UserInputError as U, type DiscoveryActions as V, DownloadAccountingSnapshotError as W, DropNotificationsError as X, type EnvironmentConfig as Y, type EnvironmentConfigFork as Z, type EnvironmentContracts as _, type TypedData as a, ListComboActivityError as a$, type Erc20TradingApproval as a0, EstimateMarketPriceError as a1, ExecuteCollateralReturnPlanError as a2, type ExecuteCollateralReturnPlanRequest as a3, FetchBuilderVolumeError as a4, FetchClosedOnlyModeError as a5, FetchCommentsByIdError as a6, FetchEventError as a7, FetchEventLiveVolumeError as a8, FetchEventTagsError as a9, FetchPriceError as aA, FetchPricesError as aB, FetchPublicProfileError as aC, FetchRelatedTagResourcesError as aD, FetchRelatedTagsError as aE, FetchResolutionsError as aF, FetchRewardPercentagesError as aG, FetchRfqStatusError as aH, type FetchRfqStatusParams as aI, FetchSeriesError as aJ, FetchSessionKeysError as aK, FetchSpreadError as aL, FetchSpreadsError as aM, FetchTagError as aN, FetchTotalEarningsForUserForDayError as aO, FetchTraderLeaderboardStandingError as aP, FetchTradingApprovalsStateError as aQ, type FetchTradingApprovalsStateRequest as aR, FetchUserPnlError as aS, FetchUserStatsError as aT, FetchUserVolumeError as aU, InsufficientLiquidityError as aV, ListAccountTradesError as aW, ListActivityError as aX, ListBiggestWinnersError as aY, ListBuilderLeaderboardError as aZ, ListBuilderTradesError as a_, FetchLastTradePriceError as aa, FetchLastTradePricesError as ab, FetchMarketError as ac, FetchMarketTagsError as ad, FetchMidpointError as ae, FetchMidpointsError as af, FetchNotificationsError as ag, FetchOpenInterestError as ah, FetchOrderBookError as ai, FetchOrderBooksError as aj, FetchOrderError as ak, FetchOrderScoringError as al, FetchOrdersScoringError as am, type FetchPerpsAccountConfigRequest as an, FetchPerpsBookError as ao, type FetchPerpsBookRequest as ap, FetchPerpsFeesError as aq, FetchPerpsInstrumentsError as ar, type FetchPerpsInstrumentsRequest as as, type FetchPerpsOpenOrdersRequest as at, type FetchPerpsOrdersRequest as au, FetchPerpsTickerError as av, type FetchPerpsTickerRequest as aw, FetchPerpsTickersError as ax, type FetchPerpsTickersRequest as ay, FetchPortfolioValueError as az, type TransactionCall as b, PostOrderError as b$, ListComboMarketsError as b0, ListComboPositionsError as b1, ListCommentsByUserAddressError as b2, ListCommentsError as b3, ListCurrentRewardsError as b4, ListEventsError as b5, ListMarketHoldersError as b6, ListMarketRewardsError as b7, ListMarketsError as b8, ListOpenOrdersError as b9, OpenRfqSessionError as bA, type OrderSignature as bB, type Page as bC, PageSizeSchema as bD, type Paginated as bE, type PerpsActions as bF, type PerpsBookDepth as bG, type PerpsEndpoints as bH, type PerpsOrderRequest as bI, type PerpsPlaceFokOrderRequest as bJ, type PerpsPlaceGtcOrderRequest as bK, type PerpsPlaceIocOrderRequest as bL, type PerpsPlacedTpSlOrder as bM, type PerpsPlacedTpSlOrders as bN, type PerpsPositionTpSlTrigger as bO, PerpsSession as bP, type PerpsSessionAccountError as bQ, type PerpsSessionLifecycleError as bR, type PerpsSessionTradingError as bS, type PerpsTpSlTrigger as bT, type PlacePerpsOrderRequest as bU, type PlacePerpsOrderResult as bV, type PlacePerpsOrderWithTpSlRequest as bW, type PlacePerpsOrderWithTpSlResult as bX, type PlacePerpsPositionTpSlRequest as bY, type PlacePerpsPositionTpSlResult as bZ, PlanCollateralReturnError as b_, ListPerpsCandlesError as ba, type ListPerpsCandlesRequest as bb, type ListPerpsDepositsRequest as bc, type ListPerpsEquityHistoryRequest as bd, type ListPerpsFillsRequest as be, ListPerpsFundingHistoryError as bf, type ListPerpsFundingHistoryRequest as bg, type ListPerpsFundingPaymentsRequest as bh, type ListPerpsNotificationsRequest as bi, type ListPerpsPnlHistoryRequest as bj, ListPerpsTradesError as bk, type ListPerpsTradesRequest as bl, type ListPerpsWithdrawalsRequest as bm, ListPositionsError as bn, ListPriceHistoryError as bo, ListSeriesError as bp, ListTagsError as bq, ListTeamsError as br, ListTraderLeaderboardError as bs, ListTradesError as bt, ListUserEarningsAndMarketsConfigError as bu, ListUserEarningsForDayError as bv, type MarkPerpsNotificationsReadRequest as bw, MergePositionsError as bx, OpenPerpsSessionError as by, type OpenPerpsSessionRequest as bz, AcceptComboQuoteError as c, type SecureListPositionsRequest as c$, PostOrdersError as c0, type PostPerpsOrdersRequest as c1, type PublicAccountActions as c2, type PublicActions as c3, type PublicClient as c4, type PublicClientOptions as c5, type PublicPerpsActions as c6, type PublicRewardsActions as c7, type PublicSubscriptionsActions as c8, type PublicWalletActions as c9, RfqQuoteError as cA, type RfqQuoteReference as cB, RfqQuoteRejectedError as cC, type RfqQuoteRejectedErrorOptions as cD, type RfqQuoteRequestEvent as cE, type RfqQuoteResponse as cF, type RfqQuoteSource as cG, RfqRequestRejectedError as cH, type RfqRequestRejectedErrorOptions as cI, type RfqSession as cJ, type RfqStatusResult as cK, type RfqTradeEvent as cL, SearchError as cM, SearchSort as cN, type SecureAccountActions as cO, type SecureActions as cP, type SecureClient as cQ, type SecureClientOptions as cR, type SecureDownloadAccountingSnapshotRequest as cS, type SecureFetchPortfolioValueRequest as cT, type SecureFetchTraderLeaderboardStandingRequest as cU, type SecureFetchUserPnlRequest as cV, type SecureFetchUserStatsRequest as cW, type SecureFetchUserVolumeRequest as cX, type SecureListActivityRequest as cY, type SecureListComboActivityRequest as cZ, type SecureListComboPositionsRequest as c_, type RateLimitBucket as ca, RateLimitError as cb, type RateLimitErrorOptions as cc, type RateLimitUpdate as cd, type RateLimitUpdateListener as ce, RedeemPositionsError as cf, RequestComboQuoteError as cg, type RequestComboQuoteParams as ch, type RequestComboQuoteResult as ci, RequestRejectedError as cj, type RequestRejectedErrorOptions as ck, type RestEndpoint as cl, type ResumePerpsSessionRequest as cm, RevokePerpsCredentialsError as cn, type RevokePerpsCredentialsRequest as co, RevokeSessionKeyError as cp, type RevokeSessionKeyRequest as cq, type RfqCancelQuoteAck as cr, RfqCancelQuoteError as cs, RfqCancelQuoteRejectedError as ct, type RfqCancelQuoteRejectedErrorOptions as cu, type RfqConfirmationAck as cv, RfqConfirmationError as cw, RfqConfirmationRejectedError as cx, type RfqConfirmationRequestEvent as cy, type RfqEvent as cz, type AcceptComboQuoteParams as d, type CancelOrdersRequest as d$, type SecurePerpsActions as d0, type SecureRewardsActions as d1, type SecureRfqActions as d2, type SecureSubscriptionsActions as d3, type SecureTradingActions as d4, type SecureWalletActions as d5, type SessionKey as d6, type SessionKeyActions as d7, SetupGaslessWalletError as d8, SetupTradingApprovalsError as d9, WaitForOrderFillSettlementError as dA, WaitForTransactionError as dB, type WalletDerivationConfig as dC, type WebSocketCloseCode as dD, type WebSocketEndpoint as dE, WebSocketKnownCloseCode as dF, WithdrawFromPerpsError as dG, type WithdrawFromPerpsRequest as dH, accountActions as dI, allActions as dJ, analyticsActions as dK, createPublicClient as dL, createSecureClient as dM, dataActions as dN, discoveryActions as dO, forkEnvironmentConfig as dP, makeErrorGuard as dQ, perpsActions as dR, production as dS, rewardsActions as dT, rfqActions as dU, sessionKeyActions as dV, subscriptionsActions as dW, tradingActions as dX, walletActions as dY, type CancelMarketOrdersRequest as dZ, type CancelOrderRequest as d_, type SignedOrder as da, type SignerTransactionRequest as db, SignerType as dc, SigningError as dd, SplitPositionError as de, SubscribeError as df, TimeoutError as dg, type TradingApprovalRequirements as dh, type TradingApprovalsState as di, TradingRestriction as dj, TransactionFailedError as dk, type TransactionHandle as dl, type TransactionOutcome as dm, TransferErc20Error as dn, TransportError as dp, type TypedDataDomain as dq, type TypedDataField as dr, UnexpectedResponseError as ds, UpdatePerpsLeverageError as dt, type UpdatePerpsLeverageRequest as du, UpdatePerpsMarginError as dv, type UpdatePerpsMarginRequest as dw, WaitForComboFillError as dx, type WaitForComboFillParams as dy, type WaitForComboFillResult as dz, type AcceptComboQuoteResult as e, FetchTickSizeError as e$, type CollateralReturnExecutionWorkflow as e0, type CommentsEventType as e1, type CommentsSubscription as e2, type CryptoPricesEventType as e3, type CryptoPricesSubscription as e4, DeployDepositWalletError as e5, type DownloadAccountingSnapshotRequest as e6, type DropNotificationsRequest as e7, type EquityPricesEventType as e8, type EquityPricesSubscription as e9, type FetchMarketInfoRequest as eA, type FetchMarketRequest as eB, type FetchMarketTagsRequest as eC, type FetchMidpointRequest as eD, type FetchMidpointsRequest as eE, FetchNegRiskError as eF, type FetchNegRiskRequest as eG, type FetchOpenInterestRequest as eH, type FetchOrderBookRequest as eI, type FetchOrderBooksRequest as eJ, type FetchOrderRequest as eK, type FetchOrderScoringRequest as eL, type FetchOrdersScoringRequest as eM, type FetchPortfolioValueRequest as eN, type FetchPriceRequest as eO, type FetchPricesRequest as eP, type FetchPublicProfileRequest as eQ, type FetchRelatedTagResourcesRequest as eR, type FetchRelatedTagsRequest as eS, type FetchResolutionsByConditionRequest as eT, type FetchResolutionsByEventRequest as eU, type FetchResolutionsByQuestionRequest as eV, type FetchResolutionsRequest as eW, type FetchSeriesRequest as eX, type FetchSpreadRequest as eY, type FetchSpreadsRequest as eZ, type FetchTagRequest as e_, type Erc1155ApprovalForAllWorkflow as ea, type Erc1155ApprovalForAllWorkflowRequest as eb, type Erc20ApprovalWorkflow as ec, type Erc20ApprovalWorkflowRequest as ed, type Erc20TransferWorkflow as ee, type Erc20TransferWorkflowRequest as ef, type EstimateMarketBuyPriceRequest as eg, type EstimateMarketPriceRequest as eh, type EstimateMarketSellPriceRequest as ei, type EventForSubscriptionSpec as ej, type EventForSubscriptionSpecs as ek, FetchBalanceAllowanceError as el, type FetchBalanceAllowanceRequest as em, FetchBuilderFeeRatesError as en, type FetchBuilderFeeRatesRequest as eo, type FetchBuilderVolumeRequest as ep, type FetchCommentsByIdRequest as eq, type FetchEventLiveVolumeRequest as er, type FetchEventRequest as es, type FetchEventTagsRequest as et, FetchExecuteParamsError as eu, type FetchExecuteParamsRequest as ev, type FetchGaslessTransactionRequest as ew, type FetchLastTradePriceRequest as ex, type FetchLastTradePricesRequest as ey, FetchMarketInfoError as ez, type AccountIdentity as f, type PrepareErc20ApprovalRequest as f$, type FetchTickSizeRequest as f0, type FetchTotalEarningsForUserForDayRequest as f1, type FetchTraderLeaderboardStandingRequest as f2, type FetchUserPnlRequest as f3, type FetchUserStatsRequest as f4, type FetchUserVolumeRequest as f5, GaslessTransactionMetadataSchema as f6, type GaslessWorkflow as f7, type GaslessWorkflowRequest as f8, IsWalletDeployedError as f9, type ListUserEarningsAndMarketsConfigRequest as fA, type ListUserEarningsForDayRequest as fB, type MarketEventType as fC, type MarketSubscription as fD, MergeComboPositionError as fE, MergeMarketPositionError as fF, type MergePositionsWorkflow as fG, type MergePositionsWorkflowRequest as fH, type OrderPostingWorkflow as fI, type OrderWorkflow as fJ, type OrderWorkflowRequest as fK, type PerpsBboSubscription as fL, type PerpsBookSubscription as fM, type PerpsCandlesSubscription as fN, type PerpsDepositWorkflow as fO, type PerpsDepositWorkflowRequest as fP, type PerpsMarketDataEventType as fQ, type PerpsMarketDataSubscription as fR, type PerpsStatisticsSubscription as fS, type PerpsStreamingCandleInterval as fT, type PerpsTickersSubscription as fU, type PerpsTradesSubscription as fV, type PostOrdersRequest as fW, PrepareCollateralReturnExecutionError as fX, PrepareErc1155ApprovalForAllError as fY, type PrepareErc1155ApprovalForAllRequest as fZ, PrepareErc20ApprovalError as f_, type IsWalletDeployedRequest as fa, type ListAccountTradesRequest as fb, type ListActivityRequest as fc, type ListBiggestWinnersRequest as fd, type ListBuilderLeaderboardRequest as fe, type ListBuilderTradesRequest as ff, type ListComboActivityRequest as fg, type ListComboMarketsRequest as fh, type ListComboPositionsRequest as fi, type ListCommentsByUserAddressRequest as fj, type ListCommentsRequest as fk, type ListCurrentRewardsRequest as fl, type ListEventsRequest as fm, ListMarketClarificationsError as fn, type ListMarketClarificationsRequest as fo, type ListMarketHoldersRequest as fp, type ListMarketRewardsRequest as fq, type ListMarketsRequest as fr, type ListOpenOrdersRequest as fs, type ListPositionsRequest as ft, type ListPriceHistoryRequest as fu, type ListSeriesRequest as fv, type ListTagsRequest as fw, type ListTeamsRequest as fx, type ListTraderLeaderboardRequest as fy, type ListTradesRequest as fz, type AnalyticsActions as g, authorizeSessionKey as g$, PrepareErc20TransferError as g0, type PrepareErc20TransferRequest as g1, PrepareGaslessTransactionError as g2, type PrepareGaslessTransactionRequest as g3, type PrepareLimitOrderRequest as g4, type PrepareMarketBuyOrderRequest as g5, type PrepareMarketOrderRequest as g6, type PrepareMarketSellOrderRequest as g7, PrepareMergeComboPositionError as g8, type PrepareMergeComboPositionRequest as g9, ResolveConditionByTokenError as gA, type ResolveConditionByTokenRequest as gB, type RfqConfirmationRejectedErrorOptions as gC, type RfqExecutionUpdateEvent as gD, type SearchRequest as gE, type SearchResults as gF, type SecureRealtimeEvent as gG, type SecureRealtimeTopic as gH, type SecureSubscriptionSpec as gI, SplitComboPositionError as gJ, SplitMarketPositionError as gK, type SplitPositionWorkflow as gL, type SplitPositionWorkflowRequest as gM, type SportsEventType as gN, type SportsSubscription as gO, type SubscriptionHandle as gP, type TradingApprovalsWorkflow as gQ, type TradingApprovalsWorkflowRequest as gR, UpdateBalanceAllowanceError as gS, type UpdateBalanceAllowanceRequest as gT, type UserEventType as gU, type UserSubscription as gV, WaitForGaslessTransactionError as gW, type WaitForOrderFillSettlementRequest as gX, acceptComboQuote as gY, approveErc1155ForAll as gZ, approveErc20 as g_, PrepareMergeMarketPositionError as ga, type PrepareMergeMarketPositionRequest as gb, PrepareMergePositionsError as gc, type PrepareMergePositionsRequest as gd, PreparePerpsDepositError as ge, PrepareRedeemComboPositionError as gf, type PrepareRedeemComboPositionRequest as gg, type PrepareRedeemMarketPositionsByConditionIdRequest as gh, type PrepareRedeemMarketPositionsByMarketIdRequest as gi, PrepareRedeemMarketPositionsError as gj, type PrepareRedeemMarketPositionsRequest as gk, type PrepareRedeemPositionRequest as gl, PrepareRedeemPositionsError as gm, type PrepareRedeemPositionsRequest as gn, PrepareSplitComboPositionError as go, type PrepareSplitComboPositionRequest as gp, PrepareSplitMarketPositionError as gq, type PrepareSplitMarketPositionRequest as gr, PrepareSplitPositionError as gs, type PrepareSplitPositionRequest as gt, PrepareTradingApprovalsError as gu, type PublicRealtimeEvent as gv, type PublicRealtimeTopic as gw, type PublicSubscriptionSpec as gx, type RedeemPositionsWorkflow as gy, type RedeemPositionsWorkflowRequest as gz, ApproveErc1155ForAllError as h, listActivity as h$, cancelAll as h0, cancelMarketOrders as h1, cancelOrder as h2, cancelOrders as h3, deployDepositWallet as h4, depositToPerps as h5, downloadAccountingSnapshot as h6, dropNotifications as h7, estimateMarketPrice as h8, executeCollateralReturnPlan as h9, fetchPerpsInstruments as hA, fetchPerpsTicker as hB, fetchPerpsTickers as hC, fetchPortfolioValue as hD, fetchPrice as hE, fetchPrices as hF, fetchPublicProfile as hG, fetchRelatedTagResources as hH, fetchRelatedTags as hI, fetchResolutions as hJ, fetchRewardPercentages as hK, fetchRfqStatus as hL, fetchSeries as hM, fetchSessionKeys as hN, fetchSpread as hO, fetchSpreads as hP, fetchTag as hQ, fetchTickSize as hR, fetchTotalEarningsForUserForDay as hS, fetchTraderLeaderboardStanding as hT, fetchTradingApprovalsState as hU, fetchTransaction as hV, fetchUserPnl as hW, fetchUserStats as hX, fetchUserVolume as hY, isWalletDeployed as hZ, listAccountTrades as h_, fetchBalanceAllowance as ha, fetchBuilderFeeRates as hb, fetchBuilderVolume as hc, fetchClosedOnlyMode as hd, fetchCommentsById as he, fetchEvent as hf, fetchEventLiveVolume as hg, fetchEventTags as hh, fetchExecuteParams as hi, fetchLastTradePrice as hj, fetchLastTradePrices as hk, fetchMarket as hl, fetchMarketInfo as hm, fetchMarketTags as hn, fetchMidpoint as ho, fetchMidpoints as hp, fetchNegRisk as hq, fetchNotifications as hr, fetchOpenInterest as hs, fetchOrder as ht, fetchOrderBook as hu, fetchOrderBooks as hv, fetchOrderScoring as hw, fetchOrdersScoring as hx, fetchPerpsBook as hy, fetchPerpsFees as hz, ApproveErc20Error as i, splitPosition as i$, listBiggestWinners as i0, listBuilderLeaderboard as i1, listBuilderTrades as i2, listComboActivity as i3, listComboMarkets as i4, listComboPositions as i5, listComments as i6, listCommentsByUserAddress as i7, listCurrentRewards as i8, listEvents as i9, postOrders as iA, prepareCollateralReturnExecution as iB, prepareErc1155ApprovalForAll as iC, prepareErc20Approval as iD, prepareErc20Transfer as iE, prepareGaslessTransaction as iF, prepareMergeComboPosition as iG, prepareMergeMarketPosition as iH, prepareMergePositions as iI, preparePerpsDeposit as iJ, prepareRedeemComboPosition as iK, prepareRedeemMarketPositions as iL, prepareRedeemPosition as iM, prepareRedeemPositions as iN, prepareSplitComboPosition as iO, prepareSplitMarketPosition as iP, prepareSplitPosition as iQ, prepareTradingApprovals as iR, redeemPositions as iS, requestComboQuote as iT, resolveConditionByToken as iU, revokePerpsCredentials as iV, revokeSessionKey as iW, search as iX, setupTradingApprovals as iY, splitComboPosition as iZ, splitMarketPosition as i_, listMarketClarifications as ia, listMarketHolders as ib, listMarketRewards as ic, listMarkets as id, listOpenOrders as ie, listPerpsCandles as ig, listPerpsFundingHistory as ih, listPerpsTrades as ii, listPositions as ij, listPriceHistory as ik, listSeries as il, listTags as im, listTeams as io, listTraderLeaderboard as ip, listTrades as iq, listUserEarningsAndMarketsConfig as ir, listUserEarningsForDay as is, mergeComboPosition as it, mergeMarketPosition as iu, mergePositions as iv, openPerpsSession as iw, openRfqSession as ix, planCollateralReturn as iy, postOrder as iz, ArmPerpsAutoCancelError as j, subscribe as j0, transferErc20 as j1, updateBalanceAllowance as j2, waitForComboFill as j3, waitForOrderFillSettlement as j4, withdrawFromPerps as j5, type ArmPerpsAutoCancelRequest as k, AuthorizeSessionKeyError as l, type AuthorizeSessionKeyRequest as m, type AuthorizeSessionKeyResult as n, AutoCancelDailyLimitError as o, BasePublicClient as p, BaseSecureClient as q, type BeginAuthenticationRequest as r, type CancelAllPerpsOrdersRequest as s, CancelMarketOrdersError as t, CancelOrderError as u, CancelOrdersError as v, type CancelPerpsOrderRequest as w, type CancelPerpsOrdersRequest as x, CancelledSigningError as y, type Client as z };
|