@madeonsol/plugin-madeonsol 1.12.0 → 1.13.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
@@ -11,6 +11,8 @@ ElizaOS plugin for [MadeOnSol](https://madeonsol.com) — Solana KOL trading int
11
11
 
12
12
  > 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. Free tier: 200 requests/day at [madeonsol.com/pricing](https://madeonsol.com/pricing) — no credit card required.
13
13
 
14
+ > **New in 1.13.0** — **Token net flow.** New action `GET_TOKEN_FLOW` + `client.getTokenFlow(mint, { window })` — net buy/sell flow over a rolling window (`1h` default, or `24h`): `unique_wallets`, `unique_buyers`, `unique_sellers`, `buy_count`, `sell_count`, `total_trades`, `buy_sol`, `sell_sol`, `net_sol`, `trades_per_wallet`. PRO+. Deployer alerts now also surface `deployer_sol_balance` — the deployer wallet's SOL balance at alert time (`null` for historical rows).
15
+ >
14
16
  > **New in 1.12.0** — **Token OHLCV candles.** New action `GET_TOKEN_CANDLES` + `client.getTokenCandles(mint, { tf, limit, from, to })` — historical price candles (1m/5m/15m/1h/4h/1d) aggregated from the on-chain trade firehose. Each candle has `t/open/high/low/close/volume_usd/trades/market_cap_usd`. PRO returns OHLCV for the last 30 days; ULTRA adds buy/sell volume + count splits, net flow, MEV volume, open/close liquidity, high/low MC, and full history. PRO/ULTRA only.
15
17
  >
16
18
  > **New in 1.11.0** — **Token risk score.** New action `GET_TOKEN_RISK` + `client.getTokenRisk(mint)` — a transparent 0–100 rug-risk/safety score (higher = riskier) with a `band` (safe/caution/danger), an explainable `factors[]` array, and the raw `inputs` (mint/freeze authority, liquidity, liq-to-MC ratio, transfer fee, launch cohort, deployer bond rate, KOL signal, blacklist). PRO/ULTRA only.
@@ -68,6 +70,7 @@ Gives your ElizaOS agent access to MadeOnSol's Solana intelligence API.
68
70
  | `WALLET_TRADES` | **New 1.8** · Recent trades for any wallet, filtered by action (PRO+) |
69
71
  | `GET_TOKEN_RISK` | **New 1.11** · Transparent 0–100 rug-risk/safety score with band + explainable factors (PRO+) |
70
72
  | `GET_TOKEN_CANDLES` | **New 1.12** · Historical OHLCV candles (1m–1d). PRO=OHLCV 30d; ULTRA=+net flow, liquidity delta, full history (PRO+) |
73
+ | `GET_TOKEN_FLOW` | **New 1.13** · Net buy/sell flow over a 1h/24h window — unique wallets/buyers/sellers, buy/sell counts, buy/sell/net SOL, trades-per-wallet (PRO+) |
71
74
 
72
75
  ## Install
73
76
 
@@ -182,6 +185,22 @@ Also available: `priceAlertsList()`, `priceAlertsGet(id)`, `priceAlertsUpdate(id
182
185
  | `PEAK_HISTORY` | Historical peak-density windows for a token (PRO+) |
183
186
  | `COORDINATION_HISTORY` | Global coordination event log (PRO+) |
184
187
 
188
+ ### Token net flow *(new in 1.13)*
189
+
190
+ `GET_TOKEN_FLOW` (or `client.getTokenFlow(mint, { window })`) returns net buy/sell flow over a rolling `1h` (default) or `24h` window. PRO+.
191
+
192
+ ```ts
193
+ import { MadeOnSolClient } from "@madeonsol/plugin-madeonsol";
194
+ const client = new MadeOnSolClient({ apiKey: process.env.MADEONSOL_API_KEY });
195
+
196
+ const { data } = await client.getTokenFlow("7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", { window: "24h" });
197
+ // { mint, window, from, unique_wallets, unique_buyers, unique_sellers,
198
+ // buy_count, sell_count, total_trades, buy_sol, sell_sol, net_sol, trades_per_wallet }
199
+ console.log(`Net ${data.net_sol} SOL across ${data.unique_wallets} wallets`);
200
+ ```
201
+
202
+ > Deployer alerts (`GET_DEPLOYER_ALERTS` / `client.getDeployerAlerts()`) now include `deployer_sol_balance` — the deployer wallet's SOL balance at alert time (`null` for historical rows).
203
+
185
204
  ### Wallet derived stats *(new in 1.9)*
186
205
 
187
206
  `WALLET_STATS` now returns a `stats` object with derived fields: `win_rate` (0-1), `roi`, `verdict` ("strong" | "profitable" | "neutral" | "losing"), and `biggest_miss` (token with the highest post-exit gain the wallet missed).
@@ -0,0 +1,2 @@
1
+ import type { Action } from "@elizaos/core";
2
+ export declare const tokenFlowAction: Action;
@@ -0,0 +1,57 @@
1
+ import { MadeOnSolClient } from "../client.js";
2
+ import { MADEONSOL_CLIENT_KEY } from "../index.js";
3
+ function getClient(runtime) {
4
+ return runtime[MADEONSOL_CLIENT_KEY] ?? new MadeOnSolClient();
5
+ }
6
+ const MINT_RE = /\b([1-9A-HJ-NP-Za-km-z]{32,44})\b/;
7
+ const WINDOW_RE = /\b(1h|24h)\b/i;
8
+ export const tokenFlowAction = {
9
+ name: "GET_TOKEN_FLOW",
10
+ description: "Get net buy/sell flow for a Solana token over a rolling window (1h or 24h) from MadeOnSol. Returns unique wallet/buyer/seller counts, buy/sell trade counts, buy/sell/net SOL, and trades-per-wallet. PRO+.",
11
+ similes: [
12
+ "token flow",
13
+ "net flow",
14
+ "buy sell flow",
15
+ "buy pressure",
16
+ "sell pressure",
17
+ "net sol flow",
18
+ "money flow",
19
+ ],
20
+ validate: async (_runtime, message) => {
21
+ const text = message.content?.text || "";
22
+ return /\b(flow|net buy|net sell|buy pressure|sell pressure|money flow)\b/i.test(text) && MINT_RE.test(text);
23
+ },
24
+ handler: async (runtime, message, _state, _options, callback) => {
25
+ const client = getClient(runtime);
26
+ const text = message.content?.text || "";
27
+ const mint = text.match(MINT_RE)?.[1];
28
+ if (!mint) {
29
+ callback?.({ text: "Please include a token mint address." });
30
+ return undefined;
31
+ }
32
+ const window = text.match(WINDOW_RE)?.[1]?.toLowerCase();
33
+ const result = await client.getTokenFlow(mint, window ? { window } : undefined);
34
+ if (result.error) {
35
+ callback?.({ text: result.status === 402
36
+ ? "Authentication required. Set MADEONSOL_API_KEY — free at https://madeonsol.com/pricing — or SVM_PRIVATE_KEY."
37
+ : `Error: ${result.error}` });
38
+ return undefined;
39
+ }
40
+ const data = result.data;
41
+ const net = data.net_sol >= 0 ? `+${data.net_sol.toFixed(2)}` : data.net_sol.toFixed(2);
42
+ const summary = [
43
+ `Net flow (${data.window}) for ${mint.slice(0, 8)}…`,
44
+ `• Net SOL: ${net} (buy ${data.buy_sol.toFixed(2)} / sell ${data.sell_sol.toFixed(2)})`,
45
+ `• Trades: ${data.total_trades} (${data.buy_count} buys / ${data.sell_count} sells)`,
46
+ `• Wallets: ${data.unique_wallets} (${data.unique_buyers} buyers / ${data.unique_sellers} sellers, ${data.trades_per_wallet.toFixed(1)}/wallet)`,
47
+ ].join("\n");
48
+ callback?.({ text: summary, content: { ...data } });
49
+ return undefined;
50
+ },
51
+ examples: [
52
+ [
53
+ { name: "user1", content: { text: "What's the 24h net flow for 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU" } },
54
+ { name: "assistant", content: { text: "Here's the buy/sell flow for that token..." } },
55
+ ],
56
+ ],
57
+ };
package/dist/client.d.ts CHANGED
@@ -18,6 +18,22 @@ export interface RateLimitInfo {
18
18
  reset?: string;
19
19
  requestId?: string;
20
20
  }
21
+ /** Net buy/sell flow for a token over a rolling window. Returned by `getTokenFlow`. */
22
+ export interface TokenFlow {
23
+ mint: string;
24
+ window: "1h" | "24h";
25
+ from: number;
26
+ unique_wallets: number;
27
+ unique_buyers: number;
28
+ unique_sellers: number;
29
+ buy_count: number;
30
+ sell_count: number;
31
+ total_trades: number;
32
+ buy_sol: number;
33
+ sell_sol: number;
34
+ net_sol: number;
35
+ trades_per_wallet: number;
36
+ }
21
37
  export declare class MadeOnSolClient {
22
38
  private baseUrl;
23
39
  private fetchFn;
@@ -296,6 +312,18 @@ export declare class MadeOnSolClient {
296
312
  error?: string;
297
313
  status: number;
298
314
  }>;
315
+ /**
316
+ * Net buy/sell flow for a token over a rolling window (1h or 24h). Returns unique
317
+ * wallet/buyer/seller counts, buy/sell trade counts, buy/sell/net SOL, and trades-per-wallet.
318
+ * Default window is "1h". PRO+.
319
+ */
320
+ getTokenFlow(mint: string, params?: {
321
+ window?: "1h" | "24h";
322
+ }): Promise<{
323
+ data?: TokenFlow | undefined;
324
+ error?: string;
325
+ status: number;
326
+ }>;
299
327
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
300
328
  getTokenBuyerQualityBatch(mints: string[]): Promise<{
301
329
  data?: unknown;
@@ -320,12 +348,18 @@ export declare class MadeOnSolClient {
320
348
  status: number;
321
349
  }>;
322
350
  copyTradeCreate(params: {
323
- name: string;
324
- source_wallet: string;
325
- is_active?: boolean;
351
+ /** 1-50 wallets to copy trades from. */
352
+ source_wallets: string[];
353
+ /** Required. Fixed SOL amount, proportional multiplier, or percent of source — per sizing_mode. */
354
+ sizing_amount: number;
355
+ name?: string;
356
+ min_trade_sol?: number;
357
+ only_action?: "buy" | "sell" | "both";
358
+ sizing_mode?: "fixed" | "proportional" | "percent_source";
359
+ delivery_mode?: "webhook" | "websocket" | "both";
326
360
  webhook_url?: string;
327
- delivery?: "webhook" | "websocket" | "both";
328
- filters?: Record<string, unknown>;
361
+ min_mc_usd?: number | null;
362
+ max_mc_usd?: number | null;
329
363
  }): Promise<{
330
364
  data?: unknown;
331
365
  error?: string;
package/dist/client.js CHANGED
@@ -215,7 +215,7 @@ export class MadeOnSolClient {
215
215
  return this.restRequest("GET", `/alpha/leaderboard${query}`);
216
216
  }
217
217
  getAlphaWallet(wallet) {
218
- return this.restRequest("GET", `/alpha/wallet/${encodeURIComponent(wallet)}`);
218
+ return this.restRequest("GET", `/alpha/${encodeURIComponent(wallet)}`);
219
219
  }
220
220
  getAlphaLinked(wallet) {
221
221
  return this.restRequest("GET", `/alpha/${encodeURIComponent(wallet)}/linked`);
@@ -245,6 +245,15 @@ export class MadeOnSolClient {
245
245
  const query = qs.toString() ? `?${qs.toString()}` : "";
246
246
  return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/candles${query}`);
247
247
  }
