@structbuild/sdk 0.3.10-staging.6 → 0.3.10-staging.8

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.
@@ -203,6 +203,26 @@ export interface paths {
203
203
  patch?: never;
204
204
  trace?: never;
205
205
  };
206
+ "/polymarket/events/top-traders": {
207
+ parameters: {
208
+ query?: never;
209
+ header?: never;
210
+ path?: never;
211
+ cookie?: never;
212
+ };
213
+ /**
214
+ * Get top traders for an event
215
+ * @description Top traders ranked by realized PnL for a given event.
216
+ */
217
+ get: operations["get_event_top_traders"];
218
+ put?: never;
219
+ post?: never;
220
+ delete?: never;
221
+ options?: never;
222
+ head?: never;
223
+ patch?: never;
224
+ trace?: never;
225
+ };
206
226
  "/polymarket/events/{event_slug}/analytics/changes": {
207
227
  parameters: {
208
228
  query?: never;
@@ -292,7 +312,7 @@ export interface paths {
292
312
  };
293
313
  /**
294
314
  * Get market holders
295
- * @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a nested holder `pnl` object.
315
+ * @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Set `include_pnl=true` to include a nested holder `pnl` object. Uses cursor-based pagination.
296
316
  */
297
317
  get: operations["get_market_holders"];
298
318
  put?: never;
@@ -463,6 +483,26 @@ export interface paths {
463
483
  patch?: never;
464
484
  trace?: never;
465
485
  };
486
+ "/polymarket/market/oracle-events": {
487
+ parameters: {
488
+ query?: never;
489
+ header?: never;
490
+ path?: never;
491
+ cookie?: never;
492
+ };
493
+ /**
494
+ * List oracle events
495
+ * @description Retrieve on-chain oracle lifecycle events (resolutions, disputes, assertions, emergency resolutions). Filter by `condition_ids` or `event_types` and paginate with `limit`/`pagination_key`.
496
+ */
497
+ get: operations["get_oracle_events"];
498
+ put?: never;
499
+ post?: never;
500
+ delete?: never;
501
+ options?: never;
502
+ head?: never;
503
+ patch?: never;
504
+ trace?: never;
505
+ };
466
506
  "/polymarket/market/position/candlestick": {
467
507
  parameters: {
468
508
  query?: never;
@@ -503,6 +543,26 @@ export interface paths {
503
543
  patch?: never;
504
544
  trace?: never;
505
545
  };
546
+ "/polymarket/market/position/top-traders": {
547
+ parameters: {
548
+ query?: never;
549
+ header?: never;
550
+ path?: never;
551
+ cookie?: never;
552
+ };
553
+ /**
554
+ * Get top traders for a position id / outcome
555
+ * @description Top traders ranked by realized PnL on a specific position (ERC1155 outcome token).
556
+ */
557
+ get: operations["get_position_top_traders"];
558
+ put?: never;
559
+ post?: never;
560
+ delete?: never;
561
+ options?: never;
562
+ head?: never;
563
+ patch?: never;
564
+ trace?: never;
565
+ };
506
566
  "/polymarket/market/position/volume-chart": {
507
567
  parameters: {
508
568
  query?: never;
@@ -563,6 +623,26 @@ export interface paths {
563
623
  patch?: never;
564
624
  trace?: never;
565
625
  };
626
+ "/polymarket/market/top-traders": {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ /**
634
+ * Get top traders for a market
635
+ * @description Top traders ranked by realized PnL for a given market (condition_id or market_slug).
636
+ */
637
+ get: operations["get_market_top_traders"];
638
+ put?: never;
639
+ post?: never;
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
566
646
  "/polymarket/market/trades": {
567
647
  parameters: {
568
648
  query?: never;
@@ -1092,7 +1172,7 @@ export interface paths {
1092
1172
  };
1093
1173
  /**
1094
1174
  * Get trader position PnL
1095
- * @description Retrieve per-outcome-token lifetime PnL for a trader from polymarket_accounts. Includes open/closed state, win/loss outcome, redemption payouts, and share quantities. Filter by status and won/lost to segment portfolio views.
1175
+ * @description Retrieve per-outcome-token lifetime PnL for a trader. Includes open/closed state, win/loss outcome, redemption payouts, and share quantities. Filter by status and won/lost to segment portfolio views.
1096
1176
  */
1097
1177
  get: operations["get_trader_position_pnl"];
1098
1178
  put?: never;
@@ -1254,7 +1334,7 @@ export interface components {
1254
1334
  * domains and re-bucketed from the `_1d` MV for market/event/trader.
1255
1335
  * @enum {string}
1256
1336
  */
1257
- AnalyticsResolution: "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D" | "W" | "1W" | "M" | "1M";
1337
+ AnalyticsResolution: "60" | "240" | "D" | "1D" | "W" | "1W" | "M" | "1M";
1258
1338
  /** @description Output payload for ERC1155 setApprovalForAll events. */
1259
1339
  ApprovalTrade: {
1260
1340
  id: string;
@@ -1542,6 +1622,36 @@ export interface components {
1542
1622
  slug?: string | null;
1543
1623
  event_slug?: string | null;
1544
1624
  };
1625
+ /** @description V2 UMA OOv2: a proposed price was disputed. */
1626
+ DisputePriceEvent: {
1627
+ id: string;
1628
+ hash: string;
1629
+ /** Format: int64 */
1630
+ block?: number | null;
1631
+ /** Format: int64 */
1632
+ confirmed_at?: number | null;
1633
+ /** Format: int64 */
1634
+ received_at?: number | null;
1635
+ /** Format: int64 */
1636
+ log_index?: number | null;
1637
+ /** Format: int64 */
1638
+ block_index?: number | null;
1639
+ oracle_contract: string;
1640
+ requester: string;
1641
+ proposer: string;
1642
+ disputer: string;
1643
+ identifier: string;
1644
+ timestamp: string;
1645
+ ancillary_data: string;
1646
+ /** Format: int64 */
1647
+ proposed_price: number;
1648
+ condition_id?: string | null;
1649
+ proposed_outcome?: string | null;
1650
+ question?: string | null;
1651
+ image_url?: string | null;
1652
+ slug?: string | null;
1653
+ event_slug?: string | null;
1654
+ };
1545
1655
  /** @description Enriched market data for event API responses */
1546
1656
  EventMarket: {
1547
1657
  /** @default */
@@ -1660,8 +1770,21 @@ export interface components {
1660
1770
  buy_volume_usd: number;
1661
1771
  /** Format: double */
1662
1772
  sell_volume_usd: number;
1663
- /** Format: int64 */
1773
+ /**
1774
+ * Format: int64
1775
+ * @description Distinct addresses that have ever traded on Polymarket (lifetime).
1776
+ */
1664
1777
  unique_traders: number;
1778
+ /**
1779
+ * Format: int64
1780
+ * @description Distinct makers ever active (lifetime distinct).
1781
+ */
1782
+ unique_makers: number;
1783
+ /**
1784
+ * Format: int64
1785
+ * @description Distinct takers ever active (lifetime distinct).
1786
+ */
1787
+ unique_takers: number;
1665
1788
  /** Format: int64 */
1666
1789
  txn_count: number;
1667
1790
  /** Format: int64 */
@@ -1828,11 +1951,10 @@ export interface components {
1828
1951
  */
1829
1952
  LeaderboardCategory: "overall" | "politics" | "sports" | "crypto" | "finance" | "culture" | "mentions" | "weather" | "economics" | "tech";
1830
1953
  /**
1831
- * @description Flat response row. `trader` is the canonical `TraderInfo` used across all
1832
- * our other endpoints; all enrichment fields sit at the top level. Fields
1833
- * other than `trader`, `rank`, `pnl`, and `timeframe` are sourced from our
1834
- * `prediction_trader_pnl_*_v2` tables and are `null` when we don't yet have
1835
- * a row for that address in the selected timeframe.
1954
+ * @description Flat response row. `trader` is the canonical `TraderInfo` used across
1955
+ * endpoints; enrichment fields sit at the top level. Fields other than
1956
+ * `trader`, `rank`, `pnl`, and `timeframe` may be `null` when PnL data for
1957
+ * the trader in the selected timeframe isn't yet available.
1836
1958
  */
1837
1959
  LeaderboardEntry: {
1838
1960
  /** Format: int64 */
@@ -2061,8 +2183,16 @@ export interface components {
2061
2183
  /** Format: double */
2062
2184
  sell_volume_usd?: number | null;
2063
2185
  /** Format: double */
2186
+ merge_volume_usd?: number | null;
2187
+ /** Format: double */
2188
+ split_volume_usd?: number | null;
2189
+ /** Format: double */
2064
2190
  unique_traders?: number | null;
2065
2191
  /** Format: double */
2192
+ unique_makers?: number | null;
2193
+ /** Format: double */
2194
+ unique_takers?: number | null;
2195
+ /** Format: double */
2066
2196
  txn_count?: number | null;
2067
2197
  /** Format: double */
2068
2198
  fees_usd?: number | null;
@@ -2097,6 +2227,62 @@ export interface components {
2097
2227
  slug?: string | null;
2098
2228
  event_slug?: string | null;
2099
2229
  };
2230
+ /**
2231
+ * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
2232
+ * and only includes fields relevant to each type.
2233
+ */
2234
+ OracleEventTyped: (components["schemas"]["AssertionMadeEvent"] & {
2235
+ /** @enum {string} */
2236
+ event_type: "AssertionMade";
2237
+ }) | (components["schemas"]["AssertionDisputedEvent"] & {
2238
+ /** @enum {string} */
2239
+ event_type: "AssertionDisputed";
2240
+ }) | (components["schemas"]["AssertionSettledEvent"] & {
2241
+ /** @enum {string} */
2242
+ event_type: "AssertionSettled";
2243
+ }) | (components["schemas"]["RequestPriceEvent"] & {
2244
+ /** @enum {string} */
2245
+ event_type: "RequestPrice";
2246
+ }) | (components["schemas"]["ProposePriceEvent"] & {
2247
+ /** @enum {string} */
2248
+ event_type: "ProposePrice";
2249
+ }) | (components["schemas"]["DisputePriceEvent"] & {
2250
+ /** @enum {string} */
2251
+ event_type: "DisputePrice";
2252
+ }) | (components["schemas"]["SettleEvent"] & {
2253
+ /** @enum {string} */
2254
+ event_type: "Settle";
2255
+ }) | (components["schemas"]["QuestionResolvedEvent"] & {
2256
+ /** @enum {string} */
2257
+ event_type: "QuestionResolved";
2258
+ }) | (components["schemas"]["QuestionEmergencyResolvedEvent"] & {
2259
+ /** @enum {string} */
2260
+ event_type: "QuestionEmergencyResolved";
2261
+ }) | (components["schemas"]["QuestionResetEvent"] & {
2262
+ /** @enum {string} */
2263
+ event_type: "QuestionReset";
2264
+ }) | (components["schemas"]["QuestionInitializedEvent"] & {
2265
+ /** @enum {string} */
2266
+ event_type: "QuestionInitialized";
2267
+ }) | (components["schemas"]["QuestionPausedEvent"] & {
2268
+ /** @enum {string} */
2269
+ event_type: "QuestionPaused";
2270
+ }) | (components["schemas"]["QuestionUnpausedEvent"] & {
2271
+ /** @enum {string} */
2272
+ event_type: "QuestionUnpaused";
2273
+ }) | (components["schemas"]["QuestionFlaggedEvent"] & {
2274
+ /** @enum {string} */
2275
+ event_type: "QuestionFlagged";
2276
+ }) | (components["schemas"]["QuestionUnflaggedEvent"] & {
2277
+ /** @enum {string} */
2278
+ event_type: "QuestionUnflagged";
2279
+ }) | (components["schemas"]["ConditionResolutionEvent"] & {
2280
+ /** @enum {string} */
2281
+ event_type: "ConditionResolution";
2282
+ }) | (components["schemas"]["NegRiskOutcomeReportedEvent"] & {
2283
+ /** @enum {string} */
2284
+ event_type: "NegRiskOutcomeReported";
2285
+ });
2100
2286
  /** @description Output payload for OrderFilled and OrdersMatched trades (actual buy/sell). */
2101
2287
  OrderFilledTrade: {
2102
2288
  id: string;
@@ -2475,9 +2661,22 @@ export interface components {
2475
2661
  txn_count: number;
2476
2662
  /**
2477
2663
  * Format: int64
2664
+ * @description Distinct active traders in the window.
2478
2665
  * @default null
2479
2666
  */
2480
2667
  unique_traders: number;
2668
+ /**
2669
+ * Format: int64
2670
+ * @description Distinct active makers in the window.
2671
+ * @default null
2672
+ */
2673
+ unique_makers: number;
2674
+ /**
2675
+ * Format: int64
2676
+ * @description Distinct active takers in the window.
2677
+ * @default null
2678
+ */
2679
+ unique_takers: number;
2481
2680
  /**
2482
2681
  * Format: double
2483
2682
  * @default null
@@ -2521,7 +2720,7 @@ export interface components {
2521
2720
  * @description Outcome index (0 = Yes, 1 = No for binary)
2522
2721
  */
2523
2722
  outcome_index: number;
2524
- /** @description Outcome name (e.g. "Yes", "No") — enriched from market metadata */
2723
+ /** @description Outcome name (e.g. "Yes", "No"). Optional may be omitted when the market metadata isn't yet available. */
2525
2724
  outcome?: string | null;
2526
2725
  /** @description Amount of shares created/burned/redeemed for this position */
2527
2726
  amount: string;
@@ -2673,6 +2872,37 @@ export interface components {
2673
2872
  };
2674
2873
  /** @enum {string} */
2675
2874
  PriceJumpResolution: "1" | "5" | "15" | "30" | "60" | "240";
2875
+ /** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
2876
+ ProposePriceEvent: {
2877
+ id: string;
2878
+ hash: string;
2879
+ /** Format: int64 */
2880
+ block?: number | null;
2881
+ /** Format: int64 */
2882
+ confirmed_at?: number | null;
2883
+ /** Format: int64 */
2884
+ received_at?: number | null;
2885
+ /** Format: int64 */
2886
+ log_index?: number | null;
2887
+ /** Format: int64 */
2888
+ block_index?: number | null;
2889
+ oracle_contract: string;
2890
+ requester: string;
2891
+ proposer: string;
2892
+ identifier: string;
2893
+ timestamp: string;
2894
+ ancillary_data: string;
2895
+ /** Format: int64 */
2896
+ proposed_price: number;
2897
+ expiration_timestamp: string;
2898
+ currency: string;
2899
+ condition_id?: string | null;
2900
+ proposed_outcome?: string | null;
2901
+ question?: string | null;
2902
+ image_url?: string | null;
2903
+ slug?: string | null;
2904
+ event_slug?: string | null;
2905
+ };
2676
2906
  /** @description UMA CTF Adapter: admin emergency resolution. */
2677
2907
  QuestionEmergencyResolvedEvent: {
2678
2908
  id: string;
@@ -2903,6 +3133,41 @@ export interface components {
2903
3133
  event_slug?: string | null;
2904
3134
  exchange: components["schemas"]["PolymarketExchange"];
2905
3135
  };
3136
+ /** @description V2 UMA OOv2: a price request was made (market initialization). */
3137
+ RequestPriceEvent: {
3138
+ id: string;
3139
+ hash: string;
3140
+ /** Format: int64 */
3141
+ block?: number | null;
3142
+ /** Format: int64 */
3143
+ confirmed_at?: number | null;
3144
+ /** Format: int64 */
3145
+ received_at?: number | null;
3146
+ /** Format: int64 */
3147
+ log_index?: number | null;
3148
+ /** Format: int64 */
3149
+ block_index?: number | null;
3150
+ oracle_contract: string;
3151
+ requester: string;
3152
+ identifier: string;
3153
+ /**
3154
+ * @description UMA request timestamp (seconds, decimal string).
3155
+ * The point in time the requester is asking the oracle to resolve the
3156
+ * price for — part of the request identity tuple
3157
+ * `(requester, identifier, timestamp, ancillaryData)`. Not the block
3158
+ * timestamp of this event; see `confirmed_at` for that.
3159
+ */
3160
+ timestamp: string;
3161
+ ancillary_data: string;
3162
+ currency: string;
3163
+ reward: string;
3164
+ final_fee: string;
3165
+ condition_id?: string | null;
3166
+ question?: string | null;
3167
+ image_url?: string | null;
3168
+ slug?: string | null;
3169
+ event_slug?: string | null;
3170
+ };
2906
3171
  SearchResponse: {
2907
3172
  events?: components["schemas"]["PolymarketEvent"][] | null;
2908
3173
  events_pagination?: null | components["schemas"]["PaginationMeta"];
@@ -2916,6 +3181,38 @@ export interface components {
2916
3181
  * @enum {string}
2917
3182
  */
2918
3183
  SearchSortBy: "volume" | "txns" | "unique_traders" | "relevance" | "title" | "creation_date" | "start_date" | "end_date" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time";
3184
+ /** @description V2 UMA OOv2: a price request was settled (final resolution). */
3185
+ SettleEvent: {
3186
+ id: string;
3187
+ hash: string;
3188
+ /** Format: int64 */
3189
+ block?: number | null;
3190
+ /** Format: int64 */
3191
+ confirmed_at?: number | null;
3192
+ /** Format: int64 */
3193
+ received_at?: number | null;
3194
+ /** Format: int64 */
3195
+ log_index?: number | null;
3196
+ /** Format: int64 */
3197
+ block_index?: number | null;
3198
+ oracle_contract: string;
3199
+ requester: string;
3200
+ proposer: string;
3201
+ disputer: string;
3202
+ identifier: string;
3203
+ timestamp: string;
3204
+ ancillary_data: string;
3205
+ /** Format: int64 */
3206
+ proposed_price: number;
3207
+ payout: string;
3208
+ disputed: boolean;
3209
+ condition_id?: string | null;
3210
+ proposed_outcome?: string | null;
3211
+ question?: string | null;
3212
+ image_url?: string | null;
3213
+ slug?: string | null;
3214
+ event_slug?: string | null;
3215
+ };
2919
3216
  SimpleTimeframeMetrics: {
2920
3217
  /**
2921
3218
  * Format: double
@@ -2996,12 +3293,12 @@ export interface components {
2996
3293
  };
2997
3294
  /**
2998
3295
  * @description Metric to order by when `sort=<value>` is provided.
2999
- * `traders` windowed sums per-block deltas — approximate for the "unique
3000
- * traders in window" reading (double-counts traders active in multiple
3001
- * blocks) but fine for ranking. `lifetime` uses the exact cumulative.
3296
+ *
3297
+ * `unique_*` ranks by window-distinct addresses exact `uniqExact` count
3298
+ * of addresses active in the timeframe.
3002
3299
  * @enum {string}
3003
3300
  */
3004
- TagSortBy: "volume" | "txns" | "traders" | "fees";
3301
+ TagSortBy: "volume" | "txns" | "unique_traders" | "unique_makers" | "unique_takers" | "fees";
3005
3302
  /**
3006
3303
  * @description Timeframe for `?sort=...` — defines the window the metric is summed over
3007
3304
  * (or `lifetime` for all-time cumulative).
@@ -3015,10 +3312,12 @@ export interface components {
3015
3312
  *
3016
3313
  * Short field names for compact JSON responses:
3017
3314
  * t=bucket (unix seconds), v=volume_usd, bv=buy_volume_usd, sv=sell_volume_usd,
3018
- * ut=unique_traders, tc=txn_count, bc=buy_count, sc=sell_count,
3019
- * rc=redemption_count, rv=redemption_volume_usd, mc=merge_count,
3020
- * sp=split_count, f=fees_usd, sh=shares_volume,
3021
- * yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count
3315
+ * ut=unique_traders, um=unique_makers, uk=unique_takers,
3316
+ * tc=txn_count, bc=buy_count, sc=sell_count,
3317
+ * rc=redemption_count, rv=redemption_volume_usd, mc=merge_count, mv=merge_volume_usd,
3318
+ * sp=split_count, spv=split_volume_usd, f=fees_usd, sh=shares_volume,
3319
+ * yv=yes_volume_usd, nv=no_volume_usd, yc=yes_count, nc=no_count,
3320
+ * bd_*=buy distribution by USD bucket
3022
3321
  */
3023
3322
  TimeBucketRow: {
3024
3323
  /** Format: int32 */
@@ -3030,8 +3329,6 @@ export interface components {
3030
3329
  /** Format: double */
3031
3330
  sv: number;
3032
3331
  /** Format: int64 */
3033
- ut: number;
3034
- /** Format: int64 */
3035
3332
  tc: number;
3036
3333
  /** Format: int64 */
3037
3334
  bc: number;
@@ -3076,6 +3373,21 @@ export interface components {
3076
3373
  bd_50k: number;
3077
3374
  /** Format: int64 */
3078
3375
  bd_50p: number;
3376
+ /**
3377
+ * Format: int64
3378
+ * @description Distinct traders ACTIVE in this bucket (window-unique, not first-time).
3379
+ */
3380
+ ut: number;
3381
+ /**
3382
+ * Format: int64
3383
+ * @description Distinct makers active in this bucket.
3384
+ */
3385
+ um: number;
3386
+ /**
3387
+ * Format: int64
3388
+ * @description Distinct takers active in this bucket.
3389
+ */
3390
+ uk: number;
3079
3391
  };
3080
3392
  /** @description Token outcome (position) */
3081
3393
  TokenOutcome: {
@@ -3264,6 +3576,33 @@ export interface components {
3264
3576
  /** Format: double */
3265
3577
  realized_pnl_pct?: number | null;
3266
3578
  };
3579
+ /**
3580
+ * @description Per-metric percentage change over a lookback window for one trader
3581
+ * address. A `null` field means the window predates the trader's first
3582
+ * activity or the prior value was zero (percentage undefined).
3583
+ */
3584
+ TraderMetricPctChange: {
3585
+ /** Format: double */
3586
+ volume_usd?: number | null;
3587
+ /** Format: double */
3588
+ buy_volume_usd?: number | null;
3589
+ /** Format: double */
3590
+ sell_volume_usd?: number | null;
3591
+ /** Format: double */
3592
+ merge_volume_usd?: number | null;
3593
+ /** Format: double */
3594
+ split_volume_usd?: number | null;
3595
+ /** Format: double */
3596
+ txn_count?: number | null;
3597
+ /** Format: double */
3598
+ fees_usd?: number | null;
3599
+ /** Format: double */
3600
+ shares_volume?: number | null;
3601
+ /** Format: double */
3602
+ yes_volume_usd?: number | null;
3603
+ /** Format: double */
3604
+ no_volume_usd?: number | null;
3605
+ };
3267
3606
  /** @description Outcome-level PnL entry (per outcome token / position_id) */
3268
3607
  TraderOutcomePnlEntry: {
3269
3608
  position_id?: string | null;
@@ -3384,6 +3723,65 @@ export interface components {
3384
3723
  /** Format: int64 */
3385
3724
  last_trade_at?: number | null;
3386
3725
  };
3726
+ /**
3727
+ * @description Bucket row returned by the per-trader `/analytics/timeseries` and
3728
+ * `/analytics/deltas` endpoints. Mirrors `TimeBucketRow` minus the
3729
+ * distinct-address counters (`new_*` / `unique_*`) — those only carry
3730
+ * information for aggregations over many addresses (market, event, tag,
3731
+ * global), not for a single trader.
3732
+ */
3733
+ TraderTimeBucketRow: {
3734
+ /** Format: int32 */
3735
+ t: number;
3736
+ /** Format: double */
3737
+ v: number;
3738
+ /** Format: double */
3739
+ bv: number;
3740
+ /** Format: double */
3741
+ sv: number;
3742
+ /** Format: int64 */
3743
+ tc: number;
3744
+ /** Format: int64 */
3745
+ bc: number;
3746
+ /** Format: int64 */
3747
+ sc: number;
3748
+ /** Format: int64 */
3749
+ rc: number;
3750
+ /** Format: double */
3751
+ rv: number;
3752
+ /** Format: int64 */
3753
+ mc: number;
3754
+ /** Format: double */
3755
+ mv: number;
3756
+ /** Format: int64 */
3757
+ sp: number;
3758
+ /** Format: double */
3759
+ spv: number;
3760
+ /** Format: double */
3761
+ f: number;
3762
+ /** Format: double */
3763
+ sh: number;
3764
+ /** Format: double */
3765
+ yv: number;
3766
+ /** Format: double */
3767
+ nv: number;
3768
+ /** Format: int64 */
3769
+ yc: number;
3770
+ /** Format: int64 */
3771
+ nc: number;
3772
+ /** Format: int64 */
3773
+ bd_u10: number;
3774
+ /** Format: int64 */
3775
+ bd_100: number;
3776
+ /** Format: int64 */
3777
+ bd_1k: number;
3778
+ /** Format: int64 */
3779
+ bd_10k: number;
3780
+ /** Format: int64 */
3781
+ bd_50k: number;
3782
+ /** Format: int64 */
3783
+ bd_50p: number;
3784
+ };
3387
3785
  TraderVolumeChartResponse: {
3388
3786
  volumes: components["schemas"]["TraderVolumeDataPoint"][];
3389
3787
  has_more: boolean;
@@ -3428,9 +3826,9 @@ export type $defs = Record<string, never>;
3428
3826
  export interface operations {
3429
3827
  get_global_analytics_changes: {
3430
3828
  parameters: {
3431
- query: {
3432
- /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
3433
- timeframe: components["schemas"]["ChangeTimeframe"];
3829
+ query?: {
3830
+ /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
3831
+ timeframe?: components["schemas"]["ChangeTimeframe"];
3434
3832
  };
3435
3833
  header?: never;
3436
3834
  path?: never;
@@ -3472,7 +3870,7 @@ export interface operations {
3472
3870
  get_global_analytics_deltas: {
3473
3871
  parameters: {
3474
3872
  query?: {
3475
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3873
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3476
3874
  resolution?: components["schemas"]["AnalyticsResolution"];
3477
3875
  /** @description Start timestamp (Unix seconds). Omit for all-time. */
3478
3876
  from?: number;
@@ -3503,7 +3901,7 @@ export interface operations {
3503
3901
  get_global_analytics_timeseries: {
3504
3902
  parameters: {
3505
3903
  query?: {
3506
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3904
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3507
3905
  resolution?: components["schemas"]["AnalyticsResolution"];
3508
3906
  /** @description Start timestamp (Unix seconds). Omit for all-time. */
3509
3907
  from?: number;
@@ -3797,11 +4195,38 @@ export interface operations {
3797
4195
  };
3798
4196
  };
3799
4197
  };
3800
- get_event_analytics_changes: {
4198
+ get_event_top_traders: {
3801
4199
  parameters: {
3802
4200
  query: {
3803
- /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
3804
- timeframe: components["schemas"]["ChangeTimeframe"];
4201
+ /** @description Event slug */
4202
+ event_slug: string;
4203
+ /** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
4204
+ timeframe?: components["schemas"]["PnlTimeframe"];
4205
+ /** @description Results limit (default: 10, max: 200) */
4206
+ limit?: number;
4207
+ /** @description Pagination key from the previous response */
4208
+ pagination_key?: string;
4209
+ };
4210
+ header?: never;
4211
+ path?: never;
4212
+ cookie?: never;
4213
+ };
4214
+ requestBody?: never;
4215
+ responses: {
4216
+ /** @description Top traders sorted by realized PnL desc. */
4217
+ 200: {
4218
+ headers: {
4219
+ [name: string]: unknown;
4220
+ };
4221
+ content?: never;
4222
+ };
4223
+ };
4224
+ };
4225
+ get_event_analytics_changes: {
4226
+ parameters: {
4227
+ query?: {
4228
+ /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
4229
+ timeframe?: components["schemas"]["ChangeTimeframe"];
3805
4230
  };
3806
4231
  header?: never;
3807
4232
  path: {
@@ -3826,7 +4251,7 @@ export interface operations {
3826
4251
  get_event_analytics_deltas: {
3827
4252
  parameters: {
3828
4253
  query?: {
3829
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
4254
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3830
4255
  resolution?: components["schemas"]["AnalyticsResolution"];
3831
4256
  /** @description Start timestamp (Unix seconds) */
3832
4257
  from?: number;
@@ -3860,7 +4285,7 @@ export interface operations {
3860
4285
  get_event_analytics_timeseries: {
3861
4286
  parameters: {
3862
4287
  query?: {
3863
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
4288
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
3864
4289
  resolution?: components["schemas"]["AnalyticsResolution"];
3865
4290
  /** @description Start timestamp (Unix seconds) */
3866
4291
  from?: number;
@@ -3937,8 +4362,10 @@ export interface operations {
3937
4362
  condition_id?: string;
3938
4363
  /** @description Market slug (e.g. `will-trump-win`) */
3939
4364
  market_slug?: string;
3940
- /** @description Results limit (default: 10, max: 100) */
4365
+ /** @description Results limit per outcome (default: 10, max: 100) */
3941
4366
  limit?: number;
4367
+ /** @description Cursor-based pagination key */
4368
+ pagination_key?: string;
3942
4369
  /** @description Minimum shares held (decimal string) */
3943
4370
  min_shares?: string;
3944
4371
  /** @description Maximum shares held (decimal string) */
@@ -3954,7 +4381,7 @@ export interface operations {
3954
4381
  };
3955
4382
  requestBody?: never;
3956
4383
  responses: {
3957
- /** @description Market holders grouped by outcome (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. */
4384
+ /** @description Market holders grouped by outcome (sorted by shares DESC). Holder `pnl` is included only when `include_pnl=true`. Response includes `pagination: { has_more, pagination_key }` for cursor-based pagination. */
3958
4385
  200: {
3959
4386
  headers: {
3960
4387
  [name: string]: unknown;
@@ -4323,6 +4750,43 @@ export interface operations {
4323
4750
  };
4324
4751
  };
4325
4752
  };
4753
+ get_oracle_events: {
4754
+ parameters: {
4755
+ query?: {
4756
+ /** @description Comma-separated condition IDs (max 20) */
4757
+ condition_ids?: string;
4758
+ /** @description Comma-separated event names: Initialization, Proposal, Dispute, Settled, Resolution, ConditionResolution, Reset, Flag, Unflag, Pause, Unpause, ManualResolution, NegRiskOutcomeReported. Empty = all oracle event types. */
4759
+ event_types?: string;
4760
+ /** @description Start timestamp (Unix seconds) */
4761
+ from?: number;
4762
+ /** @description End timestamp (Unix seconds) */
4763
+ to?: number;
4764
+ /** @description Results per page (default 10, max 250) */
4765
+ limit?: number;
4766
+ /** @description Pagination offset. Takes precedence over pagination_key. */
4767
+ offset?: number;
4768
+ /** @description Cursor-based pagination key */
4769
+ pagination_key?: string;
4770
+ /** @description Sort direction (default true = newest first) */
4771
+ sort_desc?: boolean;
4772
+ };
4773
+ header?: never;
4774
+ path?: never;
4775
+ cookie?: never;
4776
+ };
4777
+ requestBody?: never;
4778
+ responses: {
4779
+ /** @description Oracle events matching the filter */
4780
+ 200: {
4781
+ headers: {
4782
+ [name: string]: unknown;
4783
+ };
4784
+ content: {
4785
+ "application/json": components["schemas"]["TradeEvent"][];
4786
+ };
4787
+ };
4788
+ };
4789
+ };
4326
4790
  get_position_candlestick: {
4327
4791
  parameters: {
4328
4792
  query: {
@@ -4388,6 +4852,33 @@ export interface operations {
4388
4852
  };
4389
4853
  };
4390
4854
  };
4855
+ get_position_top_traders: {
4856
+ parameters: {
4857
+ query: {
4858
+ /** @description Position ID (ERC1155 token ID) */
4859
+ position_id: string;
4860
+ /** @description Filter by position status (omit for all) */
4861
+ status?: "open" | "closed";
4862
+ /** @description Results limit (default: 10, max: 200) */
4863
+ limit?: number;
4864
+ /** @description Pagination key from the previous response */
4865
+ pagination_key?: string;
4866
+ };
4867
+ header?: never;
4868
+ path?: never;
4869
+ cookie?: never;
4870
+ };
4871
+ requestBody?: never;
4872
+ responses: {
4873
+ /** @description Top traders sorted by realized PnL desc. */
4874
+ 200: {
4875
+ headers: {
4876
+ [name: string]: unknown;
4877
+ };
4878
+ content?: never;
4879
+ };
4880
+ };
4881
+ };
4391
4882
  get_position_volume_chart: {
4392
4883
  parameters: {
4393
4884
  query: {
@@ -4558,6 +5049,35 @@ export interface operations {
4558
5049
  };
4559
5050
  };
4560
5051
  };
5052
+ get_market_top_traders: {
5053
+ parameters: {
5054
+ query?: {
5055
+ /** @description Market condition ID */
5056
+ condition_id?: string;
5057
+ /** @description Market slug (alternative to condition_id) */
5058
+ market_slug?: string;
5059
+ /** @description Timeframe: 1d, 7d, 30d, lifetime (default: lifetime) */
5060
+ timeframe?: components["schemas"]["PnlTimeframe"];
5061
+ /** @description Results limit (default: 10, max: 200) */
5062
+ limit?: number;
5063
+ /** @description Pagination key from the previous response */
5064
+ pagination_key?: string;
5065
+ };
5066
+ header?: never;
5067
+ path?: never;
5068
+ cookie?: never;
5069
+ };
5070
+ requestBody?: never;
5071
+ responses: {
5072
+ /** @description Top traders sorted by realized PnL desc. */
5073
+ 200: {
5074
+ headers: {
5075
+ [name: string]: unknown;
5076
+ };
5077
+ content?: never;
5078
+ };
5079
+ };
5080
+ };
4561
5081
  get_market_trades: {
4562
5082
  parameters: {
4563
5083
  query?: {
@@ -4569,6 +5089,8 @@ export interface operations {
4569
5089
  position_ids?: string;
4570
5090
  /** @description Comma-separated trader addresses (max 25) */
4571
5091
  traders?: string;
5092
+ /** @description Comma-separated builder codes (max 25) */
5093
+ builder_codes?: string;
4572
5094
  /** @description Trade side: 0 (Buy), 1 (Sell) */
4573
5095
  side?: components["schemas"]["TradeSide"];
4574
5096
  /** @description Outcome name filter (e.g. Yes, No) */
@@ -4764,9 +5286,9 @@ export interface operations {
4764
5286
  };
4765
5287
  get_market_analytics_changes: {
4766
5288
  parameters: {
4767
- query: {
4768
- /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
4769
- timeframe: components["schemas"]["ChangeTimeframe"];
5289
+ query?: {
5290
+ /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
5291
+ timeframe?: components["schemas"]["ChangeTimeframe"];
4770
5292
  };
4771
5293
  header?: never;
4772
5294
  path: {
@@ -4791,7 +5313,7 @@ export interface operations {
4791
5313
  get_market_analytics_deltas: {
4792
5314
  parameters: {
4793
5315
  query?: {
4794
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5316
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
4795
5317
  resolution?: components["schemas"]["AnalyticsResolution"];
4796
5318
  /** @description Start timestamp (Unix seconds) */
4797
5319
  from?: number;
@@ -4825,7 +5347,7 @@ export interface operations {
4825
5347
  get_market_analytics_timeseries: {
4826
5348
  parameters: {
4827
5349
  query?: {
4828
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5350
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
4829
5351
  resolution?: components["schemas"]["AnalyticsResolution"];
4830
5352
  /** @description Start timestamp (Unix seconds) */
4831
5353
  from?: number;
@@ -5287,6 +5809,8 @@ export interface operations {
5287
5809
  sort?: components["schemas"]["TagSortBy"];
5288
5810
  /** @description Window for the sort metric. Defaults to `24h` when only `sort` is set. Setting either `sort` or `timeframe` adds +2 credits. */
5289
5811
  timeframe?: components["schemas"]["TagSortTimeframe"];
5812
+ /** @description Sort direction (default: true = highest first). Only applies to sort/timeframe mode. */
5813
+ sort_desc?: boolean;
5290
5814
  };
5291
5815
  header?: never;
5292
5816
  path?: never;
@@ -5342,9 +5866,9 @@ export interface operations {
5342
5866
  };
5343
5867
  get_tag_analytics_changes: {
5344
5868
  parameters: {
5345
- query: {
5346
- /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
5347
- timeframe: components["schemas"]["ChangeTimeframe"];
5869
+ query?: {
5870
+ /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
5871
+ timeframe?: components["schemas"]["ChangeTimeframe"];
5348
5872
  };
5349
5873
  header?: never;
5350
5874
  path: {
@@ -5369,7 +5893,7 @@ export interface operations {
5369
5893
  get_tag_analytics_deltas: {
5370
5894
  parameters: {
5371
5895
  query?: {
5372
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5896
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5373
5897
  resolution?: components["schemas"]["AnalyticsResolution"];
5374
5898
  /** @description Start timestamp (Unix seconds) */
5375
5899
  from?: number;
@@ -5403,7 +5927,7 @@ export interface operations {
5403
5927
  get_tag_analytics_timeseries: {
5404
5928
  parameters: {
5405
5929
  query?: {
5406
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5930
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5407
5931
  resolution?: components["schemas"]["AnalyticsResolution"];
5408
5932
  /** @description Start timestamp (Unix seconds) */
5409
5933
  from?: number;
@@ -5780,6 +6304,8 @@ export interface operations {
5780
6304
  slugs?: string;
5781
6305
  /** @description Comma-separated position IDs */
5782
6306
  position_ids?: string;
6307
+ /** @description Comma-separated builder codes (max 25) */
6308
+ builder_codes?: string;
5783
6309
  /** @description Trade side: 0 (Buy), 1 (Sell) */
5784
6310
  side?: components["schemas"]["TradeSide"];
5785
6311
  /** @description Outcome name filter (e.g. Yes, No) */
@@ -5804,8 +6330,6 @@ export interface operations {
5804
6330
  from?: number;
5805
6331
  /** @description End timestamp (ms) */
5806
6332
  to?: number;
5807
- /** @description Return all-time trades, not just last 30 days (default: false) */
5808
- all?: boolean;
5809
6333
  /** @description Results per page (default: 10, max: 250) */
5810
6334
  limit?: number;
5811
6335
  /** @description Pagination offset (number of results to skip). Takes precedence over pagination_key. */
@@ -5871,9 +6395,9 @@ export interface operations {
5871
6395
  };
5872
6396
  get_trader_analytics_changes: {
5873
6397
  parameters: {
5874
- query: {
5875
- /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y */
5876
- timeframe: components["schemas"]["ChangeTimeframe"];
6398
+ query?: {
6399
+ /** @description Lookback window: 1h, 24h, 7d, 30d, 1mo, 1y (default: 24h) */
6400
+ timeframe?: components["schemas"]["ChangeTimeframe"];
5877
6401
  };
5878
6402
  header?: never;
5879
6403
  path: {
@@ -5890,7 +6414,7 @@ export interface operations {
5890
6414
  [name: string]: unknown;
5891
6415
  };
5892
6416
  content: {
5893
- "application/json": components["schemas"]["MetricPctChange"];
6417
+ "application/json": components["schemas"]["TraderMetricPctChange"];
5894
6418
  };
5895
6419
  };
5896
6420
  };
@@ -5898,7 +6422,7 @@ export interface operations {
5898
6422
  get_trader_analytics_deltas: {
5899
6423
  parameters: {
5900
6424
  query?: {
5901
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
6425
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5902
6426
  resolution?: components["schemas"]["AnalyticsResolution"];
5903
6427
  /** @description Start timestamp (Unix seconds) */
5904
6428
  from?: number;
@@ -5924,7 +6448,7 @@ export interface operations {
5924
6448
  [name: string]: unknown;
5925
6449
  };
5926
6450
  content: {
5927
- "application/json": components["schemas"]["TimeBucketRow"][];
6451
+ "application/json": components["schemas"]["TraderTimeBucketRow"][];
5928
6452
  };
5929
6453
  };
5930
6454
  };
@@ -5932,7 +6456,7 @@ export interface operations {
5932
6456
  get_trader_analytics_timeseries: {
5933
6457
  parameters: {
5934
6458
  query?: {
5935
- /** @description Bucket size: 1, 5, 15, 30, 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
6459
+ /** @description Bucket size: 60, 240, D, 1D, W, 1W, M, 1M (default: 60) */
5936
6460
  resolution?: components["schemas"]["AnalyticsResolution"];
5937
6461
  /** @description Start timestamp (Unix seconds) */
5938
6462
  from?: number;
@@ -5958,7 +6482,7 @@ export interface operations {
5958
6482
  [name: string]: unknown;
5959
6483
  };
5960
6484
  content: {
5961
- "application/json": components["schemas"]["TimeBucketRow"][];
6485
+ "application/json": components["schemas"]["TraderTimeBucketRow"][];
5962
6486
  };
5963
6487
  };
5964
6488
  };