@0xinsider/mcp 3.4.1 → 3.5.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.
Files changed (43) hide show
  1. package/README.md +25 -4
  2. package/dist/catalog.generated.d.ts +40 -0
  3. package/dist/catalog.generated.d.ts.map +1 -1
  4. package/dist/catalog.generated.js +50 -0
  5. package/dist/catalog.generated.js.map +1 -1
  6. package/dist/client.d.ts +7 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/constants.d.ts +1 -1
  10. package/dist/constants.js +1 -1
  11. package/dist/sdk/index.d.ts +1 -1
  12. package/dist/sdk/index.d.ts.map +1 -1
  13. package/dist/sdk/schema.d.ts +226 -27
  14. package/dist/sdk/schema.d.ts.map +1 -1
  15. package/dist/sdk/webhooks.d.ts +30 -226
  16. package/dist/sdk/webhooks.d.ts.map +1 -1
  17. package/dist/sdk/webhooks.js.map +1 -1
  18. package/dist/server.d.ts.map +1 -1
  19. package/dist/server.js +14 -0
  20. package/dist/server.js.map +1 -1
  21. package/dist/tools/combos.d.ts +6 -0
  22. package/dist/tools/combos.d.ts.map +1 -0
  23. package/dist/tools/combos.js +133 -0
  24. package/dist/tools/combos.js.map +1 -0
  25. package/dist/tools/get-trader.d.ts.map +1 -1
  26. package/dist/tools/get-trader.js +7 -2
  27. package/dist/tools/get-trader.js.map +1 -1
  28. package/dist/tools/large-trade-counterparties.d.ts +5 -0
  29. package/dist/tools/large-trade-counterparties.d.ts.map +1 -0
  30. package/dist/tools/large-trade-counterparties.js +91 -0
  31. package/dist/tools/large-trade-counterparties.js.map +1 -0
  32. package/dist/tools/market-reads.d.ts +5 -0
  33. package/dist/tools/market-reads.d.ts.map +1 -0
  34. package/dist/tools/market-reads.js +100 -0
  35. package/dist/tools/market-reads.js.map +1 -0
  36. package/dist/tools/read-parity.d.ts.map +1 -1
  37. package/dist/tools/read-parity.js +7 -3
  38. package/dist/tools/read-parity.js.map +1 -1
  39. package/dist/tools/trader-reads.d.ts +6 -0
  40. package/dist/tools/trader-reads.d.ts.map +1 -0
  41. package/dist/tools/trader-reads.js +99 -0
  42. package/dist/tools/trader-reads.js.map +1 -0
  43. package/package.json +1 -1
