madeonsol 2.31.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>;
@@ -2786,8 +3122,10 @@ export interface TokenSurgeStreamEvent {
2786
3122
  bonding_progress_pct: number | null;
2787
3123
  is_bonded: boolean | null;
2788
3124
  tape: TokenSurgeTape;
2789
- kol: TokenSurgeKol;
2790
- 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;
2791
3129
  deployer: TokenSurgeDeployer | null;
2792
3130
  /** Flat copies of `deployer.wallet` / `deployer.tier` (what the subscribe filter reads). */
2793
3131
  deployer_wallet: string | null;
@@ -3092,6 +3430,27 @@ export interface TradeCoverage {
3092
3430
  /** Present when `in_scope` is `false`/`null` (and always on `/risk`) —
3093
3431
  * human-readable explanation of what the coverage gap means. */
3094
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;
3095
3454
  }
3096
3455
  /** Back-compat alias — the honesty block is no longer trades-specific. */
3097
3456
  export type TokenTradesCoverage = TradeCoverage;
@@ -3381,6 +3740,19 @@ export interface WalletStatsResponse {
3381
3740
  /** v2.22.4 — trade-coverage disclosure; when `in_scope` is false an empty
3382
3741
  * `stats` block means "outside the write-gate", not "never traded". */
3383
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 & {})>;
3384
3756
  _rid?: string;
3385
3757
  }