248
+ /**
249
+ * Net buy/sell flow for a token over a rolling window (1h or 24h). Returns unique
250
+ * wallet/buyer/seller counts, buy/sell trade counts, buy/sell/net SOL, and trades-per-wallet.
251
+ * Default window is "1h". PRO+.
252
+ */
253
+ getTokenFlow(mint, params) {
254
+ const qs = params?.window ? `?window=${params.window}` : "";
255
+ return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/flow${qs}`);
256
+ }
248
257
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
249
258
  getTokenBuyerQualityBatch(mints) {
250
259
  return this.restRequest("POST", "/tokens/batch/buyer-quality", { mints });
@@ -260,19 +269,19 @@ export class MadeOnSolClient {
260
269
  }
261
270
  // ── Copy-Trade Rules (PRO/ULTRA) ──
262
271
  copyTradeList() {
263
- return this.restRequest("GET", "/copy-trade/rules");
272
+ return this.restRequest("GET", "/copytrade/subscriptions");
264
273
  }
265
274
  copyTradeCreate(params) {
266
- return this.restRequest("POST", "/copy-trade/rules", params);
275
+ return this.restRequest("POST", "/copytrade/subscriptions", params);
267
276
  }
268
277
  copyTradeGet(ruleId) {
269
- return this.restRequest("GET", `/copy-trade/rules/${encodeURIComponent(ruleId)}`);
278
+ return this.restRequest("GET", `/copytrade/subscriptions/${encodeURIComponent(ruleId)}`);
270
279
  }
271
280
  copyTradeUpdate(ruleId, updates) {
272
- return this.restRequest("PATCH", `/copy-trade/rules/${encodeURIComponent(ruleId)}`, updates);
281
+ return this.restRequest("PATCH", `/copytrade/subscriptions/${encodeURIComponent(ruleId)}`, updates);
273
282
  }
274
283
  copyTradeDelete(ruleId) {
275
- return this.restRequest("DELETE", `/copy-trade/rules/${encodeURIComponent(ruleId)}`);
284
+ return this.restRequest("DELETE", `/copytrade/subscriptions/${encodeURIComponent(ruleId)}`);
276
285
  }
277
286
  // ── Coordination alerts (PRO/ULTRA, v1.1) ──
278
287
  coordinationAlertsList() {
@@ -343,7 +352,7 @@ export class MadeOnSolClient {
343
352
  if (v !== undefined)
344
353
  qs.set(k, v);
345
354
  const query = qs.toString() ? `?${qs.toString()}` : "";
346
- return this.restRequest("GET", `/copy-trade/signals${query}`);
355
+ return this.restRequest("GET", `/copytrade/signals${query}`);
347
356
  }
348
357
  // ── Price alerts (PRO/ULTRA, v1.9) ──
349
358
  priceAlertsList() {
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { kolCompareAction } from "./actions/kol-compare.js";
9
9
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
10
10
  import { tokenRiskAction } from "./actions/token-risk.js";
11
11
  import { tokenCandlesAction } from "./actions/token-candles.js";
12
+ import { tokenFlowAction } from "./actions/token-flow.js";
12
13
  import { meAction } from "./actions/me.js";
13
14
  import { tokensListAction } from "./actions/tokens-list.js";
14
15
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -19,6 +20,6 @@ export default madeOnSolPlugin;
19
20
  export { MadeOnSolClient } from "./client.js";
20
21
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
21
22
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
22
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
23
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction, tokenFlowAction };
23
24
  export { meAction, tokensListAction };
24
25
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { kolCompareAction } from "./actions/kol-compare.js";
8
8
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
9
9
  import { tokenRiskAction } from "./actions/token-risk.js";
10
10
  import { tokenCandlesAction } from "./actions/token-candles.js";
11
+ import { tokenFlowAction } from "./actions/token-flow.js";
11
12
  import { meAction } from "./actions/me.js";
12
13
  import { tokensListAction } from "./actions/tokens-list.js";
13
14
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -29,6 +30,7 @@ export const madeOnSolPlugin = {
29
30
  kolAlertsRecentAction,
30
31
  tokenRiskAction,
31
32
  tokenCandlesAction,
33
+ tokenFlowAction,
32
34
  meAction,
33
35
  tokensListAction,
34
36
  walletStatsAction,
@@ -82,6 +84,6 @@ export default madeOnSolPlugin;
82
84
  export { MadeOnSolClient } from "./client.js";
83
85
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
84
86
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
85
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
87
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction, tokenFlowAction };
86
88
  export { meAction, tokensListAction };
87
89
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madeonsol/plugin-madeonsol",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "ElizaOS plugin for MadeOnSol — Solana KOL intelligence and deployer analytics via x402 micropayments",
5
5
  "repository": {
6
6
  "type": "git",