@0xinsider/sdk 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/client.d.ts +4 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +3 -3
- package/dist/provenance.js.map +1 -1
- package/dist/schema.d.ts +154 -12
- package/dist/schema.d.ts.map +1 -1
- package/dist/stream.d.ts +18 -2
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +5 -1
- package/dist/stream.js.map +1 -1
- package/package.json +1 -1
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 = {
|
|
@@ -1812,7 +1817,7 @@ export type LargeTradeInsertedV2Data = {
|
|
|
1812
1817
|
trader_id: number;
|
|
1813
1818
|
/** Address of the wallet that made the trade. */
|
|
1814
1819
|
wallet: string;
|
|
1815
|
-
/** The wallet's grade when the event was published; `null` when it has none. */
|
|
1820
|
+
/** 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
1821
|
grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
|
|
1817
1822
|
/** USD notional of the trade; decimal string. */
|
|
1818
1823
|
size_usd: string;
|
|
@@ -1826,20 +1831,26 @@ export type LargeTradeInsertedV2Data = {
|
|
|
1826
1831
|
/** When the trade filled on Polymarket. The envelope's `created_at` is this instant. */
|
|
1827
1832
|
traded_at: string;
|
|
1828
1833
|
platform: "polymarket";
|
|
1834
|
+
/** 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. */
|
|
1835
|
+
grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F" | null;
|
|
1836
|
+
/** `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. */
|
|
1837
|
+
grade_at_trade_status?: "graded" | "ungraded" | "unknown";
|
|
1829
1838
|
};
|
|
1830
1839
|
/** `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
1840
|
export type LargeTradesInsertedData = {
|
|
1832
1841
|
/** Large trades the producing batch admitted. */
|
|
1833
1842
|
count: number;
|
|
1834
1843
|
};
|
|
1835
|
-
/** All present fields narrow large_trade_inserted_v2 delivery.
|
|
1844
|
+
/** 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
1845
|
export type LargeTradeSubscriptionFilters = {
|
|
1837
1846
|
/** Raw provider condition ID or mkt_-prefixed market ID. */
|
|
1838
1847
|
condition_id?: string;
|
|
1839
1848
|
/** Polymarket wallet address; matching is case-insensitive. */
|
|
1840
1849
|
wallet?: string;
|
|
1841
|
-
/** S is best; ungraded trades do not match. */
|
|
1850
|
+
/** 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
1851
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
1852
|
+
/** 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. */
|
|
1853
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
1843
1854
|
/** Positive USD notional as an exact decimal string. */
|
|
1844
1855
|
min_size_usd?: string;
|
|
1845
1856
|
};
|
|
@@ -1886,17 +1897,28 @@ export type LeaderboardEntry = {
|
|
|
1886
1897
|
/** 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
1898
|
last_active?: string;
|
|
1888
1899
|
};
|
|
1900
|
+
/** Every league with a skill leaderboard, by sport: the league values GET /api/v1/leaderboard/sports/{sport} accepts. */
|
|
1889
1901
|
export type LeaderboardLeagues = {
|
|
1902
|
+
/** Grouped by sport, then most ranked wallets first. */
|
|
1890
1903
|
leagues: {
|
|
1904
|
+
/** The canonical sport, for example Soccer or Esports. */
|
|
1891
1905
|
category: string;
|
|
1906
|
+
/** The league's display name. */
|
|
1892
1907
|
name: string;
|
|
1908
|
+
/** Wallets the league board's edge sort ranks with no hold; at least min_ranked. */
|
|
1893
1909
|
ranked_traders: number;
|
|
1910
|
+
/** The league slug, the board route's league parameter. */
|
|
1894
1911
|
slug: string;
|
|
1912
|
+
/** The sport slug, the board route's {sport}. */
|
|
1895
1913
|
sport: string;
|
|
1914
|
+
/** 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
1915
|
total_traders: number;
|
|
1897
1916
|
}[];
|
|
1917
|
+
/** Wallets a league board's edge sort must rank, with no hold, for the league to be listed. */
|
|
1898
1918
|
min_ranked: number;
|
|
1919
|
+
/** Settled markets of $20 or more a wallet needs in a league to be on its board. */
|
|
1899
1920
|
min_resolved: number;
|
|
1921
|
+
/** When the league ranking last ran. It runs about once a day. */
|
|
1900
1922
|
refreshed_at: string;
|
|
1901
1923
|
};
|
|
1902
1924
|
/** 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. */
|
|
@@ -3004,6 +3026,8 @@ export type PickOfTheDayLedgerOpenedEntry = {
|
|
|
3004
3026
|
supersedes_pick_id: string | null;
|
|
3005
3027
|
/** Explicit proof provenance: 1 retains historic eight-field canonical JSON; 2 binds stable pick_id and version without pick_rank. */
|
|
3006
3028
|
commitment_version: 1 | 2;
|
|
3029
|
+
/** 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. */
|
|
3030
|
+
selected_by: "auto" | "manual";
|
|
3007
3031
|
};
|
|
3008
3032
|
/** 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
3033
|
export type PickOfTheDayLedgerSealedEntry = {
|
|
@@ -3036,6 +3060,8 @@ export type PickOfTheDayLedgerSealedEntry = {
|
|
|
3036
3060
|
supersedes_pick_id: string | null;
|
|
3037
3061
|
/** Explicit proof provenance: 1 retains historic eight-field canonical JSON; 2 binds stable pick_id and version without pick_rank. */
|
|
3038
3062
|
commitment_version: 1 | 2;
|
|
3063
|
+
/** 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. */
|
|
3064
|
+
selected_by: "auto" | "manual";
|
|
3039
3065
|
};
|
|
3040
3066
|
/** 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
3067
|
export type PickOfTheDayLedgerUncommittedEntry = {
|
|
@@ -3074,6 +3100,8 @@ export type PickOfTheDayLedgerUncommittedEntry = {
|
|
|
3074
3100
|
* @deprecated
|
|
3075
3101
|
*/
|
|
3076
3102
|
supersedes_pick_id: string | null;
|
|
3103
|
+
/** 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. */
|
|
3104
|
+
selected_by: "auto" | "manual";
|
|
3077
3105
|
};
|
|
3078
3106
|
/** 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
3107
|
export type PickOfTheDayNoEntitledPicks = {
|
|
@@ -3498,6 +3526,37 @@ export type PickOfTheDayStats = {
|
|
|
3498
3526
|
pick_id: string;
|
|
3499
3527
|
pick_rank: number;
|
|
3500
3528
|
}[];
|
|
3529
|
+
selections: {
|
|
3530
|
+
canonical_category?: string;
|
|
3531
|
+
clv_avg_display?: string;
|
|
3532
|
+
clv_avg_pct?: number;
|
|
3533
|
+
clv_avg_pp?: number;
|
|
3534
|
+
clv_avg_pp_display?: string;
|
|
3535
|
+
clv_measured: number;
|
|
3536
|
+
edge_display?: string;
|
|
3537
|
+
edge_pp?: number;
|
|
3538
|
+
key: string;
|
|
3539
|
+
label: string;
|
|
3540
|
+
losses: number;
|
|
3541
|
+
net_profit_display?: string;
|
|
3542
|
+
net_profit_usd?: number;
|
|
3543
|
+
pending: number;
|
|
3544
|
+
picks: number;
|
|
3545
|
+
priced_decided: number;
|
|
3546
|
+
priced_in_display?: string;
|
|
3547
|
+
priced_in_pct?: number;
|
|
3548
|
+
roi_display?: string;
|
|
3549
|
+
roi_pct?: number;
|
|
3550
|
+
settled: number;
|
|
3551
|
+
small_sample: boolean;
|
|
3552
|
+
staked_usd: number;
|
|
3553
|
+
unit_score?: number;
|
|
3554
|
+
unit_score_display?: string;
|
|
3555
|
+
void: number;
|
|
3556
|
+
win_rate_display?: string;
|
|
3557
|
+
win_rate_pct?: number;
|
|
3558
|
+
wins: number;
|
|
3559
|
+
}[];
|
|
3501
3560
|
};
|
|
3502
3561
|
/** 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
3562
|
export type PickOfTheDayStatsSections = {
|
|
@@ -3938,6 +3997,37 @@ export type PickOfTheDayStatsSections = {
|
|
|
3938
3997
|
pick_id: string;
|
|
3939
3998
|
pick_rank: number;
|
|
3940
3999
|
}[];
|
|
4000
|
+
selections?: {
|
|
4001
|
+
canonical_category?: string;
|
|
4002
|
+
clv_avg_display?: string;
|
|
4003
|
+
clv_avg_pct?: number;
|
|
4004
|
+
clv_avg_pp?: number;
|
|
4005
|
+
clv_avg_pp_display?: string;
|
|
4006
|
+
clv_measured: number;
|
|
4007
|
+
edge_display?: string;
|
|
4008
|
+
edge_pp?: number;
|
|
4009
|
+
key: string;
|
|
4010
|
+
label: string;
|
|
4011
|
+
losses: number;
|
|
4012
|
+
net_profit_display?: string;
|
|
4013
|
+
net_profit_usd?: number;
|
|
4014
|
+
pending: number;
|
|
4015
|
+
picks: number;
|
|
4016
|
+
priced_decided: number;
|
|
4017
|
+
priced_in_display?: string;
|
|
4018
|
+
priced_in_pct?: number;
|
|
4019
|
+
roi_display?: string;
|
|
4020
|
+
roi_pct?: number;
|
|
4021
|
+
settled: number;
|
|
4022
|
+
small_sample: boolean;
|
|
4023
|
+
staked_usd: number;
|
|
4024
|
+
unit_score?: number;
|
|
4025
|
+
unit_score_display?: string;
|
|
4026
|
+
void: number;
|
|
4027
|
+
win_rate_display?: string;
|
|
4028
|
+
win_rate_pct?: number;
|
|
4029
|
+
wins: number;
|
|
4030
|
+
}[];
|
|
3941
4031
|
};
|
|
3942
4032
|
/** 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
4033
|
export type PickOfTheDayUncommittedPayload = {
|
|
@@ -4525,48 +4615,88 @@ export type SnapshotState = {
|
|
|
4525
4615
|
/** When this body's source read started, the clock finality is judged on. null for a body stored before that clock was recorded. */
|
|
4526
4616
|
source_read_started_at: string | null;
|
|
4527
4617
|
};
|
|
4618
|
+
/** 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
4619
|
export type SportLeaderboard = {
|
|
4620
|
+
/** 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
4621
|
as_of: string | null;
|
|
4622
|
+
/** 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
4623
|
category: string | null;
|
|
4624
|
+
/** 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
4625
|
edge_average: number | null;
|
|
4626
|
+
/** The league this board ranks; null on a sport board. */
|
|
4532
4627
|
league: {
|
|
4628
|
+
/** The league's display name. */
|
|
4533
4629
|
name: string;
|
|
4630
|
+
/** Wallets the league board's edge sort ranks with no hold. */
|
|
4534
4631
|
ranked_traders: number;
|
|
4632
|
+
/** The league's slug under its sport, for example premier-league or cs2. */
|
|
4535
4633
|
slug: string;
|
|
4536
4634
|
} | null;
|
|
4635
|
+
/** The requested limit after clamping to 1..100 (default 20). rows holds fewer when the board has fewer wallets. */
|
|
4537
4636
|
limit: number;
|
|
4637
|
+
/** Settled markets of $20 or more a wallet needs in the sport or league to be on the board. */
|
|
4538
4638
|
min_resolved: number;
|
|
4639
|
+
/** 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
4640
|
rows: ({
|
|
4641
|
+
/** Lowercase proxy wallet. */
|
|
4540
4642
|
address: string;
|
|
4643
|
+
/** 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
4644
|
cost: number | null;
|
|
4645
|
+
/** 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
4646
|
edge_hold: "category_loss" | "record_incomplete" | null;
|
|
4647
|
+
/** 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
4648
|
edge_skill: number | null;
|
|
4649
|
+
/** 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
4650
|
grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
|
|
4651
|
+
/** trd_0x..., the id the trader routes accept. */
|
|
4545
4652
|
id: string;
|
|
4653
|
+
/** The wallet's last trade on a settled market of $20 or more in this sport or league. */
|
|
4546
4654
|
last_category_trade_at: string | null;
|
|
4655
|
+
/** Markets n_resolved counts that settled at a realized loss. A market that broke even counts in neither wins nor losses. */
|
|
4547
4656
|
losses: number;
|
|
4657
|
+
/** The wallet's settled markets of $20 or more in this sport or league; at least min_resolved. */
|
|
4548
4658
|
n_resolved: number;
|
|
4659
|
+
/** Provider platform. Always polymarket. */
|
|
4549
4660
|
platform: "polymarket";
|
|
4661
|
+
/** 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
4662
|
pnl: number | null;
|
|
4663
|
+
/** 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
4664
|
price_edge: {
|
|
4665
|
+
/** Mean entry price paid, 0-1. */
|
|
4552
4666
|
avg_price: number;
|
|
4667
|
+
/** hit_rate minus avg_price, full precision, before any shrink. edge_skill is the shrunk value. */
|
|
4553
4668
|
edge: number;
|
|
4669
|
+
/** 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
4670
|
edge_lower: number;
|
|
4671
|
+
/** 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
4672
|
hit_rate: number;
|
|
4673
|
+
/** Settled markets of $20 or more in this sport or league at a known entry price that the edge is measured over. */
|
|
4556
4674
|
markets: number;
|
|
4675
|
+
/** 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
4676
|
status: "ranked" | "too_few_markets" | "sample_mismatch";
|
|
4558
4677
|
} | null;
|
|
4678
|
+
/** 1-based position on this board under sort. A page of limit rows is the head of the board. */
|
|
4559
4679
|
rank: number;
|
|
4680
|
+
/** pnl / cost, a fraction: 0.12 is 12%. null when cost is null. */
|
|
4560
4681
|
roi: number | null;
|
|
4682
|
+
/** The wallet's Polymarket username; null when it has none. */
|
|
4561
4683
|
username: string | null;
|
|
4684
|
+
/** 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
4685
|
volume: number | null;
|
|
4686
|
+
/** wins / (wins + losses) in this sport or league, 0-1: 0.6 is 60%. null when no market was decided. */
|
|
4563
4687
|
win_rate: number | null;
|
|
4688
|
+
/** 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
4689
|
win_rate_wilson_lb: number | null;
|
|
4690
|
+
/** Markets n_resolved counts that settled at a realized profit. */
|
|
4565
4691
|
wins: number;
|
|
4566
4692
|
})[];
|
|
4693
|
+
/** 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
4694
|
sort: "edge" | "pnl" | "win_rate";
|
|
4695
|
+
/** 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
4696
|
sport: string;
|
|
4697
|
+
/** 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
4698
|
total_traders: number;
|
|
4699
|
+
/** 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
4700
|
volume_scope: "sports_and_esports";
|
|
4571
4701
|
};
|
|
4572
4702
|
export type SuspiciousTrade = {
|
|
@@ -6413,7 +6543,7 @@ export interface OperationQuery {
|
|
|
6413
6543
|
series_slugs?: string[];
|
|
6414
6544
|
};
|
|
6415
6545
|
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
|
|
6546
|
+
/** 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
6547
|
cursor?: string;
|
|
6418
6548
|
/** Maximum durable public whale-trade events to return. Out-of-range values are clamped to 1..100. */
|
|
6419
6549
|
limit?: number;
|
|
@@ -6421,8 +6551,10 @@ export interface OperationQuery {
|
|
|
6421
6551
|
trader?: string;
|
|
6422
6552
|
/** Only trades on this market: the raw provider condition_id or its mkt_-prefixed id. Bound to the cursor. */
|
|
6423
6553
|
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. */
|
|
6554
|
+
/** 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
6555
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6556
|
+
/** 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. */
|
|
6557
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6426
6558
|
/** 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
6559
|
min_size?: number | string;
|
|
6428
6560
|
/** Backward-compatible alias for expand. Repeatable: trade. */
|
|
@@ -6507,10 +6639,10 @@ export interface OperationQuery {
|
|
|
6507
6639
|
getPickOfTheDayStats: {
|
|
6508
6640
|
/** 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
6641
|
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")[];
|
|
6642
|
+
/** 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. */
|
|
6643
|
+
sections?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "selections" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
|
|
6512
6644
|
/** 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")[];
|
|
6645
|
+
"sections[]"?: ("hit_rate" | "series" | "market_expectations" | "outcome_stats" | "days" | "categories" | "sports" | "tiers" | "selections" | "months" | "price_bands" | "market_types" | "total_sides" | "streaks" | "records" | "voids")[];
|
|
6514
6646
|
};
|
|
6515
6647
|
getPlatforms: Record<string, never>;
|
|
6516
6648
|
getPositionTimeline: {
|
|
@@ -6558,8 +6690,10 @@ export interface OperationQuery {
|
|
|
6558
6690
|
event?: string;
|
|
6559
6691
|
/** 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
6692
|
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. */
|
|
6693
|
+
/** 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
6694
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6695
|
+
/** 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. */
|
|
6696
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6563
6697
|
/** 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
6698
|
wallet?: string;
|
|
6565
6699
|
/** 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. */
|
|
@@ -6732,8 +6866,10 @@ export interface OperationQuery {
|
|
|
6732
6866
|
trader?: string;
|
|
6733
6867
|
/** 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
6868
|
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
|
|
6869
|
+
/** 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
6870
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6871
|
+
/** 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. */
|
|
6872
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6737
6873
|
/** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
|
|
6738
6874
|
suspicious_only?: boolean;
|
|
6739
6875
|
/** Filter by whale_alerts.platform. all is equivalent to omitted. */
|
|
@@ -6758,8 +6894,10 @@ export interface OperationQuery {
|
|
|
6758
6894
|
min_size?: number;
|
|
6759
6895
|
/** 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
6896
|
category?: string;
|
|
6761
|
-
/** Minimum trader grade. */
|
|
6897
|
+
/** 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
6898
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6899
|
+
/** 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. */
|
|
6900
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6763
6901
|
/** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
|
|
6764
6902
|
suspicious_only?: boolean;
|
|
6765
6903
|
/** 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 +7049,8 @@ export interface OperationQuery {
|
|
|
6911
7049
|
category?: string;
|
|
6912
7050
|
/** Minimum trader grade. */
|
|
6913
7051
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
7052
|
+
/** 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. */
|
|
7053
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6914
7054
|
/** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
|
|
6915
7055
|
suspicious_only?: boolean;
|
|
6916
7056
|
/** Filter by whale_alerts.platform. all is equivalent to omitted. */
|
|
@@ -6935,8 +7075,10 @@ export interface OperationQuery {
|
|
|
6935
7075
|
min_size?: number;
|
|
6936
7076
|
/** 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
7077
|
category?: string;
|
|
6938
|
-
/** Minimum trader grade
|
|
7078
|
+
/** 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
7079
|
min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
7080
|
+
/** 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. */
|
|
7081
|
+
min_grade_at_trade?: "S" | "A" | "B" | "C" | "D" | "F";
|
|
6940
7082
|
/** When true, return only rows with persisted suspicion_score >= 60. The filter is applied before SQL-backed limit + 1 pagination. */
|
|
6941
7083
|
suspicious_only?: boolean;
|
|
6942
7084
|
/** 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. */
|