@madeonsol/plugin-madeonsol 1.12.1 → 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 +19 -0
- package/dist/actions/token-flow.d.ts +2 -0
- package/dist/actions/token-flow.js +57 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.js +9 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
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,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;
|
package/dist/client.js
CHANGED
|
@@ -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 });
|
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