@0xinsider/sdk 0.38.0 → 0.40.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/schema.d.ts CHANGED
@@ -1001,6 +1001,7 @@ export type EventReplayMeta = {
1001
1001
  condition_id?: string;
1002
1002
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
1003
1003
  min_size?: number;
1004
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
1004
1005
  };
1005
1006
  /** The expansions applied to every event on this page; empty when none. */
1006
1007
  expand: "trade"[];
@@ -1335,6 +1336,10 @@ export type GameFreshness = {
1335
1336
  scores_observed_at?: string;
1336
1337
  /** The provider's own frame clock. Omitted when the frame carries none. */
1337
1338
  scores_source_at?: string;
1339
+ /** Seconds since this game's last Sports WebSocket frame. The esports feed resends an unchanged series about every 20 seconds, so this dates the feed's last frame, not the last score change. Omitted when no Sports WebSocket frame dates the score, which is not age zero: a score read from the provider's event listing is re-read on a cadence whether or not the game moved. */
1340
+ scores_age_seconds?: number;
1341
+ /** Whether this game's score and clock are current, judged on how often this league's feed sends a frame, and independent of source_freshness, which dates the board: a board can be seconds old while one game's frame is frozen. not_applicable outside play (scheduled, final, postponed, cancelled), at halftime and in a break between periods (a period of HT or End ...). stale when the last frame is older than the bound measured for its state: 180 seconds for a running soccer half before stoppage time (the provider sends a frame each match minute); 120 seconds for an in-progress cs2 or lol series (the feed resends each running series about every 20 seconds, so fresh means the provider resent it, not that the map score moved); 600 seconds for a running period of men's and women's college basketball (league cbb, cwbb) and NHL hockey (nhl), whose feeds send no frame while the clock is stopped for a timeout or review. fresh within the bound. unknown otherwise: no dated frame, soccer stoppage time, a period clock at 00:00, End OT in women's college basketball (the end of the third quarter, after which the provider sends no frame until the final), tennis (frames land on points and stop for changeovers and breaks), and every league with no measured bound, including the NBA and NFL. */
1342
+ scores_freshness: "fresh" | "stale" | "unknown" | "not_applicable";
1338
1343
  };
1339
1344
  /** One market of a game holders batch: GET /api/v1/market/{condition_id}/holders unfiltered and cut to the batch limit. */
