madeonsol 1.8.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +308 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,16 +7,18 @@
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
8
8
 
9
9
  Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com) Solana API** — zero dependencies, fully typed, works in Node.js ≥ 18 and edge runtimes.
10
- n> 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. Free tier: 200 requests/day at [madeonsol.com/developer](https://madeonsol.com/developer) — no credit card required.
10
+ > 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/developer](https://madeonsol.com/developer) — no credit card required.
11
11
 
12
12
  > **Build Solana trading bots, analytics dashboards, KOL copy-trading tools, deployer sniper bots, and ecosystem browsers.**
13
13
 
14
14
  | Feature | Description |
15
15
  |---|---|
16
- | **KOL Tracker** | Real-time trade feed, PnL leaderboard with five time windows (today, 7d, 30d, 90d, 180d), coordination detection, and per-wallet profiles for 1,000+ tracked KOL wallets. **180 days of trade history** retained. |
16
+ | **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. |
17
+ | **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. |
18
+ | **Wallet Tracker** | Monitor any Solana wallet for swaps and transfers. Track up to 10/50/100 wallets (BASIC/PRO/ULTRA). 120-day event retention. WS events on ULTRA. |
17
19
  | **Deployer Hunter** | Pump.fun deployer scoring, tier leaderboard, deploy alerts, and bonding intelligence |
18
20
  | **DEX Trade Stream** | Real-time WebSocket stream of ALL Solana DEX trades — filter by token, wallet, program, or trade size (Ultra) |
19
- | **Webhooks** | Push notifications for KOL trades, coordination signals, and deployer alerts (Pro/Ultra) |
21
+ | **Webhooks** | Push notifications for KOL trades, coordination signals, deployer alerts, and wallet tracker events (Pro/Ultra) |
20
22
  | **Tool Directory** | Search 950+ Solana tools and dApps indexed on MadeOnSol |
21
23
 
22
24
  **Links:** [Full docs](https://madeonsol.com/solana-api) · [Website](https://madeonsol.com) · [API docs](https://madeonsol.com/api-docs)
@@ -154,6 +156,186 @@ Returns: `KolTokenActivity`
154
156
 
155
157
  ---
156
158
 
159
+ #### `client.kol.pnl(wallet, params?)`
160
+
161
+ Deep per-wallet PnL breakdown with equity curve, risk metrics, and position history.
162
+
163
+ ```ts
164
+ const pnl = await client.kol.pnl("7xKX...", {
165
+ period: "30d", // "7d" | "30d" | "90d" | "180d", default "30d"
166
+ });
167
+ // BASIC: summary stats only
168
+ // PRO: + equity curve + closed positions
169
+ // ULTRA: + open positions
170
+ ```
171
+
172
+ Returns: `KolPnlResponse`
173
+
174
+ ---
175
+
176
+ #### `client.kol.trendingTokens(params?)`
177
+
178
+ Tokens ranked by KOL buy volume across multiple time windows.
179
+
180
+ ```ts
181
+ const { tokens } = await client.kol.trendingTokens({
182
+ period: "1h", // "5m" | "15m" | "30m" | "1h" | "4h" | "8h" | "12h", default "1h"
183
+ min_kols: 2, // minimum distinct KOL buyers
184
+ limit: 20, // 1–50, default 20
185
+ });
186
+ // Sub-hour periods (5m, 15m, 30m) require PRO or ULTRA
187
+ ```
188
+
189
+ Returns: `KolTrendingTokensResponse`
190
+
191
+ ---
192
+
193
+ ### Alpha Wallet Intelligence — `client.alpha`
194
+
195
+ #### `client.alpha.leaderboard(params?)`
196
+
197
+ Leaderboard of 47,000+ scored early-buyer wallets ranked by win rate, PnL, or ROI.
198
+
199
+ ```ts
200
+ const { wallets } = await client.alpha.leaderboard({
201
+ period: "30d", // "7d" | "30d" | "90d", default "30d"
202
+ sort: "win_rate", // "win_rate" | "pnl" | "roi"
203
+ min_tokens: 5,
204
+ exclude_bots: true,
205
+ });
206
+ // BASIC: 25 results, PRO: 100, ULTRA: 500
207
+ ```
208
+
209
+ Returns: `AlphaLeaderboardResponse`
210
+
211
+ ---
212
+
213
+ #### `client.alpha.wallet(wallet)`
214
+
215
+ Full profile for an alpha wallet including per-token history and bot signals. ULTRA only.
216
+
217
+ ```ts
218
+ const profile = await client.alpha.wallet("7xKX...");
219
+ ```
220
+
221
+ Returns: `AlphaWalletResponse`
222
+
223
+ ---
224
+
225
+ #### `client.alpha.linked(wallet)`
226
+
227
+ Linked-wallet clustering — wallets that co-bought with this address within 2 seconds. ULTRA only.
228
+
229
+ ```ts
230
+ const { linked } = await client.alpha.linked("7xKX...");
231
+ ```
232
+
233
+ Returns: `AlphaLinkedResponse`
234
+
235
+ ---
236
+
237
+ #### `client.alpha.capTable(mint)`
238
+
239
+ First buyers for a token enriched with historical win rates, PnL, and KOL identity. PRO/ULTRA.
240
+
241
+ ```ts
242
+ const { buyers } = await client.alpha.capTable("EPjFW...");
243
+ ```
244
+
245
+ Returns: `AlphaCapTableResponse`
246
+
247
+ ---
248
+
249
+ #### `client.alpha.buyerQuality(mint)`
250
+
251
+ 0–100 cohort quality score based on the profile of a token's first buyers. All tiers. 5-minute cache.
252
+
253
+ ```ts
254
+ const { score } = await client.alpha.buyerQuality("EPjFW...");
255
+ ```
256
+
257
+ Returns: `AlphaBuyerQualityResponse`
258
+
259
+ ---
260
+
261
+ ### Wallet Tracker — `client.walletTracker`
262
+
263
+ #### `client.walletTracker.watchlist()`
264
+
265
+ List your tracked wallets and remaining capacity.
266
+
267
+ ```ts
268
+ const { wallets, capacity } = await client.walletTracker.watchlist();
269
+ // capacity: { used, limit } — BASIC: 10, PRO: 50, ULTRA: 100
270
+ ```
271
+
272
+ Returns: `WatchlistResponse`
273
+
274
+ ---
275
+
276
+ #### `client.walletTracker.addToWatchlist(wallet, params?)`
277
+
278
+ Add a wallet to your watchlist. Tracking begins immediately.
279
+
280
+ ```ts
281
+ await client.walletTracker.addToWatchlist("7xKX...", { label: "whale" });
282
+ ```
283
+
284
+ ---
285
+
286
+ #### `client.walletTracker.removeFromWatchlist(wallet)`
287
+
288
+ Remove a wallet from your watchlist.
289
+
290
+ ```ts
291
+ await client.walletTracker.removeFromWatchlist("7xKX...");
292
+ ```
293
+
294
+ ---
295
+
296
+ #### `client.walletTracker.updateLabel(wallet, label)`
297
+
298
+ Update the label for a tracked wallet.
299
+
300
+ ```ts
301
+ await client.walletTracker.updateLabel("7xKX...", "smart money");
302
+ ```
303
+
304
+ ---
305
+
306
+ #### `client.walletTracker.trades(params?)`
307
+
308
+ Historical swap and transfer events for your watched wallets. 120-day retention.
309
+
310
+ ```ts
311
+ const { events } = await client.walletTracker.trades({
312
+ wallet: "7xKX...", // filter by specific wallet
313
+ action: "buy", // "buy" | "sell"
314
+ event_type: "swap", // "swap" | "transfer"
315
+ limit: 50,
316
+ before: "2026-04-01T00:00:00Z", // ISO 8601 cursor
317
+ });
318
+ ```
319
+
320
+ Returns: `WalletTrackerTradesResponse`
321
+
322
+ ---
323
+
324
+ #### `client.walletTracker.summary(params?)`
325
+
326
+ Per-wallet stats across your watchlist: swap counts, SOL bought/sold, last event time.
327
+
328
+ ```ts
329
+ const { wallets } = await client.walletTracker.summary({
330
+ period: "7d", // "24h" | "7d" | "30d", default "7d"
331
+ wallet: "7xKX...", // optional: single wallet
332
+ });
333
+ ```
334
+
335
+ Returns: `WalletTrackerSummaryResponse`
336
+
337
+ ---
338
+
157
339
  ### Deployer Hunter — `client.deployer`
158
340
 
159
341
  #### `client.deployer.stats()`
@@ -303,16 +485,104 @@ console.log(token.dex_ws_url); // wss://madeonsol.com/ws/v1/dex-stream (Ultra o
303
485
 
304
486
  Returns: `StreamToken` — `{ token, expires_at, ws_url, dex_ws_url?, usage }`
305
487
 
306
- **DEX Trade Stream (Ultra):** Connect to `dex_ws_url` and subscribe with filters:
488
+ ---
489
+
490
+ ### DEX Firehose (Ultra) — `wss://madeonsol.com/ws/v1/dex-stream`
491
+
492
+ Real-time trades across **9+ Solana DEX programs** (Pump.fun, PumpAMM, PumpSwap, Raydium AMM/CPMM/CAMM, Jupiter v6, Orca Whirlpool, Meteora DBC/DAMM, LaunchLab/bonk.fun) on a single normalized WebSocket. Server-side filters drop everything you don't care about before it hits your socket.
493
+
494
+ **Limits:** ULTRA = 2 connections, **10 named subscriptions per connection**, up to **500 trades replay** from in-memory ring buffer. Inbound rate limit: 5 messages/sec (excess emits one error per second).
495
+
496
+ #### Quick start
497
+
498
+ ```ts
499
+ import { WebSocket } from "ws"; // or native WebSocket in browsers/Bun
500
+
501
+ const { token, dex_ws_url } = await client.stream.getToken();
502
+ const ws = new WebSocket(`${dex_ws_url}?token=${token}`); // token MUST be appended as query param
503
+
504
+ ws.on("open", () => {
505
+ // Multi-subscription: each sub has its own sub_id and filters
506
+ ws.send(JSON.stringify({
507
+ type: "subscribe",
508
+ sub_id: "fresh-pumpfun",
509
+ replay: 50, // backfill up to 500 from ring buffer
510
+ filters: {
511
+ dex: "pumpfun",
512
+ token_age_max_seconds: 300, // first seen in last 5 min
513
+ min_sol: 0.5,
514
+ action: "buy",
515
+ },
516
+ }));
517
+ });
518
+
519
+ ws.on("message", (raw) => {
520
+ const msg = JSON.parse(raw.toString());
521
+ if (msg.channel === "dex:trades") {
522
+ // { sub_id, data: { wallet, mint, action, sol_amount, token_amount, dex, ... }, replay, ts }
523
+ console.log(msg.sub_id, msg.data.dex, msg.data.action, msg.data.sol_amount);
524
+ }
525
+ });
526
+ ```
527
+
528
+ #### Protocol — client → server
529
+
530
+ | `type` | Required fields | Notes |
531
+ |---|---|---|
532
+ | `subscribe` | `sub_id`, `filters` | Optional `replay: 1–500` |
533
+ | `update` | `sub_id`, `filters` | Replaces filters in place — no disconnect needed |
534
+ | `unsubscribe` | `sub_id` | Or omit `sub_id` to clear all subs |
535
+ | `list` | — | Server replies with `{ type: "list", subs: [...] }` |
536
+ | `ping` | — | Heartbeat — server replies `{ type: "pong" }` |
537
+
538
+ #### Server → client message shapes
307
539
 
308
540
  ```ts
309
- ws.send(JSON.stringify({
310
- type: "subscribe",
311
- filters: { program: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", min_sol: 0.5 }
312
- }));
313
- // Filters: token_mint, token_mints (max 50), wallet, wallets (max 50), program, min_sol, max_sol, action
541
+ { type: "connected", tier: "ULTRA", capabilities: { max_subs: 10, max_replay: 500, dex_names: [...], deployer_tiers: [...] } } // on connect
542
+ { type: "subscribed", sub_id: "fresh-pumpfun", filters: { ... } }
543
+ { type: "replay_done", sub_id: "fresh-pumpfun", count: 50 } // after backfill
544
+ { type: "updated", sub_id: "fresh-pumpfun", filters: { ... } }
545
+ { type: "unsubscribed", sub_id: "fresh-pumpfun" }
546
+ { type: "list", subs: [{ sub_id, filters }] } // reply to { type: "list" }
547
+ { type: "heartbeat", ts: 1712160000000 } // every 30s
548
+ { type: "error", sub_id?, message: "..." }
549
+ { channel: "dex:trades", sub_id, data: { ... }, replay: false, ts: 1712160000000 }
314
550
  ```
315
551
 
552
+ #### Filter dimensions
553
+
554
+ At least **one targeting filter** is required (otherwise the firehose would dump every trade). Filters compose with AND semantics.
555
+
556
+ | Filter | Type | Notes |
557
+ |---|---|---|
558
+ | `token_mint` / `token_mints` | string / string[] (≤50) | Targeting |
559
+ | `wallet` / `wallets` | string / string[] (≤50) | Targeting |
560
+ | `dex` | string \| string[] | `pumpfun`, `pumpamm`, `pumpswap`, `raydium`, `jupiter`, `orca`, `meteora`, `launchlab` |
561
+ | `program` | string | Raw program ID |
562
+ | `deployer_tier` | string \| string[] | `elite`, `good`, `moderate`, `rising`, `cold`, `unranked` (uses Deployer Hunter scoring) |
563
+ | `token_age_max_seconds` | number | Only trades on mints first seen within window (uses persisted first-seen table) |
564
+ | `market_cap_min_sol` / `market_cap_max_sol` | number | Bounded by current market cap (last trade price × cached supply, 1h TTL) |
565
+ | `min_sol` / `max_sol` | number | Trade size bounds |
566
+ | `action` | `"buy"` \| `"sell"` | Direction |
567
+
568
+ **Async filters** (`token_age`, `deployer_tier`, `market_cap`) evaluate against live state and are **skipped on replay**. The first trade for an unseen mint may be skipped while the supply fetch is in flight.
569
+
570
+ #### Multi-sub example
571
+
572
+ ```ts
573
+ ws.send(JSON.stringify({ type: "subscribe", sub_id: "snipers", filters: { token_age_max_seconds: 60 } }));
574
+ ws.send(JSON.stringify({ type: "subscribe", sub_id: "whales", filters: { min_sol: 50 } }));
575
+ ws.send(JSON.stringify({ type: "subscribe", sub_id: "kol-mints", filters: { token_mints: ["EPjF...", "So11..."] } }));
576
+
577
+ // Tighten the snipers filter without disconnecting
578
+ ws.send(JSON.stringify({ type: "update", sub_id: "snipers", filters: { token_age_max_seconds: 30, min_sol: 0.3 } }));
579
+
580
+ // Drop whales when you're done
581
+ ws.send(JSON.stringify({ type: "unsubscribe", sub_id: "whales" }));
582
+ ```
583
+
584
+ Each `dex:trades` message echoes the `sub_id` that matched, so you can route them locally without reapplying filter logic client-side.
585
+
316
586
  ---
317
587
 
318
588
  ### Webhooks — `client.webhooks`
@@ -406,6 +676,26 @@ import type {
406
676
  ToolsSearchResponse,
407
677
  Tool,
408
678
 
679
+ // KOL PnL & Trending
680
+ KolPnlResponse,
681
+ KolTrendingTokensResponse,
682
+ TrendingToken,
683
+
684
+ // Alpha Wallet Intelligence
685
+ AlphaWalletEntry,
686
+ AlphaLeaderboardResponse,
687
+ AlphaWalletResponse,
688
+ AlphaLinkedResponse,
689
+ AlphaCapTableResponse,
690
+ AlphaBuyerQualityResponse,
691
+
692
+ // Wallet Tracker
693
+ WalletEntry,
694
+ WatchlistResponse,
695
+ WalletTrackerEvent,
696
+ WalletTrackerTradesResponse,
697
+ WalletTrackerSummaryResponse,
698
+
409
699
  // Streaming
410
700
  StreamToken,
411
701
 
@@ -434,6 +724,15 @@ import type {
434
724
  - [API documentation](https://madeonsol.com/solana-api) — Interactive endpoint reference
435
725
  - [MadeOnSol on GitHub](https://github.com/LamboPoewert/madeonsol) — Main project repository
436
726
 
727
+ ## Also Available
728
+
729
+ | Platform | Package |
730
+ |---|---|
731
+ | Python (LangChain, CrewAI) | [`madeonsol-x402`](https://pypi.org/project/madeonsol-x402/) on PyPI |
732
+ | MCP Server (Claude, Cursor) | [`mcp-server-madeonsol`](https://www.npmjs.com/package/mcp-server-madeonsol) |
733
+ | ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
734
+ | Solana Agent Kit | [`solana-agent-kit-plugin-madeonsol`](https://www.npmjs.com/package/solana-agent-kit-plugin-madeonsol) |
735
+
437
736
  ---
438
737
 
439
738
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "madeonsol",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "Official SDK for the MadeOnSol Solana API — KOL wallet tracking, Pump.fun deployer intelligence, and tool directory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",