How Senpi Trades: The Five-Phase Engine

The shared infrastructure every strategy runs on. Each trade flows through five phases — click any to jump to its capabilities.

PHASE 01
Discover

Find what's worth trading from 500+ perps.

Opportunity Scanner
Hyperfeed
Emerging Movers
Whale Index
PHASE 02
Decide

Score it. Gate it. Confirm conviction.

Confluence Gates
Risk Guard Rails
LLM Conviction
PHASE 03
Execute

Open the position with optimal fees.

Trading Runtime v3.0
Fee Optimizer
Senpi MCP
PHASE 04
Manage

Defend, then ride. Two phases of risk.

DSL Phase 1
Ratchet Stops
PHASE 05
Exit

Close cleanly. Audit the trade. Learn.

DSL Phase 2
Audit Engine
01Discover

Finding what's worth trading

Senpi runs four parallel signal layers to filter 500+ Hyperliquid perps down to a handful of opportunities per cycle.

🔭
Opportunity Scanner
4-stage funnel from 500 perps to top setups

Scores every Hyperliquid perpetual 0–400 across four independent dimensions. Runs every tick, surfaces only the highest-conviction setups to the strategy layer.

SM
Smart Money concentration
STRUCT
Trend & structure breaks
TECH
Momentum / RSI regime
FUND
Funding health / OI
500+ perps → top 5–10 per cycle. Composite 0–400 score gates which assets even reach strategy logic.
📡
Hyperfeed
Real-time pulse from the top-trader cohort

Streaming data pipeline from Hyperliquid's top-trader leaderboard. Rank changes, position-level delta PnL, momentum events, per-market concentration — all from real trader behavior, not synthetic signals.

leaderboard_get_top · leaderboard_get_markets · leaderboard_get_momentum_events · leaderboard_get_trader_positions
🚀
Emerging Movers
Rank acceleration, not rank position

Tracks Smart Money market-concentration rank velocity across all 500+ perps. The signal is how fast an asset is climbing — not where it currently sits. Flags assets early, before the cohort positions and before price moves.

Used as primary or secondary entry gate by most strategies. Timing edge layered onto any thesis.
🐋
Whale Index
Per-asset rollup of top-trader positioning

Aggregates top-trader notional exposure across the full leaderboard cohort, per asset. Where Emerging Movers is timing, Whale Index is conviction — how much capital the smartest cohort has actually deployed.

Confluence layer. Most effective combined with trend-following or momentum thesis.
02Decide

Scoring, gating, and conviction

A surfaced opportunity isn't a trade — yet. Senpi runs each candidate through configurable confluence gates and risk guard rails before any capital is committed.

🧠
Confluence Gates
All signals must agree, not just one

Each strategy declares its own gate stack — technical, hyperfeed, structure, funding. A trade only fires when every required gate clears. Strict-gate strategies (Cheetah, Condor) trade rarely but high-conviction; relaxed gates (Vulture) trade more often.

Gate stacks are declared in skill YAML — not hardcoded. Authors tune confluence depth per family.
🛡️
Risk Guard Rails
Declarative limits, no per-strategy boilerplate

Runtime v3.0 reads risk.guard_rails from every strategy config. Position size limits, max leverage, concurrent position counts, asset exclusions — all enforced at the runtime layer before MCP is ever called.

No skill can violate the platform limits. Guard rails are the bridge between strategy creativity and platform safety.
03Execute

Opening the position

When a trade fires, the runtime owns it. Fee-optimized limit orders are placed natively. Every step is logged. Skills never call MCP directly.

Trading Runtime v3.0
The plugin that owns the trading loop

In-process producer daemon with direct HTTPS to MCP. Native FEE_OPTIMIZED_LIMIT entries and exits. Full trade-chain DB telemetry. Clean lifecycle hooks for skill authors. The runtime is the only caller — skills never talk to MCP.

v3.0 skills get fee-optimized limit orders + on-chain telemetry by default. v1.0 skills run on Python cron + openclaw subprocess.
💰
Fee Optimizer
Maker rebate vs market order intelligence

Decides per-trade whether to use FEE_OPTIMIZED_LIMIT (maker rebate, passive fill) versus MARKET orders, based on urgency, spread, and position context. Maker rebates on Hyperliquid can flip the P&L on marginal trades. Compounds at volume.

Configured per skill in runtime.yaml or loaded as a side skill. System property, not per-strategy decision.
04Manage

Cutting losers, riding winners

The DSL Exit Engine is the single most impactful component for long-run P&L. Two phases: defense first, then trail. The position only moves forward.

🛡️
DSL Dynamic Stop-Loss · Two-phase exit engine
Cuts losers immediately. Rides winners patiently.
Phase 1 · Defense
Max-loss threshold, consecutive breach counter, retrace gate. Active from entry — designed to stop out fast on a wrong call.
Phase 2 · Trail
Arms once profitable. Ratcheting trailing stop with tiered ROE locks. The stop only moves toward profit, never away.
+10% ROE
locks 35%
+20% ROE
locks 55%
+35% ROE
locks 70%
Used by every active strategy in the fleet. Defense phase + ratchet phase compose the entire risk lifecycle of a position.
05Exit & Audit

Closing cleanly, learning from every trade

Exits run through the same fee-optimized rails as entries. Every closed trade lands in the audit log — searchable, queryable, and feeding the next iteration of strategy improvement.

📊
Audit Engine
Every action, every signal, every fill

Full chronological record of every decision a strategy makes — signals fired, orders placed, position changes, exits triggered. Queryable by time, asset, action type. The audit log is how strategy authors find bugs and how users build trust.

audit_get_recent_actions · audit_get_strategy_history · audit_query
🔧
Senpi MCP
68 typed tools across 13 categories

Every capability is exposed as a typed MCP tool. Structured API surface covering the full lifecycle — discovery through execution through audit. Browse the surface below or use it in the Dojo.

Discovery · Hyperfeed · Strategy lifecycle · State · Position · Execution · Market data · Ratchet Stop · Arena · Audit · Account · Treasury · User & rewards
MCP tool surface

Browse the API surface

Every capability is exposed as a typed tool. Click a category to see its tools — names and descriptions inline.

66
tools · 13 categories
Discovery5 tools
discovery_get_top_traders
Top-performing traders by PnL, ROE, or win rate across multiple timeframes.
discovery_get_top_strategies
Strategy leaderboard ranked by totalPnl across all users.
discovery_get_trader_history
Full historical trade and position record for a specific trader address.
discovery_get_trader_state
Snapshot of a trader's current open positions and recent activity.
discovery_get_open_position_realized_pnl
Realized PnL on a position that is still open — partial-close accounting.