1340
1345
  export type GameHoldersItem = {
@@ -1378,6 +1383,21 @@ export type GameMarket = {
1378
1383
  prices?: GameMarketPrices;
1379
1384
  /** Polymarket's reported liquidity for this market. Omitted when the provider read carried none, and on a finished game read from its stored record; never 0 in place of a missing figure. */
1380
1385
  liquidity?: GameMarketLiquidity;
1386
+ /** How Polymarket's oracle settled or is settling this market, the block GET /api/v1/games/{event_slug}/markets serves, from the same per-game store. Always present on GET /api/v1/games/{event_slug}; on GET /api/v1/games only with expand=settlement. It never waits for Polymarket: a game not read lately reads status unavailable while its read starts. */
1387
+ settlement?: {
1388
+ expected_settlement_time: string | null;
1389
+ observed_at: string | null;
1390
+ oracle_status: string | null;
1391
+ payouts: number[] | null;
1392
+ proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
1393
+ resolved_at: string | null;
1394
+ result: "outcome" | "split" | null;
1395
+ settled: boolean | null;
1396
+ settlement_time_basis: string | null;
1397
+ status: "observed" | "not_posed" | "unavailable";
1398
+ was_disputed: boolean | null;
1399
+ winning_outcome_index: number | null;
1400
+ };
1381
1401
  };
1382
1402
  /** One market's liquidity as Polymarket reports it (Gamma liquidityNum), verbatim. Polymarket documents it only as reported market liquidity, with no unit. It describes the market's resting order book, not traded volume. */
1383
1403
  export type GameMarketLiquidity = {
@@ -1812,7 +1832,7 @@ export type LargeTradeInsertedV2Data = {
1812
1832
  trader_id: number;
1813
1833
  /** Address of the wallet that made the trade. */
1814
1834
  wallet: string;
1815
- /** The wallet's grade when the event was published; `null` when it has none. */
1835
+ /** The wallet's grade when the event was published; `null` when it has none. A backfilled trade publishes hours after it filled, so this can differ from `grade_at_trade`. `min_grade` filters on this field; `min_grade_at_trade` filters on `grade_at_trade`. */
1816
1836
  grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
1817
1837
  /** USD notional of the trade; decimal string. */
1818
1838
  size_usd: string;
@@ -1826,20 +1846,26 @@ export type LargeTradeInsertedV2Data = {
1826
1846
  /** When the trade filled on Polymarket. The envelope's `created_at` is this instant. */
1827
1847
  traded_at: string;
1828
1848
  platform: "polymarket";
1849
+ /** The grade the wallet held when the trade filled, the same fact as `trader.grade_at_trade` on `GET /api/v1/large-trades`; `null` unless `grade_at_trade_status` is `graded`. `min_grade_at_trade` filters on it. */
1850
+ grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F" | null;
1851
+ /** `graded` when `grade_at_trade` holds the grade at the fill; `ungraded` when the wallet had no grade then; `unknown` when it cannot be known, for a trade before 2026-09-19 23:00 UTC or while a grade change is unconfirmed. Only `graded` trades match `min_grade_at_trade`. An event published before these fields shipped (November 2026), or a redelivery of one, carries neither. */
1852
+ grade_at_trade_status?: "graded" | "ungraded" | "unknown";
1829
1853
  };
1830
1854
  /** `large_trades_inserted` data (Pro and Max): new large trades were ingested. It carries a count and no trade; subscribe to `large_trade_inserted_v2` for the trade itself. The deprecated spelling `whale_trades_inserted` delivers the same object until its sunset on 2027-02-01 (#29352). */
1831
1855
  export type LargeTradesInsertedData = {
1832
1856
  /** Large trades the producing batch admitted. */
1833
1857
  count: number;
1834
1858
  };
1835
- /** All present fields narrow large_trade_inserted_v2 delivery. Grade is observed at publication; ungraded trades do not match min_grade. An empty object matches every large trade. */
1859
+ /** All present fields narrow large_trade_inserted_v2 delivery. min_grade reads the payload's grade, observed at publication; min_grade_at_trade reads its grade_at_trade, the grade when the trade filled. Send one of the two, not both (400). An empty object matches every large trade. */
1836
1860
  export type LargeTradeSubscriptionFilters = {
1837
1861
  /** Raw provider condition ID or mkt_-prefixed market ID. */
1838
1862
  condition_id?: string;
1839
1863
  /** Polymarket wallet address; matching is case-insensitive. */
1840
1864
  wallet?: string;
1841
- /** S is best; ungraded trades do not match. */
1865
+ /** S is best; ungraded trades do not match. Reads the wallet's grade when the trade was published, which for a backfilled trade can be hours after the fill. */
1842
1866
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
1867
+ /** S is best. Reads grade_at_trade, the grade the trader held when the trade filled; only a trade whose grade_at_trade_status is graded matches. The same basis as min_grade_at_trade on GET /api/v1/large-trades and GET /api/v1/stream. */
1868
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
1843
1869
  /** Positive USD notional as an exact decimal string. */
1844
1870
  min_size_usd?: string;
1845
1871
  };
@@ -1886,17 +1912,28 @@ export type LeaderboardEntry = {
1886
1912
  /** When the wallet last traded: its most recent recorded trade, as of the leaderboard row's last refresh, which re-reads it hourly, so a new trade can take about an hour to show. It agrees with the activity filter: every wallet listed under activity=inactive last traded more than 30 days ago. Since 2026-11-02 (#32322); before, it carried the time 0xinsider last synced the wallet, usually within the past week whether or not the wallet traded. Omitted when the wallet has no recorded trade. */
1887
1913
  last_active?: string;
1888
1914
  };
1915
+ /** Every league with a skill leaderboard, by sport: the league values GET /api/v1/leaderboard/sports/{sport} accepts. */
1889
1916
  export type LeaderboardLeagues = {
1917
+ /** Grouped by sport, then most ranked wallets first. */
1890
1918
  leagues: {
1919
+ /** The canonical sport, for example Soccer or Esports. */
1891
1920
  category: string;
1921
+ /** The league's display name. */
1892
1922
  name: string;
1923
+ /** Wallets the league board's edge sort ranks with no hold; at least min_ranked. */
1893
1924
  ranked_traders: number;
1925
+ /** The league slug, the board route's league parameter. */
1894
1926
  slug: string;
1927
+ /** The sport slug, the board route's {sport}. */
1895
1928
  sport: string;
1929
+ /** Wallets with at least min_resolved settled markets in the league and a trade in the last 180 days: the field the league board ranks. */
1896
1930
  total_traders: number;
1897
1931
  }[];
1932
+ /** Wallets a league board's edge sort must rank, with no hold, for the league to be listed. */
1898
1933
  min_ranked: number;
1934
+ /** Settled markets of $20 or more a wallet needs in a league to be on its board. */
1899
1935
  min_resolved: number;
1936
+ /** When the league ranking last ran. It runs about once a day. */
1900
1937
  refreshed_at: string;
1901
1938
  };
1902
1939
  /** Edge over the price paid (#32270): how often the side a wallet bought won, minus the average price it paid, over its settled sports and esports markets of $20 or more at a known entry price. Probabilities throughout: edge 0.12 is 12 percentage points. A wallet buying at 99 cents that wins every market has an edge of about 0.01. A market bought on both sides counts by its shares: the winning side's share of the shares bought is its hit, the cost over those shares its price. */
@@ -2242,6 +2279,21 @@ export type MarketSnapshot = {
2242
2279
  };
2243
2280
  /** Price and spread trust metadata. Present only when expand=trust or expand[]=trust is requested. */
2244
2281
  trust?: MarketSnapshotTrust;
2282
+ /** How Polymarket's oracle settled or is settling this market, the block GET /api/v1/games/{event_slug}/markets serves, read from the store of the market's event (a child event's market: its game's). It never waits for Polymarket: with nothing stored it reads status unavailable while the read starts. market.market_result stays null; read settlement.result. */
2283
+ settlement: {
2284
+ expected_settlement_time: string | null;
2285
+ observed_at: string | null;
2286
+ oracle_status: string | null;
2287
+ payouts: number[] | null;
2288
+ proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
2289
+ resolved_at: string | null;
2290
+ result: "outcome" | "split" | null;
2291
+ settled: boolean | null;
2292
+ settlement_time_basis: string | null;
2293
+ status: "observed" | "not_posed" | "unavailable";
2294
+ was_disputed: boolean | null;
2295
+ winning_outcome_index: number | null;
2296
+ };
2245
2297
  };
2246
2298
  export type MarketSnapshotFreshness = {
2247
2299
  status: "fresh" | "stale" | "available" | "not_live" | "unavailable";
@@ -3004,6 +3056,8 @@ export type PickOfTheDayLedgerOpenedEntry = {
3004
3056
  supersedes_pick_id: string | null;
3005
3057
  /** Explicit proof provenance: 1 retains historic eight-field canonical JSON; 2 binds stable pick_id and version without pick_rank. */
3006
3058
  commitment_version: 1 | 2;
3059
+ /** How the pick was chosen: auto by the selection algorithm, manual by an operator (102 published picks from 2026-06-23 to 2026-10-15; none since). Outside the hashed payload, so it moves no commitment. */
3060
+ selected_by: "auto" | "manual";
3007
3061
  };
3008
3062
  /** An unresolved published pick. Carries only date, rank, hash, algorithm, seal instant and permalink. Kickoff and game identity are withheld; seal time remains public commitment provenance. */
3009
3063
  export type PickOfTheDayLedgerSealedEntry = {
@@ -3036,6 +3090,8 @@ export type PickOfTheDayLedgerSealedEntry = {
3036
3090
  supersedes_pick_id: string | null;
3037
3091
  /** Explicit proof provenance: 1 retains historic eight-field canonical JSON; 2 binds stable pick_id and version without pick_rank. */
3038
3092
  commitment_version: 1 | 2;
3093
+ /** How the pick was chosen: auto by the selection algorithm, manual by an operator (102 published picks from 2026-06-23 to 2026-10-15; none since). Outside the hashed payload, so it moves no commitment. */
3094
+ selected_by: "auto" | "manual";
3039
3095
  };
3040
3096
  /** A pick without a commitment, retained so the record cannot omit unprovable entries. Unresolved entries omit game identity; once resolved, matchup, category and payload become public. Existing opened canonical payload bytes and hashes are unchanged. */
3041
3097
  export type PickOfTheDayLedgerUncommittedEntry = {
@@ -3074,6 +3130,8 @@ export type PickOfTheDayLedgerUncommittedEntry = {
3074
3130
  * @deprecated
3075
3131
  */
3076
3132
  supersedes_pick_id: string | null;
3133
+ /** How the pick was chosen: auto by the selection algorithm, manual by an operator (102 published picks from 2026-06-23 to 2026-10-15; none since). Outside the hashed payload, so it moves no commitment. */
3134
+ selected_by: "auto" | "manual";
3077
3135
  };
3078
3136
  /** A successful current-day entitlement response when only unauthorized ranks have published. It carries an empty pick set, identity-free locked ranks and an upgrade message. Selection IDs, game identity, prices and unauthorized clocks are absent. Any scheduled or proof-pending rows are entitled rows. */
3079
3137
  export type PickOfTheDayNoEntitledPicks = {
@@ -3498,6 +3556,37 @@ export type PickOfTheDayStats = {
3498
3556
  pick_id: string;
3499
3557
  pick_rank: number;
3500
3558
  }[];
3559
+ selections: {
3560
+ canonical_category?: string;
3561
+ clv_avg_display?: string;
3562
+ clv_avg_pct?: number;
3563
+ clv_avg_pp?: number;
3564
+ clv_avg_pp_display?: string;
3565
+ clv_measured: number;
3566
+ edge_display?: string;
3567
+ edge_pp?: number;
3568
+ key: string;
3569
+ label: string;
3570
+ losses: number;
3571
+ net_profit_display?: string;
3572
+ net_profit_usd?: number;
3573
+ pending: number;
3574
+ picks: number;
3575
+ priced_decided: number;
3576
+ priced_in_display?: string;
3577
+ priced_in_pct?: number;
3578
+ roi_display?: string;
3579
+ roi_pct?: number;
3580
+ settled: number;
3581
+ small_sample: boolean;
3582
+ staked_usd: number;
3583
+ unit_score?: number;
3584
+ unit_score_display?: string;
3585
+ void: number;
3586
+ win_rate_display?: string;
3587
+ win_rate_pct?: number;
3588
+ wins: number;
3589
+ }[];
3501
3590
  };
3502
3591
  /** The stats with `view=summary` or `sections`: only the named sections, listed in `sections`. `view=summary` names every section except `series`, `days`, `categories`, `months` and `voids`. */
3503
3592
  export type PickOfTheDayStatsSections = {
@@ -3938,6 +4027,37 @@ export type PickOfTheDayStatsSections = {
3938
4027
  pick_id: string;
3939
4028
  pick_rank: number;
3940
4029
  }[];
4030
+ selections?: {
4031
+ canonical_category?: string;
4032
+ clv_avg_display?: string;
4033
+ clv_avg_pct?: number;
4034
+ clv_avg_pp?: number;
4035
+ clv_avg_pp_display?: string;
4036
+ clv_measured: number;
4037
+ edge_display?: string;
4038
+ edge_pp?: number;
4039
+ key: string;
4040
+ label: string;
4041
+ losses: number;
4042
+ net_profit_display?: string;
4043
+ net_profit_usd?: number;
4044
+ pending: number;
4045
+ picks: number;
4046
+ priced_decided: number;
4047
+ priced_in_display?: string;
4048
+ priced_in_pct?: number;
4049
+ roi_display?: string;
4050
+ roi_pct?: number;
4051
+ settled: number;
4052
+ small_sample: boolean;
4053
+ staked_usd: number;
4054
+ unit_score?: number;
4055
+ unit_score_display?: string;
4056
+ void: number;
4057
+ win_rate_display?: string;
4058
+ win_rate_pct?: number;
4059
+ wins: number;
4060
+ }[];
3941
4061
  };
3942
4062
  /** A settled uncommitted pick's market, side and price. The same eight fields as PickOfTheDayCommitmentPayload, in the same key order, so a settled pick's side and price sit under payload whatever the entry's state. It is NOT a commitment: no hash was taken over it before the game, and it proves nothing about when the pick was made. */
3943
4063
  export type PickOfTheDayUncommittedPayload = {
@@ -4525,48 +4645,88 @@ export type SnapshotState = {
4525
4645
  /** When this body's source read started, the clock finality is judged on. null for a body stored before that clock was recorded. */
4526
4646
  source_read_started_at: string | null;
4527
4647
  };
4648
+ /** One sport's skill leaderboard, or one league's. Every figure on a row is the wallet's record in this sport or league, except grade, the wallet's all-time grade, and volume (see volume_scope). */
4528
4649
  export type SportLeaderboard = {
4650
+ /** The latest time any wallet's record on this board was recomputed. The sport ranking reruns hourly, a league ranking about once a day. null when the board has no rows. */
4529
4651
  as_of: string | null;
4652
+ /** The canonical sport the slug resolved to, for example Soccer or Basketball. null when no wallet has a record under it; rows is then empty. */
4530
4653
  category: string | null;
4654
+ /** The mean edge over every wallet in the field whose price_edge.status is ranked, held ones included: the value each row's edge_skill is pulled toward. null when no wallet's edge is ranked. */
4531
4655
  edge_average: number | null;
4656
+ /** The league this board ranks; null on a sport board. */
4532
4657
  league: {
4658
+ /** The league's display name. */
4533
4659
  name: string;
4660
+ /** Wallets the league board's edge sort ranks with no hold. */
4534
4661
  ranked_traders: number;
4662
+ /** The league's slug under its sport, for example premier-league or cs2. */
4535
4663
  slug: string;
4536
4664
  } | null;
4665
+ /** The requested limit after clamping to 1..100 (default 20). rows holds fewer when the board has fewer wallets. */
4537
4666
  limit: number;
4667
+ /** Settled markets of $20 or more a wallet needs in the sport or league to be on the board. */
4538
4668
  min_resolved: number;
4669
+ /** The head of the board, in sort order. Every figure is the wallet's record in this sport or league, except grade (all-time) and volume (see volume_scope). */
4539
4670
  rows: ({
4671
+ /** Lowercase proxy wallet. */
4540
4672
  address: string;
4673
+ /** What the wallet paid, USD, for the settled markets pnl counts. null when any of them has no stored cost, never a partial sum. */
4541
4674
  cost: number | null;
4675
+ /** Why sort=edge sets aside an edge whose status is ranked. category_loss: the wallet's realized P&L in this sport or league is zero or below. record_incomplete: the wallet's stored sports and esports P&L runs more than 5% of its cost ahead of Polymarket's own figure, so settled losing markets are likely missing from its record. A held row keeps its price_edge and edge_skill and sorts after the ranked rows on sort=edge. null when nothing holds the edge, and always null unless price_edge.status is ranked. */
4542
4676
  edge_hold: "category_loss" | "record_incomplete" | null;
4677
+ /** price_edge.edge pulled toward edge_average by the share of the record that is noise: a short record moves most of the way to the average, a long one keeps nearly all of its own edge. The value sort=edge orders by when edge_hold is null. null unless price_edge.status is ranked. */
4543
4678
  edge_skill: number | null;
4679
+ /** The wallet's all-time grade, S to F, the one every route serves. It is led by realized profit across all of the wallet's sports and esports markets, not this sport's or league's, so a wallet can lead a board on in-sport P&L and still grade F. Every letter is listed: the board ranks the in-sport record and does not filter on the grade. null when the wallet has no grade. */
4544
4680
  grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
4681
+ /** trd_0x..., the id the trader routes accept. */
4545
4682
  id: string;
4683
+ /** The wallet's last trade on a settled market of $20 or more in this sport or league. */
4546
4684
  last_category_trade_at: string | null;
4685
+ /** Markets n_resolved counts that settled at a realized loss. A market that broke even counts in neither wins nor losses. */
4547
4686
  losses: number;
4687
+ /** The wallet's settled markets of $20 or more in this sport or league; at least min_resolved. */
4548
4688
  n_resolved: number;
4689
+ /** Provider platform. Always polymarket. */
4549
4690
  platform: "polymarket";
4691
+ /** Realized P&L, USD, across the markets n_resolved counts: this sport or league only, not the wallet's whole record. The value sort=pnl orders by. */
4550
4692
  pnl: number | null;
4693
+ /** Edge over the price paid in this sport or league: how often the side the wallet bought won, minus the average price it paid. Probabilities throughout: edge 0.03 is 3 percentage points. A market bought on both sides counts by its shares. null when the wallet has no priced settled market here. */
4551
4694
  price_edge: {
4695
+ /** Mean entry price paid, 0-1. */
4552
4696
  avg_price: number;
4697
+ /** hit_rate minus avg_price, full precision, before any shrink. edge_skill is the shrunk value. */
4553
4698
  edge: number;
4699
+ /** The low end of edge's 95% range: edge minus 1.96 times the square root of avg_price * (1 - avg_price) / markets. Not a sort key: sort=edge orders by edge_skill. */
4554
4700
  edge_lower: number;
4701
+ /** Share of those markets whose bought side won, 0-1. A market bought on both sides adds the winning side's share of the shares bought. */
4555
4702
  hit_rate: number;
4703
+ /** Settled markets of $20 or more in this sport or league at a known entry price that the edge is measured over. */
4556
4704
  markets: number;
4705
+ /** Whether the edge ranks. ranked: at least 30 such markets, and the share of the decided ones that made money at settlement within 10 points of the win rate here. too_few_markets: fewer than 30. sample_mismatch: that share is more than 10 points away, so these markets do not describe the wallet's record. Only a ranked edge with a null edge_hold orders on sort=edge. */
4557
4706
  status: "ranked" | "too_few_markets" | "sample_mismatch";
4558
4707
  } | null;
4708
+ /** 1-based position on this board under sort. A page of limit rows is the head of the board. */
4559
4709
  rank: number;
4710
+ /** pnl / cost, a fraction: 0.12 is 12%. null when cost is null. */
4560
4711
  roi: number | null;
4712
+ /** The wallet's Polymarket username; null when it has none. */
4561
4713
  username: string | null;
4714
+ /** USD, measured as volume_scope says. On a sport board: the wallet's volume across all its sports and esports markets, the profile's Volume traded, not this sport's alone. null on every league board row: no per-league volume is stored. */
4562
4715
  volume: number | null;
4716
+ /** wins / (wins + losses) in this sport or league, 0-1: 0.6 is 60%. null when no market was decided. */
4563
4717
  win_rate: number | null;
4718
+ /** The lower bound of the 95% Wilson interval on win_rate, 0-1: the value sort=win_rate orders by, so a short perfect record does not outrank a long strong one. null with win_rate. */
4564
4719
  win_rate_wilson_lb: number | null;
4720
+ /** Markets n_resolved counts that settled at a realized profit. */
4565
4721
  wins: number;
4566
4722
  })[];
4723
+ /** The order rows are in. edge: by edge_skill, with every wallet whose edge is not ranked, or is held, after the ranked ones. pnl: by realized P&L in the sport or league. win_rate: by the Wilson lower bound of the win rate. */
4567
4724
  sort: "edge" | "pnl" | "win_rate";
4725
+ /** The board's sport slug, for example soccer, basketball or esports. An alias in the path, such as nba or cs2, reads as its sport's slug. */
4568
4726
  sport: string;
4727
+ /** Wallets with at least min_resolved settled markets in the sport or league and a trade, in any market, in the last 180 days: the field rows is the head of. */
4569
4728
  total_traders: number;
4729
+ /** What each row's volume measures. sports_and_esports: the wallet's volume across all its sports and esports markets, not this sport's or league's alone. */
4570
4730
  volume_scope: "sports_and_esports";
4571
4731
  };
4572
4732
  export type SuspiciousTrade = {
@@ -6172,11 +6332,21 @@ export interface OperationData {
6172
6332
  line?: number;
6173
6333
  line_outcome_index?: number;
6174
6334
  negative_risk?: boolean;
6175
- outcomes: {
6335
+ outcomes: ({
6176
6336
  index: number;
6177
6337
  label?: string;
6178
6338
  token_id?: string;
6179
- }[];
6339
+ quote?: {
6340
+ best_ask: number | null;
6341
+ best_bid: number | null;
6342
+ book_observed_at: string | null;
6343
+ price: number | null;
6344
+ price_basis: "midpoint" | "last_trade" | null;
6345
+ price_observed_at: string | null;
6346
+ status: "observed" | "no_orderbook" | "unavailable";
6347
+ book_unavailable_reason: "cache_miss" | "stream_capacity" | "no_orderbook" | "missing_provider_token_id" | null;
6348
+ };
6349
+ })[];
6180
6350
  platform?: string;
6181
6351
  slug?: string;
6182
6352
  sports_market_type?: string;
@@ -6196,6 +6366,42 @@ export interface OperationData {
6196
6366
  status: "computed" | "not_computed" | "unavailable";
6197
6367
  trader_count: number | null;
6198
6368
  };
6369
+ settlement: {
6370
+ expected_settlement_time: string | null;
6371
+ observed_at: string | null;
6372
+ oracle_status: string | null;
6373
+ payouts: number[] | null;
6374
+ proposed_answer: "split" | "too_early" | "outcome_0" | "outcome_1" | null;
6375
+ resolved_at: string | null;
6376
+ result: "outcome" | "split" | null;
6377
+ settled: boolean | null;
6378
+ settlement_time_basis: string | null;
6379
+ status: "observed" | "not_posed" | "unavailable";
6380
+ was_disputed: boolean | null;
6381
+ winning_outcome_index: number | null;
6382
+ };
6383
+ trading_terms?: {
6384
+ fee_schedule: {
6385
+ exponent: number | null;
6386
+ rate: number | null;
6387
+ rebate_rate: number | null;
6388
+ taker_only: boolean | null;
6389
+ } | null;
6390
+ fees_enabled: boolean | null;
6391
+ observed_at: string | null;
6392
+ reward_allocations: ({
6393
+ end_date: string | null;
6394
+ rewards_amount: number | null;
6395
+ rewards_daily_rate: number | null;
6396
+ start_date: string | null;
6397
+ })[] | null;
6398
+ rewards_max_spread: number | null;
6399
+ rewards_min_size: number | null;
6400
+ seconds_delay: number | null;
6401
+ status: "observed" | "not_listed" | "unavailable";
6402
+ tick_size: number | null;
6403
+ min_order_size_shares: number | null;
6404
+ };
6199
6405
  })[];
6200
6406
  listGames: Game[];
6201
6407
  listGameTrades: GameTrade[];
@@ -6413,7 +6619,7 @@ export interface OperationQuery {
6413
6619
  series_slugs?: string[];
6414
6620
  };
6415
6621
  getEventReplaySince: {
6416
- /** Opaque event replay cursor returned as next_cursor by a prior response. The cursor maps to the global (whale_alerts.inserted_xid, whale_alerts.id) commit-order position, is valid across backend replicas, and is bound to the filter set the walk ran with (trader, condition_id, min_grade, min_size): presenting it under different filters answers 400 bad_request with error.reason cursor_expired, and the walk restarts without a cursor. Cursors issued before 2026-09-22 (id-only) stay accepted and are bound to no filters. Omit to fetch the latest durable public suffix. */
6622
+ /** Opaque event replay cursor returned as next_cursor by a prior response. The cursor maps to the global (whale_alerts.inserted_xid, whale_alerts.id) commit-order position, is valid across backend replicas, and is bound to every filter the walk ran with (trader, condition_id, min_grade, min_grade_at_trade, min_size; expand is not a filter): presenting it under different filters, including a switch between min_grade and min_grade_at_trade, answers 400 bad_request with error.reason cursor_expired, and the walk restarts without a cursor. Cursors issued before 2026-09-22 (id-only) stay accepted and are bound to no filters. Omit to fetch the latest durable public suffix. */
6417
6623
  cursor?: string;
6418
6624
  /** Maximum durable public whale-trade events to return. Out-of-range values are clamped to 1..100. */
6419
6625
  limit?: number;
@@ -6421,8 +6627,10 @@ export interface OperationQuery {
6421
6627
  trader?: string;
6422
6628
  /** Only trades on this market: the raw provider condition_id or its mkt_-prefixed id. Bound to the cursor. */
6423
6629
  condition_id?: string;
6424
- /** Only trades by wallets at this grade or better (S best), read from the wallet's newest ranking at request time; a wallet with no grade never passes. Bound to the cursor. */
6630
+ /** Only trades by wallets at this grade or better (S best), read from the wallet's newest ranking at request time; a wallet with no grade never passes. For the grade the wallet held when the trade filled, send min_grade_at_trade instead. Bound to the cursor. */
6425
6631
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
6632
+ /** Only trades whose grade_at_trade, the grade the wallet held when the trade filled, is at this grade or better (S best). Only a trade whose grade at the fill is graded passes, so a trade before 2026-09-19T23:00Z, or one made while the wallet's grade was changing, never does. The same basis as min_grade_at_trade on GET /api/v1/large-trades, GET /api/v1/stream and webhook trade_filters. Bound to the cursor: switching between min_grade and min_grade_at_trade is a filter change and answers cursor_expired. Sending it with min_grade, or an invalid grade, returns HTTP 400. */
6633
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6426
6634
  /** Only trades of at least this USD amount. Decimal and scientific query spellings normalize exactly to cents, rounding half away from zero; maximum 1e15 USD. Pass the dataset continuation decimal string unchanged to preserve the bound. Bound to the cursor. */
6427
6635
  min_size?: number | string;
6428
6636
  /** Backward-compatible alias for expand. Repeatable: trade. */
@@ -6507,10 +6715,10 @@ export interface OperationQuery {
6507
6715
  getPickOfTheDayStats: {
6508
6716
  /** full (default) is every section. summary returns view, sections and every section except the five that grow with the record: series, days, categories, months and voids. In summary and sections bodies hit_rate carries no series; series is its own top-level section. Ignored when sections is sent. Any other value returns 400 bad_request with error.param=view. */
6509
6717
  view?: "full" | "summary";
6510
- /** Exactly the sections to return, in the body's order whatever the request order. Repeatable and comma-separated: hit_rate, series, market_expectations, outcome_stats, days, categories, sports, tiers, months, price_bands, market_types, total_sides, streaks, records, voids. The body names them in sections and carries view=sections. An unrecognized name returns 400 bad_request with error.param=sections rather than being ignored. */
6511
- sections?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
6718
+ /** Exactly the sections to return, in the body's order whatever the request order. Repeatable and comma-separated: hit_rate, series, market_expectations, outcome_stats, days, categories, sports, tiers, selections, months, price_bands, market_types, total_sides, streaks, records, voids. The body names them in sections and carries view=sections. An unrecognized name returns 400 bad_request with error.param=sections rather than being ignored. */
6719
+ sections?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "selections" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
6512
6720
  /** Backward-compatible bracket alias for sections, for clients that emit array keys. Repeatable and comma-separated, with the same names. */
6513
- "sections[]"?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
6721
+ "sections[]"?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "selections" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
6514
6722
  };
6515
6723
  getPlatforms: Record<string, never>;
6516
6724
  getPositionTimeline: {
@@ -6558,8 +6766,10 @@ export interface OperationQuery {
6558
6766
  event?: string;
6559
6767
  /** Optional per-connection subscribe-time filter. Raw provider condition_id or mkt_-prefixed market id (normalized the same way the other v1 market endpoints normalize). A frame passes only when it carries a matching condition_id field; frames that carry no condition_id (e.g. whale-pulse events) are EXCLUDED while this is set. An empty value after normalization returns HTTP 400. Combines with event and min_grade as a logical AND; an absent param adds no constraint. */
6560
6768
  condition_id?: string;
6561
- /** Optional per-connection subscribe-time filter. A frame passes only when it carries a grade field whose grade is better-or-equal to this minimum (S is best). Frames without a grade (every frame except wallet_grade_changed and LargeTradeInsertedV2) are excluded. An invalid grade returns HTTP 400. Combines with the other filters as a logical AND. */
6769
+ /** Optional per-connection subscribe-time filter. A frame passes only when it carries a grade field whose grade is better-or-equal to this minimum (S is best). On a LargeTradeInsertedV2 frame that field is grade, the wallet's grade when the trade was published: seconds after the fill for a live trade, hours after it for a backfilled one, so it is not always the grade the trade filled under. For that, send min_grade_at_trade instead. Frames without a grade (every frame except wallet_grade_changed and LargeTradeInsertedV2) are excluded. An invalid grade returns HTTP 400. Combines with the other filters as a logical AND. */
6562
6770
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
6771
+ /** Filter LargeTradeInsertedV2 frames to trades whose grade_at_trade, the grade the trader held when the trade filled, is at or above this minimum (S is best). Only a frame whose grade_at_trade_status is graded can match. The same basis as min_grade_at_trade on GET /api/v1/large-trades and on webhook trade_filters. Other event types are excluded when set. Sending it with min_grade, or an invalid grade, returns HTTP 400. */
6772
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6563
6773
  /** Filter LargeTradeInsertedV2 frames to this Polymarket wallet. Other event types have no wallet and are excluded when set. Applied to live and retained Redis frames after privacy checks. */
6564
6774
  wallet?: string;
6565
6775
  /** Filter LargeTradeInsertedV2 frames to trades at or above this USD notional. Positive decimal with at most six places; other event types are excluded when set. */
@@ -6646,15 +6856,15 @@ export interface OperationQuery {
6646
6856
  limit?: number;
6647
6857
  /** Opaque gmk_v1_ cursor from next_cursor, sent with the same filters. It pins the page position (sports_market_type, line, condition_id), not a snapshot. A cursor this endpoint did not issue returns 400 with error.param=cursor. */
6648
6858
  cursor?: string;
6649
- /** sharp_money adds each row's sharp_money: the game page's per-line split, side USD and S, A and B wallet counts per outcome. One read for the event whatever the page size; the request costs 5 instead of 2. Pro and Max. Repeatable: sharp_money. */
6650
- expand?: "sharp_money"[];
6651
- /** Backward-compatible alias for expand. Repeatable: sharp_money. */
6652
- "expand[]"?: "sharp_money"[];
6859
+ /** sharp_money adds each row's sharp_money: the game page's per-line split, side USD and S, A and B wallet counts per outcome. One read for the event whatever the page size; the request costs 5 instead of 2. Pro and Max. quotes adds each outcome's quote: the cached display price and best bid and ask, each with its observation time, in one cache read for the page; it adds 1 to the cost, on every plan. trading_terms adds each row's fee schedule, reward settings and allocations, order delay, tick and minimum order size in shares from its Gamma record, with the read's time; it adds 1 to the cost, on every plan. Repeatable: sharp_money, quotes, trading_terms. */
6860
+ expand?: ("sharp_money" | "quotes" | "trading_terms")[];
6861
+ /** Backward-compatible alias for expand. Repeatable: sharp_money, quotes, trading_terms. */
6862
+ "expand[]"?: ("sharp_money" | "quotes" | "trading_terms")[];
6653
6863
  };
6654
6864
  listGames: {
6655
6865
  /** Canonical sport bucket, case-insensitive, with - and _ read as a space: table-tennis and Table Tennis are the same bucket. Omit for every covered sport. A bucket this deployment does not serve returns an empty page. */
6656
6866
  sport?: string;
6657
- /** League tag, case-insensitive, as coverage.leagues spells it: nfl, epl, cs2, euroleague, cbb, cwbb. EuroLeague games use sport=Basketball and league=euroleague; NCAA men's and women's college basketball games use sport=Basketball with league=cbb and league=cwbb. Omit for every league inside the selected sports. */
6867
+ /** League tag, case-insensitive, as this list's coverage.leagues spells it (GET /api/v1/coverage lists no leagues): nfl, epl, cs2, euroleague, cbb, cwbb. EuroLeague games use sport=Basketball and league=euroleague; NCAA men's and women's college basketball games use sport=Basketball with league=cbb and league=cwbb. Omit for every league inside the selected sports. */
6658
6868
  league?: string;
6659
6869
  /** Keep only games in this state. ended, cancelled and postponed also list finished games that have left the live board, read from their stored records, for kickoffs within starts_after..starts_before (default: the 7 days before now). Without status, or with any other state, the list is the live and upcoming board. A value outside the enum returns an empty page. */
6660
6870
  status?: "scheduled" | "live" | "paused" | "ended" | "postponed" | "cancelled" | "suspended" | "delayed" | "unknown";
@@ -6668,10 +6878,10 @@ export interface OperationQuery {
6668
6878
  limit?: number;
6669
6879
  /** Opaque gms_v1_ cursor from next_cursor. It pins the page position (kickoff and event_slug), not a snapshot: the catalog is live, so a game added or removed between pages moves with it. With a finished status, a page that spent its read budget carries a cursor past everything it read, which may be past the last game it returned. A cursor this endpoint did not issue returns 400 with error.param=cursor. */
6670
6880
  cursor?: string;
6671
- /** Backward-compatible alias for expand. Repeatable: sharp_money. */
6672
- "expand[]"?: "sharp_money"[];
6673
- /** sharp_money adds each game's sharp_money, the GameSharpMoney object GET /api/v1/games/{event_slug}/sharp-money returns, read from the sport board's cached aggregate: one board read per sport on the page, never a per-game compute. A game the board did not evaluate carries status not_computed (read the per-game route for it); a sport whose aggregate could not be read carries status unavailable while the rest of the page is served. Adds 3 to the request cost. Repeatable. */
6674
- expand?: "sharp_money"[];
6881
+ /** Backward-compatible alias for expand. Repeatable: sharp_money, settlement. */
6882
+ "expand[]"?: ("sharp_money" | "settlement")[];
6883
+ /** sharp_money adds each game's sharp_money, the GameSharpMoney object GET /api/v1/games/{event_slug}/sharp-money returns, read from the sport board's cached aggregate: one board read per sport on the page, never a per-game compute. A game the board did not evaluate carries status not_computed (read the per-game route for it); a sport whose aggregate could not be read carries status unavailable while the rest of the page is served. Pro and Max only; adds 3 to the request cost. settlement adds settlement to each winner market, the GameMarketSettlement block GET /api/v1/games/{event_slug}/markets serves, from the same per-game store. It never waits for Polymarket: a game not read lately carries status unavailable and its read starts, so a read a moment later may answer. Every plan; adds 2 to the request cost. Repeatable; the two combine. */
6884
+ expand?: ("sharp_money" | "settlement")[];
6675
6885
  };
6676
6886
  listGameTrades: {
6677
6887
  /** Newest fills to return. Out-of-range values are clamped to 1..200. */
@@ -6732,8 +6942,10 @@ export interface OperationQuery {
6732
6942
  trader?: string;
6733
6943
  /** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. The word sports, in any casing, matches every sport but Esports, the provider's catch-all Sports category (cycling, lacrosse) included: use esports for Esports alone, or omit category for both (#32657). */
6734
6944
  category?: string;
6735
- /** Minimum trader grade as of today (trader.grade), not at trade time. On a historical window it selects wallets by a grade they may have earned after the trade; for a point-in-time rule filter on trader.grade_at_trade instead. A means S or A, B means S, A or B. */
6945
+ /** Minimum trader grade as of today (trader.grade), not at trade time. On a historical window it selects wallets by a grade they may have earned after the trade; for a point-in-time rule send min_grade_at_trade instead, which filters on trader.grade_at_trade. A means S or A, B means S, A or B. */
6736
6946
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
6947
+ /** Minimum grade the trader held when the trade filled (trader.grade_at_trade). Only rows whose trader.grade_at_trade_status is graded can match, so a trade before 2026-09-19T23:00Z, or one made while the wallet's grade was changing, never does. The same basis as min_grade_at_trade on GET /api/v1/large-trades, GET /api/v1/stream and webhook trade_filters, so a history read and a stream with the same floor agree. Applies to both sorts and beside condition_id, event_slug, trader and from/to. Sending it with min_grade is 400. A means S or A, B means S, A or B. */
6948
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6737
6949
  /** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
6738
6950
  suspicious_only?: boolean;
6739
6951
  /** Filter by whale_alerts.platform. all is equivalent to omitted. */
@@ -6758,8 +6970,10 @@ export interface OperationQuery {
6758
6970
  min_size?: number;
6759
6971
  /** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. The word sports, in any casing, matches every sport but Esports, the provider's catch-all Sports category (cycling, lacrosse) included: use esports for Esports alone, or omit category for both (#32657). */
6760
6972
  category?: string;
6761
- /** Minimum trader grade. */
6973
+ /** Minimum trader grade now (trader.grade), the wallet's grade when this page is read, not when the trade filled. A wallet re-graded after a trade enters or leaves the result, so a catch-up read can disagree with GET /api/v1/stream and webhooks. For the grade at the fill, send min_grade_at_trade instead. A means S or A, B means S, A or B. */
6762
6974
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
6975
+ /** Minimum grade the trader held when the trade filled (trader.grade_at_trade). Only rows whose trader.grade_at_trade_status is graded can match, so a trade before 2026-09-19T23:00Z, or one made while the wallet's grade was changing, never does. The same basis as min_grade_at_trade on GET /api/v1/stream and on webhook trade_filters, so a client that catches up here and then streams gets one answer. Applies to every path: recent, since, sort=market_volume_share, condition_id and event_slug. Sending it with min_grade is 400. A means S or A, B means S, A or B. */
6976
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6763
6977
  /** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
6764
6978
  suspicious_only?: boolean;
6765
6979
  /** Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor. */
@@ -6911,6 +7125,8 @@ export interface OperationQuery {
6911
7125
  category?: string;
6912
7126
  /** Minimum trader grade. */
6913
7127
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
7128
+ /** Minimum grade the trader held when the trade filled (trader.grade_at_trade). Only rows whose trader.grade_at_trade_status is graded can match, so a trade before 2026-09-19T23:00Z, or one made while the wallet's grade was changing, never does. The same basis as min_grade_at_trade on GET /api/v1/large-trades, GET /api/v1/stream and webhook trade_filters, so a history read and a stream with the same floor agree. Applies to both sorts and beside condition_id, event_slug, trader and from/to. Sending it with min_grade is 400. A means S or A, B means S, A or B. */
7129
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6914
7130
  /** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
6915
7131
  suspicious_only?: boolean;
6916
7132
  /** Filter by whale_alerts.platform. all is equivalent to omitted. */
@@ -6935,8 +7151,10 @@ export interface OperationQuery {
6935
7151
  min_size?: number;
6936
7152
  /** Filter by market category (case-insensitive). A canonical bucket name (e.g. Basketball) matches every provider member that folds into it (NBA, WNBA, NCAAB); a raw provider value also resolves to its bucket. Sports and esports only (#27430): a category outside them returns 400 bad_request with param category and names the accepted buckets. The word sports, in any casing, matches every sport but Esports, the provider's catch-all Sports category (cycling, lacrosse) included: use esports for Esports alone, or omit category for both (#32657). */
6937
7153
  category?: string;
6938
- /** Minimum trader grade as of today (trader.grade). A means S or A, B means S, A or B. */
7154
+ /** Minimum trader grade now (trader.grade), the wallet's grade when this page is read, not when the trade filled. A wallet re-graded after a trade enters or leaves the result, so a catch-up read can disagree with GET /api/v1/stream and webhooks. For the grade at the fill, send min_grade_at_trade instead. A means S or A, B means S, A or B. */
6939
7155
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
7156
+ /** Minimum grade the trader held when the trade filled (trader.grade_at_trade). Only rows whose trader.grade_at_trade_status is graded can match, so a trade before 2026-09-19T23:00Z, or one made while the wallet's grade was changing, never does. The same basis as min_grade_at_trade on GET /api/v1/stream and on webhook trade_filters, so a client that catches up here and then streams gets one answer. Applies to every path: recent, since, sort=market_volume_share, condition_id and event_slug. Sending it with min_grade is 400. A means S or A, B means S, A or B. */
7157
+ min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
6940
7158
  /** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
6941
7159
  suspicious_only?: boolean;
6942
7160
  /** Keep only trades whose market_volume_share is known and at least this. A fraction, not a percent: 0.01 is one percent of the market's traded volume. A trade whose share is unavailable is never returned by a non-zero value, because an unavailable share cannot be said to clear a floor. */