3386
3758
  export interface WalletPnlSummary {
@@ -3769,7 +4141,7 @@ export interface AlmostBondedResponse {
3769
4141
  note: string;
3770
4142
  _rid?: string;
3771
4143
  }
3772
- export type ApiTier = "BASIC" | "TRADER" | "PRO" | "ULTRA";
4144
+ export type ApiTier = "BASIC" | "TRADER" | "PRO" | "ULTRA" | "BUSINESS" | "ENTERPRISE";
3773
4145
  export interface MeQuotaWindow {
3774
4146
  limit: number;
3775
4147
  used: number;
@@ -3844,11 +4216,15 @@ export interface WalletEntry {
3844
4216
  label: string | null;
3845
4217
  added_at: string;
3846
4218
  }
4219
+ /** POST /wallet-tracker/watchlist (201) — the inserted row under `wallet`. */
3847
4220
  export interface WatchlistAddResponse {
3848
- wallet_address: string;
3849
- label: string | null;
3850
- added_at: string;
3851
- 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;
3852
4228
  }
3853
4229
  export interface WatchlistResponse {
3854
4230
  wallets: WalletEntry[];
@@ -3914,8 +4290,10 @@ export interface WalletTrackerSummaryResponse {
3914
4290
  wallets: WalletTrackerWalletStats[];
3915
4291
  period: string;
3916
4292
  }
4293
+ /** DELETE /wallet-tracker/watchlist/{address} — echoes the removed address. */
3917
4294
  export interface WalletTrackerDeleteResponse {
3918
- success: boolean;
4295
+ removed: string;
4296
+ _rid?: string;
3919
4297
  }
3920
4298
  export interface ToolsSearchParams {
3921
4299
  /** Full-text search query. */
@@ -3983,31 +4361,112 @@ export interface StreamSessionEvictResponse {
3983
4361
  id: string;
3984
4362
  _rid?: string;
3985
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
+ }
3986
4390
  export interface WebhookCreateParams {
4391
+ /** Must be https://. */
3987
4392
  url: string;
3988
- events: string[];
3989
- filters?: Record<string, unknown>;
4393
+ events: WebhookEvent[];
4394
+ filters?: WebhookFilters;
3990
4395
  }
3991
4396
  export interface WebhookUpdateParams {
3992
4397
  url?: string;
3993
- events?: string[];
3994
- filters?: Record<string, unknown>;
3995
- 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;
3996
4409
  }
3997
4410
  export interface Webhook {
3998
4411
  id: number;
3999
4412
  url: string;
4000
- events: string[];
4001
- filters: Record<string, unknown> | null;
4002
- status: string;
4413
+ events: WebhookEvent[];
4414
+ filters: WebhookFilters | null;
4415
+ is_active: boolean;
4003
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;
4004
4423
  }
4005
4424
  export interface WebhookListResponse {
4006
4425
  webhooks: Webhook[];
4007
4426
  _rid?: string;
4008
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
+ }
4009
4456
  export interface WebhookDeleteResponse {
4457
+ deleted: boolean;
4458
+ _rid?: string;
4459
+ }
4460
+ /** POST /webhooks/test */
4461
+ export interface WebhookTestResponse {
4010
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;
4011
4470
  }
4012
4471
  export interface MadeOnSolConfig {
4013
4472
  /**
@@ -4367,6 +4826,15 @@ declare class TokenClient {
4367
4826
  * and at 1h/6h/24h/7d after bond.
4368
4827
  */
4369
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>;
4370
4838
  /**
4371
4839
  * v2.25 — Token locks & vesting on a mint (`GET /tokens/{mint}/locks`): every
4372
4840
  * on-chain Streamflow stream, Jupiter Lock vesting escrow and Bonfida
@@ -4545,7 +5013,7 @@ declare class DeployerClient {
4545
5013
  * Full profile for a single deployer wallet.
4546
5014
  * @param wallet Solana wallet address.
4547
5015
  */
4548
- profile(wallet: string): Promise<DeployerProfile>;
5016
+ profile(wallet: string): Promise<DeployerProfileResponse>;
4549
5017
  /**
4550
5018
  * Tokens deployed by a specific wallet.
4551
5019
  * @param wallet Solana wallet address.
@@ -4639,7 +5107,7 @@ declare class WalletTrackerClient {
4639
5107
  * @param address Solana wallet address.
4640
5108
  * @param params label (string to set, null to clear).
4641
5109
  */
4642
- updateLabel(address: string, params: WatchlistUpdateParams): Promise<WalletEntry>;
5110
+ updateLabel(address: string, params: WatchlistUpdateParams): Promise<WatchlistUpdateResponse>;
4643
5111
  /**
4644
5112
  * Historical events (swaps + transfers) for all watched wallets.
4645
5113
  * BASIC: truncated wallets, no tx_signature, no counterparty.
@@ -4962,9 +5430,27 @@ export interface CopyTradeSubscription {
4962
5430
  sizing_amount: number;
4963
5431
  delivery_mode: CopyTradeDeliveryMode;
4964
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;
4965
5436
  is_active: boolean;
4966
5437
  created_at: string;
4967
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;
4968
5454
  }
4969
5455
  export interface CopyTradeCreateParams {
4970
5456
  name?: string;
@@ -4975,6 +5461,9 @@ export interface CopyTradeCreateParams {
4975
5461
  sizing_amount: number;
4976
5462
  delivery_mode?: CopyTradeDeliveryMode;
4977
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;
4978
5467
  }
4979
5468
  export interface CopyTradeUpdateParams {
4980
5469
  name?: string | null;
@@ -4986,12 +5475,17 @@ export interface CopyTradeUpdateParams {
4986
5475
  delivery_mode?: CopyTradeDeliveryMode;
4987
5476
  webhook_url?: string | null;
4988
5477
  is_active?: boolean;
5478
+ /** Pass `null` to clear an MC bound. */
5479
+ min_mc_usd?: number | null;
5480
+ max_mc_usd?: number | null;
4989
5481
  }
4990
5482
  export interface CopyTradeCreateResponse {
4991
5483
  subscription: CopyTradeSubscription;
4992
5484
  /** Returned ONCE on creation when `webhook_url` is set — store it to verify HMAC signatures. */
4993
5485
  webhook_secret: string | null;
4994
5486
  note?: string;
5487
+ /** Same as `subscription.warnings`, repeated at top level when present. */
5488
+ warnings?: CopyTradeRuleWarning[];
4995
5489
  }
4996
5490
  export interface CopyTradeSignal {
4997
5491
  id: number;
@@ -5124,13 +5618,15 @@ declare class WebhookClient {
5124
5618
  /** List all webhooks. */
5125
5619
  list(): Promise<WebhookListResponse>;
5126
5620
  /** Create a new webhook. */
5127
- 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>;
5128
5624
  /** Update a webhook. */
5129
- update(id: number, params: WebhookUpdateParams): Promise<Webhook>;
5625
+ update(id: number, params: WebhookUpdateParams): Promise<WebhookUpdateResponse>;
5130
5626
  /** Delete a webhook. */
5131
5627
  delete(id: number): Promise<WebhookDeleteResponse>;
5132
5628
  /** Send a test payload to a webhook. */
5133
- test(webhookId: number): Promise<unknown>;
5629
+ test(webhookId: number, event?: WebhookEvent): Promise<WebhookTestResponse>;
5134
5630
  }
5135
5631
  /**
5136
5632
  * MadeOnSol API client.