@madeonsol/plugin-madeonsol 1.10.0 → 1.12.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,10 @@ 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.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
+ >
16
+ > **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.
17
+ >
14
18
  > **New in 1.10.0** — `client.getTokensList()` gains three new filter params: `min_liq_mc_ratio`, `max_liq_mc_ratio`, and `deployer_tier`. Response items now include `liquidity_to_mc_ratio` and `deployer_tier`. KOL leaderboard entries now include `median_hold_minutes_30d` and `percentile_early_entry_30d`. Token endpoints now return `liquidity_to_mc_ratio`, `launch_cohort_sol`, and `launch_cohort_size`.
15
19
  >
16
20
  > **New in 1.9.3** — Deployer alerts now surface `runner_rate` + `labeled_tokens` (fraction of a deployer's labeled tokens that ran vs dumped, gate on `labeled_tokens` ≥3) and `avg_time_to_bond_minutes`.
@@ -62,6 +66,8 @@ Gives your ElizaOS agent access to MadeOnSol's Solana intelligence API.
62
66
  | `WALLET_PNL` | **New 1.8** · Full FIFO PnL — realized + unrealized, profit factor, drawdown, hold times, top winners (PRO+) |
63
67
  | `WALLET_POSITIONS` | **New 1.8** · Open positions with live unrealized SOL from market-cap tracker (PRO+) |
64
68
  | `WALLET_TRADES` | **New 1.8** · Recent trades for any wallet, filtered by action (PRO+) |
69
+ | `GET_TOKEN_RISK` | **New 1.11** · Transparent 0–100 rug-risk/safety score with band + explainable factors (PRO+) |
70
+ | `GET_TOKEN_CANDLES` | **New 1.12** · Historical OHLCV candles (1m–1d). PRO=OHLCV 30d; ULTRA=+net flow, liquidity delta, full history (PRO+) |
65
71
 
66
72
  ## Install
67
73
 
@@ -0,0 +1,2 @@
1
+ import type { Action } from "@elizaos/core";
2
+ export declare const tokenCandlesAction: Action;
@@ -0,0 +1,56 @@
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 TF_RE = /\b(1m|5m|15m|1h|4h|1d)\b/i;
8
+ export const tokenCandlesAction = {
9
+ name: "GET_TOKEN_CANDLES",
10
+ description: "Get historical OHLCV price candles for a Solana token from MadeOnSol (1m/5m/15m/1h/4h/1d). Each candle has t/open/high/low/close/volume_usd/trades/market_cap_usd. PRO=OHLCV 30d; ULTRA adds net flow, liquidity delta, and full history. PRO+.",
11
+ similes: [
12
+ "token candles",
13
+ "ohlc",
14
+ "ohlcv",
15
+ "price chart",
16
+ "candlestick",
17
+ "price history",
18
+ "candle data",
19
+ ],
20
+ validate: async (_runtime, message) => {
21
+ const text = message.content?.text || "";
22
+ return /\b(candle|chart|ohlc|ohlcv|candlestick)\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 tf = text.match(TF_RE)?.[1]?.toLowerCase();
33
+ const result = await client.getTokenCandles(mint, tf ? { tf } : 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 candles = data.candles || [];
42
+ const latest = candles.slice(-5);
43
+ const lines = latest.map((c) => `• ${c.t} — O ${c.open} H ${c.high} L ${c.low} C ${c.close} (vol $${Math.round(c.volume_usd).toLocaleString()})`);
44
+ callback?.({
45
+ text: `${data.timeframe} candles for ${mint.slice(0, 8)}… (${data.count} total)${lines.length ? `\nLatest:\n${lines.join("\n")}` : ""}`,
46
+ content: data,
47
+ });
48
+ return undefined;
49
+ },
50
+ examples: [
51
+ [
52
+ { name: "user1", content: { text: "Show me the 1h candles for 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU" } },
53
+ { name: "assistant", content: { text: "Here's the OHLCV candle history for that token..." } },
54
+ ],
55
+ ],
56
+ };
@@ -0,0 +1,2 @@
1
+ import type { Action } from "@elizaos/core";
2
+ export declare const tokenRiskAction: Action;
@@ -0,0 +1,52 @@
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
+ export const tokenRiskAction = {
8
+ name: "GET_TOKEN_RISK",
9
+ description: "Get a transparent 0–100 rug-risk/safety score for a Solana token from MadeOnSol (higher = riskier). Returns a band (safe/caution/danger) and an explainable factors breakdown. PRO+.",
10
+ similes: [
11
+ "token risk",
12
+ "is this a rug",
13
+ "rug risk",
14
+ "safety score",
15
+ "how safe is this token",
16
+ "risk score",
17
+ ],
18
+ validate: async (_runtime, message) => {
19
+ const text = message.content?.text || "";
20
+ return /\b(risk|rug|safe|safety|danger)\b/i.test(text) && MINT_RE.test(text);
21
+ },
22
+ handler: async (runtime, message, _state, _options, callback) => {
23
+ const client = getClient(runtime);
24
+ const mint = (message.content?.text || "").match(MINT_RE)?.[1];
25
+ if (!mint) {
26
+ callback?.({ text: "Please include a token mint address." });
27
+ return undefined;
28
+ }
29
+ const result = await client.getTokenRisk(mint);
30
+ if (result.error) {
31
+ callback?.({ text: result.status === 402
32
+ ? "Authentication required. Set MADEONSOL_API_KEY — free at https://madeonsol.com/pricing — or SVM_PRIVATE_KEY."
33
+ : `Error: ${result.error}` });
34
+ return undefined;
35
+ }
36
+ const data = result.data;
37
+ const lines = (data.factors || [])
38
+ .filter((f) => f.status !== "ok")
39
+ .map((f) => `• ${f.label} [${f.status}] — ${f.detail}`);
40
+ callback?.({
41
+ text: `Risk score for ${mint.slice(0, 8)}…: ${data.risk_score}/100 (${data.band})${lines.length ? `\n${lines.join("\n")}` : ""}`,
42
+ content: data,
43
+ });
44
+ return undefined;
45
+ },
46
+ examples: [
47
+ [
48
+ { name: "user1", content: { text: "Is 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU a rug? Check the risk score." } },
49
+ { name: "assistant", content: { text: "Here's the rug-risk score for that token..." } },
50
+ ],
51
+ ],
52
+ };
package/dist/client.d.ts CHANGED
@@ -279,6 +279,23 @@ export declare class MadeOnSolClient {
279
279
  error?: string;
280
280
  status: number;
281
281
  }>;
282
+ /** Transparent 0–100 rug-risk/safety score (higher = riskier) with band, explainable factors, and raw inputs. PRO+. */
283
+ getTokenRisk(mint: string): Promise<{
284
+ data?: unknown;
285
+ error?: string;
286
+ status: number;
287
+ }>;
288
+ /** Historical OHLCV candles (1m/5m/15m/1h/4h/1d) aggregated from the trade firehose. PRO=OHLCV 30d; ULTRA=+net flow, liquidity delta, full history. PRO+. */
289
+ getTokenCandles(mint: string, params?: {
290
+ tf?: string;
291
+ limit?: number;
292
+ from?: string;
293
+ to?: string;
294
+ }): Promise<{
295
+ data?: unknown;
296
+ error?: string;
297
+ status: number;
298
+ }>;
282
299
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
283
300
  getTokenBuyerQualityBatch(mints: string[]): Promise<{
284
301
  data?: unknown;
package/dist/client.js CHANGED
@@ -19,7 +19,7 @@ export class MadeOnSolClient {
19
19
  this.authHeaders = {};
20
20
  if (options.apiKey) {
21
21
  this.authMode = "madeonsol";
22
- this.authHeaders = { Authorization: `Bearer ${options.apiKey}`, "User-Agent": "plugin-madeonsol/1.10.0" };
22
+ this.authHeaders = { Authorization: `Bearer ${options.apiKey}`, "User-Agent": "plugin-madeonsol/1.11.0" };
23
23
  }
24
24
  else if (options.fetchFn) {
25
25
  this.authMode = "x402";
@@ -227,6 +227,24 @@ export class MadeOnSolClient {
227
227
  getTokenBuyerQuality(mint) {
228
228
  return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/buyer-quality`);
229
229
  }
230
+ /** Transparent 0–100 rug-risk/safety score (higher = riskier) with band, explainable factors, and raw inputs. PRO+. */
231
+ getTokenRisk(mint) {
232
+ return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/risk`);
233
+ }
234
+ /** Historical OHLCV candles (1m/5m/15m/1h/4h/1d) aggregated from the trade firehose. PRO=OHLCV 30d; ULTRA=+net flow, liquidity delta, full history. PRO+. */
235
+ getTokenCandles(mint, params) {
236
+ const qs = new URLSearchParams();
237
+ if (params?.tf)
238
+ qs.set("tf", params.tf);
239
+ if (params?.limit !== undefined)
240
+ qs.set("limit", String(params.limit));
241
+ if (params?.from)
242
+ qs.set("from", params.from);
243
+ if (params?.to)
244
+ qs.set("to", params.to);
245
+ const query = qs.toString() ? `?${qs.toString()}` : "";
246
+ return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/candles${query}`);
247
+ }
230
248
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
231
249
  getTokenBuyerQualityBatch(mints) {
232
250
  return this.restRequest("POST", "/tokens/batch/buyer-quality", { mints });
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ import { walletTrackerWatchlistAction, walletTrackerTradesAction } from "./actio
7
7
  import { kolTokenEntryOrderAction } from "./actions/kol-token-entry-order.js";
8
8
  import { kolCompareAction } from "./actions/kol-compare.js";
9
9
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
10
+ import { tokenRiskAction } from "./actions/token-risk.js";
11
+ import { tokenCandlesAction } from "./actions/token-candles.js";
10
12
  import { meAction } from "./actions/me.js";
11
13
  import { tokensListAction } from "./actions/tokens-list.js";
12
14
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -17,6 +19,6 @@ export default madeOnSolPlugin;
17
19
  export { MadeOnSolClient } from "./client.js";
18
20
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
19
21
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
20
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
22
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
21
23
  export { meAction, tokensListAction };
22
24
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ import { walletTrackerWatchlistAction, walletTrackerTradesAction } from "./actio
6
6
  import { kolTokenEntryOrderAction } from "./actions/kol-token-entry-order.js";
7
7
  import { kolCompareAction } from "./actions/kol-compare.js";
8
8
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
9
+ import { tokenRiskAction } from "./actions/token-risk.js";
10
+ import { tokenCandlesAction } from "./actions/token-candles.js";
9
11
  import { meAction } from "./actions/me.js";
10
12
  import { tokensListAction } from "./actions/tokens-list.js";
11
13
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -25,6 +27,8 @@ export const madeOnSolPlugin = {
25
27
  kolTokenEntryOrderAction,
26
28
  kolCompareAction,
27
29
  kolAlertsRecentAction,
30
+ tokenRiskAction,
31
+ tokenCandlesAction,
28
32
  meAction,
29
33
  tokensListAction,
30
34
  walletStatsAction,
@@ -78,6 +82,6 @@ export default madeOnSolPlugin;
78
82
  export { MadeOnSolClient } from "./client.js";
79
83
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
80
84
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
81
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
85
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
82
86
  export { meAction, tokensListAction };
83
87
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madeonsol/plugin-madeonsol",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "description": "ElizaOS plugin for MadeOnSol — Solana KOL intelligence and deployer analytics via x402 micropayments",
5
5
  "repository": {
6
6
  "type": "git",