madeonsol 2.30.0 → 3.0.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/index.d.ts CHANGED
@@ -11,6 +11,24 @@ export interface PaginationParams {
11
11
  limit?: number;
12
12
  offset?: number;
13
13
  }
14
+ /** Free (BASIC) tier 5-minute delay metadata — present only on delayed feed responses. */
15
+ export interface FreeTierDelayMeta {
16
+ /** e.g. "5m" */
17
+ delay?: string;
18
+ delay_seconds?: number;
19
+ /** The delayed cutoff the page was served at. */
20
+ as_of?: string;
21
+ delay_note?: string;
22
+ /** Pricing URL. */
23
+ upgrade?: string;
24
+ }
25
+ /** Present when a filter was applied after the candidate fetch. `scan_truncated: true` means more matches MAY exist past `next_cursor`. */
26
+ export interface FeedScanInfo {
27
+ post_filtered: boolean;
28
+ scanned: number;
29
+ scan_truncated: boolean;
30
+ scan_budget: number;
31
+ }
14
32
  export type KolAction = "buy" | "sell";
15
33
  export type LeaderboardPeriod = "today" | "7d" | "30d" | "90d" | "180d";
16
34
  export type CoordinationPeriod = "1h" | "6h" | "24h" | "7d";
@@ -20,8 +38,14 @@ export type KolWalletInclude = "pnl_by_token" | "recent_winners" | "recent_loser
20
38
  export interface KolFeedParams {
21
39
  /** Number of trades to return (1–100). Default: 50. */
22
40
  limit?: number;
23
- /** Cursor — return trades strictly older than this ISO 8601 timestamp. Pass `next_before` from the previous response. */
41
+ /** LEGACY cursor — return trades strictly older than this ISO 8601 timestamp (skips same-timestamp rows). Prefer `cursor`. */
24
42
  before?: string;
43
+ /** PREFERRED pagination: `next_cursor` from the previous page — opaque strict (traded_at, id) keyset. Cannot be combined with `before`. */
44
+ cursor?: string;
45
+ /** Poll cursor — only trades strictly newer than this ISO time (feed back `next_since`). */
46
+ since?: string;
47
+ /** "token" embeds the /token/{mint} snapshot on each row (≤20 distinct mints per page). */
48
+ include?: "token";
25
49
  /** Filter by trade direction. */
26
50
  action?: KolAction;
27
51
  /** Filter by a specific KOL wallet address. */
@@ -113,13 +137,39 @@ export interface KolTrade {
113
137
  token_age_minutes?: number | null;
114
138
  deployer?: KolTradeDeployer | null;
115
139
  deployer_tier?: string | null;
140
+ /** include=token only — the /token/{mint} snapshot (null past the 20-mint cap). */
141
+ token?: TokenResponseBody | null;
116
142
  }
117
- export interface KolFeedResponse {
143
+ export interface KolFeedResponse extends FreeTierDelayMeta {
118
144
  trades: KolTrade[];
119
145
  count: number;
120
146
  data_age_seconds?: number | null;
121
- /** Cursor for the next page — pass as `before` to fetch older trades. */
147
+ /** LEGACY strict timestamp cursor (skips same-timestamp siblings) — pass as `before`. Prefer `next_cursor`. */
122
148
  next_before?: string | null;
149
+ /** Pass as `cursor` for the next (older) page; null at the end. */
150
+ next_cursor?: string | null;
151
+ /** false only when the candidate feed is exhausted — never inferred from a short filtered page. */
152
+ has_more?: boolean;
153
+ /** Present when a filter was applied after the candidate fetch. */
154
+ scan?: FeedScanInfo;
155
+ /** Poll cursor — pass as `since` to fetch only newer rows. */
156
+ next_since?: string | null;
157
+ /** Echo of the `since` parameter. */
158
+ since?: string | null;
159
+ /** WebSocket channel (`kol:trades`) that pushes the same rows. */
160
+ stream?: TokenFeedStreamPointer;
161
+ /** Present only when include= was honoured. */
162
+ included?: Array<"token">;
163
+ /** Present only when include=token hit the 20-distinct-mint cap. */
164
+ include_truncated?: {
165
+ token: string[];
166
+ note: string;
167
+ };
168
+ /** Present only when an unknown include= value was sent. */
169
+ include_errors?: Record<string, {
170
+ status: number;
171
+ error: string;
172
+ }>;
123
173
  _rid?: string;
124
174
  }
125
175
  export interface KolLeaderboardEntry {
@@ -146,11 +196,41 @@ export interface KolLeaderboardEntry {
146
196
  median_hold_minutes_30d?: number | null;
147
197
  /** Percentile rank for early entry (0–100) over the last 30 days. */
148
198
  percentile_early_entry_30d?: number | null;
199
+ /** Number of buys with a known entry MC in the period; null when that read failed (`entry_mc_complete: false`). */
200
+ entry_mc_samples?: number | null;
201
+ /** Average entry market cap (USD) over the period; null when unknown. */
202
+ avg_entry_mc_usd?: number | null;
203
+ }
204
+ export interface KolLeaderboardPagination {
205
+ limit: number;
206
+ offset: number;
207
+ returned: number;
208
+ /** Entries in the filtered universe. */
209
+ total: number;
210
+ has_more: boolean;
211
+ }
212
+ /** The fixed ranked set pagination walks (top KOLs by realized PnL for the period). */
213
+ export interface KolLeaderboardUniverse {
214
+ kind: string;
215
+ period: string;
216
+ max_size: number;
217
+ size: number;
218
+ note: string;
149
219
  }
150
220
  export interface KolLeaderboardResponse {
151
221
  leaderboard: KolLeaderboardEntry[];
222
+ pagination?: KolLeaderboardPagination;
223
+ universe?: KolLeaderboardUniverse;
224
+ /** Start of the entry-MC aggregation window (ISO). */
225
+ entry_mc_window_start?: string | null;
226
+ /** false when the entry-MC read failed (entry MC fields are then null). */
227
+ entry_mc_complete?: boolean;
152
228
  period: string;
153
229
  sort?: string | null;
230
+ /** Echo — present only when the filter was sent. */
231
+ strategy?: string;
232
+ /** Echo — present only when the filter was sent. */
233
+ min_winrate?: number;
154
234
  _rid?: string;
155
235
  }
156
236
  export interface KolPnlByToken {
@@ -388,10 +468,39 @@ export interface ScoutLeaderboardParams {
388
468
  scout_tier?: ScoutTier;
389
469
  sort?: ScoutLeaderboardSort;
390
470
  }
471
+ /**
472
+ * GET /tokens/{mint}/kol-consensus. FIX (2026-10-03 parity): the figures are
473
+ * nested under `consensus` — that is what the route has always returned;
474
+ * earlier versions of this type declared them at the top level, where they were
475
+ * always undefined. With no KOL trades: `consensus: null`,
476
+ * `total_kol_buyers: 0`, `total_kol_sellers: 0`, `complete: true`.
477
+ */
391
478
  export interface KolConsensusResponse {
479
+ mint: string;
480
+ current_mc_usd?: number | null;
481
+ current_price_usd?: number | null;
482
+ consensus: KolConsensus | null;
483
+ /** Only on the no-trades answer (then 0). */
484
+ total_kol_buyers?: number;
485
+ total_kol_sellers?: number;
486
+ complete?: boolean;
487
+ _rid?: string;
488
+ }
489
+ /** The `consensus` block of {@link KolConsensusResponse}. */
490
+ export interface KolConsensus {
392
491
  total_kol_buyers: number;
393
492
  total_kol_sellers: number;
493
+ /** Share of KOL buyers with >=1 recorded sell (any size) — NOT a full position exit. */
394
494
  kol_exit_rate: number | null;
495
+ /** Accurately named copy of kol_exit_rate. */
496
+ kol_any_sell_rate?: number | null;
497
+ /** false when the trade read hit its row ceiling (numbers cover the oldest rows_scanned trades). */
498
+ complete?: boolean;
499
+ truncated?: boolean;
500
+ rows_scanned?: number;
501
+ /** Definition string for kol_exit_rate. */
502
+ kol_exit_rate_definition?: string;
503
+ total_trades?: number;
395
504
  net_flow_sol: number;
396
505
  total_buy_sol: number;
397
506
  total_sell_sol: number;
@@ -404,9 +513,26 @@ export interface KolConsensusResponse {
404
513
  buyers?: string[];
405
514
  /** ULTRA only — wallets that fully exited. */
406
515
  exited?: string[];
407
- _rid?: string;
408
516
  }
517
+ /**
518
+ * GET /tokens/{mint}/peak-history. FIX (2026-10-03 parity): the figures are
519
+ * nested under `peak_history` (null with `found: false` for an unknown mint);
520
+ * earlier versions of this type declared them at the top level, where they were
521
+ * always undefined.
522
+ */
409
523
  export interface PeakHistoryResponse {
524
+ mint: string;
525
+ found: boolean;
526
+ token?: {
527
+ name: string | null;
528
+ symbol: string | null;
529
+ image_url: string | null;
530
+ };
531
+ peak_history: PeakHistory | null;
532
+ _rid?: string;
533
+ }
534
+ /** The `peak_history` block of {@link PeakHistoryResponse}. */
535
+ export interface PeakHistory {
410
536
  peak_mc_usd: number | null;
411
537
  peak_mc_updated_at: string | null;
412
538
  current_mc_usd: number | null;
@@ -421,6 +547,57 @@ export interface PeakHistoryResponse {
421
547
  time_to_bond_minutes: number | null;
422
548
  deployed_at: string | null;
423
549
  bonded_at: string | null;
550
+ mc_tracking_complete?: boolean | null;
551
+ }
552
+ export interface TokenTopTradersParams {
553
+ /** 1-25 on PRO, up to 100 on ULTRA+. */
554
+ limit?: number;
555
+ /** Rank axis. Default "pnl". */
556
+ sort?: "pnl" | "roi";
557
+ /** Lookback window in days (1-180, default 90). */
558
+ window_days?: number;
559
+ /** Minimum SOL bought to qualify (default 0.1). */
560
+ min_bought_sol?: number;
561
+ }
562
+ /** One wallet in a top-traders response, enriched with KOL identity + alpha-wallet stats. */
563
+ export interface TokenTopTrader {
564
+ rank: number;
565
+ wallet: string;
566
+ trades: number;
567
+ buys: number;
568
+ sells: number;
569
+ bought_sol: number;
570
+ sold_sol: number;
571
+ realized_pnl_sol: number;
572
+ unrealized_pnl_sol: number;
573
+ total_pnl_sol: number;
574
+ held_value_sol: number;
575
+ roi: number | null;
576
+ still_holding: boolean;
577
+ first_trade_at: string;
578
+ last_trade_at: string;
579
+ is_kol: boolean;
580
+ kol_name: string | null;
581
+ is_alpha_tracked: boolean;
582
+ bot_confidence: "low" | "medium" | "high" | "none" | null;
583
+ historical_win_rate: number | null;
584
+ historical_pnl_sol: number | null;
585
+ historical_tokens: number | null;
586
+ }
587
+ export interface TokenTopTradersResponse {
588
+ mint: string;
589
+ sort: "pnl" | "roi";
590
+ window_days: number;
591
+ traders: TokenTopTrader[];
592
+ summary: {
593
+ returned: number;
594
+ known_kols: number;
595
+ known_alpha_wallets: number;
596
+ net_realized_pnl_sol: number;
597
+ };
598
+ /** Trade-coverage disclosure; when `in_scope` is false an empty `traders`
599
+ * list means "outside the write-gate", not "nobody traded". */
600
+ coverage?: TradeCoverage;
424
601
  _rid?: string;
425
602
  }
426
603
  export interface CoordinationHistoryParams {
@@ -432,8 +609,10 @@ export type ScoutTier = "S" | "A" | "B" | "C";
432
609
  export interface FirstTouchesParams {
433
610
  /** ISO datetime — return events strictly newer than this. Polling cursor. */
434
611
  since?: string;
435
- /** ISO datetime — return events strictly older than this. Pagination cursor. */
612
+ /** ISO datetime — return events strictly older than this. LEGACY pagination (skips same-timestamp rows); prefer `cursor`. */
436
613
  before?: string;
614
+ /** PREFERRED pagination: `next_cursor` from the previous page — opaque strict keyset. Cannot be combined with `before`. */
615
+ cursor?: string;
437
616
  /** 1–100. Default: 50 (BASIC capped at 20). */
438
617
  limit?: number;
439
618
  /** Single KOL wallet (32–44 base58 chars). */
@@ -490,11 +669,24 @@ export interface FirstTouchEvent {
490
669
  /** v2.4 — current last-trade price (USD). */
491
670
  last_price_usd?: number | null;
492
671
  }
493
- export interface FirstTouchesResponse {
672
+ export interface FirstTouchesResponse extends FreeTierDelayMeta {
494
673
  events: FirstTouchEvent[];
495
674
  count: number;
675
+ /** LEGACY strict timestamp cursor — prefer `next_cursor`. */
496
676
  next_before: string | null;
677
+ /** Pass as `cursor` for the next (older) page; null at the end. */
678
+ next_cursor?: string | null;
679
+ /** false only when the candidate feed is exhausted. */
680
+ has_more?: boolean;
681
+ /** Present when a filter was applied after the candidate fetch. */
682
+ scan?: FeedScanInfo;
683
+ /** Poll cursor — pass as `since` for only-newer rows. */
684
+ next_since?: string | null;
685
+ /** Echo of the `since` parameter. */
686
+ since?: string | null;
497
687
  data_age_seconds: number | null;
688
+ /** WebSocket channel (`kol:first_touches`) that pushes the same rows. */
689
+ stream?: TokenFeedStreamPointer;
498
690
  _rid?: string;
499
691
  }
500
692
  export interface FirstTouchSubscriptionFilters {
@@ -909,8 +1101,12 @@ export interface DeployerTokensParams extends PaginationParams {
909
1101
  export interface DeployerAlertsParams extends PaginationParams {
910
1102
  /** ISO 8601 datetime — return alerts since this time. */
911
1103
  since?: string;
912
- /** Cursor — return alerts strictly older than this ISO 8601 timestamp. Pass `next_before` from the previous response. Preferred over `offset` at scale. */
1104
+ /** LEGACY cursor — return alerts strictly older than this ISO 8601 timestamp (skips same-timestamp siblings). Prefer `cursor`. */
913
1105
  before?: string;
1106
+ /** PREFERRED pagination: `next_cursor` from the previous page — opaque strict (created_at, id) keyset. Not combinable with `before` / `offset`. */
1107
+ cursor?: string;
1108
+ /** Only alerts for this token mint. */
1109
+ token_mint?: string;
914
1110
  /** Max results (1–50). Default: 20. */
915
1111
  limit?: number;
916
1112
  /**
@@ -973,6 +1169,10 @@ export interface DeployerSummary {
973
1169
  /** Confidence denominator; gate on >=3. */
974
1170
  labeled_tokens?: number | null;
975
1171
  avg_time_to_bond_minutes?: number | null;
1172
+ /** Populated on alert rows. */
1173
+ instant_bonds?: number | null;
1174
+ /** Count of labeled tokens that ran. Populated on alert rows. */
1175
+ runner_tokens?: number | null;
976
1176
  }
977
1177
  export interface DeployerLeaderboardEntry {
978
1178
  id: string;
@@ -1013,6 +1213,79 @@ export interface DeployerToken {
1013
1213
  bonded_at: string | null;
1014
1214
  peak_market_cap_usd: number | null;
1015
1215
  }
1216
+ /** A LaunchLab (bonk) / bags token from our own DB on GET /deployer-hunter/{wallet}. */
1217
+ export interface DeployerLaunchpadToken {
1218
+ mint: string;
1219
+ name: string | null;
1220
+ symbol: string | null;
1221
+ /** e.g. "launchlab" (bonk) | "bags". */
1222
+ launchpad: string;
1223
+ /** Graduated / bonded. */
1224
+ complete: boolean;
1225
+ deployed_at: string;
1226
+ bonded_at: string | null;
1227
+ peak_market_cap: number | null;
1228
+ }
1229
+ /** The `deployers` row inside {@link DeployerProfileResponse}. */
1230
+ export interface DeployerProfileRow {
1231
+ id: string;
1232
+ wallet_address: string;
1233
+ total_tokens_deployed: number;
1234
+ total_bonded: number;
1235
+ instant_bonds: number | null;
1236
+ bonding_rate: number | null;
1237
+ recent_bond_rate: number | null;
1238
+ tier: DeployerTier | null;
1239
+ is_tracked: boolean;
1240
+ avg_time_to_bond_minutes: number | null;
1241
+ best_token_peak_mc: number | null;
1242
+ avg_peak_mc: number | null;
1243
+ recent_outcomes: unknown;
1244
+ /** Fraction of labeled tokens that ran (peak ≥ 60 min). Gate on `labeled_tokens` ≥ 3. */
1245
+ runner_rate: number | null;
1246
+ runner_tokens: number | null;
1247
+ labeled_tokens: number | null;
1248
+ post_bond_survival_rate: number | null;
1249
+ post_bond_2x_rate: number | null;
1250
+ post_bond_labeled_count: number | null;
1251
+ first_seen_at: string | null;
1252
+ last_deploy_at: string | null;
1253
+ last_bond_at: string | null;
1254
+ label: string | null;
1255
+ }
1256
+ /**
1257
+ * `GET /deployer-hunter/{wallet}` — what `client.deployer.profile()` returns.
1258
+ * The route has always nested the deployer row under `deployer` (null with
1259
+ * `is_deployer: false` for an untracked wallet); the earlier flat
1260
+ * {@link DeployerProfile} return type described fields that were undefined at runtime.
1261
+ */
1262
+ export interface DeployerProfileResponse {
1263
+ is_deployer: boolean;
1264
+ /** Only on the `is_deployer: false` answer. */
1265
+ wallet?: string;
1266
+ deployer: DeployerProfileRow | null;
1267
+ /** Aggregated from the live pump.fun API (not our DB); null when not a deployer. */
1268
+ pump_stats: {
1269
+ total: number;
1270
+ bonded: number;
1271
+ bondingRate: number;
1272
+ bestAthMc: number;
1273
+ avgAthMc: number;
1274
+ } | null;
1275
+ /** Raw pump.fun API token list (pump.fun-launched tokens only). */
1276
+ pump_tokens: Record<string, unknown>[];
1277
+ /** true when the pump.fun API read failed (pump_tokens is then empty); null on the not-a-deployer answer. */
1278
+ pump_error: boolean | null;
1279
+ /** Our own LaunchLab/bonk + bags tokens for this deployer. */
1280
+ launchpad_tokens: DeployerLaunchpadToken[];
1281
+ /** PRO+ funding evidence; absent below PRO or when the feature is off. */
1282
+ funding?: Record<string, unknown>;
1283
+ funding_features?: Record<string, unknown>;
1284
+ /** PRO+ capital intelligence; absent when disabled. */
1285
+ capital_intelligence?: Record<string, unknown>;
1286
+ _rid?: string;
1287
+ }
1288
+ /** @deprecated Not what GET /deployer-hunter/{wallet} returns — use {@link DeployerProfileResponse}. Kept for source compatibility. */
1016
1289
  export interface DeployerProfile {
1017
1290
  wallet: string;
1018
1291
  tier: DeployerTier;
@@ -1037,7 +1310,8 @@ export interface DeployerTokensResponse {
1037
1310
  export interface KolBuysSummary {
1038
1311
  count: number;
1039
1312
  total_sol: number;
1040
- kols: unknown[];
1313
+ /** KOLs that bought. */
1314
+ kols: string[];
1041
1315
  }
1042
1316
  export interface DeployerAlert {
1043
1317
  id: string;
@@ -1052,15 +1326,25 @@ export interface DeployerAlert {
1052
1326
  market_cap_at_alert?: number | null;
1053
1327
  /** Deployer wallet's SOL balance at alert time, in SOL. Null when unknown. */
1054
1328
  deployer_sol_balance?: number | null;
1329
+ /** Launchpad the token was deployed on. */
1330
+ launchpad?: string | null;
1055
1331
  deployers: DeployerSummary;
1056
1332
  kol_buys?: KolBuysSummary | null;
1057
1333
  }
1058
- export interface DeployerAlertsResponse {
1334
+ export interface DeployerAlertsResponse extends FreeTierDelayMeta {
1059
1335
  alerts: DeployerAlert[];
1060
1336
  limit: number;
1061
1337
  offset: number;
1062
- /** Cursor for the next page — pass as `before` to fetch older alerts. */
1338
+ /** LEGACY strict timestamp cursor — pass as `before`. Prefer `next_cursor`. */
1063
1339
  next_before?: string | null;
1340
+ /** Pass as `cursor` for the next (older) page; null at the end. */
1341
+ next_cursor?: string | null;
1342
+ /** false only when the candidate feed is exhausted. */
1343
+ has_more?: boolean;
1344
+ /** false only if kol_buys could not be aggregated exactly (counts are then lower bounds). */
1345
+ kol_buys_complete?: boolean;
1346
+ /** Present with min_kol_buys. */
1347
+ scan?: FeedScanInfo;
1064
1348
  data_age_seconds?: number | null;
1065
1349
  _rid?: string;
1066
1350
  }
@@ -1831,10 +2115,42 @@ export interface TokenLockNextUnlock {
1831
2115
  * ui (`amount`, `locked`, …), `*_usd` and `*_pct_of_supply` fields are null when
1832
2116
  * decimals / price are unknown.
1833
2117
  */
2118
+ /**
2119
+ * Who runs the lock contract, and how sure the server is (server 2026-10-02).
2120
+ * `verified` = a known provider deployment (Streamflow / Jupiter Lock / Bonfida,
2121
+ * identified by program id); `compatible` = only the instruction/event shape
2122
+ * matches a known provider (`compatible_with`), the operator is NOT identified;
2123
+ * `unverified` = unknown program. `id` / `website_url` are null unless verified.
2124
+ * `lock_url` is a per-lock page on the provider site, set ONLY where its
2125
+ * format is proven — for the Solana providers it is always null (never guessed).
2126
+ */
2127
+ export interface TokenLockProvider {
2128
+ id: string | null;
2129
+ name: string | null;
2130
+ identity: "verified" | "compatible" | "unverified";
2131
+ compatible_with: string | null;
2132
+ website_url: string | null;
2133
+ lock_url: string | null;
2134
+ }
2135
+ /** Independent on-chain evidence on Solana Explorer (server 2026-10-02). */
2136
+ export interface TokenLockExplorer {
2137
+ lock_account_url: string | null;
2138
+ creation_tx_url: string | null;
2139
+ }
2140
+ /** One Bonfida vesting tranche (`TokenLock.schedule`). */
2141
+ export interface TokenLockTranche {
2142
+ release_at: string | null;
2143
+ /** Base units as a decimal string. */
2144
+ amount_raw: string;
2145
+ }
1834
2146
  export interface TokenLock {
1835
2147
  /** The contract account (Streamflow stream / Jupiter VestingEscrow / Bonfida vesting account). */
1836
2148
  lock_account: string;
1837
2149
  program: TokenLockProgram;
2150
+ /** Server 2026-10-02 — who runs the locker and how sure we are; see {@link TokenLockProvider}. Absent on older servers. */
2151
+ provider?: TokenLockProvider;
2152
+ /** Server 2026-10-02 — Solana Explorer links for the lock account and the creation tx. */
2153
+ explorer?: TokenLockExplorer;
1838
2154
  kind: TokenLockKind;
1839
2155
  status: TokenLockStatus;
1840
2156
  mint: string;
@@ -1846,6 +2162,9 @@ export interface TokenLock {
1846
2162
  amount_raw: string;
1847
2163
  amount: number | null;
1848
2164
  amount_usd: number | null;
2165
+ /** Server 2026-10-02 — the token price behind every `*_usd` field (null when unknown, stale or phantom). */
2166
+ price_usd?: number | null;
2167
+ /** % of CURRENT supply; null when unknown or above 100.5 (supply changed since the deposit). */
1849
2168
  amount_pct_of_supply: number | null;
1850
2169
  /** Still locked right now (amount − unlocked-so-far); "0" unless active. */
1851
2170
  locked_raw: string;
@@ -1864,6 +2183,10 @@ export interface TokenLock {
1864
2183
  cliff_at: string | null;
1865
2184
  /** Fully unlocked at; null = perpetual / no schedule. */
1866
2185
  end_at: string | null;
2186
+ /** Server 2026-10-02 — seconds until fully unlocked (>= 0); 0 once completed; null when perpetual or cancelled / closed. */
2187
+ seconds_until_end?: number | null;
2188
+ /** Server 2026-10-02 — seconds until `next_unlock.at` (>= 0); null without a next unlock. */
2189
+ seconds_until_next_unlock?: number | null;
1867
2190
  period_seconds: number | null;
1868
2191
  /** period < 1h (per-second stream, e.g. Streamflow payroll). */
1869
2192
  continuous: boolean;
@@ -1873,6 +2196,8 @@ export interface TokenLock {
1873
2196
  cliff_amount: number | null;
1874
2197
  perpetual: boolean;
1875
2198
  next_unlock: TokenLockNextUnlock | null;
2199
+ /** Bonfida vesting only: the tranche list (absent on other programs). */
2200
+ schedule?: TokenLockTranche[];
1876
2201
  /** The locker can cancel — funds are locked against the RECIPIENT, not the locker (a weaker promise). */
1877
2202
  cancelable_by_sender: boolean | null;
1878
2203
  cancelable_by_recipient: boolean | null;
@@ -1949,8 +2274,10 @@ export interface TokenLocksResponse {
1949
2274
  export interface TokenLocksFeedParams {
1950
2275
  /** ISO date-time — only contracts created after this instant (use `pagination.next_since`). */
1951
2276
  since?: string;
1952
- /** ISO date-time — page back: only contracts created before this instant (`pagination.next_before`). */
2277
+ /** ISO date-time — page back: only contracts created before this instant (`pagination.next_before`). Legacy and strict: skips same-timestamp siblings — prefer `cursor`. */
1953
2278
  before?: string;
2279
+ /** Opaque `pagination.next_cursor` from the previous page: strict (created_at, id) keyset, no repeats, no skips. Not combinable with `before`. */
2280
+ cursor?: string;
1954
2281
  mint?: string;
1955
2282
  sender?: string;
1956
2283
  recipient?: string;
@@ -1975,6 +2302,13 @@ export interface TokenFeedPagination {
1975
2302
  next_since: string | null;
1976
2303
  /** Pass as `before` to page back. */
1977
2304
  next_before: string | null;
2305
+ /** Locks feed — pass as `cursor` to page back without skipping same-timestamp rows; null = end. */
2306
+ next_cursor?: string | null;
2307
+ /** Present when a post-filter (min_usd / min_pct_of_supply / status) was scanned. */
2308
+ post_filtered?: boolean;
2309
+ scanned?: number;
2310
+ scan_truncated?: boolean;
2311
+ scan_budget?: number;
1978
2312
  }
1979
2313
  /** WebSocket pointer returned by the feed endpoints — the same rows are pushed live on `channel`. */
1980
2314
  export interface TokenFeedStreamPointer {
@@ -1991,6 +2325,8 @@ export interface TokenFeedStreamPointer {
1991
2325
  export interface TokenLocksFeedResponse {
1992
2326
  locks: TokenLockFeedEntry[];
1993
2327
  pagination: TokenFeedPagination;
2328
+ /** "mint_facts:<table>" when a per-mint enrichment read failed; those rows' usd/ui/pct are null (unknown) and min_usd / min_pct_of_supply could not be applied to them. */
2329
+ degraded_fields?: string[];
1994
2330
  /** Pointer to the `token:locks` WS channel (event `token:lock`). */
1995
2331
  stream: TokenFeedStreamPointer;
1996
2332
  meta?: Record<string, unknown>;
@@ -2182,6 +2518,257 @@ export interface TokenUnlockScheduleEvent extends TokenLockLifecycleBase {
2182
2518
  }
2183
2519
  /** Any lifecycle payload on `token:locks` — narrow on the frame's `event`. */
2184
2520
  export type TokenLockLifecycleEvent = TokenLockClaimedEvent | TokenLockCancelledEvent | TokenLockClosedEvent | TokenLockUpdatedEvent | TokenUnlockScheduleEvent;
2521
+ /**
2522
+ * `token:candles` subscribe filters (PRO+). `mints` is REQUIRED (base58) and
2523
+ * capped per CONNECTION across named subscriptions — PRO 25 / ULTRA 100 /
2524
+ * BUSINESS 250, a budget separate from `token:prices`. Over the cap, a missing
2525
+ * scope or a non-boolean `updates` rejects the channel, never truncates.
2526
+ */
2527
+ export interface TokenCandlesFilters {
2528
+ mints: string[];
2529
+ /** Also receive the in-progress minute as `candle:update` (a state stream). Default false. */
2530
+ updates?: boolean;
2531
+ }
2532
+ /**
2533
+ * `candle:closed` frame `data` on `token:candles` — the STORED 1-minute row
2534
+ * (`token_ohlc_1m`), identical live and on a durable resume. Every key is
2535
+ * always present (null when unknown). Frame id =
2536
+ * `candle:solana:<mint>:<bucket_start epoch s>` (not event-prefixed). A fully
2537
+ * flat zero-trade candle (o = h = l = c, trades 0) is never emitted.
2538
+ */
2539
+ export interface TokenCandleClosedEvent {
2540
+ chain: "solana";
2541
+ mint: string;
2542
+ bucket_start: string;
2543
+ /** bucket_start + 60 s. */
2544
+ bucket_end: string;
2545
+ /** When the row was first written (≈ ≤ 25 s after bucket_end). */
2546
+ closed_at: string | null;
2547
+ open_price_usd: number | null;
2548
+ high_price_usd: number | null;
2549
+ low_price_usd: number | null;
2550
+ close_price_usd: number | null;
2551
+ open_mc_usd: number | null;
2552
+ high_mc_usd: number | null;
2553
+ low_mc_usd: number | null;
2554
+ close_mc_usd: number | null;
2555
+ open_liquidity_usd: number | null;
2556
+ close_liquidity_usd: number | null;
2557
+ close_supply: number | null;
2558
+ volume_usd: number | null;
2559
+ volume_mev_usd: number | null;
2560
+ buy_volume_usd: number | null;
2561
+ sell_volume_usd: number | null;
2562
+ trades: number | null;
2563
+ buy_count: number | null;
2564
+ sell_count: number | null;
2565
+ dex: string | null;
2566
+ pool_address: string | null;
2567
+ write_id: string | null;
2568
+ final: true;
2569
+ source: "token_ohlc_1m";
2570
+ }
2571
+ /**
2572
+ * `candle:update` frame `data` (only with `filters.updates: true`) — the
2573
+ * producer's in-progress minute, ≤ 1 per mint per second. A state stream: no
2574
+ * id / seq, never replayed, no snapshot on subscribe.
2575
+ */
2576
+ export interface TokenCandleUpdateEvent {
2577
+ chain: "solana";
2578
+ mint: string;
2579
+ bucket_start: string;
2580
+ bucket_end: string;
2581
+ open_price_usd: number | null;
2582
+ high_price_usd: number | null;
2583
+ low_price_usd: number | null;
2584
+ close_price_usd: number | null;
2585
+ close_mc_usd: number | null;
2586
+ volume_usd: number | null;
2587
+ trades: number | null;
2588
+ final: false;
2589
+ /** The producer's timestamp of this state (ISO). */
2590
+ as_of: string | null;
2591
+ source: "mc-tracker:open_candle";
2592
+ }
2593
+ /** Event types on `token:risk`. */
2594
+ export type TokenRiskEventName = "risk:authority_changed" | "risk:supply_inflated";
2595
+ /**
2596
+ * `token:risk` subscribe filters (PRO+). `mints` is REQUIRED (base58), capped
2597
+ * per connection PRO 25 / ULTRA 100 / BUSINESS 250. Invalid values reject the
2598
+ * channel (`channels_rejected`) or the whole update (`invalid_filters`).
2599
+ */
2600
+ export interface TokenRiskFilters {
2601
+ mints: string[];
2602
+ /** Non-empty subset of the channel's event types. */
2603
+ risk_events?: TokenRiskEventName[];
2604
+ /** Send one `risk:inputs` snapshot per mint on subscribe / scope change / resume. Default true. */
2605
+ risk_snapshot?: boolean;
2606
+ }
2607
+ /**
2608
+ * `risk:authority_changed` — the stored mint / freeze authority went from not
2609
+ * revoked to revoked (once per mint + field, ever), or the Token-2022 transfer
2610
+ * fee changed with both values known. Never a re-enable, never a first
2611
+ * observation. Frame id = `risk:authority_changed:<event_key>`.
2612
+ */
2613
+ export interface TokenRiskAuthorityChangedEvent {
2614
+ chain: "solana";
2615
+ mint: string;
2616
+ /** `<mint>:mint_authority:revoked` | `<mint>:freeze_authority:revoked` | `<mint>:transfer_fee:<before>><after>:<observed_at ms>`. */
2617
+ event_key: string;
2618
+ field: "mint_authority" | "freeze_authority" | "transfer_fee";
2619
+ /** `{revoked}` for the authorities, `{transfer_fee_bps}` for the fee. */
2620
+ before: {
2621
+ revoked: boolean;
2622
+ } | {
2623
+ transfer_fee_bps: number;
2624
+ };
2625
+ after: {
2626
+ revoked: boolean;
2627
+ } | {
2628
+ transfer_fee_bps: number;
2629
+ };
2630
+ /** The full picture after the change. */
2631
+ mint_authority_revoked: boolean | null;
2632
+ freeze_authority_revoked: boolean | null;
2633
+ transfer_fee_bps: number | null;
2634
+ is_token_2022: boolean | null;
2635
+ /** When mc-tracker parsed the mint account that showed the change. */
2636
+ observed_at: string | null;
2637
+ /** The parse before: the change happened on chain in between. */
2638
+ previous_observed_at: string | null;
2639
+ written_at: string;
2640
+ slot: null;
2641
+ source: "token_prices";
2642
+ }
2643
+ /**
2644
+ * `risk:supply_inflated` — the first `supply_drift_events` row for the mint
2645
+ * reaching a level (warn 0.5 % / danger 5 %). Per-observation drift, not a
2646
+ * cumulative inflation. Frame id = `risk:supply_inflated:<event_key>`.
2647
+ */
2648
+ export interface TokenRiskSupplyInflatedEvent {
2649
+ chain: "solana";
2650
+ mint: string;
2651
+ /** `<mint>:supply_inflated:warn` | `<mint>:supply_inflated:danger`. */
2652
+ event_key: string;
2653
+ level: "warn" | "danger";
2654
+ /** 0.5 (warn) | 5 (danger). */
2655
+ threshold_pct: number;
2656
+ /** drift / expected of one drift row, in percent, 4 dp. */
2657
+ inflation_pct: number;
2658
+ /** Integer strings. */
2659
+ expected_supply_raw: string;
2660
+ onchain_supply_raw: string;
2661
+ drift_raw: string;
2662
+ detected_at: string;
2663
+ drift_event_id: number;
2664
+ window_days: 30;
2665
+ written_at: string;
2666
+ slot: null;
2667
+ source: "supply_drift_events";
2668
+ }
2669
+ /**
2670
+ * `risk:inputs` snapshot frame `data` (frame `snapshot: true`, no id / seq):
2671
+ * the CURRENT stored risk inputs of one scoped mint. Not the score or band —
2672
+ * `GET /tokens/{mint}/risk` computes those.
2673
+ */
2674
+ export interface TokenRiskInputsSnapshot {
2675
+ chain: "solana";
2676
+ mint: string;
2677
+ /** false = the mint is not in the price table (every input null). */
2678
+ tracked: boolean;
2679
+ mint_authority_revoked: boolean | null;
2680
+ freeze_authority_revoked: boolean | null;
2681
+ transfer_fee_bps: number | null;
2682
+ is_token_2022: boolean | null;
2683
+ authority_observed_at: string | null;
2684
+ /** Worst positive supply drift in the last 30 days; null when none. `level` null below 0.5 %. */
2685
+ supply_inflation: {
2686
+ inflation_pct: number;
2687
+ level: "warn" | "danger" | null;
2688
+ detected_at: string | null;
2689
+ window_days: 30;
2690
+ } | null;
2691
+ source: "token_prices+supply_drift_events";
2692
+ }
2693
+ /** Any event payload on `token:risk` — narrow on the frame's `event`. */
2694
+ export type TokenRiskEvent = TokenRiskAuthorityChangedEvent | TokenRiskSupplyInflatedEvent;
2695
+ /** Event types on `wallet:scores`. */
2696
+ export type WalletScoreEventName = "deployer:tier_changed" | "kol:score_state_changed";
2697
+ /**
2698
+ * `wallet:scores` subscribe filters (PRO+). `wallets` is REQUIRED — base58
2699
+ * deployer or KOL wallets — capped per connection per chain PRO 25 / ULTRA 100
2700
+ * / BUSINESS 250. A subscription that also holds `rhc:wallet_scores` may mix
2701
+ * in 0x addresses; an entry of a chain the subscription does not hold is refused.
2702
+ */
2703
+ export interface WalletScoresFilters {
2704
+ wallets: string[];
2705
+ /** Optional subset of the held channels' event types (e.g. `"rhc:deployer_tier_changed"` when mixing chains). */
2706
+ score_events?: Array<WalletScoreEventName | "rhc:deployer_tier_changed">;
2707
+ }
2708
+ /**
2709
+ * Where a score event came from. `computed_at` means "recomputed at T", not
2710
+ * "changed at T": `live_write` = a bond / deploy re-classified the deployer
2711
+ * (real time); `scheduled_recompute` = the 6-hourly stats worker (can lag the
2712
+ * stats by hours); `matview_refresh` = the KOL diff after each 10-min refresh.
2713
+ */
2714
+ export type WalletScoreSource = "live_write" | "scheduled_recompute" | "matview_refresh";
2715
+ /** Solana deployer tier values on `deployer:tier_changed`. */
2716
+ export type DeployerTierChangeValue = "elite" | "good" | "rising" | "moderate" | "cold" | "unranked";
2717
+ /**
2718
+ * `deployer:tier_changed` — `deployers.tier` changed. Frame id =
2719
+ * `deployer:tier_changed:<event_key>`. A wallet appearing is not an event;
2720
+ * entering a ranked tier is (`entered_ranking: true`, `tier_before: "unranked"`).
2721
+ */
2722
+ export interface DeployerTierChangedEvent {
2723
+ /** `<wallet>:<tier_before>><tier_after>:<txid>`. */
2724
+ event_key: string;
2725
+ chain: "solana";
2726
+ wallet: string;
2727
+ tier_before: DeployerTierChangeValue | null;
2728
+ tier_after: DeployerTierChangeValue | null;
2729
+ entered_ranking: boolean;
2730
+ is_tracked: boolean | null;
2731
+ /** As of the write. */
2732
+ stats: {
2733
+ total_tokens_deployed: number | null;
2734
+ total_bonded: number | null;
2735
+ instant_bonds: number | null;
2736
+ bonding_rate: number | null;
2737
+ recent_bond_rate: number | null;
2738
+ recent_outcomes: string | null;
2739
+ };
2740
+ computed_at: string;
2741
+ source: WalletScoreSource;
2742
+ }
2743
+ /** The categorical KOL score fields diffed on `kol:score_state_changed`. */
2744
+ export interface KolScoreState {
2745
+ is_cold: boolean | null;
2746
+ is_heating_up: boolean | null;
2747
+ auto_strategy_tag: KolStrategy | null;
2748
+ }
2749
+ /**
2750
+ * `kol:score_state_changed` — one event per KOL per `mv_kol_scores` refresh
2751
+ * where `is_cold`, `is_heating_up` or `auto_strategy_tag` differs (fields never
2752
+ * split). Frame id = `kol:score_state_changed:<event_key>`.
2753
+ */
2754
+ export interface KolScoreStateChangedEvent {
2755
+ /** `<wallet>:<computed_at epoch ms>`. */
2756
+ event_key: string;
2757
+ chain: "solana";
2758
+ wallet: string;
2759
+ kol_wallet_id: string | null;
2760
+ kol_name: string | null;
2761
+ /** All three for a KOL first seen after the seed. */
2762
+ changed: Array<keyof KolScoreState>;
2763
+ /** null for a first appearance. */
2764
+ before: KolScoreState | null;
2765
+ after: KolScoreState;
2766
+ computed_at: string;
2767
+ source: "matview_refresh";
2768
+ matview: "mv_kol_scores";
2769
+ }
2770
+ /** Any event payload on `wallet:scores` — narrow on the frame's `event`. */
2771
+ export type WalletScoreEvent = DeployerTierChangedEvent | KolScoreStateChangedEvent;
2185
2772
  /** pump.fun fee event types (`creator_claim` is excluded from the feed unless requested via `type=`). */
2186
2773
  export type TokenFeeEventType = "shares_created" | "shares_updated" | "shares_reset" | "distribution" | "social_pda_created" | "social_claim" | "creator_transferred" | "creator_claim";
2187
2774
  /** A shareholder on a SharingConfig: `{ address, share_bps }` (bps of the creator fee). */
@@ -2535,8 +3122,10 @@ export interface TokenSurgeStreamEvent {
2535
3122
  bonding_progress_pct: number | null;
2536
3123
  is_bonded: boolean | null;
2537
3124
  tape: TokenSurgeTape;
2538
- kol: TokenSurgeKol;
2539
- early_buyers: TokenSurgeEarlyBuyers;
3125
+ /** null when the enrichment round-trip failed (`enrichment_available: false`). */
3126
+ kol: TokenSurgeKol | null;
3127
+ /** null when the enrichment round-trip failed (`enrichment_available: false`). */
3128
+ early_buyers: TokenSurgeEarlyBuyers | null;
2540
3129
  deployer: TokenSurgeDeployer | null;
2541
3130
  /** Flat copies of `deployer.wallet` / `deployer.tier` (what the subscribe filter reads). */
2542
3131
  deployer_wallet: string | null;
@@ -2841,6 +3430,27 @@ export interface TradeCoverage {
2841
3430
  /** Present when `in_scope` is `false`/`null` (and always on `/risk`) —
2842
3431
  * human-readable explanation of what the coverage gap means. */
2843
3432
  note?: string;
3433
+ /** Same value as in_scope: persisted rows exist (presence, not completeness). */
3434
+ data_observed?: boolean | null;
3435
+ /** Does the CURRENT capture gate admit this mint? */
3436
+ eligibility?: TradeEligibility | null;
3437
+ eligibility_basis?: string | null;
3438
+ /** Always "not_verified": rows existing never proves a complete interval. */
3439
+ completeness?: "not_verified";
3440
+ /** Persistence size floor of the stored trade tape (server 2026-09-30). */
3441
+ size_floor?: TradeSizeFloor;
3442
+ }
3443
+ /** Treat unknown future values as "unknown". */
3444
+ export type TradeEligibility = "eligible" | "lapsed" | "excluded" | "unknown" | "admitted_previously" | "not_applicable";
3445
+ /**
3446
+ * The stored trade tape drops buys under `min_sol` SOL (under `min_stable_usd`
3447
+ * when paid in USDC/USDT); sells that RECEIVE SOL are kept at any size. Live
3448
+ * streams, prices, market caps and candles are not subject to it.
3449
+ */
3450
+ export interface TradeSizeFloor {
3451
+ min_sol: number;
3452
+ min_stable_usd: number;
3453
+ applies_to: string;
2844
3454
  }
2845
3455
  /** Back-compat alias — the honesty block is no longer trades-specific. */
2846
3456
  export type TokenTradesCoverage = TradeCoverage;
@@ -3130,6 +3740,19 @@ export interface WalletStatsResponse {
3130
3740
  /** v2.22.4 — trade-coverage disclosure; when `in_scope` is false an empty
3131
3741
  * `stats` block means "outside the write-gate", not "never traded". */
3132
3742
  coverage?: TradeCoverage;
3743
+ /**
3744
+ * Server 2026-10-01 — present (`true`) only when the 90-day aggregation
3745
+ * failed: `stats: null` is then UNKNOWN, not an inactive wallet.
3746
+ */
3747
+ stats_unavailable?: boolean;
3748
+ /** Present (`true`) only when one or more enrichment queries failed; see `degraded_fields`. */
3749
+ enrichment_unavailable?: boolean;
3750
+ /**
3751
+ * Enrichment blocks whose query failed (e.g. a database timeout). Their
3752
+ * `null` / `[]` is UNKNOWN, not "no data"; retry later. `biggest_miss`
3753
+ * refers to `derived.biggest_miss`.
3754
+ */
3755
+ degraded_fields?: Array<"top_tokens" | "trading_style" | "deployer_breakdown" | "recent_trades" | "biggest_miss" | (string & {})>;
3133
3756
  _rid?: string;
3134
3757
  }
3135
3758
  export interface WalletPnlSummary {
@@ -3518,7 +4141,7 @@ export interface AlmostBondedResponse {
3518
4141
  note: string;
3519
4142
  _rid?: string;
3520
4143
  }
3521
- export type ApiTier = "BASIC" | "TRADER" | "PRO" | "ULTRA";
4144
+ export type ApiTier = "BASIC" | "TRADER" | "PRO" | "ULTRA" | "BUSINESS" | "ENTERPRISE";
3522
4145
  export interface MeQuotaWindow {
3523
4146
  limit: number;
3524
4147
  used: number;
@@ -3593,11 +4216,15 @@ export interface WalletEntry {
3593
4216
  label: string | null;
3594
4217
  added_at: string;
3595
4218
  }
4219
+ /** POST /wallet-tracker/watchlist (201) — the inserted row under `wallet`. */
3596
4220
  export interface WatchlistAddResponse {
3597
- wallet_address: string;
3598
- label: string | null;
3599
- added_at: string;
3600
- remaining: number;
4221
+ wallet: WalletEntry;
4222
+ _rid?: string;
4223
+ }
4224
+ /** PATCH /wallet-tracker/watchlist/{address} — the updated row under `wallet`. */
4225
+ export interface WatchlistUpdateResponse {
4226
+ wallet: WalletEntry;
4227
+ _rid?: string;
3601
4228
  }
3602
4229
  export interface WatchlistResponse {
3603
4230
  wallets: WalletEntry[];
@@ -3663,8 +4290,10 @@ export interface WalletTrackerSummaryResponse {
3663
4290
  wallets: WalletTrackerWalletStats[];
3664
4291
  period: string;
3665
4292
  }
4293
+ /** DELETE /wallet-tracker/watchlist/{address} — echoes the removed address. */
3666
4294
  export interface WalletTrackerDeleteResponse {
3667
- success: boolean;
4295
+ removed: string;
4296
+ _rid?: string;
3668
4297
  }
3669
4298
  export interface ToolsSearchParams {
3670
4299
  /** Full-text search query. */
@@ -3732,31 +4361,112 @@ export interface StreamSessionEvictResponse {
3732
4361
  id: string;
3733
4362
  _rid?: string;
3734
4363
  }
4364
+ /** Event types a webhook can subscribe to (`VALID_EVENTS`). Every event is PRO+. */
4365
+ export type WebhookEvent = "kol:trade" | "kol:coordination" | "deployer:alert" | "deployer:bond" | "wallet_tracker:event" | "sniper:deploy" | "rhc:kol_trade" | "token:surge" | "token:revival";
4366
+ export type WebhookConditionOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
4367
+ /** Custom filter condition — ULTRA/BUSINESS only (PRO gets 403). Max 10 per webhook. */
4368
+ export interface WebhookCondition {
4369
+ field: string;
4370
+ op: WebhookConditionOp;
4371
+ value: string | number | boolean | Array<string | number>;
4372
+ }
4373
+ /** Delivery filters. Named filters are validated against the subscribed `events` (400 when one does not apply). */
4374
+ export interface WebhookFilters {
4375
+ min_sol?: number;
4376
+ action?: "buy" | "sell";
4377
+ kol_name?: string;
4378
+ deployer_tier?: string[];
4379
+ min_kols?: number;
4380
+ /** token:surge / token:revival */
4381
+ kinds?: Array<"surge" | "revival">;
4382
+ tiers?: Array<"early" | "strong" | "breakout">;
4383
+ launchpads?: string[];
4384
+ exclude_flags?: string[];
4385
+ min_mc_usd?: number;
4386
+ max_mc_usd?: number;
4387
+ /** ULTRA/BUSINESS only. */
4388
+ conditions?: WebhookCondition[];
4389
+ }
3735
4390
  export interface WebhookCreateParams {
4391
+ /** Must be https://. */
3736
4392
  url: string;
3737
- events: string[];
3738
- filters?: Record<string, unknown>;
4393
+ events: WebhookEvent[];
4394
+ filters?: WebhookFilters;
3739
4395
  }
3740
4396
  export interface WebhookUpdateParams {
3741
4397
  url?: string;
3742
- events?: string[];
3743
- filters?: Record<string, unknown>;
3744
- status?: "active" | "paused";
4398
+ events?: WebhookEvent[];
4399
+ filters?: WebhookFilters;
4400
+ /** Pause (false) or resume (true). Resuming resets `consecutive_failures`. */
4401
+ is_active?: boolean;
4402
+ }
4403
+ export interface WebhookDeliverySummary {
4404
+ total_24h: number;
4405
+ success_24h: number;
4406
+ failed_24h: number;
4407
+ /** Percent, one decimal; 100 when there were no deliveries. */
4408
+ success_rate: number;
3745
4409
  }
3746
4410
  export interface Webhook {
3747
4411
  id: number;
3748
4412
  url: string;
3749
- events: string[];
3750
- filters: Record<string, unknown> | null;
3751
- status: string;
4413
+ events: WebhookEvent[];
4414
+ filters: WebhookFilters | null;
4415
+ is_active: boolean;
3752
4416
  created_at: string;
4417
+ /** On list / get. */
4418
+ last_delivered_at?: string | null;
4419
+ /** On list / get. */
4420
+ consecutive_failures?: number;
4421
+ /** On list only. */
4422
+ delivery_summary?: WebhookDeliverySummary;
3753
4423
  }
3754
4424
  export interface WebhookListResponse {
3755
4425
  webhooks: Webhook[];
3756
4426
  _rid?: string;
3757
4427
  }
4428
+ /** POST /webhooks (201) — the only response that carries `secret`. */
4429
+ export interface WebhookCreateResponse {
4430
+ webhook: Webhook & {
4431
+ secret: string;
4432
+ };
4433
+ note: string;
4434
+ _rid?: string;
4435
+ }
4436
+ export interface WebhookDelivery {
4437
+ event_type: string;
4438
+ status_code: number | null;
4439
+ response_time_ms: number | null;
4440
+ delivered_at: string;
4441
+ error: string | null;
4442
+ }
4443
+ /** GET /webhooks/{id} */
4444
+ export interface WebhookGetResponse {
4445
+ webhook: Webhook;
4446
+ recent_deliveries: WebhookDelivery[];
4447
+ _rid?: string;
4448
+ }
4449
+ /** PATCH /webhooks/{id} */
4450
+ export interface WebhookUpdateResponse {
4451
+ webhook: Pick<Webhook, "id" | "url" | "events" | "filters" | "is_active"> & {
4452
+ updated_at: string;
4453
+ };
4454
+ _rid?: string;
4455
+ }
3758
4456
  export interface WebhookDeleteResponse {
4457
+ deleted: boolean;
4458
+ _rid?: string;
4459
+ }
4460
+ /** POST /webhooks/test */
4461
+ export interface WebhookTestResponse {
3759
4462
  success: boolean;
4463
+ status_code?: number | null;
4464
+ response_time_ms: number;
4465
+ /** The event type that was sampled. */
4466
+ event?: string;
4467
+ /** Present when the delivery failed. */
4468
+ error?: string;
4469
+ _rid?: string;
3760
4470
  }
3761
4471
  export interface MadeOnSolConfig {
3762
4472
  /**
@@ -4116,6 +4826,15 @@ declare class TokenClient {
4116
4826
  * and at 1h/6h/24h/7d after bond.
4117
4827
  */
4118
4828
  peakHistory(mint: string): Promise<PeakHistoryResponse>;
4829
+ /**
4830
+ * The wallets that made (or lost) the most on a token, ranked by realized
4831
+ * PnL or ROI, each enriched with KOL identity and alpha-wallet reputation
4832
+ * (`bot_confidence`, historical win rate / PnL). `limit` PRO <= 25 /
4833
+ * ULTRA <= 100; `sort` "pnl" (default) | "roi"; `window_days` 1-180
4834
+ * (default 90); `min_bought_sol` default 0.1. PRO+.
4835
+ * `GET /tokens/{mint}/top-traders`
4836
+ */
4837
+ topTraders(mint: string, params?: TokenTopTradersParams): Promise<TokenTopTradersResponse>;
4119
4838
  /**
4120
4839
  * v2.25 — Token locks & vesting on a mint (`GET /tokens/{mint}/locks`): every
4121
4840
  * on-chain Streamflow stream, Jupiter Lock vesting escrow and Bonfida
@@ -4294,7 +5013,7 @@ declare class DeployerClient {
4294
5013
  * Full profile for a single deployer wallet.
4295
5014
  * @param wallet Solana wallet address.
4296
5015
  */
4297
- profile(wallet: string): Promise<DeployerProfile>;
5016
+ profile(wallet: string): Promise<DeployerProfileResponse>;
4298
5017
  /**
4299
5018
  * Tokens deployed by a specific wallet.
4300
5019
  * @param wallet Solana wallet address.
@@ -4388,7 +5107,7 @@ declare class WalletTrackerClient {
4388
5107
  * @param address Solana wallet address.
4389
5108
  * @param params label (string to set, null to clear).
4390
5109
  */
4391
- updateLabel(address: string, params: WatchlistUpdateParams): Promise<WalletEntry>;
5110
+ updateLabel(address: string, params: WatchlistUpdateParams): Promise<WatchlistUpdateResponse>;
4392
5111
  /**
4393
5112
  * Historical events (swaps + transfers) for all watched wallets.
4394
5113
  * BASIC: truncated wallets, no tx_signature, no counterparty.
@@ -4711,9 +5430,27 @@ export interface CopyTradeSubscription {
4711
5430
  sizing_amount: number;
4712
5431
  delivery_mode: CopyTradeDeliveryMode;
4713
5432
  webhook_url: string | null;
5433
+ /** Market-cap band (USD) on the source trade; `null` = no bound. */
5434
+ min_mc_usd?: number | null;
5435
+ max_mc_usd?: number | null;
4714
5436
  is_active: boolean;
4715
5437
  created_at: string;
4716
5438
  updated_at?: string;
5439
+ /**
5440
+ * Source wallets that are tracked KOL wallets (can produce signals), read at
5441
+ * response time. `null` when the tracking lookup failed (see `warnings`).
5442
+ * Server 2026-09-25 on; absent on older ones.
5443
+ */
5444
+ source_wallets_tracked?: string[] | null;
5445
+ /** Source wallets that are NOT tracked KOL wallets: they never produce a signal. */
5446
+ source_wallets_untracked?: string[] | null;
5447
+ /** Present when at least one wallet is untracked, or tracking could not be determined. */
5448
+ warnings?: CopyTradeRuleWarning[];
5449
+ }
5450
+ /** A non-fatal note on a copy-trade rule. The rule is saved unchanged. */
5451
+ export interface CopyTradeRuleWarning {
5452
+ code: "untracked_source_wallets" | "source_wallet_tracking_unavailable" | (string & {});
5453
+ message: string;
4717
5454
  }
4718
5455
  export interface CopyTradeCreateParams {
4719
5456
  name?: string;
@@ -4724,6 +5461,9 @@ export interface CopyTradeCreateParams {
4724
5461
  sizing_amount: number;
4725
5462
  delivery_mode?: CopyTradeDeliveryMode;
4726
5463
  webhook_url?: string;
5464
+ /** Market-cap band (USD, 0 to 1e12, min <= max) on the source trade's MC at trade time. When either bound is set, trades with an unknown MC are dropped. */
5465
+ min_mc_usd?: number | null;
5466
+ max_mc_usd?: number | null;
4727
5467
  }
4728
5468
  export interface CopyTradeUpdateParams {
4729
5469
  name?: string | null;
@@ -4735,12 +5475,17 @@ export interface CopyTradeUpdateParams {
4735
5475
  delivery_mode?: CopyTradeDeliveryMode;
4736
5476
  webhook_url?: string | null;
4737
5477
  is_active?: boolean;
5478
+ /** Pass `null` to clear an MC bound. */
5479
+ min_mc_usd?: number | null;
5480
+ max_mc_usd?: number | null;
4738
5481
  }
4739
5482
  export interface CopyTradeCreateResponse {
4740
5483
  subscription: CopyTradeSubscription;
4741
5484
  /** Returned ONCE on creation when `webhook_url` is set — store it to verify HMAC signatures. */
4742
5485
  webhook_secret: string | null;
4743
5486
  note?: string;
5487
+ /** Same as `subscription.warnings`, repeated at top level when present. */
5488
+ warnings?: CopyTradeRuleWarning[];
4744
5489
  }
4745
5490
  export interface CopyTradeSignal {
4746
5491
  id: number;
@@ -4873,13 +5618,15 @@ declare class WebhookClient {
4873
5618
  /** List all webhooks. */
4874
5619
  list(): Promise<WebhookListResponse>;
4875
5620
  /** Create a new webhook. */
4876
- create(params: WebhookCreateParams): Promise<Webhook>;
5621
+ create(params: WebhookCreateParams): Promise<WebhookCreateResponse>;
5622
+ /** One webhook plus its most recent deliveries. */
5623
+ get(id: number): Promise<WebhookGetResponse>;
4877
5624
  /** Update a webhook. */
4878
- update(id: number, params: WebhookUpdateParams): Promise<Webhook>;
5625
+ update(id: number, params: WebhookUpdateParams): Promise<WebhookUpdateResponse>;
4879
5626
  /** Delete a webhook. */
4880
5627
  delete(id: number): Promise<WebhookDeleteResponse>;
4881
5628
  /** Send a test payload to a webhook. */
4882
- test(webhookId: number): Promise<unknown>;
5629
+ test(webhookId: number, event?: WebhookEvent): Promise<WebhookTestResponse>;
4883
5630
  }
4884
5631
  /**
4885
5632
  * MadeOnSol API client.