madeonsol 2.8.0 → 2.10.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/README.md CHANGED
@@ -10,13 +10,19 @@
10
10
  > ⭐ **[Star on GitHub](https://github.com/LamboPoewert/madeonsol-sdk)** if you find this useful · 📂 **[Examples](./examples/)** · 📚 **[API docs](https://madeonsol.com/api-docs)**
11
11
 
12
12
  Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com) Solana API** — zero dependencies, fully typed, works in Node.js ≥ 18 and edge runtimes.
13
- > Real-time Solana trading intelligence: track 1,000+ KOL wallets with <3s latency, score 6,700+ Pump.fun deployers by reputation, detect multi-KOL coordination signals, and stream every DEX trade across 9+ programs. Free tier: 200 requests/day at [madeonsol.com/pricing](https://madeonsol.com/pricing) — no credit card required.
13
+ > Real-time Solana trading intelligence: track 1,069 KOL wallets with <3s latency, score 23,000+ Pump.fun deployers, surface deshred deploy signals **~500ms before on-chain confirmation**, detect multi-KOL coordination, and stream every DEX trade across 9+ programs. Free tier: 200 requests/day at [madeonsol.com/pricing](https://madeonsol.com/pricing) — no credit card required.
14
14
 
15
+ > **New in 2.9** — **Deshred Sniper Alerts.** `client.sniper.recent()` surfaces new pump.fun deploys reconstructed from shred-level data ~500ms before the chain confirms them — a measured head start over any confirmed-stream feed. PRO sees elite/good deployers; ULTRA sees every tier and maintains a custom deployer watchlist (`client.sniper.addToWatchlist()`). Use the `sniper:deploys` WebSocket channel or `sniper:deploy` webhook for live push instead of polling.
16
+ >
17
+ > **New in 2.8** — **Price alerts, scout leaderboard, wallet derived stats.** `client.priceAlerts.*` — CRUD for token MC dip/recovery alerts delivered via webhook or WebSocket (PRO=5, ULTRA=25). `client.kol.scoutLeaderboard()` — top scouts ranked by first-touch follow-on rate. `client.kol.coordinationHistory()` and `client.token.peakHistory()` expose the historical record. `client.wallet.stats()` now returns a `derived` block: `win_rate`, `roi`, `verdict`, and `biggest_miss`.
18
+ >
19
+ > **New in 2.7** — **Universal Wallet API.** `client.wallet.stats()`, `client.wallet.pnl()`, `client.wallet.positions()`, `client.wallet.trades()` — FIFO cost-basis PnL, open positions hydrated with live prices, and cursor-paginated raw trades for **any** Solana wallet (not just curated KOLs). PRO+. Server-side cache (5min/1h/24h based on activity) — cache hits don't count against your quota.
20
+ >
15
21
  > **New in 2.6.1** *(2026-05-13)* — **Velocity types fixed.** Velocity fields are now correctly typed as `mc_change_pct`, `volume_usd`, `mev_volume_pct` — each its own object keyed by `5m`/`15m`/`1h`/`2h`/`4h` — to match the actual API response. The 2.6.0 shape (`velocity[window].mc_change_pct`) was wrong; clients reading it would get `undefined`. Patch is type-only — no runtime breaking changes.
16
22
  >
17
23
  > **New in 2.6.0** *(2026-05-12)* — **Token directory + self-inspection.** `client.token.list({ min_liq, min_volume_1h_usd, max_mev_share_pct, mc_change_1h_min_pct, sort, ... })` — browse and filter every active mint, with default `min_liq=2000` to skip phantom-MC dust. `client.me()` — read your tier, daily/burst quota state, and per-feature usage in one call (no header parsing). Velocity / MEV-share fields added to every `TokenResponseBody`: `mc_change_pct`, `volume_usd`, `mev_volume_pct` (each keyed by `5m`/`15m`/`1h`/`2h`/`4h`) plus `history_age_seconds` on the parent. `/token/{mint}` 400s now ship `code`, `reason`, `received_length`, `example`, and `docs` URL — stop guessing why a mint failed. Deprecated `avg_entry_mc_usd` / `entry_mc_samples` removed from leaderboard types. All other 2.5.x APIs unchanged.
18
24
 
19
- > **Build Solana trading bots, analytics dashboards, KOL copy-trading tools, deployer sniper bots, and ecosystem browsers.**
25
+ > **Build Solana trading bots, analytics dashboards, KOL copy-trading tools, deshred sniper bots, and ecosystem browsers.**
20
26
 
21
27
  ## Quick start (10 seconds)
22
28
 
@@ -32,13 +38,16 @@ const { trades } = await client.kol.feed({ limit: 5, action: "buy" });
32
38
 
33
39
  | Feature | Description |
34
40
  |---|---|
35
- | **KOL Tracker** | Real-time trade feed, PnL leaderboard with five time windows (today, 7d, 30d, 90d, 180d), coordination detection, per-wallet profiles, and deep PnL analytics for 1,000+ tracked KOL wallets. **180 days of trade history** retained. |
36
- | **Alpha Wallet Intel** | Leaderboard of 47,000+ scored early-buyer wallets, full wallet profiles, linked-wallet clustering, token cap-table enrichment, and 0–100 buyer quality scores. |
41
+ | **KOL Tracker** | Real-time trade feed, PnL leaderboard with five time windows (today, 7d, 30d, 90d, 180d), coordination detection, per-wallet profiles, and deep PnL analytics for 1,069 tracked KOL wallets. **180 days of trade history** retained. |
42
+ | **Deshred Sniper** | Deploy feed reconstructed from shred-level data surfaces new pump.fun launches **~500ms before on-chain confirmation**. PRO: elite/good deployers. ULTRA: all tiers + custom watchlist. Use WebSocket/webhook for live push. |
43
+ | **Alpha Wallet Intel** | Leaderboard of 1M+ scored early-buyer wallets, full wallet profiles, linked-wallet clustering, token cap-table enrichment, and 0–100 buyer quality scores. |
44
+ | **Universal Wallet** | FIFO cost-basis PnL, open positions (hydrated with live prices), and raw trade history for **any** Solana wallet — not just curated KOLs. 90-day window, server-side cache. PRO+. |
45
+ | **Price Alerts** | Token MC dip/recovery alerts delivered via WebSocket or HMAC-signed webhook. PRO: 5 rules, ULTRA: 25. |
37
46
  | **Wallet Tracker** | Monitor any Solana wallet for swaps and transfers. Track up to 10/50/100 wallets (Free/Pro/Ultra). Full wallets, counterparties, and tx_signatures on every tier. 120-day event retention. WS events on ULTRA. |
38
- | **Deployer Hunter** | Pump.fun deployer scoring, tier leaderboard, deploy alerts, and bonding intelligence |
39
- | **DEX Trade Stream** | Real-time WebSocket stream of ALL Solana DEX trades — filter by token, wallet, program, or trade size (Ultra) |
47
+ | **Deployer Hunter** | 23,000+ pump.fun deployers scored by bonding rate — tier leaderboard, deploy alerts, deployer profiles, and best-tokens feed. |
48
+ | **DEX Trade Stream** | Real-time WebSocket stream of ALL Solana DEX trades across 9+ programs — filter by token, wallet, DEX, deployer tier, or trade size. ULTRA. |
40
49
  | **Webhooks** | Push notifications for KOL trades, coordination signals, deployer alerts, and wallet tracker events (Pro/Ultra) |
41
- | **Tool Directory** | Search 950+ Solana tools and dApps indexed on MadeOnSol |
50
+ | **Tool Directory** | Search 1,070+ Solana tools and dApps indexed on MadeOnSol |
42
51
 
43
52
  **Links:** [Full docs](https://madeonsol.com/solana-api) · [Website](https://madeonsol.com) · [API docs](https://madeonsol.com/api-docs)
44
53
 
@@ -73,11 +82,16 @@ const client = new MadeOnSol({ apiKey: "msk_your_api_key_here" });
73
82
  const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
74
83
  console.log(trades[0].kol_name, "bought", trades[0].token_symbol);
75
84
 
76
- // Elite deployer leaderboard
77
- const { deployers } = await client.deployer.leaderboard({ tier: "elite" });
85
+ // Deshred sniper — ~500ms before on-chain confirmation (PRO/ULTRA)
86
+ const { deploys } = await client.sniper.recent({ limit: 20, min_bond_rate: 0.5 });
87
+ console.log(deploys[0].token_name, "deployed by", deploys[0].deployer_tier, "tier deployer");
88
+
89
+ // Multi-KOL coordination signal
90
+ const { coordination } = await client.kol.coordination({ min_kols: 3, min_score: 70 });
78
91
 
79
- // Recent deploy alerts
80
- const { alerts } = await client.deployer.alerts({ limit: 5 });
92
+ // FIFO PnL for any wallet (PRO+)
93
+ const pnl = await client.wallet.pnl("ASVz...ybJk");
94
+ console.log(`Realized: ${pnl.summary.realized_sol} SOL · Win rate: ${(pnl.summary.win_rate! * 100).toFixed(1)}%`);
81
95
 
82
96
  // Search Solana tools
83
97
  const { tools } = await client.tools.search({ q: "trading", limit: 10 });
@@ -88,11 +102,13 @@ const { tools } = await client.tools.search({ q: "trading", limit: 10 });
88
102
  ## Use cases
89
103
 
90
104
  - **Copy-trading bot** — stream KOL buys via `client.kol.feed()` and mirror trades
91
- - **DEX trade sniping** — subscribe to the all-DEX stream filtered by token or wallet
92
- - **Deployer sniper** — monitor `client.deployer.alerts()` for elite-tier launches
93
- - **Coordination detector** — flag tokens with `client.kol.coordination({ min_kols: 3 })`
105
+ - **Deshred sniper** — `client.sniper.recent()` or subscribe to `sniper:deploys` WebSocket for ~500ms pre-confirm deploy signals
106
+ - **DEX trade sniping** — subscribe to the all-DEX stream filtered by token, wallet, or deployer tier
107
+ - **Coordination detector** — flag tokens with `client.kol.coordination({ min_kols: 3, min_score: 70 })`
94
108
  - **Scout signal** — track first-KOL-touch events filtered to S/A-tier scouts via `client.kol.firstTouches({ preset: "scout" })`
95
- - **Analytics dashboard** — combine leaderboard, PnL, and tool data
109
+ - **Wallet analyser** — `client.wallet.pnl()` for FIFO cost-basis PnL on any Solana wallet
110
+ - **Price alert bot** — `client.priceAlerts.create()` for MC dip/recovery alerts delivered via webhook
111
+ - **Analytics dashboard** — combine leaderboard, PnL, token velocity, and tool data
96
112
  - **Telegram/Discord bot** — pipe alerts via webhooks into chat
97
113
  - **Portfolio tracker** — use `client.kol.wallet()` to follow specific KOL positions
98
114
 
@@ -235,6 +251,28 @@ WebSocket: subscribe to channel `price_alert:events` — user-scoped. Webhook: p
235
251
 
236
252
  ---
237
253
 
254
+ #### `client.sniper.*` — Deshred Sniper Alerts *(new in 2.9)*
255
+
256
+ **The fastest path to a new pump.fun launch.** Deploys are reconstructed from shred-level (**deshred**) data and surface in the feed **~500ms before the chain confirms them** — a measured head start versus any confirmed-stream feed. **PRO** sees elite + good deployers; **ULTRA** sees every tier and can keep a custom deployer watchlist.
257
+
258
+ ```ts
259
+ // Newest-first deshred deploy feed (PRO: elite/good · ULTRA: all tiers)
260
+ const { deploys } = await client.sniper.recent({ limit: 50, min_bond_rate: 0.5 });
261
+
262
+ // Audit one deployer's recent launches (ULTRA)
263
+ await client.sniper.byDeployer("7dEx...4pQ8");
264
+
265
+ // Custom watchlist — get deploys from only the deployers you track, any tier (ULTRA, max 50)
266
+ await client.sniper.addToWatchlist({ wallets: ["7dEx...4pQ8", "9aBc...2zZ1"], label: "alpha devs" });
267
+ await client.sniper.watchlist();
268
+ const { deploys: tracked } = await client.sniper.recent({ watchlist: true });
269
+ await client.sniper.removeFromWatchlist("7dEx...4pQ8");
270
+ ```
271
+
272
+ Detection is pre-execution, so payloads carry no MC/logs/balances — `confirmed_on_chain` is `"deshred"`. For **live** push (not polling), use the `sniper:deploy` webhook event, the `sniper:deploys` WebSocket channel, or `/alert sniper` in the Telegram bot. ~1–3% of detected deploys may abandon before settlement.
273
+
274
+ ---
275
+
238
276
  #### `client.kol.scoutLeaderboard(params?)` *(new in 2.8)*
239
277
 
240
278
  Scout leaderboard: top KOLs ranked by scout score, first-touch frequency, and swarm attraction rate. **ULTRA only.**
@@ -373,7 +411,7 @@ Returns: `KolTrendingTokensResponse`
373
411
 
374
412
  #### `client.alpha.leaderboard(params?)`
375
413
 
376
- Leaderboard of 47,000+ scored early-buyer wallets ranked by win rate, PnL, or ROI.
414
+ Leaderboard of 1M+ scored early-buyer wallets ranked by win rate, PnL, or ROI.
377
415
 
378
416
  ```ts
379
417
  const { wallets } = await client.alpha.leaderboard({
@@ -834,6 +872,20 @@ console.log(token.dex_ws_url); // wss://madeonsol.com/ws/v1/dex-stream (Ultra o
834
872
 
835
873
  Returns: `StreamToken` — `{ token, expires_at, ws_url, dex_ws_url?, usage }`
836
874
 
875
+ #### `client.stream.connect()` *(new in 2.10)*
876
+
877
+ Open a **managed** stream — token fetch + 24h refresh, auto-reconnect (backoff + jitter), heartbeat liveness, and typed events are handled for you. No need to touch `getToken()` or `ws` directly.
878
+
879
+ ```ts
880
+ const stream = client.stream.connect();
881
+ stream.on("kol:trade", (t) => console.log(t.token_symbol, t.action));
882
+ stream.on("deployer:alert", (a) => console.log("new deploy", a.token_mint));
883
+ stream.subscribe(["kol:trades", "deployer:alerts"]);
884
+ // stream.unsubscribe([...]) / stream.close() when done
885
+ ```
886
+
887
+ Channels: `kol:trades`, `kol:coordination`, `kol:first_touches`, `deployer:alerts`, `wallet_tracker:events`, `copytrade:signals`, `price_alert:events`, `sniper:deploys`. Lifecycle: `open`, `close`, `reconnect`, `heartbeat`, `error`. Node 22+ uses the global `WebSocket`; on Node < 22 also `npm i ws`.
888
+
837
889
  ---
838
890
 
839
891
  ### DEX Firehose (Ultra) — `wss://madeonsol.com/ws/v1/dex-stream`
@@ -934,6 +986,27 @@ Each `dex:trades` message echoes the `sub_id` that matched, so you can route the
934
986
 
935
987
  ---
936
988
 
989
+ ### Copy-Trade — `client.copytrade` *(new in 2.10)*
990
+
991
+ Mirror N source wallets into actionable signals (delivered via webhook/WebSocket). PRO/ULTRA — PRO: 3 rules × 5 wallets, ULTRA: 20 × 50.
992
+
993
+ ```ts
994
+ const { subscription, webhook_secret } = await client.copytrade.create({
995
+ name: "whale mirror",
996
+ source_wallets: ["WalletA…", "WalletB…"],
997
+ sizing_mode: "fixed",
998
+ sizing_amount: 0.5, // SOL per mirrored buy
999
+ only_action: "buy",
1000
+ delivery_mode: "webhook",
1001
+ webhook_url: "https://you.example/hook",
1002
+ });
1003
+
1004
+ await client.copytrade.subscriptions(); // list rules
1005
+ await client.copytrade.update(subscription.id, { is_active: false });
1006
+ await client.copytrade.signals({ limit: 50 }); // 7-day fired-signal history
1007
+ await client.copytrade.delete(subscription.id);
1008
+ ```
1009
+
937
1010
  ### Webhooks — `client.webhooks`
938
1011
 
939
1012
  Manage push notification webhooks for real-time events (Pro: 3, Ultra: 10).
package/dist/index.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ import { MadeOnSolStream } from "./stream.js";
2
+ import type { StreamClientOptions } from "./stream.js";
3
+ export { MadeOnSolStream } from "./stream.js";
4
+ export type { StreamClientOptions, StreamChannel, StreamEventName, StreamEvent, StreamLifecycleEvent, } from "./stream.js";
1
5
  export declare class MadeOnSolError extends Error {
2
6
  readonly status: number;
3
7
  readonly body: unknown;
@@ -2179,6 +2183,103 @@ declare class WalletTrackerClient {
2179
2183
  */
2180
2184
  summary(params?: WalletTrackerSummaryParams): Promise<WalletTrackerSummaryResponse>;
2181
2185
  }
2186
+ export interface SniperDeploy {
2187
+ mint: string;
2188
+ name: string | null;
2189
+ symbol: string | null;
2190
+ deployer_wallet: string;
2191
+ signature: string;
2192
+ slot: number;
2193
+ detected_at: string;
2194
+ detection_region: string;
2195
+ detection_confirmed: boolean;
2196
+ deployer_tier: string | null;
2197
+ deployer_bond_rate: number | null;
2198
+ deployer_total_bonded: number | null;
2199
+ deployer_recent: string | null;
2200
+ /** "deshred" — detection is pre-execution, so the payload carries no MC/logs/balances. */
2201
+ confirmed_on_chain: boolean | null;
2202
+ confirmed_at: string | null;
2203
+ }
2204
+ export interface SniperRecentParams {
2205
+ /** Only deploys detected after this ISO-8601 timestamp. */
2206
+ since?: string;
2207
+ /** Filter by deployer reputation tier (ULTRA; PRO is always elite/good). */
2208
+ deployer_tier?: "elite" | "good" | "moderate" | "rising" | "cold" | "unranked";
2209
+ /** Minimum deployer lifetime bond rate (0–1). */
2210
+ min_bond_rate?: number;
2211
+ /** Max results, 1–200 (default 50). */
2212
+ limit?: number;
2213
+ /** ULTRA: narrow the feed to your custom deployer watchlist (any tier). */
2214
+ watchlist?: boolean;
2215
+ }
2216
+ export interface SniperRecentResponse {
2217
+ deploys: SniperDeploy[];
2218
+ count: number;
2219
+ data_age_seconds: number | null;
2220
+ /** Present (true) when watchlist mode was requested but the watchlist is empty. */
2221
+ watchlist_empty?: boolean;
2222
+ }
2223
+ export interface SniperByDeployerResponse {
2224
+ deployer: string;
2225
+ deploys: SniperDeploy[];
2226
+ count: number;
2227
+ }
2228
+ export interface SniperWatchlistEntry {
2229
+ deployer_wallet: string;
2230
+ label: string | null;
2231
+ created_at: string;
2232
+ }
2233
+ export interface SniperWatchlistResponse {
2234
+ deployers: SniperWatchlistEntry[];
2235
+ count: number;
2236
+ limit: number;
2237
+ remaining: number;
2238
+ }
2239
+ export interface SniperWatchlistAddParams {
2240
+ /** A single deployer wallet to add. */
2241
+ wallet?: string;
2242
+ /** Bulk add (max 50 total). */
2243
+ wallets?: string[];
2244
+ /** Optional label applied to the added deployer(s). */
2245
+ label?: string;
2246
+ }
2247
+ export interface SniperWatchlistAddResponse {
2248
+ added: number;
2249
+ deployers?: string[];
2250
+ message?: string;
2251
+ }
2252
+ export interface SniperWatchlistRemoveResponse {
2253
+ removed: string;
2254
+ }
2255
+ /**
2256
+ * Deshred pre-confirm pump.fun sniper feed. PRO + ULTRA.
2257
+ * Live alerts flow via webhook (`sniper:deploy`), the `sniper:deploys` WebSocket
2258
+ * channel, or Telegram (`/alert sniper`); these methods are for catch-up,
2259
+ * backtesting, and managing the ULTRA custom watchlist.
2260
+ */
2261
+ declare class SniperClient {
2262
+ private readonly _get;
2263
+ private readonly _post;
2264
+ private readonly _delete;
2265
+ private readonly _baseUrl;
2266
+ constructor(_get: <T>(url: string) => Promise<T>, _post: <T>(url: string, body?: unknown) => Promise<T>, _delete: <T>(url: string) => Promise<T>, _baseUrl: string);
2267
+ /**
2268
+ * Newest-first deshred deploy feed. PRO sees elite/good deployers; ULTRA sees all.
2269
+ * Pass `watchlist: true` (ULTRA) to narrow to your custom deployer watchlist.
2270
+ */
2271
+ recent(params?: SniperRecentParams): Promise<SniperRecentResponse>;
2272
+ /** Deshred deploys filtered to a single deployer wallet. ULTRA only. */
2273
+ byDeployer(wallet: string, params?: {
2274
+ limit?: number;
2275
+ }): Promise<SniperByDeployerResponse>;
2276
+ /** List your custom deployer watchlist (ULTRA, max 50). */
2277
+ watchlist(): Promise<SniperWatchlistResponse>;
2278
+ /** Add one (`wallet`) or many (`wallets`) deployers to your watchlist. ULTRA only. */
2279
+ addToWatchlist(params: SniperWatchlistAddParams): Promise<SniperWatchlistAddResponse>;
2280
+ /** Remove a deployer from your watchlist. ULTRA only. */
2281
+ removeFromWatchlist(wallet: string): Promise<SniperWatchlistRemoveResponse>;
2282
+ }
2182
2283
  declare class WalletClient {
2183
2284
  private readonly _get;
2184
2285
  private readonly _baseUrl;
@@ -2329,6 +2430,114 @@ declare class PriceAlertsClient {
2329
2430
  */
2330
2431
  events(params?: PriceAlertEventsParams): Promise<PriceAlertEventsResponse>;
2331
2432
  }
2433
+ export type CopyTradeAction = "buy" | "sell" | "both";
2434
+ export type CopyTradeSizingMode = "fixed" | "proportional" | "percent_source";
2435
+ export type CopyTradeDeliveryMode = "webhook" | "websocket" | "both";
2436
+ export interface CopyTradeSubscription {
2437
+ id: number;
2438
+ name: string | null;
2439
+ source_wallets: string[];
2440
+ min_trade_sol: number;
2441
+ only_action: CopyTradeAction;
2442
+ sizing_mode: CopyTradeSizingMode;
2443
+ sizing_amount: number;
2444
+ delivery_mode: CopyTradeDeliveryMode;
2445
+ webhook_url: string | null;
2446
+ is_active: boolean;
2447
+ created_at: string;
2448
+ updated_at?: string;
2449
+ }
2450
+ export interface CopyTradeCreateParams {
2451
+ name?: string;
2452
+ source_wallets: string[];
2453
+ min_trade_sol?: number;
2454
+ only_action?: CopyTradeAction;
2455
+ sizing_mode?: CopyTradeSizingMode;
2456
+ sizing_amount: number;
2457
+ delivery_mode?: CopyTradeDeliveryMode;
2458
+ webhook_url?: string;
2459
+ }
2460
+ export interface CopyTradeUpdateParams {
2461
+ name?: string | null;
2462
+ source_wallets?: string[];
2463
+ min_trade_sol?: number;
2464
+ only_action?: CopyTradeAction;
2465
+ sizing_mode?: CopyTradeSizingMode;
2466
+ sizing_amount?: number;
2467
+ delivery_mode?: CopyTradeDeliveryMode;
2468
+ webhook_url?: string | null;
2469
+ is_active?: boolean;
2470
+ }
2471
+ export interface CopyTradeCreateResponse {
2472
+ subscription: CopyTradeSubscription;
2473
+ /** Returned ONCE on creation when `webhook_url` is set — store it to verify HMAC signatures. */
2474
+ webhook_secret: string | null;
2475
+ note?: string;
2476
+ }
2477
+ export interface CopyTradeSignal {
2478
+ id: number;
2479
+ subscription_id: number;
2480
+ fired_at: string;
2481
+ source_wallet: string;
2482
+ action: "buy" | "sell";
2483
+ token_mint: string;
2484
+ token_symbol: string | null;
2485
+ token_name: string | null;
2486
+ source_sol_amount: number;
2487
+ suggested_sol_amount: number;
2488
+ tx_signature: string;
2489
+ delivered: boolean;
2490
+ delivered_at: string | null;
2491
+ /** Market cap (USD) stamped on the source trade when the rule fired. */
2492
+ market_cap_usd_at_trade?: number | null;
2493
+ /** Token price (USD) at the same moment. */
2494
+ price_usd_at_trade?: number | null;
2495
+ /** Current market cap (USD) — compare against at-trade for chase-vs-dip context. */
2496
+ market_cap_usd?: number | null;
2497
+ /** Current last-trade price (USD). */
2498
+ last_price_usd?: number | null;
2499
+ }
2500
+ export interface CopyTradeSignalsParams {
2501
+ subscription_id?: number;
2502
+ /** ISO 8601 — only signals fired at-or-after this time. */
2503
+ since?: string;
2504
+ /** 1–500, default 50. */
2505
+ limit?: number;
2506
+ }
2507
+ declare class CopyTradeClient {
2508
+ private readonly _get;
2509
+ private readonly _post;
2510
+ private readonly _patch;
2511
+ private readonly _delete;
2512
+ private readonly _baseUrl;
2513
+ constructor(_get: <T>(url: string) => Promise<T>, _post: <T>(url: string, body?: unknown) => Promise<T>, _patch: <T>(url: string, body?: unknown) => Promise<T>, _delete: <T>(url: string) => Promise<T>, _baseUrl: string);
2514
+ /** List your copy-trade rules. Requires PRO or ULTRA. */
2515
+ subscriptions(): Promise<{
2516
+ subscriptions: CopyTradeSubscription[];
2517
+ }>;
2518
+ /**
2519
+ * Create a copy-trade rule (mirror N source wallets). Returns a one-time
2520
+ * `webhook_secret` when `webhook_url` is set — save it. Tier quotas: PRO 3
2521
+ * rules × 5 wallets, ULTRA 20 × 50.
2522
+ */
2523
+ create(params: CopyTradeCreateParams): Promise<CopyTradeCreateResponse>;
2524
+ /** Fetch a single rule by id. */
2525
+ get(id: number | string): Promise<{
2526
+ subscription: CopyTradeSubscription;
2527
+ }>;
2528
+ /** Update any field on a rule. */
2529
+ update(id: number | string, params: CopyTradeUpdateParams): Promise<{
2530
+ subscription: CopyTradeSubscription;
2531
+ }>;
2532
+ /** Delete a rule and its signal history. */
2533
+ delete(id: number | string): Promise<{
2534
+ deleted: boolean;
2535
+ }>;
2536
+ /** Fired signal history (up to 7 days). Filter by subscription_id, since, limit. */
2537
+ signals(params?: CopyTradeSignalsParams): Promise<{
2538
+ signals: CopyTradeSignal[];
2539
+ }>;
2540
+ }
2332
2541
  declare class ToolsClient {
2333
2542
  private readonly _fetch;
2334
2543
  private readonly _baseUrl;
@@ -2349,6 +2558,16 @@ declare class StreamClient {
2349
2558
  * Ultra only: dex_ws_url for all-DEX trade streaming.
2350
2559
  */
2351
2560
  getToken(): Promise<StreamToken>;
2561
+ /**
2562
+ * Open a managed real-time WebSocket stream. Handles token fetch + refresh,
2563
+ * auto-reconnect with backoff, heartbeat liveness, and typed events for you.
2564
+ *
2565
+ * @example
2566
+ * const stream = client.stream.connect();
2567
+ * stream.on("kol:trade", (t) => console.log(t));
2568
+ * stream.subscribe(["kol:trades", "deployer:alerts"]);
2569
+ */
2570
+ connect(opts?: Omit<StreamClientOptions, "getToken">): MadeOnSolStream;
2352
2571
  }
2353
2572
  declare class WebhookClient {
2354
2573
  private readonly _get;
@@ -2410,6 +2629,10 @@ export declare class MadeOnSol {
2410
2629
  readonly firstTouchSubscriptions: FirstTouchSubscriptionsClient;
2411
2630
  /** Price alerts CRUD — PRO/ULTRA. Sub-second dip/recovery detection. */
2412
2631
  readonly priceAlerts: PriceAlertsClient;
2632
+ /** Deshred pre-confirm pump.fun sniper feed + custom watchlist — PRO/ULTRA. */
2633
+ readonly sniper: SniperClient;
2634
+ /** Copy-trade rules + fired signals — PRO/ULTRA. */
2635
+ readonly copytrade: CopyTradeClient;
2413
2636
  private readonly _apiKey;
2414
2637
  private readonly _baseUrl;
2415
2638
  constructor(config: MadeOnSolConfig);