madeonsol 4.5.0 → 4.6.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
@@ -171,6 +171,7 @@ export interface KolFeedResponse extends FreeTierDelayMeta {
171
171
  error: string;
172
172
  }>;
173
173
  _rid?: string;
174
+ data_contract?: DataContract;
174
175
  }
175
176
  export interface KolLeaderboardEntry {
176
177
  name?: string | null;
@@ -200,6 +201,23 @@ export interface KolLeaderboardEntry {
200
201
  entry_mc_samples?: number | null;
201
202
  /** Average entry market cap (USD) over the period; null when unknown. */
202
203
  avg_entry_mc_usd?: number | null;
204
+ strategy_tag_source?: "classifier_076" | "fifo_auto_v2" | "in_window_auto_512" | null;
205
+ auto_strategy_tag_source?: "fifo_auto_v2" | "in_window_auto_512";
206
+ /** `fifo_full_history` = win_rate is the full-history FIFO win rate. Absent = the in-window leaderboard win rate. */
207
+ win_rate_method?: "fifo_full_history" | "unavailable";
208
+ /** `not_computed_for_period` = the FIFO win rate exists for 7d and 30d only (win_rate null for other periods). */
209
+ win_rate_status?: KolWinrateStatus | "not_computed_for_period";
210
+ win_rate_window?: "7d" | "30d" | null;
211
+ win_rate_rule_version?: string | null;
212
+ win_rate_computed_at?: string | null;
213
+ /** Win-rate denominator for win_rate_window. */
214
+ closed_positions_known?: number | null;
215
+ /** Closed positions with an unproven realization in win_rate_window (not in the denominator). */
216
+ unknown_realizations_winrate?: number | null;
217
+ /** (KOL, token) positions with a sell of unknown proceeds, excluded from realized PnL / win rate / ROI. */
218
+ unknown_realizations?: number;
219
+ unknown_proceeds_sells?: number;
220
+ incomplete_reasons?: Array<"proceeds_unattributed" | (string & {})>;
203
221
  }
204
222
  export interface KolLeaderboardPagination {
205
223
  limit: number;
@@ -253,6 +271,8 @@ export interface KolPnlByToken {
253
271
  mint?: string;
254
272
  /** @deprecated Never sent by the API — use `pnl` (SOL). */
255
273
  realized_pnl_usd?: number;
274
+ /** Sells with unknown proceeds on this token. */
275
+ unknown_proceeds_sells?: number;
256
276
  }
257
277
  /** `recent_winners` / `recent_losers` row on `GET /kol/{wallet}`. */
258
278
  export interface KolWalletClosedToken {
@@ -699,6 +719,21 @@ export interface TokenTopTrader {
699
719
  historical_win_rate: number | null;
700
720
  historical_pnl_sol: number | null;
701
721
  historical_tokens: number | null;
722
+ /** `known` / `partial` (some sells unattributed) / `unknown` (every sell unattributed: unknown, not a loss). */
723
+ realized_status?: "known" | "partial" | "unknown";
724
+ /** Sells whose proceeds went to another wallet. 0 when complete. */
725
+ unattributed_sells?: number;
726
+ /** Cost basis consumed by unattributed sells; not in realized_pnl_sol or ROI. */
727
+ unknown_realized_cost_basis_sol?: number;
728
+ /** FIFO only: trades whose SOL consideration is unknown. Null under average_cost. */
729
+ unknown_consideration_trades?: number | null;
730
+ /** FIFO only: tokens sold out of lots bought with unknown consideration. Null under average_cost. */
731
+ unknown_cost_tokens_sold?: number | null;
732
+ /** FIFO only: open tokens bought with unknown consideration (unrealized/total PnL then null). Null under average_cost. */
733
+ open_unknown_cost_tokens?: number | null;
734
+ cost_basis_evidence?: "verified" | "inferred" | "unknown";
735
+ /** `inferred` = still_holding from the open FIFO position (no balance read); never `verified` here. */
736
+ holding_evidence?: "verified" | "inferred" | "unknown";
702
737
  }
703
738
  export interface TokenTopTradersResponse {
704
739
  mint: string;
@@ -718,6 +753,9 @@ export interface TokenTopTradersResponse {
718
753
  * list means "outside the write-gate", not "nobody traded". */
719
754
  coverage?: TradeCoverage;
720
755
  _rid?: string;
756
+ data_contract?: DataContract;
757
+ /** Empty when complete. */
758
+ incomplete_reasons?: PnlIncompleteReason[];
721
759
  }
722
760
  export interface CoordinationHistoryParams {
723
761
  limit?: number;
@@ -981,6 +1019,10 @@ export interface HotToken {
981
1019
  entry_rank_avg?: number | null;
982
1020
  unique_strategies?: number | null;
983
1021
  strategies?: string[] | null;
1022
+ /** KOL sells whose SOL proceeds are unknown, left out of total_sell_sol and net flow (never 0 SOL). Null = not measured. */
1023
+ unknown_proceeds_sells?: number | null;
1024
+ /** False when unknown_proceeds_sells > 0 (real sell volume is higher). Null = not measured. */
1025
+ sell_sol_complete?: boolean | null;
984
1026
  }
985
1027
  export interface KolHotTokensResponse {
986
1028
  hot_tokens: HotToken[];
@@ -1014,6 +1056,8 @@ export interface KolPnlCurvePoint {
1014
1056
  day_pnl: number;
1015
1057
  cumulative_pnl: number;
1016
1058
  trades: number;
1059
+ /** Sells with unknown proceeds on this day. */
1060
+ unknown_sells?: number;
1017
1061
  }
1018
1062
  export interface KolClosedPosition {
1019
1063
  token_mint: string;
@@ -1029,6 +1073,9 @@ export interface KolClosedPosition {
1029
1073
  result: "win" | "loss";
1030
1074
  first_trade: string;
1031
1075
  last_trade: string;
1076
+ /** `unknown` = a sell of this position has unknown proceeds. */
1077
+ realization_status?: "known" | "unknown";
1078
+ unknown_proceeds_sells?: number;
1032
1079
  }
1033
1080
  export interface KolOpenPosition {
1034
1081
  token_mint: string;
@@ -1055,6 +1102,12 @@ export interface KolPnlResponse {
1055
1102
  closed_positions?: KolClosedPosition[] | null;
1056
1103
  open_positions?: KolOpenPosition[] | null;
1057
1104
  period: string;
1105
+ /** Sells with unknown proceeds in the window. 0 when complete. */
1106
+ unknown_proceeds_sells?: number;
1107
+ /** Positions with a sell of unknown proceeds, excluded from realized PnL / win rate / ROI. 0 when complete. */
1108
+ unknown_realizations?: number;
1109
+ /** Empty when complete. */
1110
+ incomplete_reasons?: Array<"proceeds_unattributed" | (string & {})>;
1058
1111
  }
1059
1112
  export interface KolTrendingParams {
1060
1113
  /** Time period. Default: "1h". Sub-hour periods (5m/15m/30m) require PRO/ULTRA. */
@@ -1236,6 +1289,41 @@ export interface KolCompareProfile {
1236
1289
  percentile_pnl_30d?: number | null;
1237
1290
  percentile_winrate_30d?: number | null;
1238
1291
  percentile_early_entry_30d?: number | null;
1292
+ /** Where strategy_tag comes from: `classifier_076` = the roster classifier; otherwise the auto tag and its method. */
1293
+ strategy_tag_source?: "classifier_076" | "fifo_auto_v2" | "in_window_auto_512" | null;
1294
+ /** `fifo_auto_v2` = median hold of known FIFO lots; `in_window_auto_512` = first buy to first sell per token in 30 days. */
1295
+ auto_strategy_tag_source?: "fifo_auto_v2" | "in_window_auto_512";
1296
+ /** `fifo_full_history` = full-history FIFO; `unavailable` = no FIFO computation within 2 h (winrate_* null, never 0). Absent = the in-window method. */
1297
+ winrate_method?: "fifo_full_history" | "unavailable";
1298
+ winrate_rule_version?: string | null;
1299
+ winrate_definition?: string;
1300
+ /** When the FIFO win rate was computed (at most 2 h before it is served). */
1301
+ winrate_computed_at?: string | null;
1302
+ /** Minimum known closed positions before a win rate is published. */
1303
+ winrate_min_known?: number;
1304
+ /** Status of winrate_30d. */
1305
+ winrate_status?: KolWinrateStatus;
1306
+ winrate_status_7d?: KolWinrateStatus;
1307
+ winrate_status_30d?: KolWinrateStatus;
1308
+ /** Win-rate denominator: completed buy lots whose realization is proven. */
1309
+ closed_positions_known_7d?: number;
1310
+ closed_positions_known_30d?: number;
1311
+ /** All completed buy lots: known + unknown realizations. */
1312
+ closed_positions_all_7d?: number;
1313
+ closed_positions_all_30d?: number;
1314
+ /** Closed positions whose realization is unproven: never a win or loss, not in the denominator. */
1315
+ unknown_realizations_7d?: number;
1316
+ unknown_realizations_30d?: number;
1317
+ /** Per reason: opening_inventory_unproven / consideration_unknown / closure_unproven. */
1318
+ unknown_by_reason_30d?: Record<string, number> | null;
1319
+ /** Positions excluded from pnl_7d for unknown proceeds. */
1320
+ pnl_unknown_realizations_7d?: number;
1321
+ /** (KOL, token) positions with a sell of unknown proceeds, excluded from realized PnL / win rate / ROI. */
1322
+ unknown_realizations?: number;
1323
+ /** KOL sells with unknown proceeds in the window. 0 when complete. */
1324
+ unknown_proceeds_sells?: number;
1325
+ /** Empty when complete. */
1326
+ incomplete_reasons?: Array<"proceeds_unattributed" | (string & {})>;
1239
1327
  }
1240
1328
  export interface KolCompareOverlapToken {
1241
1329
  token_mint: string;
@@ -1585,6 +1673,7 @@ export interface DeployerProfileResponse {
1585
1673
  /** PRO+ capital intelligence; absent when disabled. */
1586
1674
  capital_intelligence?: Record<string, unknown>;
1587
1675
  _rid?: string;
1676
+ data_contract?: DataContract;
1588
1677
  }
1589
1678
  /** @deprecated Not what GET /deployer-hunter/{wallet} returns — use {@link DeployerProfileResponse}. Kept for source compatibility. */
1590
1679
  export interface DeployerProfile {
@@ -2090,6 +2179,10 @@ export interface AlphaWalletEntry {
2090
2179
  buy_size_stddev?: number;
2091
2180
  active_hours?: number | null;
2092
2181
  bot_confidence?: string | null;
2182
+ /** Early-buyer pairs whose realization is unknown (unattributed sell): excluded from win_rate, net_pnl_sol and roi. Null before migration 511. */
2183
+ unknown_realizations?: number | null;
2184
+ /** SOL bought on those unknown-realization pairs, left out of net_pnl_sol and roi (neither a loss nor a gain). */
2185
+ unknown_cost_basis_sol?: number | null;
2093
2186
  }
2094
2187
  export interface AlphaLeaderboardResponse {
2095
2188
  leaderboard: AlphaWalletEntry[];
@@ -2135,10 +2228,16 @@ export interface AlphaWalletSummary {
2135
2228
  night_only_activity: boolean;
2136
2229
  }
2137
2230
  export interface AlphaWalletResponse {
2138
- wallet: string;
2231
+ /** @deprecated Not returned by the API. */
2232
+ wallet?: string;
2139
2233
  summary: AlphaWalletSummary;
2140
- positions: AlphaWalletPosition[];
2141
- bot_signals: AlphaWalletBotSignal[];
2234
+ /** @deprecated Not returned by the API; use `tokens`. */
2235
+ positions?: AlphaWalletPosition[];
2236
+ /** @deprecated Not returned at this level. */
2237
+ bot_signals?: AlphaWalletBotSignal[];
2238
+ /** Early-buyer tokens of this wallet (the array the API returns). */
2239
+ tokens?: AlphaWalletToken[];
2240
+ coverage?: TradeCoverage;
2142
2241
  }
2143
2242
  export interface AlphaLinkedWallet {
2144
2243
  wallet_address: string;
@@ -2188,6 +2287,8 @@ export interface AlphaCapTableBuyer {
2188
2287
  swarm_5plus_pct: number | null;
2189
2288
  scout_tier: "S" | "A" | "B" | "C" | null;
2190
2289
  } | null;
2290
+ /** `unknown_consideration` = the first buy settled in a quote we cannot price; first_buy_sol is then null (never 0). */
2291
+ first_buy_sol_status?: "measured" | "unknown_consideration";
2191
2292
  }
2192
2293
  /** A wallet's current balance of one mint, read from chain (`getTokenAccountsByOwner`). `amount_raw` is a u64 decimal string. */
2193
2294
  export interface BalanceNow {
@@ -2641,6 +2742,18 @@ export interface TokenBundleShareResponse {
2641
2742
  as_of: string;
2642
2743
  note?: string;
2643
2744
  _rid?: string;
2745
+ /** Names what bundled_pct_of_supply_now measures: the broad same-slot / same-block heuristic. */
2746
+ bundled_pct_basis?: "same_slot_heuristic" | "same_block_heuristic";
2747
+ /** RATIO in [0, 1]: the STRICT measure, a proven lower bound (launch bundle + same-transaction buyers). */
2748
+ strict_bundle_pct_of_supply_now?: number | null;
2749
+ strict_bundle?: StrictBundle;
2750
+ /** True only when every cluster in the window was read. */
2751
+ clusters_complete?: boolean;
2752
+ /** Most clusters read per request (200) on the older read; null when wallet_set.source is token_bundle_wallet_set. */
2753
+ clusters_limit?: number | null;
2754
+ wallet_set?: BundleWalletSet;
2755
+ /** `per_wallet`, `census` (one holders census at one slot) or `none` (wallet set incomplete, nothing read). */
2756
+ balance_method?: "per_wallet" | "census" | "none";
2644
2757
  }
2645
2758
  /** Filters for the `token:bundles` WS channel (all optional, AND-combined; invalid values reject the channel). */
2646
2759
  export interface TokenBundlesFilters {
@@ -2908,6 +3021,9 @@ export interface TokenHoldersResponse {
2908
3021
  source: TokenHoldersSource;
2909
3022
  /** Only with `include_wallet_flags: true`. */
2910
3023
  wallet_flags_meta?: WalletFlagsMeta;
3024
+ data_contract?: DataContract;
3025
+ /** Present only when your tier withheld rows the next tier would disclose. */
3026
+ upgrade_hint?: UpgradeHint;
2911
3027
  }
2912
3028
  /** Locker program a contract lives under. LP locks are NOT covered (token / vesting locks only). */
2913
3029
  export type TokenLockProgram = "streamflow" | "jupiter_lock" | "bonfida_vesting" | "smithii_vesting" | "sablier_lockup";
@@ -4180,6 +4296,12 @@ export interface CandlesResponse {
4180
4296
  history_clamped?: boolean;
4181
4297
  /** true = the whole requested window is older than the plan floor (200 with no candles). */
4182
4298
  history_outside_plan?: boolean;
4299
+ /** `none`: only stored candles are returned; missing buckets are absent, never synthesized. */
4300
+ gap_fill?: "none";
4301
+ /** Start of the bucket containing as_of: candles at or after it are still open. */
4302
+ open_bucket_start?: string;
4303
+ /** False when the per-candle quality lookup failed (null quality = not checked). */
4304
+ quality_checked?: boolean;
4183
4305
  }
4184
4306
  export type TokenFlowWindow = "1h" | "24h";
4185
4307
  export interface TokenFlowParams {
@@ -4219,6 +4341,14 @@ export interface TokenTradesParams {
4219
4341
  since?: number;
4220
4342
  /** Unix epoch seconds — default now. */
4221
4343
  until?: number;
4344
+ /** `committed` = rows in storage order, resumable with `next_committed_cursor` (default `block_time`). */
4345
+ order?: "block_time" | "committed";
4346
+ /** `order=committed` only: `next_committed_cursor` of the previous page, unchanged. */
4347
+ committed_cursor?: string;
4348
+ /** `order=committed` only: Unix milliseconds start (default now - 1 h, at most 48 h back). */
4349
+ committed_since?: number;
4350
+ /** `order=committed` only: 60-172800 s (default 86400), how much older than its storage time a row may be and still be covered. */
4351
+ lookback_s?: number;
4222
4352
  }
4223
4353
  export interface TokenTrade {
4224
4354
  tx_signature: string;
@@ -4251,6 +4381,19 @@ export interface TokenTrade {
4251
4381
  /** Solana block time (Unix seconds). */
4252
4382
  block_time: number;
4253
4383
  traded_at: string;
4384
+ /** `order=committed` only: when the row was stored (insert time, microseconds). */
4385
+ committed_at?: string;
4386
+ /** `order=committed` only: committed_at - block_time in milliseconds. */
4387
+ late_by_ms?: number | null;
4388
+ /** `order=committed` only: true when late_by_ms > 60000 (never a live frame). */
4389
+ late?: boolean | null;
4390
+ /** When mc-tracker measured market_price_*; null = not recorded for this row. */
4391
+ market_price_observed_at?: string | null;
4392
+ market_price_observed_at_status?: "observed" | "not_recorded" | "not_applicable";
4393
+ /** `mc_tracker` when market_price_observed_at is set; null when we cannot tell. */
4394
+ market_price_source?: "mc_tracker" | null;
4395
+ /** `last_measured_market_price` = the token's last measured price, NOT the price at this trade. */
4396
+ market_price_semantics?: "last_measured_market_price" | null;
4254
4397
  }
4255
4398
  export interface TokenTradesFilters {
4256
4399
  action: "buy" | "sell" | null;
@@ -4307,6 +4450,11 @@ export interface TokenTradesResponse {
4307
4450
  filters: TokenTradesFilters;
4308
4451
  coverage: TokenTradesCoverage;
4309
4452
  _rid?: string;
4453
+ data_contract?: DataContract;
4454
+ /** `order=committed` only: the bounds of this page. */
4455
+ committed?: TokenTradesCommitted;
4456
+ /** `order=committed` only: always present; pass it back as `committed_cursor`. */
4457
+ next_committed_cursor?: string;
4310
4458
  }
4311
4459
  export interface TokenDepthParams {
4312
4460
  /** SOL buy sizes to quote — CSV string (`"0.5,1,5,10"`) or an array of
@@ -4550,6 +4698,11 @@ export interface WalletTopToken {
4550
4698
  current_mc_usd: number | null;
4551
4699
  peak_mc_usd: number | null;
4552
4700
  last_traded_at: string;
4701
+ realized_status?: "known" | "partial" | "unknown";
4702
+ /** Sells whose proceeds went to another wallet. 0 when complete. */
4703
+ unattributed_sells?: number;
4704
+ /** Cost basis consumed by unattributed sells; not in realized_pnl_sol. */
4705
+ unknown_realized_cost_basis_sol?: number;
4553
4706
  }
4554
4707
  export interface WalletTradingStyle {
4555
4708
  total_trades: number;
@@ -4646,6 +4799,14 @@ export interface WalletStatsResponse {
4646
4799
  */
4647
4800
  degraded_fields?: Array<"top_tokens" | "trading_style" | "deployer_breakdown" | "recent_trades" | "biggest_miss" | (string & {})>;
4648
4801
  _rid?: string;
4802
+ /** `fresh` / `stale` (last complete result, at most 5 min old) / `unavailable`. */
4803
+ stats_status?: "fresh" | "stale" | "unavailable";
4804
+ /** When the served stats were computed. Null when stats_status is unavailable. */
4805
+ stats_computed_at?: string | null;
4806
+ /** Fixed sentence on the known-basis PnL rule. */
4807
+ pnl_basis_note?: string;
4808
+ /** Empty when complete. */
4809
+ incomplete_reasons?: PnlIncompleteReason[];
4649
4810
  }
4650
4811
  export interface WalletPnlSummary {
4651
4812
  realized_sol: number;
@@ -4697,6 +4858,10 @@ export interface WalletClosedPosition {
4697
4858
  result: "win" | "loss" | "breakeven";
4698
4859
  first_trade: string | null;
4699
4860
  last_trade: string | null;
4861
+ /** `partial` = some disposals unknown (pnl_sol is the known part); `unknown` = only unknown disposals. */
4862
+ realized_status?: "known" | "partial" | "unknown";
4863
+ /** Cost basis of lots consumed by unknown disposals; not in pnl_sol. */
4864
+ unknown_realized_cost_basis_sol?: number;
4700
4865
  }
4701
4866
  export interface WalletOpenPosition {
4702
4867
  token_mint: string;
@@ -4720,6 +4885,8 @@ export interface WalletOpenPosition {
4720
4885
  cost_basis_status?: "known" | "partial";
4721
4886
  /** Present (non-null) only when `holding_status` is `verified`. */
4722
4887
  holding?: WalletPositionHolding | null;
4888
+ /** `scope=recent` answers that do not cover the full window: the pre-scope cost basis is unknown, never 0. */
4889
+ pre_scope_cost_basis?: "unknown";
4723
4890
  }
4724
4891
  /** 2026-10: proven on-chain holding for one swap-derived position. */
4725
4892
  export interface WalletPositionHolding {
@@ -4780,6 +4947,17 @@ export interface WalletPnlResponse {
4780
4947
  * built from zero covered trades, not that the wallet never traded. */
4781
4948
  coverage?: TradeCoverage;
4782
4949
  _rid?: string;
4950
+ data_contract?: DataContract;
4951
+ /** Empty when complete. */
4952
+ incomplete_reasons?: PnlIncompleteReason[];
4953
+ /** `scope=recent` only: true when no older trade exists in the window. */
4954
+ covers_full_window?: boolean;
4955
+ /** `scope=recent` only. */
4956
+ trade_cap?: number;
4957
+ /** `scope=recent` only: trades this PnL was computed from (at most trade_cap). */
4958
+ trades_used?: number;
4959
+ /** `scope=recent` only: why older trades were not read. */
4960
+ truncated_by?: "trade_cap" | "time_budget" | null;
4783
4961
  }
4784
4962
  export interface WalletPositionsResponse {
4785
4963
  address: string;
@@ -4798,6 +4976,8 @@ export interface WalletPositionsResponse {
4798
4976
  /** v2.22.4 — trade-coverage disclosure (additive). */
4799
4977
  coverage?: TradeCoverage;
4800
4978
  _rid?: string;
4979
+ /** Empty when complete. */
4980
+ incomplete_reasons?: PnlIncompleteReason[];
4801
4981
  }
4802
4982
  export interface WalletHoldingsParams {
4803
4983
  /** 1–500, default 200. */
@@ -4877,6 +5057,13 @@ export interface WalletTrade {
4877
5057
  market_price_usd: number | null;
4878
5058
  block_time: number;
4879
5059
  traded_at: string;
5060
+ /** When mc-tracker measured market_price_*; null = not recorded for this row. */
5061
+ market_price_observed_at?: string | null;
5062
+ market_price_observed_at_status?: "observed" | "not_recorded" | "not_applicable";
5063
+ /** `mc_tracker` when market_price_observed_at is set; null when we cannot tell. */
5064
+ market_price_source?: "mc_tracker" | null;
5065
+ /** `last_measured_market_price` = the token's last measured price, NOT the price at this trade. */
5066
+ market_price_semantics?: "last_measured_market_price" | null;
4880
5067
  }
4881
5068
  export interface WalletTradesFilters {
4882
5069
  action: "buy" | "sell" | null;
@@ -4985,6 +5172,10 @@ export interface TokenResponseBody {
4985
5172
  token_supply_burn_detected?: boolean | null;
4986
5173
  /** LP-burn evidence. Only "verified" means the LP was proven burnt. */
4987
5174
  lp_burn_status?: LpBurnStatus;
5175
+ /** Why vwap_price_usd / vwap_price_sol are null, or `ok`. A VWAP more than 1000x from the price is withheld. */
5176
+ vwap_status?: "ok" | "unavailable" | "no_price_reference" | "implausible_vs_price";
5177
+ /** Per-token data contract (on `token.batch()` items). */
5178
+ data_contract?: DataContract;
4988
5179
  }
4989
5180
  /** LP-burn evidence: only "verified" means proven; "unknown" is the honest default. */
4990
5181
  export type LpBurnStatus = "verified" | "not_verified" | "unknown";
@@ -5013,6 +5204,9 @@ export interface TokenResponse {
5013
5204
  /** Includes that were requested. */
5014
5205
  included?: string[];
5015
5206
  _rid?: string;
5207
+ data_contract?: DataContract;
5208
+ /** Only with `include=flow_24h` on ULTRA+. */
5209
+ flow_24h?: TokenFlow24h;
5016
5210
  }
5017
5211
  export interface TokenBatchResponse {
5018
5212
  tokens: TokenResponseBody[];
@@ -5941,6 +6135,313 @@ export interface MadeOnSolConfig {
5941
6135
  */
5942
6136
  apiKey: string;
5943
6137
  }
6138
+ /**
6139
+ * `data_contract`: which data state an answer reflects. `source_as_of` is the
6140
+ * newest source observation behind the answer, `ingest_watermark` how far our
6141
+ * writer has committed; each comes with an evidence class (never guessed).
6142
+ */
6143
+ export interface DataContract {
6144
+ version?: "sol-token-trades.v1" | "rhc-trades.v1" | "sol-holders.v1" | "rhc-holders.v1" | "sol-wallet-pnl.v1" | "rhc-wallet-pnl.v1" | "sol-kol-feed.v1" | "sol-token.v1" | "sol-deployer.v1" | (string & {});
6145
+ /** When this block was assembled (ISO 8601). */
6146
+ assembled_at?: string;
6147
+ source_as_of?: string | null;
6148
+ source_as_of_evidence?: "verified" | "inferred" | "unknown";
6149
+ source_as_of_basis?: string;
6150
+ source_cursor?: {
6151
+ position?: number;
6152
+ unit?: "slot" | "block";
6153
+ } | null;
6154
+ ingest_watermark?: DataContractIngestWatermark | null;
6155
+ ingest_watermark_status?: "measured" | "stale" | "unmeasured" | "not_applicable";
6156
+ ingest_watermark_evidence?: "verified" | "inferred" | "unknown";
6157
+ ingest_note?: string;
6158
+ method?: {
6159
+ name?: string;
6160
+ version?: string | null;
6161
+ };
6162
+ coverage?: {
6163
+ price_source?: string | null;
6164
+ price_age_seconds?: number | null;
6165
+ price_is_stale?: boolean | null;
6166
+ last_trade_at?: string | null;
6167
+ data_status?: Record<string, unknown> | null;
6168
+ see?: string[];
6169
+ };
6170
+ evidence?: {
6171
+ price?: "verified" | "inferred" | "unknown";
6172
+ };
6173
+ }
6174
+ /** Writer checkpoint behind `DataContract.ingest_watermark`. */
6175
+ export interface DataContractIngestWatermark {
6176
+ source?: "signal_recovery_checkpoints" | "rhc_holder_fold" | "holder_index" | (string & {});
6177
+ collector?: string;
6178
+ stream?: string;
6179
+ position?: number;
6180
+ position_unit?: "slot" | "block";
6181
+ position_time?: string | null;
6182
+ recorded_at?: string | null;
6183
+ recorded_age_seconds?: number | null;
6184
+ semantics?: string;
6185
+ fresh_within_seconds?: number;
6186
+ writer_state?: {
6187
+ head_block?: number | null;
6188
+ lag_blocks?: number | null;
6189
+ binding?: string | null;
6190
+ open_loss_owed_ranges?: number | null;
6191
+ lowest_open_loss_owed_block?: number | null;
6192
+ } | null;
6193
+ }
6194
+ /** Why a figure is missing from a PnL answer. Empty array = complete. */
6195
+ export type PnlIncompleteReason = "proceeds_unattributed" | "unknown_consideration" | "missing_cost_basis" | "time_budget" | "scope_recent" | (string & {});
6196
+ /** Win-rate status (KOL compare / leaderboard). Null win rate unless `available` or `partial`. */
6197
+ export type KolWinrateStatus = "available" | "partial" | "insufficient_sample" | "no_known_positions" | "no_closed_positions" | "unavailable" | (string & {});
6198
+ /** `flow_24h` on `GET /token/{mint}?include=flow_24h` (ULTRA+): 24 h organic buy/sell split from the 1-minute candle tape. */
6199
+ export interface TokenFlow24h {
6200
+ status?: "ok" | "no_candles" | "incomplete" | "unavailable";
6201
+ source?: "candle_tape_1m";
6202
+ window_from?: string;
6203
+ window_to?: string;
6204
+ buy_volume_usd?: number | null;
6205
+ sell_volume_usd?: number | null;
6206
+ net_flow_usd?: number | null;
6207
+ /** MEV volume, separate and not side-split. */
6208
+ mev_volume_usd?: number | null;
6209
+ buys?: number | null;
6210
+ sells?: number | null;
6211
+ candle_hours?: number;
6212
+ }
6213
+ /** `upgrade_hint`: present only when your tier withheld rows the next tier would disclose. */
6214
+ export interface UpgradeHint {
6215
+ feature: string;
6216
+ tier: "ULTRA" | "BUSINESS";
6217
+ note: string;
6218
+ checkout: string;
6219
+ }
6220
+ /** `strict_bundle` on `GET /tokens/{mint}/bundle-share`: how the strict, proven-lower-bound measure was computed. */
6221
+ export interface StrictBundle {
6222
+ definition?: "launch_bundle_plus_same_transaction_buyers";
6223
+ basis?: "proven_lower_bound";
6224
+ funding_evidence_since?: string;
6225
+ status?: "ok" | "unavailable" | "timeout" | "error" | "not_supported";
6226
+ complete?: boolean;
6227
+ incomplete_reason?: string | null;
6228
+ wallets?: {
6229
+ total?: number | null;
6230
+ launch_cohort_wallets?: number | null;
6231
+ linked_cluster_wallets?: number | null;
6232
+ verified?: number | null;
6233
+ holding?: number | null;
6234
+ };
6235
+ evidence?: {
6236
+ same_transaction_wallets?: number;
6237
+ identical_amount_wallets?: number | null;
6238
+ funding_link_wallets?: number | null;
6239
+ } | null;
6240
+ funding_context?: {
6241
+ strict_wallets_with_funding_link_to_strict?: number;
6242
+ funding_evidence_since?: string;
6243
+ } | null;
6244
+ /** Raw token units as a decimal string. */
6245
+ tokens_held_raw?: string | null;
6246
+ /** RATIO in [0, 1]. */
6247
+ held_pct_of_supply?: number | null;
6248
+ note?: string;
6249
+ }
6250
+ /** `wallet_set` on `GET /tokens/{mint}/bundle-share`: where the bundle wallet set came from. */
6251
+ export interface BundleWalletSet {
6252
+ source?: "token_bundle_wallet_set" | "token_bundle_clusters";
6253
+ wallet_cap?: number | null;
6254
+ incomplete_reason?: "clusters_truncated" | "cluster_wallets_truncated" | "wallet_set_truncated" | null;
6255
+ active_slots?: number | null;
6256
+ }
6257
+ /** `committed` on `GET /tokens/{mint}/trades?order=committed`: the bounds of this page. */
6258
+ export interface TokenTradesCommitted {
6259
+ horizon_at?: string | null;
6260
+ horizon_lag_ms?: number | null;
6261
+ horizon_reason?: "settle" | "open_writer" | "coverage_unknown";
6262
+ horizon_detail?: string | null;
6263
+ status?: "ok" | "stalled" | "horizon_unavailable";
6264
+ settle_s?: number;
6265
+ lookback_s?: number;
6266
+ max_catchup_s?: number;
6267
+ block_time_from?: number;
6268
+ late_threshold_ms?: number;
6269
+ dedupe_key?: string;
6270
+ note?: string;
6271
+ }
6272
+ /** Signal products in the signal inbox. */
6273
+ export type SignalInboxProduct = "coordination" | "copytrade" | "rhc_coordination" | "rhc_copytrade";
6274
+ /** Query for `signalInbox()`. */
6275
+ export interface SignalInboxParams {
6276
+ /** Comma list (or array) of products (default all four). The ack scope is this set. */
6277
+ products?: SignalInboxProduct[] | string;
6278
+ /** `next_cursor` of a previous page (bound to its product set), or the literal `"acked"` to resume from your acknowledged position. */
6279
+ cursor?: string;
6280
+ /** ISO 8601 start without a cursor (default 7 days ago). Not combinable with `cursor`. */
6281
+ since?: string;
6282
+ /** 1-500 (default 100). */
6283
+ limit?: number;
6284
+ }
6285
+ /** One signal in the inbox. Deduplicate on `delivery_id` (delivery is at least once). */
6286
+ export interface SignalInboxItem {
6287
+ /** `<product>:<id>`; the same key as on the WS frame and the webhook (body + X-MadeOnSol-Delivery-Id). */
6288
+ delivery_id: string;
6289
+ /** Numeric signal row id, as on the WS frame. */
6290
+ signal_id: number;
6291
+ product: SignalInboxProduct;
6292
+ /** UTC, microsecond precision. */
6293
+ fired_at: string;
6294
+ /** Coordination products: the rule id. */
6295
+ rule_id?: string;
6296
+ /** Copy-trade products: the subscription id. */
6297
+ subscription_id?: string;
6298
+ /** Server-side push result (WS write or webhook 2xx), never proof that your client received it. */
6299
+ delivery?: {
6300
+ pushed?: boolean;
6301
+ push_error?: "ws_not_connected" | "ws_not_subscribed" | "ws_replay_dropped" | "ws_failed" | "webhook_no_secret" | "webhook_failed" | null;
6302
+ };
6303
+ /** The signal row's own fields (same as the WS frame / webhook payload). */
6304
+ data?: Record<string, unknown>;
6305
+ }
6306
+ /** `GET /signals/inbox` (PRO+). */
6307
+ export interface SignalInboxResponse {
6308
+ products: SignalInboxProduct[];
6309
+ scope: string;
6310
+ signals: SignalInboxItem[];
6311
+ next_cursor: string | null;
6312
+ /** Exact: true only when another row exists after this page. */
6313
+ has_more: boolean;
6314
+ acked_cursor: string | null;
6315
+ /** Per product (coordination 30, copytrade 7, rhc_coordination 30, rhc_copytrade 7 days). */
6316
+ retention_days?: Record<string, number | null>;
6317
+ retained_from?: string | null;
6318
+ /** The window starts before what a selected product still keeps: older signals may have been pruned. */
6319
+ start_before_retention?: boolean;
6320
+ }
6321
+ /** Body for `ackSignalInbox()`. */
6322
+ export interface SignalInboxAckParams {
6323
+ /** A `next_cursor` from `signalInbox()`. */
6324
+ cursor: string;
6325
+ /** Optional. The scope is the cursor's own product set; a different set is refused. */
6326
+ products?: SignalInboxProduct[];
6327
+ }
6328
+ /** `POST /signals/inbox/ack` (PRO+). Monotonic: an older or equal cursor changes nothing (`advanced: false`). */
6329
+ export interface SignalInboxAckResponse {
6330
+ scope: string;
6331
+ advanced: boolean;
6332
+ /** Signals newly covered by this call. */
6333
+ acked_now: number;
6334
+ acked_cursor: string | null;
6335
+ }
6336
+ /** Why an insider-flow figure is null (never 0). */
6337
+ export type InsiderFlowNullReason = "unpriced_trades" | "firehose_gap" | "gap_state_unverified" | "not_captured" | "capture_unverified" | "no_buy_volume" | "buy_volume_incomplete" | "liquidity_unknown" | "liquidity_stale" | "sol_price_unavailable" | (string & {});
6338
+ /** One cohort (or the deduplicated `insiders` union) inside one insider-flow window. */
6339
+ export interface InsiderFlowCohortFlow {
6340
+ wallets_trading: number | null;
6341
+ wallets_selling: number | null;
6342
+ buy_trades: number | null;
6343
+ sell_trades: number | null;
6344
+ /** Proven SOL spent on buys (unpriced trades excluded, counted in `unpriced_trades`). */
6345
+ buy_sol: number | null;
6346
+ /** Proven SOL received from sells. */
6347
+ sell_sol: number | null;
6348
+ /** Tokens sold (UI units). */
6349
+ sell_tokens: number | null;
6350
+ unpriced_trades: number | null;
6351
+ amounts: "complete" | "partial" | null;
6352
+ /** sell_sol - buy_sol. Positive = net selling. Null when amounts are partial or the window overlaps a capture gap. */
6353
+ net_sell_sol: number | null;
6354
+ net_sell_usd: number | null;
6355
+ /** PERCENT of every proven buy in the window. */
6356
+ net_sell_pct_of_buy_volume: number | null;
6357
+ /** PERCENT of the token's liquidity_usd. */
6358
+ net_sell_pct_of_liquidity: number | null;
6359
+ null_reasons?: Record<string, InsiderFlowNullReason>;
6360
+ }
6361
+ /** One insider-flow window (`5m` or `15m`), ending at `as_of`. */
6362
+ export interface InsiderFlowWindow {
6363
+ from: string;
6364
+ to: string;
6365
+ seconds: number;
6366
+ status: "ok" | "no_trades" | "gap_overlap" | "gap_unverified" | "not_captured" | "capture_unverified";
6367
+ /** Every stored trade of the token in the window. */
6368
+ market: {
6369
+ buy_trades: number | null;
6370
+ sell_trades: number | null;
6371
+ buy_sol: number | null;
6372
+ sell_sol: number | null;
6373
+ unpriced_trades: number | null;
6374
+ };
6375
+ /** Each wallet counted once, even when it sits in several cohorts. */
6376
+ insiders: InsiderFlowCohortFlow;
6377
+ /** Per cohort; a wallet can appear in several, so these can add up to more than `insiders`. */
6378
+ by_cohort: {
6379
+ creator?: InsiderFlowCohortFlow;
6380
+ early_buyers?: InsiderFlowCohortFlow;
6381
+ bundlers?: InsiderFlowCohortFlow;
6382
+ kols?: InsiderFlowCohortFlow;
6383
+ };
6384
+ }
6385
+ /** `GET /tokens/{mint}/insider-flow` (PRO+, cached 15 s): net SOL selling by creator, early buyers, bundlers and KOLs. */
6386
+ export interface TokenInsiderFlowResponse {
6387
+ mint: string;
6388
+ as_of: string;
6389
+ rule_version: string;
6390
+ /** Windows are measured on our ingest clock. */
6391
+ time_basis: "ingest_clock";
6392
+ /** Keys `5m` and `15m`. */
6393
+ windows: Record<string, InsiderFlowWindow>;
6394
+ cohorts: {
6395
+ creator?: {
6396
+ status: "known" | "platform_signer" | "not_recorded";
6397
+ wallet: string | null;
6398
+ };
6399
+ early_buyers?: {
6400
+ status: "recorded" | "not_recorded";
6401
+ wallets: number;
6402
+ };
6403
+ /** `not_measured` = launched before bundle detection started (2026-10-15 14:46 UTC). */
6404
+ bundlers?: {
6405
+ status: "detected" | "none_detected" | "not_measured";
6406
+ wallets: number;
6407
+ };
6408
+ kols?: {
6409
+ status: "matched_on_trades";
6410
+ note?: string;
6411
+ };
6412
+ };
6413
+ /** Per window `{ status: no_known_gap | gap_overlap | not_verified, overlapping }` plus `capture`. */
6414
+ completeness: Record<string, unknown>;
6415
+ liquidity: {
6416
+ liquidity_usd: number | null;
6417
+ updated_at: string | null;
6418
+ status: "ok" | "unknown" | "stale" | "no_primary_pool";
6419
+ };
6420
+ sol_usd: {
6421
+ price: number | null;
6422
+ source?: string;
6423
+ status: "ok" | "unavailable";
6424
+ };
6425
+ coverage?: TradeCoverage;
6426
+ note?: string;
6427
+ }
6428
+ /** One early-buyer token on `GET /alpha/{wallet}`. */
6429
+ export interface AlphaWalletToken {
6430
+ token_mint: string;
6431
+ rank: number | null;
6432
+ /** Null = unknown (see `first_buy_sol_status`), never 0. */
6433
+ first_buy_sol: number | null;
6434
+ first_buy_sol_status?: "measured" | "unknown_consideration";
6435
+ first_buy_at: string | null;
6436
+ /** Null = unknown, never 0. */
6437
+ total_sol_bought: number | null;
6438
+ total_sol_sold: number;
6439
+ /** Null = realization unknown (an unattributed sell), never 0. */
6440
+ realized_pnl_sol: number | null;
6441
+ buy_count: number;
6442
+ sell_count: number;
6443
+ result: "win" | "loss" | "open" | "unknown" | (string & {});
6444
+ }
5944
6445
  declare class KolClient {
5945
6446
  private readonly _fetch;
5946
6447
  private readonly _baseUrl;
@@ -6238,6 +6739,14 @@ declare class TokenClient {
6238
6739
  * **ULTRA** adds individual KOL wallet addresses in kol_activity.top_buyers[].
6239
6740
  * @param mint Token mint address (base58).
6240
6741
  */
6742
+ /**
6743
+ * Insider sell pressure (`GET /tokens/{mint}/insider-flow`): net SOL selling by
6744
+ * the creator, early buyers, bundlers and KOLs over the last 5 and 15 minutes,
6745
+ * against the window's buy volume and the token's liquidity. Unproven amounts
6746
+ * are null with `null_reasons`, never 0. Cached 15 s per token. **PRO+.**
6747
+ * @param mint Token mint address.
6748
+ */
6749
+ insiderFlow(mint: string): Promise<TokenInsiderFlowResponse>;
6241
6750
  get(mint: string, params?: TokenGetParams): Promise<TokenResponse>;
6242
6751
  /**
6243
6752
  * Resolve a ticker or name to candidate mints (`GET /tokens/search`), ranked
@@ -6620,7 +7129,7 @@ declare class WalletTrackerClient {
6620
7129
  /**
6621
7130
  * Add a wallet to your watchlist.
6622
7131
  * Returns HTTP 409 if already tracked or tier limit is reached.
6623
- * Limits: BASIC=10, PRO=50, ULTRA=100.
7132
+ * Limits per chain: PRO 50, ULTRA 250, BUSINESS 1,000 (the Free tier has no wallet tracker).
6624
7133
  * @param params wallet_address (required), label (optional).
6625
7134
  */
6626
7135
  addToWatchlist(params: WatchlistAddParams): Promise<WatchlistAddResponse>;
@@ -6826,6 +7335,8 @@ declare class WalletClient {
6826
7335
  * makes the cutoff visible.
6827
7336
  *
6828
7337
  * **PRO+**.
7338
+ * `scope: "recent"` = PnL over the most recent trades that fit the 3-second budget (at most 10,000; never refused for size;
7339
+ * labelled with `trades_used`, `covers_full_window`, `truncated_by`). Default `full` = the whole 90-day window.
6829
7340
  * @param address Solana wallet address.
6830
7341
  * @example
6831
7342
  * ```ts
@@ -6837,7 +7348,9 @@ declare class WalletClient {
6837
7348
  * }
6838
7349
  * ```
6839
7350
  */
6840
- pnl(address: string): Promise<WalletPnlResponse>;
7351
+ pnl(address: string, params?: {
7352
+ scope?: "full" | "recent";
7353
+ }): Promise<WalletPnlResponse>;
6841
7354
  /**
6842
7355
  * Open positions only — lighter slice of `pnl()` for UIs that don't need the
6843
7356
  * summary or curve. Shares the `wallet_analyses` cache: calling this right
@@ -6930,7 +7443,7 @@ declare class CoordinationAlertsClient {
6930
7443
  /**
6931
7444
  * Create a coordination alert rule. Returns the rule plus a one-time
6932
7445
  * `webhook_secret` (save it — used for HMAC-SHA256 signature verification).
6933
- * Tier quotas: PRO 5 rules, ULTRA 20 rules.
7446
+ * Tier quotas: PRO 5, ULTRA 20, BUSINESS 100 rules.
6934
7447
  */
6935
7448
  create(params: CoordinationAlertCreateParams): Promise<CoordinationAlertCreateResponse>;
6936
7449
  /** Fetch a single rule by id. */
@@ -6980,7 +7493,7 @@ declare class PriceAlertsClient {
6980
7493
  /**
6981
7494
  * Create a price alert. Captures baseline MC from current token_prices.
6982
7495
  * Returns the alert plus a one-time `webhook_secret`.
6983
- * Tier quotas: PRO 5 alerts, ULTRA 25 alerts.
7496
+ * Tier quotas: PRO 5, ULTRA 50, BUSINESS 150 active alerts per chain.
6984
7497
  */
6985
7498
  create(params: PriceAlertCreateParams): Promise<PriceAlertCreateResponse>;
6986
7499
  /** Fetch a single alert by id. */
@@ -7146,7 +7659,7 @@ declare class CopyTradeClient {
7146
7659
  /**
7147
7660
  * Create a copy-trade rule (mirror N source wallets). Returns a one-time
7148
7661
  * `webhook_secret` when `webhook_url` is set — save it. Tier quotas: PRO 3
7149
- * rules × 5 wallets, ULTRA 20 × 50.
7662
+ * rules × 5 wallets, ULTRA 20 × 50, BUSINESS 100 × 250.
7150
7663
  */
7151
7664
  create(params: CopyTradeCreateParams): Promise<CopyTradeCreateResponse>;
7152
7665
  /** Fetch a single rule by id. */
@@ -7324,6 +7837,20 @@ export declare class MadeOnSol {
7324
7837
  getSignalPerformance(name: SignalName | string, params?: {
7325
7838
  history?: boolean;
7326
7839
  }): Promise<SignalPerformanceResponse>;
7840
+ /**
7841
+ * Signal inbox (`GET /signals/inbox`): your coordination, copy-trade, RHC
7842
+ * coordination and RHC copy-trade signals in ONE resumable order, including
7843
+ * signals fired while you were offline. Deduplicate on `delivery_id`.
7844
+ * Fetching does not acknowledge: call `ackSignalInbox()`. Pass
7845
+ * `cursor: "acked"` to resume from your acknowledged position. **PRO+.**
7846
+ * Answers 503 `feature_disabled` until the inbox is enabled server-side.
7847
+ */
7848
+ signalInbox(params?: SignalInboxParams): Promise<SignalInboxResponse>;
7849
+ /**
7850
+ * Acknowledge inbox signals up to and including `cursor` (`POST /signals/inbox/ack`).
7851
+ * Monotonic read marker: nothing is deleted. **PRO+.**
7852
+ */
7853
+ ackSignalInbox(params: SignalInboxAckParams): Promise<SignalInboxAckResponse>;
7327
7854
  /** Signal Scorecard catalog (`GET /signals`): every signal, its methodology and its performance endpoint. Any key. */
7328
7855
  listSignals(): Promise<SignalsCatalogResponse>;
7329
7856
  /**