@0xinsider/sdk 0.27.0 → 0.28.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
@@ -87,7 +87,7 @@ export type ApiErrorBody = {
87
87
  message: string;
88
88
  doc_url?: string;
89
89
  param?: string;
90
- /** The recommended next retry instant (RFC3339). Present on every retryable error (reason=pick_not_released, code=rate_limited including reason=monthly_quota_exceeded, code=rate_limit_unavailable, reason=read_model_warming) and omitted otherwise. Always in the future. For pick_not_released: before the 03:00 America/New_York operating-window start, before a selected pick's stored release, or after a skipped day, it names the automatic system's next boundary. While no candidate exists in the live window it normally names the persisted next automatic selector attempt. Every value is advisory and can change before release. When the automatic schedule is absent/due or a pick is overdue it degrades to ~60s. Schedule one request and do not poll. Prefer Retry-After for the duration because it is immune to client clock skew. */
90
+ /** The recommended next retry instant (RFC3339). Present on every retryable error (reason=pick_not_released, code=rate_limited including reason=monthly_quota_exceeded, code=rate_limit_unavailable, reason=read_model_warming) and omitted otherwise. Always in the future. For pick_not_released, the recommendation is advisory and can change before a pick becomes available. Schedule the next request from the returned value instead of inferring a release schedule or polling. Prefer Retry-After for the duration because it is immune to client clock skew. */
91
91
  retry_at?: string;
92
92
  freshness?: FreshnessFailure;
93
93
  /** ADDITIVE (#7209). The specific, actionable cause behind `code`, when there is one more specific than the code itself. `code` keeps its published values, so existing clients are unaffected; new clients branch on `reason`. Omitted when the code already says everything we know. pick_not_released: no Pick of the Day is published for the current product day; schedule one request against retry_at instead of polling. unknown_endpoint: the PATH is not a route on this API -- read GET /api/v1, do not retry. trader_not_tracked: the wallet is real and the URL is right, but the trader is not on the warm sync tier (the wallets we sync most often) -- stop asking for this wallet. cursor_expired: pagination went stale mid-walk -- re-request the first page and continue. read_model_warming: the requested endpoint cannot serve its read model yet; exact causes are endpoint-specific and can include a cold or contended refresh or a dependency that prevented refresh. database_unavailable: the API's database or its connection pool is temporarily unreachable (a connection-class failure, not a query fault); code stays rate_limit_unavailable, nothing is rate-limited, retry after Retry-After / retry_at. idempotency_in_progress: retain the exact Idempotency-Key and request body, then retry shortly. webhook_delivery_in_progress: retry the URL or signing-secret configuration change after the destination's active request completes. request_accounting_unavailable: accounting capacity is unavailable before the handler executes; retry after Retry-After / retry_at. sandbox_api_key: the credential is a sandbox key (oxi_sk_test_) from POST /api/v1/agents/register, which only the sandbox server accepts -- call the sandbox base URL with it, or get a live key or OAuth access token; do not retry it here. api_key_in_query: the key was sent as a ?token= query parameter, which no route reads because URLs land in logs and history; the key itself was not checked -- resend it as Authorization: Bearer. subscription_inactive: the key is valid but the account's Pro subscription has lapsed (402 subscription_required); permanent until a person reactivates at https://0xinsider.com/billing, which the message names -- stop retrying on a schedule and surface the link. The key owner is emailed once per lapse. monthly_quota_exceeded: the account has used the requests its plan includes for the UTC calendar month (429 rate_limited); retry_at and Retry-After name the first of next month, the only retry that can succeed, and the message names https://0xinsider.com/developers, where pay as you go for requests over the quota is turned on. The X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on every authenticated response say how close the account is. invalid_query, invalid_path, invalid_body (400 bad_request, #16146): a query parameter, a path segment or the JSON body did not parse or does not fit the route's schema, so no handler ran; param names the field when the parser named one (a query key, a path segment, a JSON path such as traders[0], or body); fix the request, never retry it as sent. unsupported_media_type (415 bad_request, param content-type): send the body with Content-Type: application/json. payload_too_large (413 bad_request, param body): the body is over 1048576 bytes. method_not_allowed (405 bad_request): the path is a route but not with this method; the Allow header names the methods it serves. ip_rate_limited (429 rate_limited, #16380): the per-address budget every caller behind one IP shares, counted before authentication, is spent; not the key's own window, and the RateLimit-* headers describe that bucket. ip_throttled (429 rate_limited): the address is in a cooldown after sustained over-limit traffic; Retry-After is minutes to days, and a request before it does not shorten the cooldown. max_plan_required (403 forbidden, #23085): the key is valid and its account is on Pro, but the route is part of Max (GET /api/v1/edge-hunter); every Pro route keeps working with the same key, so do not disable it. The message names https://0xinsider.com/pricing, where the account upgrades; a retry never clears it. endpoint_retired (410): this legacy sports endpoint no longer serves data. Migrate to GET /api/v1/edge-hunter; retrying the retired path cannot succeed. */
@@ -1083,6 +1083,40 @@ export type ExportCounts = {
1083
1083
  estimated_trade_rows: number;
1084
1084
  estimated_size_mb: number;
1085
1085
  };
1086
+ /** `export_job_cancelled` data: the owner's export stopped because its owner cancelled it. */
1087
+ export type ExportJobCancelledData = {
1088
+ job_id: number;
1089
+ status: "cancelled";
1090
+ format: string;
1091
+ next_action: "resubmit";
1092
+ };
1093
+ /** `export_job_expired` data: the owner's ready export passed retention. */
1094
+ export type ExportJobExpiredData = {
1095
+ job_id: number;
1096
+ status: "expired";
1097
+ format: string;
1098
+ next_action: "resubmit";
1099
+ };
1100
+ /** `export_job_failed` data: the owner's asynchronous export reached a terminal failure. */
1101
+ export type ExportJobFailedData = {
1102
+ job_id: number;
1103
+ status: "failed";
1104
+ format: string;
1105
+ next_action: "resubmit";
1106
+ failure_reason: string;
1107
+ };
1108
+ /** `export_job_ready` data: the owner's asynchronous export can be downloaded. Download authorization stays on the status and download routes. */
1109
+ export type ExportJobReadyData = {
1110
+ job_id: number;
1111
+ status: "ready";
1112
+ format: string;
1113
+ next_action: "download";
1114
+ total_trades: number | null;
1115
+ processed_trades: number | null;
1116
+ /** Artifact size in bytes. */
1117
+ file_size: number | null;
1118
+ data_as_of: string | null;
1119
+ };
1086
1120
  export type ExportSourceRange = {
1087
1121
  first_pnl_date: string | null;
1088
1122
  last_pnl_date: string | null;
@@ -1387,6 +1421,11 @@ export type LargePosition = {
1387
1421
  category?: string;
1388
1422
  };
1389
1423
  };
1424
+ /** `large_positions_updated` data: one large-positions refresh finished. */
1425
+ export type LargePositionsUpdatedData = {
1426
+ /** Positions the refresh published. */
1427
+ count: number;
1428
+ };
1390
1429
  export type LargeTrade = {
1391
1430
  /** Prefixed ID (wt_...). */
1392
1431
  id: string;
@@ -1458,6 +1497,38 @@ export type LargeTradeHistoryMeta = {
1458
1497
  reason: string;
1459
1498
  };
1460
1499
  };
1500
+ /** `large_trade_inserted_v2` data (Pro and Max): one large trade, with the trade itself. The three amounts are decimal strings that keep the stored precision: parse them with a decimal library when the exact value matters. The endpoint's `trade_filters` decide which trades it receives. */
1501
+ export type LargeTradeInsertedV2Data = {
1502
+ /** Stable identity of this trade's event. It equals the envelope `id`, and the `id` of the same event on `GET /api/v1/events/feed/since`. */
1503
+ event_id: string;
1504
+ /** Numeric id of the trade. `GET /api/v1/large-trades/{id}` accepts it. */
1505
+ whale_alert_id: number;
1506
+ /** Polymarket condition id of the market. */
1507
+ condition_id: string;
1508
+ /** 0xinsider's numeric id for the wallet. */
1509
+ trader_id: number;
1510
+ /** Address of the wallet that made the trade. */
1511
+ wallet: string;
1512
+ /** The wallet's grade when the event was published; `null` when it has none. */
1513
+ grade: "S" | "A" | "B" | "C" | "D" | "F" | null;
1514
+ /** USD notional of the trade; decimal string. */
1515
+ size_usd: string;
1516
+ /** Shares traded; decimal string. */
1517
+ shares: string;
1518
+ /** Price paid per share; decimal string. */
1519
+ price: string;
1520
+ side: "BUY" | "SELL";
1521
+ /** Polymarket's index of the outcome traded. */
1522
+ outcome_index: number;
1523
+ /** When the trade filled on Polymarket. The envelope's `created_at` is this instant. */
1524
+ traded_at: string;
1525
+ platform: "polymarket";
1526
+ };
1527
+ /** `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. */
1528
+ export type LargeTradesInsertedData = {
1529
+ /** Large trades the producing batch admitted. */
1530
+ count: number;
1531
+ };
1461
1532
  /** 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. */
1462
1533
  export type LargeTradeSubscriptionFilters = {
1463
1534
  /** Raw provider condition ID or mkt_-prefixed market ID. */
@@ -1494,6 +1565,48 @@ export type LeaderboardEntry = {
1494
1565
  platform: "polymarket";
1495
1566
  last_active?: string;
1496
1567
  };
1568
+ /** One side's score line inside a `live_sports_updated` pulse. */
1569
+ export type LiveSportsScoreEntry = {
1570
+ /** Team name, ordered for the league (away first where the league reads that way). */
1571
+ team: string;
1572
+ /** This side's score as the provider sends it. */
1573
+ score: string;
1574
+ /** Esports series only: this side's current-map score. Absent on other sports. */
1575
+ map_score?: string;
1576
+ };
1577
+ /** `live_sports_updated` data: one bounded pulse for one live game. A pulse fires when a material field moved since this game's previous delivered pulse (`scores`, `status`, `period`, `live`, `ended`), at most once per game per 20 seconds. A `live` or `ended` transition is exempt from that interval, and the game clock alone never fires a pulse. Suppressed frames are folded into the next pulse's `changed`, and its body carries the current state. */
1578
+ export type LiveSportsUpdatedData = {
1579
+ /** The Polymarket event slug this game trades under. */
1580
+ event_slug: string;
1581
+ /** Provider game id, or `null` when the frame carried none. */
1582
+ game_id: string | null;
1583
+ /** League abbreviation, or `null`. */
1584
+ league: string | null;
1585
+ /** Durable per-game pulse ordinal, increasing by one per delivered pulse. Deliveries are not ordered, so drop a pulse whose version you already saw. */
1586
+ version: number;
1587
+ /** Material fields that moved since this game's previous delivered pulse. */
1588
+ changed: ("scores" | "status" | "period" | "live" | "ended")[];
1589
+ /** Provider frame time, or `null` when the frame carried none. Never replaced with a local clock. */
1590
+ observed_at: string | null;
1591
+ /** When the pulse was admitted. */
1592
+ published_at: string;
1593
+ /** Provider status text, or `null`. */
1594
+ status: string | null;
1595
+ /** Provider period text ("Q3", "Map 2/3"), or `null`. */
1596
+ period: string | null;
1597
+ /** Game clock, or `null`. Not a material field: it never fires a pulse on its own. */
1598
+ clock: string | null;
1599
+ /** Provider live flag, or `null` when the frame carried none. */
1600
+ live: boolean | null;
1601
+ /** Whether the provider has marked this game final. */
1602
+ ended: boolean;
1603
+ /** Per-side scores, one line per team. */
1604
+ scores: LiveSportsScoreEntry[];
1605
+ /** Esports `BoN` series token, or `null` on every other sport. */
1606
+ series_format: string | null;
1607
+ /** Public game page. Re-read it after a gap instead of replaying pulses. */
1608
+ snapshot_url: string;
1609
+ };
1497
1610
  /** Provider-first bucketed OHLC price candles for a market's outcome tokens, derived from our stored copy of the Polymarket CLOB prices-history series (covers open and resolved markets). */
1498
1611
  export type MarketCandles = {
1499
1612
  /** Market condition id the candles were read for. */
@@ -1820,7 +1933,7 @@ export type PickHolder = {
1820
1933
  /** The wallet's X handle from its Polymarket profile, normalized to 1-15 characters of [A-Za-z0-9_] with no `@`. Link it as `https://x.com/<handle>`. Stamped at serve time from the wallet's current trader record, never frozen with the pick. The five badge fields are present together, and only for a wallet that carries at least one badge; all absent means no badge, or a body cached before the fields shipped. */
1821
1934
  x_username?: string | null;
1822
1935
  };
1823
- /** Recorded lead wallet facts, available only on full newly certified picks. Position and category history are frozen at publication; they are not live balances or pick win probabilities. */
1936
+ /** Recorded lead wallet facts on a full response when available. Position and category history are frozen at publication; they are not live balances or pick win probabilities. */
1824
1937
  export type PickLeadBacker = {
1825
1938
  /** Lead trader wallet address. */
1826
1939
  address: string;
@@ -1875,7 +1988,7 @@ export type PickOfTheDay = {
1875
1988
  display_category?: string;
1876
1989
  /** Provider platform. Always polymarket. */
1877
1990
  platform?: "polymarket";
1878
- /** The pick's stored release instant. Qualified automatic selections are due immediately; explicitly scheduled selections retain their stored time. Final checks, worker or claim delay can make the actual publication later. */
1991
+ /** The pick's stored release instant. Use the returned timestamp; published_at records when publication occurred. */
1879
1992
  release_at?: string;
1880
1993
  /** True only before the pick's stored release instant (a pre-release embargo flag); effectively always false on a served, already-published pick. To detect that the backed game has kicked off, use `game_started`. */
1881
1994
  is_locked?: boolean;
@@ -1945,7 +2058,7 @@ export type PickOfTheDay = {
1945
2058
  sharp_pct?: number;
1946
2059
  /** Recorded market-implied probability as a 0..1 fraction when available. */
1947
2060
  market_pct?: number;
1948
- /** Optional legacy recorded specialist facts. These describe the trader and do not disclose selection decisions. Present only on a full response when available; newly certified picks use lead_backer instead. */
2061
+ /** Optional recorded specialist facts on a full response. These describe the trader, not the pick's win probability. Omitted when no recorded specialist is available. */
1949
2062
  qualifying_expert?: {
1950
2063
  /** Trader wallet address. */
1951
2064
  address: string;
@@ -1968,15 +2081,15 @@ export type PickOfTheDay = {
1968
2081
  };
1969
2082
  /** Public V1 S/A wallet count on the backed side, equal to sharp_wallet_count. */
1970
2083
  traders?: number;
1971
- /** Recorded backed-side position value in USD when available. Newly certified picks sum only publication-certified wallet positions; legacy rows retain their recorded value. */
2084
+ /** Recorded aggregate backed-side position value in USD when available, not a live balance or entry cost. The display_holders roster can include additional wallets; use the returned aggregate rather than summing that roster. */
1972
2085
  backed_sharp_usd?: number;
1973
- /** Bounded S/A holder display projection. Newly certified picks include only publication-certified wallets; historical rows retain their recorded display shape. */
2086
+ /** Bounded S/A holder display projection from the recorded snapshot. Historical rows retain their recorded display shape. */
1974
2087
  holders?: PickHolder[];
1975
- /** Optional complete holder display roster. Newly certified picks list the recorded lead first, then any verified supporters, then the other graded wallets that held the backed side at publication, ordered by shares; only the lead and supporters are verified, the other rows are gross holdings that may also hold the other side and are not counted in the wallet counts, holder_count or backed_sharp_usd. Legacy rows retain their recorded display shape. */
2088
+ /** Optional recorded holder roster in display order, with lead_backer first when present. Preserve the returned order. The roster can include wallets outside the recorded count and aggregate fields; do not derive holder_count, wallet counts or backed_sharp_usd from its length or a sum. Position values are gross holdings on the backed outcome and can coexist with holdings on the other outcome. Historical rows retain their recorded display shape. */
1976
2089
  display_holders?: PickHolder[];
1977
2090
  /** S/A holder count for the public V1 compatibility projection. display_holders can include additional grades. */
1978
2091
  holder_count?: number;
1979
- /** Required truthful thesis. With at least one profitable-wallet holder: Profitable wallets hold {pick_outcome_label}[, led by a grade-{top_grade} trader]. Without holder backing: 0xInsider's Pick of the Day is {pick_outcome_label}. Wallet counts are not appended. */
2092
+ /** Display-ready explanation of the recorded pick. Render the returned text rather than reconstructing it from holder counts or grades. */
1980
2093
  thesis?: string;
1981
2094
  /** Canonical web market URL. */
1982
2095
  market_url?: string;
@@ -2050,11 +2163,11 @@ export type PickOfTheDayArchiveEntry = {
2050
2163
  * @deprecated
2051
2164
  */
2052
2165
  pick_rank: number;
2053
- /** When this selection was published, as RFC3339 UTC. Use this instant for publication feeds and timelines; pick_date is the America/New_York product day, not a publication timestamp. Automatic picks publish from 03:00 America/New_York on pick_date. Absent only for historical rows whose publication instant is unknown. */
2166
+ /** When this selection was published, as RFC3339 UTC. Use this instant for publication feeds and timelines; pick_date is the America/New_York product day, not a publication timestamp. Absent only for historical rows whose publication instant is unknown. */
2054
2167
  published_at?: string;
2055
2168
  /** Human-readable matchup (e.g. "Portugal vs. Uzbekistan"). */
2056
2169
  matchup?: string;
2057
- /** Frozen canonical calibration/report bucket (e.g. "Basketball", "MMA", or "Soccer"). Existing semantics are unchanged; presentation consumers should prefer display_category when present. */
2170
+ /** Frozen canonical sport bucket (e.g. "Basketball", "MMA", or "Soccer"). Existing semantics are unchanged; presentation consumers should prefer display_category when present. */
2058
2171
  category?: string;
2059
2172
  /** Frozen public presentation category. Tennis uses the provider-verified ATP or WTA tour, including Wimbledon and doubles; unknown tours retain Tennis. Every men's and women's cricket competition uses Cricket. Other sports use the curated league, esports title or soccer competition label, then the provider series name without its season year, then category when no competition is known. The canonical category and measured cohort are unchanged: an esports title still uses the pooled Esports category. Optional for mixed-version client compatibility. */
2060
2173
  display_category?: string;
@@ -2062,7 +2175,7 @@ export type PickOfTheDayArchiveEntry = {
2062
2175
  image_url?: string;
2063
2176
  /** The backed side's outcome label. Omitted for a still-pending pick when the request is not from an authenticated Pro key. */
2064
2177
  pick_outcome_label?: string;
2065
- /** Best public V1-compatible S/A sharp-money grade on the backed side; a current B-only grade is omitted by the stable V1 adapter, while historical rows retain their frozen policy's grade. Omitted when no sharp-money wallet backs the pick, when a pending legacy proof has not yet upgraded, or when the stored holder policy is unknown-future or structurally invalid. Resolved legacy history remains supported. */
2178
+ /** Recorded top grade on the backed side in the public V1 compatibility projection. Omitted when unavailable. Historical values remain recorded snapshots. */
2066
2179
  top_grade?: string;
2067
2180
  /** Settlement outcome of the backed side; 'pending' until the market resolves. */
2068
2181
  outcome: "pending" | "win" | "loss" | "void";
@@ -2274,7 +2387,7 @@ export type PickOfTheDayLedgerOpenedEntry = {
2274
2387
  outcome: "win" | "loss" | "void";
2275
2388
  /** Frozen matchup, for a reader. */
2276
2389
  matchup: string;
2277
- /** Frozen canonical sport bucket used for selection calibration (Basketball, MMA), not the exact public league identity; the archive owns that. */
2390
+ /** Frozen canonical sport bucket (for example Basketball or MMA), not the exact public league identity; the archive owns that. */
2278
2391
  category: string;
2279
2392
  /** The pick's public page. */
2280
2393
  permalink: string;
@@ -2340,7 +2453,7 @@ export type PickOfTheDayLedgerUncommittedEntry = {
2340
2453
  outcome: "pending" | "win" | "loss" | "void";
2341
2454
  /** Frozen matchup, for a reader. */
2342
2455
  matchup?: string;
2343
- /** Frozen canonical sport bucket used for selection calibration (Basketball, MMA), not the exact public league identity; the archive owns that. */
2456
+ /** Frozen canonical sport bucket (for example Basketball or MMA), not the exact public league identity; the archive owns that. */
2344
2457
  category?: string;
2345
2458
  /** When outcome was LAST written to a settled value, or null when that instant is unknown. It moves with a corrected market re-mapping an already-settled pick, while commitment_hash stays untouched -- which is how a mirror that keeps history sees a correction. */
2346
2459
  resolved_at: string | null;
@@ -2589,11 +2702,11 @@ export type PositionTimelineEvent = {
2589
2702
  /** Cumulative buy-weighted average of stored fills for this outcome, including older pages; not provider current-position avgPrice. Sells do not change this value. 0 when no stored buys have occurred yet. */
2590
2703
  running_avg_price: number;
2591
2704
  };
2592
- /** Returned entry permission bound to the named market, token and outcome. New policy-8 grants allow five cents above the first reference ask, capped at 85 cents and floored to the provider tick; policy-7 grants retain their original two-cent allowance. Honor the immutable max_entry_price and expires_at, and quote a current executable book for the actual stake. The submitted order price must remain within the limit; fills may be lower. Fees are separate, and this grant does not guarantee liquidity, execution or positive expected value. */
2705
+ /** Returned entry permission bound to the named market, token and outcome. Honor the immutable max_entry_price and expires_at, and quote a current executable book for the actual stake. The submitted order price must remain within the returned limit; fills may be lower. Fees are separate, and this grant does not guarantee liquidity, execution or positive expected value. */
2593
2706
  export type PotdEntryAuthorization = {
2594
2707
  version: 1;
2595
2708
  authorization_id: string;
2596
- /** Entry allowance policy, independent of selection or feed policy. Policy 8 issues new grants at the first reference ask plus 0.05, capped at 0.85 and floored to the provider tick. Policy 7 retains its original plus-0.02 grant. Existing grants never rise or extend. */
2709
+ /** Identifier for the policy recorded with this authorization. It does not replace the returned max_entry_price or expires_at. Existing grants retain their recorded values. */
2597
2710
  policy_version: 7 | 8;
2598
2711
  condition_id: string;
2599
2712
  token_id: string;
@@ -2604,12 +2717,12 @@ export type PotdEntryAuthorization = {
2604
2717
  canonical_event_id: string;
2605
2718
  /** Maximum authorized order price as an exact decimal string, excluding fees. Quote a current executable book for the actual stake and keep the submitted order price at or below this bound. Actual fills may be lower; this limit does not guarantee a fill or define fair probability. */
2606
2719
  max_entry_price: string;
2607
- /** Selected-token best ask at first issuance. The entry allowance uses this immutable reference, not the published pick price or a later quote. */
2720
+ /** Selected-token best ask from the recorded reference book at issuance. This is a reference quote, not the authorized order-price limit; use max_entry_price for that limit. */
2608
2721
  reference_best_ask: string;
2609
2722
  reference_book_hash: string;
2610
2723
  reference_book_at: string;
2611
2724
  issued_at: string;
2612
- /** Original authorization expiry at the earlier requested or provider kickoff; never extended. An expired authorization cannot authorize a new automated entry. */
2725
+ /** Authorization expiry timestamp. Existing grants do not extend; an expired authorization cannot authorize a new automated entry. */
2613
2726
  expires_at: string;
2614
2727
  };
2615
2728
  /** One PUBLISHED same-day pick whose holder proof is not readable yet: its stable slot rank, the release and kickoff instants, and the instant before which a retry cannot succeed. Every item in `picks` carries its full required shape, so a pick that cannot meet it is listed here instead of being served with missing fields or a synthetic zero. */
@@ -2765,14 +2878,14 @@ export type ResponseMeta = {
2765
2878
  /** Independent SHA-256 recomputation over the same base fields immediately after category-skill enrichment. Equality with category_skill_base_payload_hash proves category-skill enrichment did not change funded inputs. Edge Hunter signals view only. */
2766
2879
  category_skill_enriched_base_payload_hash?: string;
2767
2880
  };
2768
- /** An entitled same-day pick selected but not yet released: stable rank and backend-owned release/kickoff instants. No matchup, category, platform, side, price, or holder fields appear before release. Unauthorized scheduled ranks appear only in locked_picks. */
2881
+ /** An entitled same-day slot with a future scheduled release: stable identity and backend-owned release/kickoff instants. It leaves this list at its release instant; an unpublished slot is never a delayed recommendation. No matchup, category, platform, side, price, or holder fields appear before release. Unauthorized scheduled ranks appear only in locked_picks. */
2769
2882
  export type ScheduledPickSlot = {
2770
2883
  /**
2771
2884
  * Deprecated compatibility daily release slot; use pick_id for identity and publication_order for scheduling.
2772
2885
  * @deprecated
2773
2886
  */
2774
2887
  pick_rank: number;
2775
- /** The slot's stored release instant. Qualified automatic selections are due immediately; explicitly scheduled selections retain their stored time. The actual publication can follow final checks and worker delay. */
2888
+ /** The slot's future release instant. Remove this preview at that instant and read again for published picks; a scheduled slot does not guarantee publication. */
2776
2889
  release_at: string;
2777
2890
  /** The backed game's current kickoff instant. */
2778
2891
  kickoff: string;
@@ -2797,6 +2910,23 @@ export type ScoreCell = {
2797
2910
  };
2798
2911
  /** Shape the provider score string was parsed into. `two_side` is one aggregate per side (basketball `105-98`), `multi_set` is per-set columns (tennis `6-7(5-7), 6-0, 1-0`), `esports_series` is a maps/sets/format triplet (`000-000|2-0|Bo3`). Omitted when the score could not be parsed. */
2799
2912
  export type ScoreFormat = "two_side" | "multi_set" | "esports_series";
2913
+ /** `sharp_money_flow_detected` data (Pro and Max): ranked-trader net flow on a market crossed the threshold. The deprecated spelling `smart_money_flow_detected` delivers the same object. */
2914
+ export type SharpMoneyFlowDetectedData = {
2915
+ /** Polymarket condition id of the market. */
2916
+ condition_id: string;
2917
+ /** Signed ranked-trader net flow in USD over `window`: positive is net into YES, negative net into NO. */
2918
+ net_flow_usd: number;
2919
+ /** Absolute value of `net_flow_usd`, the magnitude compared with the threshold. */
2920
+ abs_net_flow_usd: number;
2921
+ /** `yes` when `net_flow_usd` is 0 or more, else `no`. */
2922
+ dominant_side: "yes" | "no";
2923
+ /** Minimum trader grade included in the flow. */
2924
+ grade_floor: "S" | "A" | "B" | "C" | "D" | "F";
2925
+ /** Ranked-trader large fills that make up the flow. */
2926
+ whale_trade_count: number;
2927
+ /** Window the flow was aggregated over, for example `24h`. */
2928
+ window: string;
2929
+ };
2800
2930
  export type SmartMoneyFlowMarket = {
2801
2931
  market: {
2802
2932
  id: string;
@@ -2895,6 +3025,27 @@ export type SuspiciousTrade = {
2895
3025
  /** Stored trade timestamp. */
2896
3026
  created_at: string;
2897
3027
  };
3028
+ /** `suspicious_trade_flagged` data (Pro and Max): a trade's suspicion score crossed the flag threshold for the first time. The deprecated spelling `insider_radar_flag_raised` delivers the same object. */
3029
+ export type SuspiciousTradeFlaggedData = {
3030
+ /** Numeric id of the flagged trade, a JSON number. It is the `id` that `GET /api/v1/large-trades/{id}` accepts. */
3031
+ trade_id: number;
3032
+ /** Address of the wallet that made the trade. */
3033
+ wallet: string;
3034
+ /** 0xinsider's numeric id for the wallet. */
3035
+ trader_id: number;
3036
+ /** Polymarket condition id of the market. */
3037
+ condition_id: string;
3038
+ /** The suspicion score, 0 to 100, that crossed the threshold. */
3039
+ suspicion_score: number;
3040
+ /** The scoring track that raised the flag. */
3041
+ track: "whale" | "fresh_conviction" | "sliced_position";
3042
+ /** Outcome side the flagged fill took. */
3043
+ side: "yes" | "no";
3044
+ /** Share count of the flagged fill. */
3045
+ size: number;
3046
+ /** Fill price of the flagged trade. */
3047
+ price: number;
3048
+ };
2898
3049
  /** Optional current-game tennis facts from API-Tennis, aligned with live_score.scores display order. These facts have their own revision and expiry; Polymarket remains the source of sets, match status, period, and the outer live-score revision. New observations require corroborated identity, current set/games, and live state. Cached responses and replayed frames may still carry expired facts, so clients must enforce expires_at. */
2899
3050
  export type TennisPoints = {
2900
3051
  source: "api_tennis";
@@ -3365,6 +3516,13 @@ export type TraderStatsExact = {
3365
3516
  /** stats.total_volume as an exact decimal: full-history both-sides cash volume in USD, Polymarket user-volume `volume_usdc`, from the verified `trader_usd_volume` observation. Never Polymarket's share count. */
3366
3517
  total_volume: ExactDecimal;
3367
3518
  };
3519
+ /** `trader_synced` data: a tracked wallet finished a sync pass and has a fresh grade. The deprecated spelling `whale_trader_synced` delivers the same object. */
3520
+ export type TraderSyncedData = {
3521
+ /** 0xinsider's numeric id for the wallet. */
3522
+ trader_id: number;
3523
+ /** Proxy wallet address. */
3524
+ wallet: string;
3525
+ };
3368
3526
  /** Field-level trust metadata returned only when GET /api/v1/trader/{address} includes expand=trust. */
3369
3527
  export type TraderTrust = {
3370
3528
  total_pnl: TrustMetadata;
@@ -3510,6 +3668,24 @@ export type VerifyWebhookRequest = {
3510
3668
  /** The one-time token returned on create or on a url change. It is necessary but not sufficient: the destination must also answer the signed webhook.verification challenge with a 2xx. */
3511
3669
  verification_token: string;
3512
3670
  };
3671
+ /** `wallet_grade_changed` data (Pro and Max): a tracked wallet's grade moved on a re-grade. */
3672
+ export type WalletGradeChangedData = {
3673
+ /** Lowercased proxy wallet address. */
3674
+ wallet: string;
3675
+ /** 0xinsider's numeric id for the wallet. */
3676
+ trader_id: number;
3677
+ /** The grade before the move. Never equal to `new_grade`. */
3678
+ old_grade: "S" | "A" | "B" | "C" | "D" | "F";
3679
+ new_grade: "S" | "A" | "B" | "C" | "D" | "F";
3680
+ /** `upgrade` when `new_grade` is better than `old_grade`, else `downgrade`. */
3681
+ direction: "upgrade" | "downgrade";
3682
+ /** Cohort skill index that drove the grade, 0 to 1. */
3683
+ skill_index: number;
3684
+ /** Final 0 to 100 score banded into the new grade. */
3685
+ final_score: number;
3686
+ /** The ranking date of the re-grade. */
3687
+ date: string;
3688
+ };
3513
3689
  /** Owner-scoped view of one webhook delivery attempt. Deliberately omits the request body and the endpoint signing secret: a delivery log never re-exposes the payload or any secret material. */
3514
3690
  export type WebhookDelivery = {
3515
3691
  id: number;
@@ -3736,6 +3912,28 @@ export type WhaleDatasetTrade = {
3736
3912
  trade_event_id: string;
3737
3913
  source_trade_ingested_at: string | null;
3738
3914
  };
3915
+ /**
3916
+ * The `data` payload of each webhook event type, from the document's
3917
+ * `webhooks` map. Two spellings of one event share one payload.
3918
+ */
3919
+ export interface WebhookEventData {
3920
+ export_job_cancelled: ExportJobCancelledData;
3921
+ export_job_expired: ExportJobExpiredData;
3922
+ export_job_failed: ExportJobFailedData;
3923
+ export_job_ready: ExportJobReadyData;
3924
+ insider_radar_flag_raised: SuspiciousTradeFlaggedData;
3925
+ large_positions_updated: LargePositionsUpdatedData;
3926
+ large_trade_inserted_v2: LargeTradeInsertedV2Data;
3927
+ large_trades_inserted: LargeTradesInsertedData;
3928
+ live_sports_updated: LiveSportsUpdatedData;
3929
+ sharp_money_flow_detected: SharpMoneyFlowDetectedData;
3930
+ smart_money_flow_detected: SharpMoneyFlowDetectedData;
3931
+ suspicious_trade_flagged: SuspiciousTradeFlaggedData;
3932
+ trader_synced: TraderSyncedData;
3933
+ wallet_grade_changed: WalletGradeChangedData;
3934
+ whale_trader_synced: TraderSyncedData;
3935
+ whale_trades_inserted: LargeTradesInsertedData;
3936
+ }
3739
3937
  /**
3740
3938
  * The `data` payload each operation answers with: what
3741
3939
  * `ApiClient.call<T>` resolves to, and the default `T` of every
@@ -5216,7 +5414,7 @@ export interface OperationResponse {
5216
5414
  /** Absent on the last page. */
5217
5415
  next_cursor?: string;
5218
5416
  /** Holders matching the request's `outcome` and `min_grade` filters across every page. */
5219
- total?: number;
5417
+ total: number;
5220
5418
  market: MarketHoldersMarket;
5221
5419
  scan: MarketHoldersScan;
5222
5420
  totals: MarketHoldersTotals;