@madeonsol/plugin-madeonsol 1.11.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,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.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
+ >
14
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.
15
17
  >
16
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`.
@@ -65,6 +67,7 @@ Gives your ElizaOS agent access to MadeOnSol's Solana intelligence API.
65
67
  | `WALLET_POSITIONS` | **New 1.8** · Open positions with live unrealized SOL from market-cap tracker (PRO+) |
66
68
  | `WALLET_TRADES` | **New 1.8** · Recent trades for any wallet, filtered by action (PRO+) |
67
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+) |
68
71
 
69
72
  ## Install
70
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
+ };
package/dist/client.d.ts CHANGED
@@ -285,6 +285,17 @@ export declare class MadeOnSolClient {
285
285
  error?: string;
286
286
  status: number;
287
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
+ }>;
288
299
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
289
300
  getTokenBuyerQualityBatch(mints: string[]): Promise<{
290
301
  data?: unknown;
package/dist/client.js CHANGED
@@ -231,6 +231,20 @@ export class MadeOnSolClient {
231
231
  getTokenRisk(mint) {
232
232
  return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/risk`);
233
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
+ }
234
248
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
235
249
  getTokenBuyerQualityBatch(mints) {
236
250
  return this.restRequest("POST", "/tokens/batch/buyer-quality", { mints });
package/dist/index.d.ts CHANGED
@@ -8,6 +8,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
10
  import { tokenRiskAction } from "./actions/token-risk.js";
11
+ import { tokenCandlesAction } from "./actions/token-candles.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";
@@ -18,6 +19,6 @@ export default madeOnSolPlugin;
18
19
  export { MadeOnSolClient } from "./client.js";
19
20
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
20
21
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
21
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction };
22
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
22
23
  export { meAction, tokensListAction };
23
24
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ 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
9
  import { tokenRiskAction } from "./actions/token-risk.js";
10
+ import { tokenCandlesAction } from "./actions/token-candles.js";
10
11
  import { meAction } from "./actions/me.js";
11
12
  import { tokensListAction } from "./actions/tokens-list.js";
12
13
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -27,6 +28,7 @@ export const madeOnSolPlugin = {
27
28
  kolCompareAction,
28
29
  kolAlertsRecentAction,
29
30
  tokenRiskAction,
31
+ tokenCandlesAction,
30
32
  meAction,
31
33
  tokensListAction,
32
34
  walletStatsAction,
@@ -80,6 +82,6 @@ export default madeOnSolPlugin;
80
82
  export { MadeOnSolClient } from "./client.js";
81
83
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
82
84
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
83
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction };
85
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction, tokenCandlesAction };
84
86
  export { meAction, tokensListAction };
85
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.11.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",