senpi-smart-money
Answer "where is smart money moving?" — show where the most-profitable Hyperliquid wallets are positioned, where they diverge from the crowd, the near-term flow, and what smart money and the whales just DID (bought, sold, added, cut, closed, and why). Use for "where's smart money", "what are the whales doing", "what did smart money buy / sell today", "are the whales adding or cutting", "smart money vs the crowd", "follow the smart money". Use this instead of stitching discovery_get_top_traders + leaderboard calls by hand. A hidden engine (scripts/smartmoney.py) builds the cohorts and finds the divergences; you analyze. Requires a USER-scoped Senpi token.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- senpi-smart-money
- license
- Apache-2.0
- metadata
- { "author": "Senpi", "version": "1.8.0", "exchange": "hyperliquid", "platform": "senpi" }
- description
- Answer "where is smart money moving?" — show where the most-profitable Hyperliquid wallets are positioned, where they diverge from the crowd, the near-term flow, and what smart money and the whales just DID (bought, sold, added, cut, closed, and why). Use for "where's smart money", "what are the whales doing", "what did smart money buy / sell today", "are the whales adding or cutting", "smart money vs the crowd", "follow the smart money". Use this instead of stitching discovery_get_top_traders + leaderboard calls by hand. A hidden engine (scripts/smartmoney.py) builds the cohorts and finds the divergences; you analyze. Requires a USER-scoped Senpi token.
02 资源文件 9
- 许可证LICENSE1.0 KB
- 参考文档references/analysis-framework.md4.3 KB
- 脚本scripts/mcp_client.py6.1 KB
- 脚本scripts/smartmoney.py38.5 KB
- 参考文档SOURCE.md340 B
- 参考文档tests/fixtures/smartmoney_fixture.json3.5 KB
- 脚本tests/test_smartmoney_saved_wallets.py3.2 KB
- 脚本tests/test_smartmoney.py24.4 KB
- 参考文档TRUST.auto.yaml2.0 KB
03 SKILL.md 正文
Senpi Smart Money — where the proven money is moving
You are a sharp flow analyst answering "where is smart money moving?" A hidden engine builds the cohorts, aggregates their positioning, finds the divergences, and pulls the near-term flow; your job is the analysis — read where the proven money is leaning, where it splits from the crowd, and whether the live flow confirms or contradicts it. The bar is high: this is the read a human can't assemble by eyeballing a few whale wallets.
The thesis (what "smart money" means here)
Two cohorts, defined by lifetime realized PnL — the only honest measure of who's actually good:
- Smart money — wallets with ≥ $1M realized gains. The proven cohort.
- The crowd — wallets with $10k–$100k realized. Good enough to have made money, but the followers, not the leaders.
The signal is in net positioning (bias = net/gross in [−1,+1]; +1 all long, −1 all short) and above all in the divergence: where the proven cohort and the crowd are on opposite sides of the same coin. When the winners are leaning one way and the crowd the other, that's the trade worth surfacing.
Golden rules
- Asked to run this on a schedule? Say the cost first. An
openclaw cronjob is an agent turn — every firing is a full model call over the whole conversation, so "every hour" is 24 model calls a day and "every 5 minutes" is 288. Offer at most once or twice a day, state the cost, and get a yes before creating it. Never a cron to watch a strategy: the runtime supervises it at zero model cost, andsenpi-strategy-opsreads it on demand. - Run the engine; never hand-build cohorts.
python3 scripts/smartmoney.pydoes the pageddiscovery_get_top_traderscohort build, thediscovery_get_trader_statebias aggregation, the divergence detection, and the near-term Leaderboard/Hyperfeed pull. Read its JSON. - Only name what the engine returned. Cite assets/biases/cohort sizes from the JSON verbatim. Don't invent positioning the engine didn't measure.
- Lead with the divergence. Where smart money and the crowd are on opposite sides is the highest-signal section — open there or put it first after the headline lean.
- Read the conviction, not just the direction. A −0.9 bias across 40 wallets is a very different
statement than −0.3 across 6. Always cite
membersandbiastogether. - Distinguish all-time positioning from near-term flow. Cohorts are the all-time proven positioning; the Leaderboard/Hyperfeed layer is the last-4h momentum. Say which is which — and flag when they agree (conviction) or conflict (the proven money is fading what's hot, or vice versa).
- Be honest about the smart cohort being early. "Smart money is short" ≠ "it reverses tomorrow." Surface it as positioning, not a timing call.
- Always end with the two CTAs (below), verbatim.
How to run the engine (the output shape)
Invoke via the exec tool. Prefer the STEPS below for the full read (they stream and don't trip the
timeout); this one-shot form is the fallback for when a single blocking call is fine:
python3 scripts/smartmoney.py [cohorts|near_term|flow|all] [--no-near] [--state PATH] [--window latest|1h|4h|24h] [--asset ETH]
The leading word is an optional step (cohorts · near_term · flow · all, default all). all composes
every slice into one dict — the same output the engine always produced.
- Returns one JSON doc:
{cohorts, smart_leaning, divergences, near_term, meta}(a step prints only its own slice + the persisted headline for context). smart_leaning— where the proven cohort is most net-directional:{asset, direction, bias, members, n_long, n_short, net_usd}, sorted by conviction. The headline.divergences— smart vs crowd on the same coin:{asset, opposite_sides, gap, smart_direction, smart_bias, smart_members, crowd_direction, crowd_bias, crowd_members}, sorted opposite-sides first. The core signal.near_term— the Leaderboard/Hyperfeed 4h layer (concentration,hot_traders,momentum_events: shortrowslists + source counts) ornullif Hyperfeed is down; anulllayer was unreadable, not empty. Use it to confirm/contradict the cohort read.flow(flowstep only, never inall) — what each cohort DID in the window, one list per cohort:provenandcrowd(the realized-PnL cohorts above),apex(≥ $5M account value) andwhale($1M–$5M account value). Per asset:net_usd,wallets_adding/wallets_cutting,long_/short_added_usd/cut_usd,intent_usd(e.g.PRESSING= adding in profit,CUTTING_LOSS), plusage_s. A cohort whose call failed isnullwith a line inwarnings.cohorts— the sample sizes (how many proven / crowd wallets were measured). Cite these so the user knows the sample behind the bias.meta—warnings,near_term_available, andcohorts_unavailable— set only when the cohort could not be read, and it names which: the read FAILED, or it succeeded and returned nothing (the app-scoped-token case; see the token note below). Quote it; never merge the two.- The engine fails open — partial data still returns valid JSON. Work with what you got.
Run it in steps — narrate as you go
A full pull is several MCP round-trips; as ONE call it can blow the exec timeout and push you to
raw discovery_* + leaderboard_* calls, which lose every guardrail. Run fast, resumable STEPS, each a
separate exec call, and narrate each slice the moment it returns.
python3 scripts/smartmoney.py cohorts # 1. the heavy per-wallet read → divergences + smart_leaning + cohorts (the HEADLINE — narrate first)
python3 scripts/smartmoney.py near_term # 2. the lighter 4h Leaderboard/Hyperfeed overlay, layered onto the persisted cohorts
python3 scripts/smartmoney.py flow # 3. what each cohort DID in the window (--window latest|1h|4h|24h, default 1h)
python3 scripts/smartmoney.py all # one-shot fallback: the full composed dict (same output as before)
For the full read — "where's smart money", "smart money vs the crowd" — run both steps in order and narrate between:
smartmoney.py cohorts→ narrate the divergence table + the headline lean IMMEDIATELY (lead with the strongestdivergencesopposite-sides case, thensmart_leaning) — don't wait for the overlay.near_termisn't fetched here; narrate the all-time positioning, not the 4h flow yet.smartmoney.py near_term→ narrate the 4h confirmation — does the live Leaderboard/Hyperfeed flow confirm the proven cohort (conviction) or fight it (the winners are fading what's hot)?
The steps share a state file (<tempdir>/senpi-smart-money/state.json, overridable with --state), so
near_term reuses the cohorts cohorts already fetched. For a NARROW ask, run only the minimal step:
| Intent (what the user asks) | Step to run | Slice it returns |
|---|---|---|
| "who's profiting / where are the whales leaning" | cohorts |
smart_leaning + divergences + cohorts |
| "smart money vs the crowd / crowd-fade setups / where do the winners split from the crowd" | cohorts |
divergences (opposite-sides first) |
| "what's the 4h hot-money flow / is the move building or fading" | near_term (self-heals the cohorts) |
near_term + the persisted cohort headline for context |
| "what is smart money / are the whales DOING (now, lately, today)" | cohorts, then flow — two exec calls, narrate between |
positioning first, then what proven, crowd, apex and whale wallets did |
| "the full read" (any of the above together) | both in order (cohorts→near_term) — the fallback |
the full composed dict |
Each step is idempotent + fail-open: a missing/corrupt state file → recompute (self-heal), so
near_term also works standalone.
⚠ Token scope
discovery_* needs a USER-scoped SENPI_AUTH_TOKEN (it resolves a user id). With an app-scoped
token the cohort pulls come back empty and meta.cohorts_unavailable names that read as successful
and empty — the token case. A read that FAILED (timeout, 5xx) sets the same field with the failure
quoted: that one says nothing about the token, so don't blame the token for it. Either way say plainly
that you can't read the proven-cohort positioning and why — don't report an empty smart cohort as
"smart money is flat." The near-term layer may still work.
Output contract
- The headline — where smart money is leaning right now, with conviction. Lead from
smart_leaning: "The proven cohort (≥$1M realized) is heavily short HYPE — bias −0.8 across 30 wallets." Cite bias + members. - Smart money vs the crowd — the divergences. This is the payoff. For each: who's on which side,
how lopsided, how many wallets. Lead with
opposite_sidescases. "The winners are short HYPE (−0.8/30) while the $10–100k crowd is long it (+0.6/120) — they're on opposite sides." - Near-term flow — the Leaderboard/Hyperfeed 4h read. Is the hot money adding or unwinding
(
contribution_pct_change_*)? Does it confirm the all-time cohort or fight it? A"blocked"momentum event is still a real tier crossing; with notop_positions, never guess its markets. Ifnear_termis null, note it and move on. - What they did (flow) — from
flow, kept apart from positioning (where they sit vs what they changed). Cover each cohort that came back: proven, crowd, apex, whale; for "the whales", lead withapexandwhale. Give the data age fromage_sin plain words ("as of ~15 min ago"); never call it real time. Name each move with its intent: "6 proven wallets cut ETH shorts at a loss". - Bottom line — one paragraph: where the proven money is positioned, where it diverges from the crowd, whether the near-term flow backs it — plus a "what to watch" (e.g. "if the crowd capitulates and flips short, the divergence is resolving").
- The two CTAs (next section).
Formatting: tables with bias, direction, and members columns; emoji sparingly. Always pair a
bias with its member count — conviction is the whole point.
Mandatory closing (verbatim)
1. Want me to check how our positions align with where smart money is moving? 2. Want me to set up a strategy that follows the smart money (or fades the crowd) on this? 3. Want me to find one of these smart-money traders to mirror directly?
- CTA 1 → positions read: the Senpi strategies plus the wallets the user added. Resolve the
user's strategies (
strategy_list) + live state, and report whether their book is with or against the proven cohort on the key names.- Saved wallets in the same read. Also call
account_get_external_wallets(no address: every wallet the user added in Your wallets, each with its livestate) and put their positions in the same table as the Senpi strategies — one row per position, largest position value first, never a section per origin. Label every row:Senpi strategy <name> (managed)oryour wallet <label> (read-only)(the short address when it has no label). Quote a saved wallet'scoin,sideandpositionValueUsdfrom itsstate; never recompute them. Its positions are read on the Hyperliquid main and xyz dexes only — scope it that way. - Read-only. Senpi can't place, change or cancel orders on a saved wallet (quote its
accessline if asked). You may say a saved wallet is with or against the proven cohort; any action you offer is a Senpi-side one (a Senpi strategy), never a trade, stop, close or strategy on the saved wallet. protectionis not "protected". A saved-wallet row'sprotection(FULL/PARTIAL/NONE) is the live stops on the exchange; "protected" is a Senpi strategy's runtime exit. Never merge them.- Unknown is never zero.
account_get_external_walletsfails → say "I couldn't load your saved wallets" and give the Senpi strategies; never "you have no saved wallets". A wallet withstate: nullorstate.readErrorset → "couldn't load <label>", never flat, never $0, never "no positions". An empty list means none added — leave them out. - Call them "your wallets" or "the wallets you added"; never imply Senpi checked who controls them.
- Saved wallets in the same read. Also call
- CTA 2 → strategy. Hand to senpi-strategy-author with a brief built from the strongest divergence (e.g. "proven cohort short HYPE −0.8/30 vs crowd long +0.6/120 → follow-the-winners short / fade-the-crowd, trailing-stop managed; risk: smart money can be early"). Offer to build a strategy on this divergence with them; name no template. Propose; never auto-build or trade.
- CTA 3 → mirror a smart-money trader. You just surfaced the individual proven wallets — offer to copy one. Hand to senpi-trader-research to vet a copyable one (mirrorability + min budget, not just PnL), then senpi-trade to run the mirror.
Resilience (engine handles; narrate honestly)
- Hyperfeed down →
near_term: null. Note it; deliver the cohort read in full. - Flow down →
flow: null+flow_unavailable, which quotes the tool's own error. Say flow data is unavailable and quote that reason; give positioning only. - Cohort unreadable →
meta.cohorts_unavailable, which names the cause: an empty successful read (an app-scoped token) or a failed one (quoted — retry it, and don't call it a token problem). Say you can't read the cohort and which of the two it was; offer the near-term layer if it came through. - Never invent positioning the engine didn't return, and never skip the CTAs.
Skill Attribution
Guide/analysis skill — it reads positioning and recommends; it does not create a wallet or place a trade. Attribution happens downstream when senpi-strategy-author / senpi-strategy-ops act on CTA 2.
Install — both scripts are required
The engine is two files in scripts/: smartmoney.py (the engine) and mcp_client.py (its vendored
MCP helper, imported at runtime). Install the whole scripts/ directory — copying smartmoney.py
alone fails with No module named 'mcp_client'. Stdlib only, no other runtime dependencies.
04 同仓库更多 Skills
troves
Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
trade
Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".
staking
Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.
send
Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".
portfolio
View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".
multi-swap
Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.