@@ -1046,7 +1046,7 @@ export type ExploreMarket = {
1046
1046
  no_change_pct_24h: number | null;
1047
1047
  /** Backend-owned deterministic market discovery score used by the hot sort. */
1048
1048
  discover_score: number | null;
1049
- score_components?: {
1049
+ score_components: {
1050
1050
  volume_signal: number | null;
1051
1051
  /** Canonical key since #16304; whale_signal is its deprecated spelling, emitted beside it with the same value. */
1052
1052
  large_trade_signal: number | null;
@@ -1063,7 +1063,7 @@ export type ExploreMarket = {
1063
1063
  price_move_signal: number | null;
1064
1064
  missing_price_penalty: number;
1065
1065
  };
1066
- freshness?: {
1066
+ freshness: {
1067
1067
  enrichment_status: "available" | "unavailable";
1068
1068
  price_status: "available" | "unavailable";
1069
1069
  };
@@ -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;
@@ -1298,19 +1332,19 @@ export type LargeExportPolicy = {
1298
1332
  /** Programmatic API-key-gated export routes (submit/status/download/cancel) and supported formats (json, ndjson, csv). */
1299
1333
  v1_async: {
1300
1334
  /** POST route template to submit an export job. fresh=true asks for a snapshot read after the submit instead of reusing a finished one. */
1301
- submit_route?: string;
1335
+ submit_route: string;
1302
1336
  /** GET route template to poll job status. */
1303
- status_route?: string;
1337
+ status_route: string;
1304
1338
  /** GET route template that 302-redirects to the file. */
1305
- download_route?: string;
1339
+ download_route: string;
1306
1340
  /** POST route template to cancel a queued or running job. */
1307
- cancel_route?: string;
1341
+ cancel_route: string;
1308
1342
  /** Supported ?format= values. */
1309
- formats?: ("json" | "ndjson" | "csv")[];
1343
+ formats: ("json" | "ndjson" | "csv")[];
1310
1344
  /** Possible job status values. */
1311
- status_values?: ("queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled")[];
1345
+ status_values: ("queued" | "running" | "ready" | "failed" | "reconcile_required" | "expired" | "cancel_requested" | "cancelled")[];
1312
1346
  /** How long a finished export is retained before expiry. */
1313
- retention?: string;
1347
+ retention: string;
1314
1348
  };
1315
1349
  direct_streaming: Record<string, unknown>;
1316
1350
  async_job: Record<string, unknown>;
@@ -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. */
@@ -1520,7 +1633,7 @@ export type MarketFlow = {
1520
1633
  /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
1521
1634
  token_id: string | null;
1522
1635
  /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
1523
- large_trade_count?: number;
1636
+ large_trade_count: number;
1524
1637
  whale_trade_count: number;
1525
1638
  buy_volume_usd: number;
1526
1639
  sell_volume_usd: number;
@@ -1547,7 +1660,7 @@ export type MarketFlow = {
1547
1660
  /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
1548
1661
  token_id: string | null;
1549
1662
  /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
1550
- large_trade_count?: number;
1663
+ large_trade_count: number;
1551
1664
  whale_trade_count: number;
1552
1665
  buy_volume_usd: number;
1553
1666
  sell_volume_usd: number;
@@ -1706,6 +1819,7 @@ export type MarketSnapshot = {
1706
1819
  side: "yes" | "no";
1707
1820
  label: string;
1708
1821
  token_id?: string;
1822
+ /** The outcome's display price, the probability Polymarket shows for it: the midpoint of the cached top of book when the spread is at most 0.10, otherwise the token's last trade price. Omitted when neither is known, including a book wider than 0.10 with no last trade on record; top_of_book still carries that book's best_bid and best_ask. expand=trust explains a missing value in trust.current_price. */
1709
1823
  current_price?: number;
1710
1824
  top_of_book: MarketSnapshotTopOfBook;
1711
1825
  })[];
@@ -1766,7 +1880,7 @@ export type MarketSnapshotTrust = {
1766
1880
  };
1767
1881
  export type McpJsonRpcError = {
1768
1882
  jsonrpc: "2.0";
1769
- id?: string | number | null;
1883
+ id: string | number | null;
1770
1884
  error: {
1771
1885
  code: number;
1772
1886
  message: string;
@@ -2048,7 +2162,7 @@ export type PickOfTheDayArchiveEntry = {
2048
2162
  * Deprecated compatibility daily release slot; use pick_id for identity and publication_order for scheduling.
2049
2163
  * @deprecated
2050
2164
  */
2051
- pick_rank?: number;
2165
+ pick_rank: number;
2052
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. Automatic picks publish from 03:00 America/New_York on pick_date. Absent only for historical rows whose publication instant is unknown. */
2053
2167
  published_at?: string;
2054
2168
  /** Human-readable matchup (e.g. "Portugal vs. Uzbekistan"). */
@@ -2170,7 +2284,7 @@ export type PickOfTheDayHitRate = {
2170
2284
  /** Number of picks still pending resolution (excluded from the hit rate). */
2171
2285
  pending: number;
2172
2286
  /** The flat stake every money figure here assumes, in USD: 1000 since 2026-09-22 (100 before). Always present. */
2173
- stake_usd?: number;
2287
+ stake_usd: number;
2174
2288
  /** Cumulative profit (USD) of a stake_usd-per-pick strategy over visible valued decided picks: a priced win pays stake_usd/backed_price - stake_usd, every visible loss pays -stake_usd independent of price, and a void pays 0. An unpriced visible win and a current non-Insider row whose price is gated remain in wins/losses but are excluded from price-derived totals. */
2175
2289
  net_profit_usd: number;
2176
2290
  /** Total staked (USD) = stake_usd * count of visible valued decided picks: every visible loss plus every priced win. Void, unpriced wins, and current non-Insider rows whose price is gated are excluded. */
@@ -2222,7 +2336,7 @@ export type PickOfTheDayHitRate = {
2222
2336
  /** Measured public rows where close exactly equals entry. */
2223
2337
  clv_ties: number;
2224
2338
  /** Cumulative track-record series, one point per decided (win/loss) pick in ascending pick_date order (void and pending add no point). A non-valued decided row carries cumulative profit forward while advancing hit rate. The last point's net_profit_usd and hit_rate_pct equal the headline net_profit_usd and pct by construction. Empty when nothing is decided. */
2225
- series?: {
2339
+ series: {
2226
2340
  /** The decided pick's publish date (YYYY-MM-DD). */
2227
2341
  date: string;
2228
2342
  /** Running cumulative stake_usd-per-pick profit (USD) through this pick; valued losses and priced wins are booked, while a non-valued decided row carries profit forward unchanged. */
@@ -2796,6 +2910,23 @@ export type ScoreCell = {
2796
2910
  };
2797
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. */
2798
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
+ };
2799
2930
  export type SmartMoneyFlowMarket = {
2800
2931
  market: {
2801
2932
  id: string;
@@ -2813,7 +2944,7 @@ export type SmartMoneyFlowMarket = {
2813
2944
  /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
2814
2945
  token_id: string | null;
2815
2946
  /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
2816
- large_trade_count?: number;
2947
+ large_trade_count: number;
2817
2948
  whale_trade_count: number;
2818
2949
  buy_volume_usd: number;
2819
2950
  sell_volume_usd: number;
@@ -2828,7 +2959,7 @@ export type SmartMoneyFlowMarket = {
2828
2959
  /** The Polymarket CLOB token id (ERC1155 asset id, decimal string) for the net-flow direction outcome; null when unavailable (e.g. unsynced markets). */
2829
2960
  token_id: string | null;
2830
2961
  /** Canonical key since #16304 (Polymarket's noun is large trade); whale_trade_count is its deprecated spelling, emitted beside it with the same value. */
2831
- large_trade_count?: number;
2962
+ large_trade_count: number;
2832
2963
  whale_trade_count: number;
2833
2964
  buy_volume_usd: number;
2834
2965
  sell_volume_usd: number;
@@ -2841,7 +2972,7 @@ export type SnapshotCompleteness = {
2841
2972
  reason: string;
2842
2973
  expected_days: number;
2843
2974
  /** Canonical key since #16304; covered_days_with_whale_activity is its deprecated spelling, emitted beside it with the same value. */
2844
- covered_days_with_large_trade_activity?: number;
2975
+ covered_days_with_large_trade_activity: number;
2845
2976
  covered_days_with_whale_activity: number;
2846
2977
  };
2847
2978
  export type SnapshotState = {
@@ -2894,6 +3025,27 @@ export type SuspiciousTrade = {
2894
3025
  /** Stored trade timestamp. */
2895
3026
  created_at: string;
2896
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
+ };
2897
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. */
2898
3050
  export type TennisPoints = {
2899
3051
  source: "api_tennis";
@@ -2973,7 +3125,7 @@ export type Trader = {
2973
3125
  };
2974
3126
  strategy?: {
2975
3127
  /** Observed trading style identifier. New rows use two_sided, category_focused, high_activity, diversified, mixed, or unclassified. Historical identifiers remain readable during normal reclassification; style does not predict skill or intent. */
2976
- strategy_type?: string;
3128
+ strategy_type: string;
2977
3129
  description?: string;
2978
3130
  confidence?: number;
2979
3131
  };
@@ -3364,6 +3516,13 @@ export type TraderStatsExact = {
3364
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. */
3365
3517
  total_volume: ExactDecimal;
3366
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
+ };
3367
3526
  /** Field-level trust metadata returned only when GET /api/v1/trader/{address} includes expand=trust. */
3368
3527
  export type TraderTrust = {
3369
3528
  total_pnl: TrustMetadata;
@@ -3501,8 +3660,6 @@ export type Usage = {
3501
3660
  pay_as_you_go: boolean;
3502
3661
  /** The most requests this account is admitted in a UTC calendar month once enforcement has begun: limit, or four times limit with pay as you go on (2,000,000 for Pro). null for an admin account, which no number stops. Additive since 2026-09-22. */
3503
3662
  ceiling: number | null;
3504
- /** A historical usage price has not been reconciled to this plan allowance. Pay as you go remains unavailable until billing reconciliation. */
3505
- unavailable_reason?: "usage_price_reconciliation_required" | null;
3506
3663
  } | null;
3507
3664
  };
3508
3665
  meta: ResponseMeta;
@@ -3511,6 +3668,24 @@ export type VerifyWebhookRequest = {
3511
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. */
3512
3669
  verification_token: string;
3513
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
+ };
3514
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. */
3515
3690
  export type WebhookDelivery = {
3516
3691
  id: number;
@@ -3737,6 +3912,28 @@ export type WhaleDatasetTrade = {
3737
3912
  trade_event_id: string;
3738
3913
  source_trade_ingested_at: string | null;
3739
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
+ }
3740
3937
  /**
3741
3938
  * The `data` payload each operation answers with: what
3742
3939
  * `ApiClient.call<T>` resolves to, and the default `T` of every
@@ -3853,6 +4050,8 @@ export interface OperationData {
3853
4050
  error?: {
3854
4051
  code: number;
3855
4052
  message: string;
4053
+ /** Optional JSON-serializable error data. */
4054
+ data?: Record<string, unknown> | unknown[] | string | number | boolean | null;
3856
4055
  };
3857
4056
  };
3858
4057
  createWebhook: WebhookEndpoint;
@@ -3882,10 +4081,10 @@ export interface OperationData {
3882
4081
  getEventReplaySince: EventReplayEvent[];
3883
4082
  getGame: Game;
3884
4083
  getHealth: {
3885
- status?: "ok" | "degraded" | "down" | "maintenance";
3886
- db?: boolean;
3887
- cache?: boolean;
3888
- subsystems?: {
4084
+ status: "ok" | "degraded" | "down" | "maintenance";
4085
+ db: boolean;
4086
+ cache: boolean;
4087
+ subsystems: {
3889
4088
  /** Whether the webhook outbox schema validated on this probe. false lowers status to degraded. true during a maintenance window, when nothing is probed. */
3890
4089
  webhook_compatibility: boolean;
3891
4090
  /** Public-safe aggregate status for expected background job successful-completion heartbeats. Does not expose Redis keys, job names, raw errors, provider payloads, wallet addresses, or condition IDs. */
@@ -4011,8 +4210,6 @@ export interface OperationData {
4011
4210
  pay_as_you_go: boolean;
4012
4211
  /** The most requests this account is admitted in a UTC calendar month once enforcement has begun: limit, or four times limit with pay as you go on (2,000,000 for Pro). null for an admin account, which no number stops. Additive since 2026-09-22. */
4013
4212
  ceiling: number | null;
4014
- /** A historical usage price has not been reconciled to this plan allowance. Pay as you go remains unavailable until billing reconciliation. */
4015
- unavailable_reason?: "usage_price_reconciliation_required" | null;
4016
4213
  } | null;
4017
4214
  };
4018
4215
  getWebhook: WebhookEndpoint;
@@ -5118,6 +5315,8 @@ export interface OperationResponse {
5118
5315
  error?: {
5119
5316
  code: number;
5120
5317
  message: string;
5318
+ /** Optional JSON-serializable error data. */
5319
+ data?: Record<string, unknown> | unknown[] | string | number | boolean | null;
5121
5320
  };
5122
5321
  };
5123
5322
  createWebhook: {