@0xinsider/sdk 0.39.0 → 0.41.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 +21 -0
- package/dist/client.d.ts +44 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +60 -3
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.js +3 -3
- package/dist/schema.d.ts +267 -15
- package/dist/schema.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -123,6 +123,14 @@ export type BatchGameHoldersItem = {
|
|
|
123
123
|
data?: GameHoldersItem;
|
|
124
124
|
error?: ApiErrorBody;
|
|
125
125
|
};
|
|
126
|
+
export type BatchMarketCloseItem = {
|
|
127
|
+
/** Zero-based request index. Duplicate inputs keep separate result rows. */
|
|
128
|
+
index: number;
|
|
129
|
+
input: string;
|
|
130
|
+
status: "ok" | "error";
|
|
131
|
+
data?: MarketClose;
|
|
132
|
+
error?: ApiErrorBody;
|
|
133
|
+
};
|
|
126
134
|
export type BatchMarketFlowItem = {
|
|
127
135
|
/** Zero-based request index. Duplicate inputs keep separate result rows. */
|
|
128
136
|
index: number;
|
|
@@ -1276,7 +1284,7 @@ export type Game = {
|
|
|
1276
1284
|
/** Kickoff in UTC, as the provider supplied it. Omitted when the provider published none; coverage.schedule then reads unavailable. */
|
|
1277
1285
|
scheduled_at?: string;
|
|
1278
1286
|
status: GameStatus;
|
|
1279
|
-
/** Both sides, in the provider's own order.
|
|
1287
|
+
/** Both sides, in the provider's own order. That order states no home or away: Polymarket lists the away team first in US leagues and the home team first in soccer. Read a market's side for home and away. Empty when the provider identified neither side. */
|
|
1280
1288
|
competitors: GameCompetitor[];
|
|
1281
1289
|
/** The esports series length, for example Bo3. Omitted for everything else. */
|
|
1282
1290
|
series_format?: string;
|
|
@@ -1296,7 +1304,7 @@ export type Game = {
|
|
|
1296
1304
|
};
|
|
1297
1305
|
/** One side of the game. */
|
|
1298
1306
|
export type GameCompetitor = {
|
|
1299
|
-
/** The
|
|
1307
|
+
/** The team as its moneyline outcome names it, the same before, during and after the game (Jaguars, Penn). Where no outcome names the team, for example a soccer game's Yes/No win markets, the provider's full name (FC Bayern München). To identify a team, prefer provider_id. */
|
|
1300
1308
|
name: string;
|
|
1301
1309
|
/** The provider's league-scoped competitor id, as a string. Omitted when the provider has not identified this side; coverage.competitors then reads labels. */
|
|
1302
1310
|
provider_id?: string;
|
|
@@ -1371,7 +1379,7 @@ export type GameMarket = {
|
|
|
1371
1379
|
slug?: string;
|
|
1372
1380
|
/** The provider's own market type, for example moneyline or spread. Omitted when the provider sent none. Not an enum: the provider owns this vocabulary and adds to it. */
|
|
1373
1381
|
sports_market_type?: string;
|
|
1374
|
-
/** Which side of the game this market's YES leg pays. Soccer 1X2 legs are explicitly classified as home, draw or away by the provider projection. draw is a real value, not a competitor. Omitted when the provider projection cannot classify the leg, which is not the same as other. */
|
|
1382
|
+
/** Which side of the game this market's YES leg pays. home and away are the provider's own home/away designation of the team the YES leg names (Polymarket's teams[].ordering), never its place in competitors. Soccer 1X2 legs are explicitly classified as home, draw or away by the provider projection. draw is a real value, not a competitor. Omitted when the provider projection cannot classify the leg or the provider designates neither team home or away, which is not the same as other. */
|
|
1375
1383
|
side?: "home" | "away" | "draw" | "other";
|
|
1376
1384
|
/** The provider's label for the YES outcome. Omitted when the provider sent none. */
|
|
1377
1385
|
outcome_yes?: string;
|
|
@@ -1383,6 +1391,21 @@ export type GameMarket = {
|
|
|
1383
1391
|
prices?: GameMarketPrices;
|
|
1384
1392
|
/** 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. */
|
|
1385
1393
|
liquidity?: GameMarketLiquidity;
|
|
1394
|
+
/** 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. */
|
|
1395
|
+
settlement?: {
|
|
1396
|
+
expected_settlement_time: string | null;
|
|
1397
|
+
observed_at: string | null;
|
|
1398
|
+
oracle_status: string | null;
|
|
1399
|
+
payouts: number[] | null;
|
|
1400
|
+
proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
|
|
1401
|
+
resolved_at: string | null;
|
|
1402
|
+
result: "outcome" | "split" | null;
|
|
1403
|
+
settled: boolean | null;
|
|
1404
|
+
settlement_time_basis: string | null;
|
|
1405
|
+
status: "observed" | "not_posed" | "unavailable";
|
|
1406
|
+
was_disputed: boolean | null;
|
|
1407
|
+
winning_outcome_index: number | null;
|
|
1408
|
+
};
|
|
1386
1409
|
};
|
|
1387
1410
|
/** 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. */
|
|
1388
1411
|
export type GameMarketLiquidity = {
|
|
@@ -1784,6 +1807,23 @@ export type LargeTrade = {
|
|
|
1784
1807
|
/** Provider-backed market_canonical category. */
|
|
1785
1808
|
category?: string;
|
|
1786
1809
|
};
|
|
1810
|
+
/** Closing line value against the market's stored close (GET /api/v1/market/{condition_id}/close). Always present; status says whether it is measured. */
|
|
1811
|
+
clv: {
|
|
1812
|
+
/** The CLV definition, clv@v1. */
|
|
1813
|
+
basis_version: string;
|
|
1814
|
+
/** The anchor pre_kickoff was judged against: the stored close's anchor, else the market's kickoff. */
|
|
1815
|
+
close_anchor_at: string | null;
|
|
1816
|
+
/** The traded outcome's closing price, 0 to 1, whenever a usable close is stored and the outcome is known, in play included. */
|
|
1817
|
+
close_price: number | null;
|
|
1818
|
+
/** Cents per share, positive when the trade beat the close: buy is (close_price - price) * 100, sell is (price - close_price) * 100. Gross of fees. Computed from the trade's exact stored price; price on the wire is rounded to 4 places, so a recomputation from it agrees within 0.005 cents. Set exactly when status is measured. */
|
|
1819
|
+
clv_cents: number | null;
|
|
1820
|
+
/** Whether the trade filled before close_anchor_at. null when the market has no anchor. */
|
|
1821
|
+
pre_kickoff: boolean | null;
|
|
1822
|
+
/** measured: clv_cents is set. in_play: traded at or after the close anchor (kickoff), no CLV is defined. pending: traded before kickoff and the market's close is not stored yet. unavailable: see unavailable_reason. */
|
|
1823
|
+
status: "measured" | "in_play" | "pending" | "unavailable";
|
|
1824
|
+
/** Set exactly when status is unavailable. The market's reasons (see MarketClose.unavailable_reason), plus anchor_stale (the kickoff moved after the close was captured) and outcome_unknown (the traded outcome is not known for this trade). */
|
|
1825
|
+
unavailable_reason: "no_observation_in_lookback" | "provider_empty_window" | "provider_invalid_contract" | "capture_window_closed" | "no_game_start_time" | "not_one_sided_resolution" | "not_captured" | "close_token_mismatch" | "anchor_stale" | "outcome_unknown" | null;
|
|
1826
|
+
};
|
|
1787
1827
|
};
|
|
1788
1828
|
export type LargeTradeDetail = LargeTrade & {
|
|
1789
1829
|
counterparty_analysis: CounterpartyAnalysis;
|
|
@@ -2002,6 +2042,48 @@ export type MarketCandles = {
|
|
|
2002
2042
|
/** One entry per present provider token (YES first, then NO); empty when no tokens have been fetched yet. */
|
|
2003
2043
|
outcomes: OutcomeCandles[];
|
|
2004
2044
|
};
|
|
2045
|
+
/** A market's stored closing line (#32517): Polymarket's price-history value for the last minute bucket ending at or before kickoff, read once after settlement and never recomputed. */
|
|
2046
|
+
export type MarketClose = {
|
|
2047
|
+
/** true when game_start_time has moved more than lookback_seconds from close_anchor_at since capture; large trades on the market then carry no CLV. null without a stored row. */
|
|
2048
|
+
anchor_stale: boolean | null;
|
|
2049
|
+
/** Provider response contract version the value was read under. */
|
|
2050
|
+
basis_version: string | null;
|
|
2051
|
+
/** When the close was stored. Bookkeeping only. */
|
|
2052
|
+
captured_at: string | null;
|
|
2053
|
+
/** The instant the close was measured at: the kickoff when it was captured. Write-once; null when no close row is stored. */
|
|
2054
|
+
close_anchor_at: string | null;
|
|
2055
|
+
/** The field that supplied close_anchor_at, markets.game_start_time. */
|
|
2056
|
+
close_anchor_source: string | null;
|
|
2057
|
+
/** Polymarket condition id. */
|
|
2058
|
+
condition_id: string;
|
|
2059
|
+
/** The market's kickoff as stored now. */
|
|
2060
|
+
game_start_time: string | null;
|
|
2061
|
+
/** How far before the anchor the admitted bucket may start: 21600 (6 hours). */
|
|
2062
|
+
lookback_seconds: number | null;
|
|
2063
|
+
/** Bucket width: 60 (minute grain) or 3600 (hour grain, for a market read more than about six days after kickoff). */
|
|
2064
|
+
observation_window_seconds: number | null;
|
|
2065
|
+
/** Start of the provider bucket the close is. The bucket ends at observed_at + observation_window_seconds, at or before close_anchor_at. */
|
|
2066
|
+
observed_at: string | null;
|
|
2067
|
+
/** YES then NO when status is measured; empty otherwise. */
|
|
2068
|
+
outcomes: ({
|
|
2069
|
+
/** Closing price, 0 to 1, at full stored precision. */
|
|
2070
|
+
close_price: number;
|
|
2071
|
+
/** true on the NO leg: 1 minus the stored YES price, never a second read. */
|
|
2072
|
+
derived_from_yes: boolean;
|
|
2073
|
+
/** The outcome's label. */
|
|
2074
|
+
outcome: string | null;
|
|
2075
|
+
/** 0 is the YES leg, 1 the NO leg. */
|
|
2076
|
+
outcome_index: number;
|
|
2077
|
+
/** CLOB token id of the outcome. */
|
|
2078
|
+
token_id: string | null;
|
|
2079
|
+
})[];
|
|
2080
|
+
/** Provider endpoint and grain, e.g. polymarket_data_v2_prices_history@minute-window-v1. */
|
|
2081
|
+
price_source: string | null;
|
|
2082
|
+
/** measured: outcomes carries the close. pending: no close is stored yet and the capture will still read the market. unavailable: no close will be served; see unavailable_reason. */
|
|
2083
|
+
status: "measured" | "pending" | "unavailable";
|
|
2084
|
+
/** Set exactly when status is unavailable. no_observation_in_lookback, provider_empty_window, provider_invalid_contract and capture_window_closed are the capture's own stored refusals; no_game_start_time: the market has no kickoff time; not_one_sided_resolution: it resolved to neither side; not_captured: the capture does not read it (no tracked buy before resolution, or kickoff over 30 days ago); close_token_mismatch: the close was read on a different YES token than the market carries now. */
|
|
2085
|
+
unavailable_reason: "no_observation_in_lookback" | "provider_empty_window" | "provider_invalid_contract" | "capture_window_closed" | "no_game_start_time" | "not_one_sided_resolution" | "not_captured" | "close_token_mismatch" | "anchor_stale" | "outcome_unknown" | null;
|
|
2086
|
+
};
|
|
2005
2087
|
export type MarketFlow = {
|
|
2006
2088
|
market: {
|
|
2007
2089
|
id: string;
|
|
@@ -2250,7 +2332,7 @@ export type MarketSnapshot = {
|
|
|
2250
2332
|
source: string;
|
|
2251
2333
|
live_match_key?: string;
|
|
2252
2334
|
live_league_key?: string;
|
|
2253
|
-
/** Live-score period and elapsed may be omitted when unavailable (older responses use null). A score entry may omit full_name when it equals team; fall back to team. Distinct aliases and score admission markers are preserved. For live esports, scores[].map_score retains an available pair through an update omitting both sides only within the same live map, series format and series totals. Map changes and final state follow current provider updates; absent detail remains unavailable. Optional tennis_points supplies independently sourced current-game points and serving side; absence means unavailable. Compatible unexpired tennis_points survives temporary supplemental snapshot unavailability or contention; expiry and set/game mismatch still clear it. */
|
|
2335
|
+
/** Live-score period and elapsed may be omitted when unavailable (older responses use null). A score entry may omit full_name when it equals team; fall back to team. A score entry's side (home or away) is the provider's home/away designation of that team, omitted when the provider gives none; the order of scores states no side. Distinct aliases and score admission markers are preserved. For live esports, scores[].map_score retains an available pair through an update omitting both sides only within the same live map, series format and series totals. Map changes and final state follow current provider updates; absent detail remains unavailable. Optional tennis_points supplies independently sourced current-game points and serving side; absence means unavailable. Compatible unexpired tennis_points survives temporary supplemental snapshot unavailability or contention; expiry and set/game mismatch still clear it. */
|
|
2254
2336
|
live_score?: Record<string, unknown> & {
|
|
2255
2337
|
tennis_points?: TennisPoints;
|
|
2256
2338
|
};
|
|
@@ -2264,6 +2346,21 @@ export type MarketSnapshot = {
|
|
|
2264
2346
|
};
|
|
2265
2347
|
/** Price and spread trust metadata. Present only when expand=trust or expand[]=trust is requested. */
|
|
2266
2348
|
trust?: MarketSnapshotTrust;
|
|
2349
|
+
/** 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. */
|
|
2350
|
+
settlement: {
|
|
2351
|
+
expected_settlement_time: string | null;
|
|
2352
|
+
observed_at: string | null;
|
|
2353
|
+
oracle_status: string | null;
|
|
2354
|
+
payouts: number[] | null;
|
|
2355
|
+
proposed_answer: "outcome_0" | "outcome_1" | "split" | "too_early" | null;
|
|
2356
|
+
resolved_at: string | null;
|
|
2357
|
+
result: "outcome" | "split" | null;
|
|
2358
|
+
settled: boolean | null;
|
|
2359
|
+
settlement_time_basis: string | null;
|
|
2360
|
+
status: "observed" | "not_posed" | "unavailable";
|
|
2361
|
+
was_disputed: boolean | null;
|
|
2362
|
+
winning_outcome_index: number | null;
|
|
2363
|
+
};
|
|
2267
2364
|
};
|
|
2268
2365
|
export type MarketSnapshotFreshness = {
|
|
2269
2366
|
status: "fresh" | "stale" | "available" | "not_live" | "unavailable";
|
|
@@ -4939,6 +5036,53 @@ export type TraderCategoryRecords = {
|
|
|
4939
5036
|
/** One entry per canonical category with at least one decided market, ordered by decided descending then category. A category with no decided market is omitted. The Esports entry carries its per-game records in games. */
|
|
4940
5037
|
records: TraderCategoryRecord[];
|
|
4941
5038
|
};
|
|
5039
|
+
/** Closing line value over one wallet's large trades in a window (#32517). */
|
|
5040
|
+
export type TraderClv = {
|
|
5041
|
+
/** Wallet address, lowercase. */
|
|
5042
|
+
address: string;
|
|
5043
|
+
/** The CLV definition, clv@v1, each trade's clv.basis_version. */
|
|
5044
|
+
basis_version: string;
|
|
5045
|
+
/** The category filter as sent, or null. */
|
|
5046
|
+
category: string | null;
|
|
5047
|
+
/** The window's trades that carry no CLV, by clv.status. */
|
|
5048
|
+
excluded: {
|
|
5049
|
+
in_play: number;
|
|
5050
|
+
pending: number;
|
|
5051
|
+
unavailable: number;
|
|
5052
|
+
};
|
|
5053
|
+
/** Window start, inclusive. */
|
|
5054
|
+
from: string;
|
|
5055
|
+
/** trd_-prefixed trader id. */
|
|
5056
|
+
id: string;
|
|
5057
|
+
/** Large trades in the window, every status. */
|
|
5058
|
+
large_trades: number;
|
|
5059
|
+
/** Figures over the trades whose clv.status is measured. */
|
|
5060
|
+
measured: {
|
|
5061
|
+
/** Normal 95% interval on market_mean_clv_cents from the markets' sample deviation, as low and high. null below two markets. */
|
|
5062
|
+
market_ci95_cents: {
|
|
5063
|
+
high: number;
|
|
5064
|
+
low: number;
|
|
5065
|
+
} | null;
|
|
5066
|
+
/** Mean over markets of each market's mean clv_cents. null with no measured trade. */
|
|
5067
|
+
market_mean_clv_cents: number | null;
|
|
5068
|
+
/** Distinct markets among them. */
|
|
5069
|
+
markets: number;
|
|
5070
|
+
/** Plain mean of clv_cents. null with no measured trade. */
|
|
5071
|
+
mean_clv_cents: number | null;
|
|
5072
|
+
/** Share of measured trades with clv_cents > 0, 0 to 1. null with no measured trade. */
|
|
5073
|
+
share_beat_close: number | null;
|
|
5074
|
+
/** Their summed size in USDC. */
|
|
5075
|
+
size_usd: number;
|
|
5076
|
+
/** Mean of clv_cents weighted by each trade's size_usd. null with no measured trade. */
|
|
5077
|
+
stake_weighted_clv_cents: number | null;
|
|
5078
|
+
/** Large trades with clv.status measured. */
|
|
5079
|
+
trades: number;
|
|
5080
|
+
};
|
|
5081
|
+
/** Size floor in USDC, as /large-trades/history reads it. */
|
|
5082
|
+
min_size: number;
|
|
5083
|
+
/** Window end, exclusive. */
|
|
5084
|
+
to: string;
|
|
5085
|
+
};
|
|
4942
5086
|
export type TraderContext = {
|
|
4943
5087
|
trader: Trader;
|
|
4944
5088
|
/** Aggregate position and P&L coverage for the trader, over its synced markets. markets_open, unrealized_mtm and cost_basis_locked cover the open positions on sports and esports markets, each market judged when the summary is read (#32119). markets_synced, markets_resolved and the resolved win figures count every stored market: since 2026-10-27 (#29366) those are mostly sports and esports markets, but a market that moved out of sports and esports, or one stored before its category was known, stays in them, and sync_coverage counts every category on both sides. markets_total, total_realized_pnl and synced_realized_pnl still cover every Polymarket market of the wallet. Omitted entirely (key absent, never null) when the trader is not in the local database or native net economics is unavailable. Realized fields remain numbers when present, including a genuine zero. */
|
|
@@ -5868,6 +6012,23 @@ export type WhaleDatasetTrade = {
|
|
|
5868
6012
|
/** Stored source trade identity. */
|
|
5869
6013
|
trade_event_id: string;
|
|
5870
6014
|
source_trade_ingested_at: string | null;
|
|
6015
|
+
/** Closing line value: the clv object of the same trade on /api/v1/large-trades, judged at the generation's selected_at from close states read inside the same snapshot. A pending row can be measured in a later generation. The close is stored once (GET /api/v1/market/{condition_id}/close), so a measured clv_cents changes only if the market's kickoff or YES token changes afterwards, which makes it unavailable (anchor_stale, close_token_mismatch). */
|
|
6016
|
+
clv: {
|
|
6017
|
+
/** The CLV definition, clv@v1. */
|
|
6018
|
+
basis_version: string;
|
|
6019
|
+
/** The anchor pre_kickoff was judged against: the stored close's anchor, else the market's kickoff. */
|
|
6020
|
+
close_anchor_at: string | null;
|
|
6021
|
+
/** The traded outcome's closing price, 0 to 1, whenever a usable close is stored and the outcome is known, in play included. */
|
|
6022
|
+
close_price: number | null;
|
|
6023
|
+
/** Cents per share, positive when the trade beat the close: buy is (close_price - price) * 100, sell is (price - close_price) * 100. Gross of fees. Computed from the exact stored price this row carries, so a recomputation from price and close_price agrees to the stored digits. Set exactly when status is measured. */
|
|
6024
|
+
clv_cents: number | null;
|
|
6025
|
+
/** Whether the trade filled before close_anchor_at. null when the market has no anchor. */
|
|
6026
|
+
pre_kickoff: boolean | null;
|
|
6027
|
+
/** measured: clv_cents is set. in_play: traded at or after the close anchor (kickoff), no CLV is defined. pending: traded before kickoff and the market's close is not stored yet. unavailable: see unavailable_reason. */
|
|
6028
|
+
status: "measured" | "in_play" | "pending" | "unavailable";
|
|
6029
|
+
/** Set exactly when status is unavailable. The market's reasons (see MarketClose.unavailable_reason), plus anchor_stale (the kickoff moved after the close was captured) and outcome_unknown (the traded outcome is not known for this trade). */
|
|
6030
|
+
unavailable_reason: "no_observation_in_lookback" | "provider_empty_window" | "provider_invalid_contract" | "capture_window_closed" | "no_game_start_time" | "not_one_sided_resolution" | "not_captured" | "close_token_mismatch" | "anchor_stale" | "outcome_unknown" | null;
|
|
6031
|
+
};
|
|
5871
6032
|
};
|
|
5872
6033
|
/**
|
|
5873
6034
|
* The `data` payload of each webhook event type, from the document's
|
|
@@ -5898,6 +6059,7 @@ export interface WebhookEventData {
|
|
|
5898
6059
|
*/
|
|
5899
6060
|
export interface OperationData {
|
|
5900
6061
|
activateWebhookSecret: WebhookEndpoint;
|
|
6062
|
+
batchGetMarketClose: BatchMarketCloseItem[];
|
|
5901
6063
|
batchGetMarketFlow: BatchMarketFlowItem[];
|
|
5902
6064
|
batchGetMarketIntel: BatchMarketFlowItem[];
|
|
5903
6065
|
batchGetTraders: BatchTraderItem[];
|
|
@@ -6068,6 +6230,7 @@ export interface OperationData {
|
|
|
6068
6230
|
getInsiderRadarFlag: SuspiciousTrade;
|
|
6069
6231
|
getLargeTrade: LargeTradeDetail;
|
|
6070
6232
|
getMarketCandles: MarketCandles;
|
|
6233
|
+
getMarketClose: MarketClose;
|
|
6071
6234
|
getMarketContextMarkdown: string;
|
|
6072
6235
|
getMarketFlow: MarketFlow;
|
|
6073
6236
|
getMarketHolders: MarketHolder[];
|
|
@@ -6144,6 +6307,7 @@ export interface OperationData {
|
|
|
6144
6307
|
getSuspiciousTrade: SuspiciousTrade;
|
|
6145
6308
|
getTrader: Trader;
|
|
6146
6309
|
getTraderCategoryRecords: TraderCategoryRecords;
|
|
6310
|
+
getTraderClv: TraderClv;
|
|
6147
6311
|
getTraderContext: TraderContext;
|
|
6148
6312
|
getTraderContextMarkdown: string;
|
|
6149
6313
|
getTraderExportSnapshot: TraderExportSnapshot;
|
|
@@ -6302,11 +6466,21 @@ export interface OperationData {
|
|
|
6302
6466
|
line?: number;
|
|
6303
6467
|
line_outcome_index?: number;
|
|
6304
6468
|
negative_risk?: boolean;
|
|
6305
|
-
outcomes: {
|
|
6469
|
+
outcomes: ({
|
|
6306
6470
|
index: number;
|
|
6307
6471
|
label?: string;
|
|
6308
6472
|
token_id?: string;
|
|
6309
|
-
|
|
6473
|
+
quote?: {
|
|
6474
|
+
best_ask: number | null;
|
|
6475
|
+
best_bid: number | null;
|
|
6476
|
+
book_observed_at: string | null;
|
|
6477
|
+
price: number | null;
|
|
6478
|
+
price_basis: "midpoint" | "last_trade" | null;
|
|
6479
|
+
price_observed_at: string | null;
|
|
6480
|
+
status: "observed" | "no_orderbook" | "unavailable";
|
|
6481
|
+
book_unavailable_reason: "cache_miss" | "stream_capacity" | "no_orderbook" | "missing_provider_token_id" | null;
|
|
6482
|
+
};
|
|
6483
|
+
})[];
|
|
6310
6484
|
platform?: string;
|
|
6311
6485
|
slug?: string;
|
|
6312
6486
|
sports_market_type?: string;
|
|
@@ -6326,6 +6500,42 @@ export interface OperationData {
|
|
|
6326
6500
|
status: "computed" | "not_computed" | "unavailable";
|
|
6327
6501
|
trader_count: number | null;
|
|
6328
6502
|
};
|
|
6503
|
+
settlement: {
|
|
6504
|
+
expected_settlement_time: string | null;
|
|
6505
|
+
observed_at: string | null;
|
|
6506
|
+
oracle_status: string | null;
|
|
6507
|
+
payouts: number[] | null;
|
|
6508
|
+
proposed_answer: "split" | "too_early" | "outcome_0" | "outcome_1" | null;
|
|
6509
|
+
resolved_at: string | null;
|
|
6510
|
+
result: "outcome" | "split" | null;
|
|
6511
|
+
settled: boolean | null;
|
|
6512
|
+
settlement_time_basis: string | null;
|
|
6513
|
+
status: "observed" | "not_posed" | "unavailable";
|
|
6514
|
+
was_disputed: boolean | null;
|
|
6515
|
+
winning_outcome_index: number | null;
|
|
6516
|
+
};
|
|
6517
|
+
trading_terms?: {
|
|
6518
|
+
fee_schedule: {
|
|
6519
|
+
exponent: number | null;
|
|
6520
|
+
rate: number | null;
|
|
6521
|
+
rebate_rate: number | null;
|
|
6522
|
+
taker_only: boolean | null;
|
|
6523
|
+
} | null;
|
|
6524
|
+
fees_enabled: boolean | null;
|
|
6525
|
+
observed_at: string | null;
|
|
6526
|
+
reward_allocations: ({
|
|
6527
|
+
end_date: string | null;
|
|
6528
|
+
rewards_amount: number | null;
|
|
6529
|
+
rewards_daily_rate: number | null;
|
|
6530
|
+
start_date: string | null;
|
|
6531
|
+
})[] | null;
|
|
6532
|
+
rewards_max_spread: number | null;
|
|
6533
|
+
rewards_min_size: number | null;
|
|
6534
|
+
seconds_delay: number | null;
|
|
6535
|
+
status: "observed" | "not_listed" | "unavailable";
|
|
6536
|
+
tick_size: number | null;
|
|
6537
|
+
min_order_size_shares: number | null;
|
|
6538
|
+
};
|
|
6329
6539
|
})[];
|
|
6330
6540
|
listGames: Game[];
|
|
6331
6541
|
listGameTrades: GameTrade[];
|
|
@@ -6463,6 +6673,7 @@ export interface OperationData {
|
|
|
6463
6673
|
/** Each operation's documented query parameters. */
|
|
6464
6674
|
export interface OperationQuery {
|
|
6465
6675
|
activateWebhookSecret: Record<string, never>;
|
|
6676
|
+
batchGetMarketClose: Record<string, never>;
|
|
6466
6677
|
batchGetMarketFlow: Record<string, never>;
|
|
6467
6678
|
batchGetMarketIntel: Record<string, never>;
|
|
6468
6679
|
batchGetTraders: Record<string, never>;
|
|
@@ -6581,6 +6792,7 @@ export interface OperationQuery {
|
|
|
6581
6792
|
/** Inclusive upper bound as a URL-decoded unix timestamp in seconds; points after this timestamp are omitted. If from is also present, from must be less than or equal to to. */
|
|
6582
6793
|
to?: number;
|
|
6583
6794
|
};
|
|
6795
|
+
getMarketClose: Record<string, never>;
|
|
6584
6796
|
getMarketContextMarkdown: Record<string, never>;
|
|
6585
6797
|
getMarketFlow: {
|
|
6586
6798
|
/** Lookback window for whale flow aggregation. */
|
|
@@ -6712,6 +6924,16 @@ export interface OperationQuery {
|
|
|
6712
6924
|
/** Filter to one canonical category, matched through the same rollup every other category surface uses: soccer, EPL and champions league all reach Soccer, every esports label folds into Esports, and football is AMERICAN football and reaches Football. A filter that reaches Esports returns the Esports record with all of its games; a game is not a filter of its own, so ask for esports and read games. A sports or esports category the wallet has no record in answers 200 with an empty records array, never 404. Sports and esports only (#27311): a category outside them, or a value that reaches no category, 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). */
|
|
6713
6925
|
category?: string;
|
|
6714
6926
|
};
|
|
6927
|
+
getTraderClv: {
|
|
6928
|
+
/** Inclusive RFC3339 lower bound on the trade time. Defaults to 90 days before to. */
|
|
6929
|
+
from?: string;
|
|
6930
|
+
/** Exclusive RFC3339 upper bound on the trade time. Defaults to now; must be after from, and at most 366 days after it. */
|
|
6931
|
+
to?: string;
|
|
6932
|
+
/** Minimum trade size in USD. The capture floor was 3,000 USD before 2026-07-06 and 10,000 USD from then (1,000 USD in earnings markets), so 10000 gives one size rule across the whole archive. From 2026-09-23 a fill must also be at least 0.1% of its market's recorded traded volume (Polymarket's own share count); rows written before that date were not re-filtered. */
|
|
6933
|
+
min_size?: number;
|
|
6934
|
+
/** 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). */
|
|
6935
|
+
category?: string;
|
|
6936
|
+
};
|
|
6715
6937
|
getTraderContext: Record<string, never>;
|
|
6716
6938
|
getTraderContextMarkdown: Record<string, never>;
|
|
6717
6939
|
getTraderExportSnapshot: Record<string, never>;
|
|
@@ -6780,15 +7002,15 @@ export interface OperationQuery {
|
|
|
6780
7002
|
limit?: number;
|
|
6781
7003
|
/** 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. */
|
|
6782
7004
|
cursor?: string;
|
|
6783
|
-
/** 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. */
|
|
6784
|
-
expand?: "sharp_money"[];
|
|
6785
|
-
/** Backward-compatible alias for expand. Repeatable: sharp_money. */
|
|
6786
|
-
"expand[]"?: "sharp_money"[];
|
|
7005
|
+
/** 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. */
|
|
7006
|
+
expand?: ("sharp_money" | "quotes" | "trading_terms")[];
|
|
7007
|
+
/** Backward-compatible alias for expand. Repeatable: sharp_money, quotes, trading_terms. */
|
|
7008
|
+
"expand[]"?: ("sharp_money" | "quotes" | "trading_terms")[];
|
|
6787
7009
|
};
|
|
6788
7010
|
listGames: {
|
|
6789
7011
|
/** 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. */
|
|
6790
7012
|
sport?: string;
|
|
6791
|
-
/** 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. */
|
|
7013
|
+
/** 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. */
|
|
6792
7014
|
league?: string;
|
|
6793
7015
|
/** 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. */
|
|
6794
7016
|
status?: "scheduled" | "live" | "paused" | "ended" | "postponed" | "cancelled" | "suspended" | "delayed" | "unknown";
|
|
@@ -6802,10 +7024,10 @@ export interface OperationQuery {
|
|
|
6802
7024
|
limit?: number;
|
|
6803
7025
|
/** 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. */
|
|
6804
7026
|
cursor?: string;
|
|
6805
|
-
/** Backward-compatible alias for expand. Repeatable: sharp_money. */
|
|
6806
|
-
"expand[]"?: "sharp_money"[];
|
|
6807
|
-
/** 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.
|
|
6808
|
-
expand?: "sharp_money"[];
|
|
7027
|
+
/** Backward-compatible alias for expand. Repeatable: sharp_money, settlement. */
|
|
7028
|
+
"expand[]"?: ("sharp_money" | "settlement")[];
|
|
7029
|
+
/** 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. */
|
|
7030
|
+
expand?: ("sharp_money" | "settlement")[];
|
|
6809
7031
|
};
|
|
6810
7032
|
listGameTrades: {
|
|
6811
7033
|
/** Newest fills to return. Out-of-range values are clamped to 1..200. */
|
|
@@ -7131,6 +7353,7 @@ export interface OperationPath {
|
|
|
7131
7353
|
/** Webhook endpoint id owned by the authenticated API key user. */
|
|
7132
7354
|
id: number;
|
|
7133
7355
|
};
|
|
7356
|
+
batchGetMarketClose: Record<string, never>;
|
|
7134
7357
|
batchGetMarketFlow: Record<string, never>;
|
|
7135
7358
|
batchGetMarketIntel: Record<string, never>;
|
|
7136
7359
|
batchGetTraders: Record<string, never>;
|
|
@@ -7193,6 +7416,10 @@ export interface OperationPath {
|
|
|
7193
7416
|
/** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses. */
|
|
7194
7417
|
condition_id: string;
|
|
7195
7418
|
};
|
|
7419
|
+
getMarketClose: {
|
|
7420
|
+
/** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses. */
|
|
7421
|
+
condition_id: string;
|
|
7422
|
+
};
|
|
7196
7423
|
getMarketContextMarkdown: {
|
|
7197
7424
|
/** Market condition ID. Accepts the raw provider-backed condition_id returned by /api/v1/markets/search or /api/v1/markets/explore, or the mkt_-prefixed market.id emitted by V1 responses. */
|
|
7198
7425
|
condition_id: string;
|
|
@@ -7258,6 +7485,10 @@ export interface OperationPath {
|
|
|
7258
7485
|
/** Wallet address (0x...), username, or trd_-prefixed trader id. */
|
|
7259
7486
|
address: string;
|
|
7260
7487
|
};
|
|
7488
|
+
getTraderClv: {
|
|
7489
|
+
/** Wallet address (0x...), username, or trd_-prefixed trader id. */
|
|
7490
|
+
address: string;
|
|
7491
|
+
};
|
|
7261
7492
|
getTraderContext: {
|
|
7262
7493
|
/** Ethereum wallet address (0x...), known trader username, or trd_-prefixed trader ID emitted by this API. */
|
|
7263
7494
|
address: string;
|
|
@@ -7390,6 +7621,10 @@ export interface OperationPath {
|
|
|
7390
7621
|
/** Each operation's JSON request body; `never` when it takes none. */
|
|
7391
7622
|
export interface OperationBody {
|
|
7392
7623
|
activateWebhookSecret: never;
|
|
7624
|
+
batchGetMarketClose: {
|
|
7625
|
+
/** Market condition IDs (raw or mkt_-prefixed) to resolve in input order. */
|
|
7626
|
+
condition_ids: string[];
|
|
7627
|
+
};
|
|
7393
7628
|
batchGetMarketFlow: {
|
|
7394
7629
|
/** Market condition IDs to resolve in input order. */
|
|
7395
7630
|
condition_ids: string[];
|
|
@@ -7440,6 +7675,7 @@ export interface OperationBody {
|
|
|
7440
7675
|
getInsiderRadarFlag: never;
|
|
7441
7676
|
getLargeTrade: never;
|
|
7442
7677
|
getMarketCandles: never;
|
|
7678
|
+
getMarketClose: never;
|
|
7443
7679
|
getMarketContextMarkdown: never;
|
|
7444
7680
|
getMarketFlow: never;
|
|
7445
7681
|
getMarketHolders: never;
|
|
@@ -7463,6 +7699,7 @@ export interface OperationBody {
|
|
|
7463
7699
|
getSuspiciousTrade: never;
|
|
7464
7700
|
getTrader: never;
|
|
7465
7701
|
getTraderCategoryRecords: never;
|
|
7702
|
+
getTraderClv: never;
|
|
7466
7703
|
getTraderContext: never;
|
|
7467
7704
|
getTraderContextMarkdown: never;
|
|
7468
7705
|
getTraderExportSnapshot: never;
|
|
@@ -7530,6 +7767,11 @@ export interface OperationResponse {
|
|
|
7530
7767
|
data: OperationData["activateWebhookSecret"];
|
|
7531
7768
|
meta: ResponseMeta;
|
|
7532
7769
|
};
|
|
7770
|
+
batchGetMarketClose: {
|
|
7771
|
+
object: "market_close_batch";
|
|
7772
|
+
data: OperationData["batchGetMarketClose"];
|
|
7773
|
+
meta: BatchResponseMeta;
|
|
7774
|
+
};
|
|
7533
7775
|
batchGetMarketFlow: {
|
|
7534
7776
|
object: "market_flow_batch";
|
|
7535
7777
|
data: OperationData["batchGetMarketFlow"];
|
|
@@ -7659,6 +7901,11 @@ export interface OperationResponse {
|
|
|
7659
7901
|
data: OperationData["getMarketCandles"];
|
|
7660
7902
|
meta: ResponseMeta;
|
|
7661
7903
|
};
|
|
7904
|
+
getMarketClose: {
|
|
7905
|
+
object: "market_close";
|
|
7906
|
+
data: OperationData["getMarketClose"];
|
|
7907
|
+
meta: ResponseMeta;
|
|
7908
|
+
};
|
|
7662
7909
|
getMarketContextMarkdown: string;
|
|
7663
7910
|
getMarketFlow: {
|
|
7664
7911
|
object: "market_flow";
|
|
@@ -7782,6 +8029,11 @@ export interface OperationResponse {
|
|
|
7782
8029
|
data: OperationData["getTraderCategoryRecords"];
|
|
7783
8030
|
meta: ResponseMeta;
|
|
7784
8031
|
};
|
|
8032
|
+
getTraderClv: {
|
|
8033
|
+
object: "trader_clv";
|
|
8034
|
+
data: OperationData["getTraderClv"];
|
|
8035
|
+
meta: ResponseMeta;
|
|
8036
|
+
};
|
|
7785
8037
|
getTraderContext: {
|
|
7786
8038
|
object: "trader_context";
|
|
7787
8039
|
data: OperationData["getTraderContext"];
|