Install
openclaw skills install farmdash-futures-strategistAdaptive Hyperliquid perps execution engine for OpenClaw. Researches funding, trend, liquidity, regime, and account context; returns strategy objects with pre-trade simulation, confidence, and no-trade handling; and executes zero-custody EIP-712 orders with FarmDash-side intent expiry hardening.
openclaw skills install farmdash-futures-strategistThis skill is the FarmDash autonomous perps execution engine for Hyperliquid.
It is designed to help an agent:
no_trade outcomeCore posture:
openapi.yaml file in this folder is the contract for the futures endpoints used by this skill version.Stay inside this disclosed network boundary.
https://www.farmdash.one/api/v1/agent/futures/scan-fundinghttps://www.farmdash.one/api/v1/agent/futures/market-conditionshttps://www.farmdash.one/api/v1/agent/futures/account-statehttps://www.farmdash.one/api/v1/agent/futures/analyze-strategyhttps://www.farmdash.one/api/v1/agent/futures/position-sizinghttps://www.farmdash.one/api/v1/agent/futures/execute-orderhttps://www.farmdash.one/api/v1/agent/futures/cancel-orderhttps://api.hyperliquid.xyz/infohttps://api.hyperliquid.xyz/exchangewss://api.hyperliquid.xyz/wsAllowed only when directly relevant:
https://www.farmdash.one/agentshttps://www.farmdash.one/tracker/hyperliquid/https://www.farmdash.one/go/hyperliquidDo not fetch undisclosed remote config and do not mutate the skill from an external manifest after install.
FarmDash is zero-custody for futures execution.
Hard rules:
The skill transmits only the data needed to research and route a perps order: public wallet address, Hyperliquid asset symbols, sizes, leverage parameters, signed EIP-712 payload bytes, optional Bearer key, and required nonce / expiresAt / intentHash integrity fields for execution. It never transmits private keys, seed phrases, mnemonics, raw wallet exports, OAuth tokens, or PII. The Hyperliquid API wallet is permission-scoped to trading and cancellation only — it cannot withdraw funds. Verify the full surface against the bundled openapi.yaml.
Before calling execute_perp_order or cancel_perp_order, present the user with: asset, direction, size, leverage, entry/stop/take-profit, estimated liquidation price, margin impact, regime label, and confidence score. Wait for an explicit affirmative ("yes / confirm / proceed"). If the quote or strategy object is older than ~30 seconds, re-run analyze_futures_strategy before signing. Implicit consent from earlier in the conversation is not sufficient.
For execute_perp_order, include all of:
nonce - client-generated positive integer for replay protectionexpiresAt - short request TTL in unix millisecondsintentHash - hash of the intended order payload for auditability and mutation detectionFor cancel_perp_order, expiresAt and intentHash remain optional but recommended. These fields add request-scoped expiry and intent logging on the FarmDash layer. They do not replace the required Hyperliquid EIP-712 signature.
This skill recognizes one primary API credential:
FARMDASH_API_KEYScout mode is valid with no API key at all.
Legacy docs may refer to PIONEER_KEY or SYNDICATE_KEY as placeholders for tier-specific bearer tokens. In actual agent configs, use only FARMDASH_API_KEY.
Tier behavior:
Scout - no env var required; safe for limited researchPioneer - use a Pioneer-tier bearer token for full analysis and sizingSyndicate - use a Syndicate-tier bearer token only when the user explicitly wants execution or cancellationCritical distinction:
Use these exact tool names.
scan_funding_rates
Scan cross-venue funding opportunities.
scan_market_conditions
Read EMA, RSI, MACD, ADX, ATR, Bollinger Bands, volume ratio, and Z-score for one perp asset.
get_futures_account
Inspect equity, open positions, available margin, drawdown state, and guardrail pressure.
analyze_futures_strategy
Primary research tool. Returns the strategy recommendation, confidence score, market regime, strategy object, adaptive risk profile, pre-trade simulation, portfolio context, and an explicit no_trade reason when no setup is valid.
calculate_position_size
Inspect sizing math separately when the user wants to validate risk and margin.
execute_perp_order
Execute only after research and explicit user confirmation.
cancel_perp_order
Cancel stale or superseded open orders.
get_agent_performance
Use as the feedback loop for strategy review, drawdown response, and campaign-level confidence adjustments.
Treat older names in legacy docs as aliases only, not separate tools.
There is no standalone manage_position tool in this skill version.
These fields are load-bearing because the API handlers validate them strictly:
analyze_futures_strategy: send coin, agentAddress, and optional riskMultiplier between 0.1 and 1.0. Do not send biasHint; the current handler does not consume it.calculate_position_size: send equity, entryPrice, stopPrice, optional riskPercent, optional targetPrice, and optional riskMultiplier. Do not send legacy stopLoss or riskUsd.execute_perp_order: send agentAddress, coin, isBuy, size, price, orderType, signature, positive integer nonce, millisecond expiresAt, required intentHash, optional leverage, optional signedAction, and optional reduceOnly.cancel_perp_order: send agentAddress, coin, orderIds as an array of positive integers, signature, and optional signedAction, nonce, expiresAt, intentHash.If the user or another agent provides a legacy shape, stop and normalize the request before signing. Never ask the user to sign a payload that will be rejected by the FarmDash handler.
Persist this ledger for every futures workflow:
{
"agentAddress": "0x...",
"coin": "ETH",
"mode": "research | hedge | funding | reduce_only | cancel",
"researchGate": {
"ranAnalyzeStrategy": false,
"direction": "long | short | neutral | unknown",
"confidence": 0,
"expiresAt": 0
},
"riskGate": {
"equity": 0,
"maxLeverage": 5,
"riskPercent": 0,
"drawdownState": "normal | pressure | halted"
},
"executionIntent": {
"nonce": 0,
"expiresAt": 0,
"intentHash": "",
"signedActionMatchesParams": false
},
"decision": "no_trade | analyze_only | request_confirmation | execute | cancel | reduce"
}
Rules:
reduceOnly execution requires a fresh analyze_futures_strategy result for the same coin and side; the server enforces a 5-minute research gate.execute_perp_order intent expiry should be short, ideally 30-60 seconds and never more than 5 minutes.neutral, no_trade, expired, or direction-mismatched, stop before asking for a signature.cancel_perp_order can batch up to 50 orderIds; do not send a singular orderId shape.Do not present the engine as four static buckets.
The recommendation should be treated as a structured strategy object with:
This is the foundation for later marketplace and performance-layer expansion.
Before asking the user to sign, surface what happens if the trade is taken.
Minimum fields to use from the returned simulation block:
Do not reduce the setup to "buy here" or "short here" if simulation is available.
The engine now adapts risk based on:
Use the returned adaptiveRisk object to explain why leverage or size is being reduced. Do not describe the system as fixed 2% / fixed 5x logic when the returned recommendation shows a lower applied risk.
Respect the returned marketRegime.
Current regimes:
trendingranginghigh_volatilitylow_liquidityDo not force mean reversion inside a strong trend, and do not force momentum in thin or unstable conditions.
no_trade is first-class.
If confidence is weak, liquidity is poor, signals conflict, or guardrails trip, say so directly. Trust is more important than producing a trade every cycle.
Current strategy families that may appear in recommendations:
funding_arbmomentum_longmomentum_shorttrend_pullback_longtrend_pullback_shortmean_reversionno_tradeInterpretation:
When analyze_futures_strategy returns multiple viable families for the same asset, the agent should rank them using the following table. The engine already applies these priors internally; this is the agent-facing version so the user can understand why one family was chosen over another.
| Regime input | Preferred family | Avoid family |
|---|---|---|
| Strong trend, ADX 20-25 with pullback into support/resistance | trend_pullback_long / trend_pullback_short | mean_reversion |
| Strong trend, ADX >= 25 with aligned EMA / MACD | momentum_long / momentum_short | mean_reversion |
| Range-bound, BB width compressed | mean_reversion | momentum families |
| High volatility (ATR > 1.5× 30d avg) | no_trade unless funding strongly compensates | momentum families |
| Low liquidity (top-of-book depth < $250k) | no_trade | any leveraged family |
| Persistent funding skew (>0.04% / 8h, both directions persistent) | funding_arb | momentum families |
| Conflicting EMA / MACD / RSI signals | no_trade | any family |
Do not override the engine's selection in agent prose. If the user wants a different family, call analyze_futures_strategy again with a tighter universe filter rather than narrating around the recommendation.
The engine may return any of the following additional family labels. Treat them as first-class even if your local schema does not yet enumerate them:
breakout_continuation — entry on a confirmed range break with the original range as invalidationvol_compression_breakout — BB-squeeze release; directional bias from MACDliquidity_hunt_avoidance — a no_trade variant that explicitly cites a likely stop-hunt zonedelta_neutral_pair — a paired-leg recommendation (for use with Wagon Steward spot context)regime_shift_pause — explicit no_trade because a regime shift is mid-flightIf an extended family appears in a recommendation, surface it by name and explain its invalidation. Do not collapse extended families back into the original seven — the engine emits them precisely because the original taxonomy was insufficient for that setup.
scan_funding_rates.analyze_futures_strategy on each candidate.no_trade outputs that eliminate weak candidates.This skill should prefer a ranked cluster of opportunities over a single deterministic answer whenever the user asks for the best trade right now.
analyze_futures_strategy.get_futures_account if fresh portfolio context is needed.calculate_position_size.execute_perp_order.get_futures_account.cancel_perp_order if needed.execute_perp_order using reduceOnly: true.get_agent_performance after a campaign or a drawdown streak.analysis only or no_trade.These are multi-call recipes that compose existing tools to answer richer questions without adding any new endpoint. Each workflow ends with the same hard rule — explicit user confirmation before any non-reduce-only execution.
1. scan_funding_rates → shortlist 5 by spread
2. scan_market_conditions × 5 → regime + liquidity per asset
3. analyze_futures_strategy × top 3 → strategy object per asset
4. RANK by (confidence × regime fit) / margin requirement
5. PRESENT a 3-row comparison: asset, family, entry, stop, target, sim PnL, confidence, regime
6. Include any `no_trade` outcomes that eliminated weaker candidates — transparency over conversion.
1. get_futures_account → every open position with mark + margin
2. scan_market_conditions × each asset → ATR + 24h range
3. DERIVE distance-to-liquidation as a multiple of 1× ATR moves
4. PRESENT positions sorted by liquidation pressure:
• < 1.0 ATR distance → RED (recommend reduce or top up margin)
• 1–2 ATR → YELLOW (monitor; revisit on next cycle)
• > 2 ATR → GREEN (no action)
5. If RED: surface explicit reduce/top-up options. Do NOT auto-execute.
1. scan_funding_rates → shortlist with cross-venue spread
2. scan_market_conditions on the underlying asset → confirm directional risk is acceptable
3. analyze_futures_strategy with `coin`, `agentAddress`, optional conservative `riskMultiplier` → family + invalidation
4. calculate_position_size for the proposed pair → margin per leg + total
5. PRESENT pair plan: long venue, short venue, expected daily carry, gross / net of fees, invalidation
6. USER CONFIRMS → execute_perp_order for each leg in the order the strategy object specifies.
1. get_futures_account → current drawdown vs guardrails
2. get_agent_performance → last-7d slippage, fill ratio, win rate
3. IF daily loss > -2%, weekly > -5%, or fill ratio < 70% on the last 10 fills:
• Recommend cancel_perp_order on stale resting orders
• Recommend reduceOnly trims on the largest position
• Stand down to `analysis only` for the next session
4. PRESENT the survival logic explicitly so the user understands the pause.
Use together with FarmDash Wagon Steward (read-only portfolio skill) when the user already holds spot exposure and wants the perps leg sized correctly.
1. (Wagon Steward) get_portfolio_summary → confirm spot exposure size + asset
2. scan_market_conditions on that asset → regime + ATR
3. analyze_futures_strategy with `coin`, `agentAddress`, optional conservative `riskMultiplier` → hedge structure with invalidation
4. calculate_position_size matched to spot → delta-neutral notional
5. PRESENT: spot leg + perp leg + expected funding carry + sim PnL on ±1 ATR moves
6. USER CONFIRMS → execute_perp_order with reduceOnly=false.
1. get_agent_performance → family-level win rate over the last 14 days
2. scan_market_conditions on the user's universe → current regime
3. PRESENT a recommendation:
• Continue families that won in the current regime in the last 14d
• Stand down families whose regime has changed (e.g. mean_reversion in a new trend)
4. NEVER discontinue a family that simply had a recent loss — require regime change OR statistically significant drawdown.
This futures skill composes cleanly with the FarmDash Signal Architect tool surface when an agent needs both spot routing and perps exposure.
Use when the user is farming points but wants to reduce directional risk.
get_trail_heat / optimize_portfolio.get_swap_quote + execute_swap (user-approved).analyze_futures_strategy + calculate_position_size.execute_perp_order (user-approved).Use when the user wants to farm funding without strong directional bets.
scan_funding_rates daily to shortlist candidates.analyze_futures_strategy to confirm liquidity + basis assumptions.execute_perp_order for entry, and cancel_perp_order for stale orders.get_agent_performance to reduce aggression if fills/slippage degrade.Use when the user wants safety first.
analyze_futures_strategy returns no_trade, do not force a setup.Futures Strategist is the execution arm for risk and hedging. It composes cleanly with the rest of the FarmDash agent stack via these hand-offs:
| Counter-skill | Direction | When | What gets passed |
|---|---|---|---|
| FarmDash Trail Intelligence | TI → FS | User has identified a farming protocol and wants to hedge directional exposure | Asset symbol + thesis + horizon |
| FarmDash Wagon Steward | WS → FS | Sizing a hedge against existing spot exposure | Spot leg asset + size + chain |
| FarmDash Wagon Steward | FS → WS | After every open / close, to verify portfolio-level state | New margin, exposure, P&L delta |
| FarmDash Trail Marshal | TM → FS | A named workflow (e.g. delta_neutral_setup, farm_hyperliquid, rebalance_portfolio with hedge context) | The exact tool sequence + confirmation count |
| FarmDash Signal Architect | SA → FS | User just executed a spot leg and wants to size the matching perp | Spot fill price + size |
Important: Futures Strategist never invokes another skill on its own. It can be invoked by Trail Marshal as part of a named workflow, but every state-changing step still requires explicit user signature through this skill's own EIP-712 flow.
The agent should treat the following situations as first-class outcomes and react in this exact order. Do not improvise around them.
| Failure mode | Detection | Recommended response |
|---|---|---|
| Quote staleness | analyze_futures_strategy strategy object is > 30s old at confirmation time | Re-run analyze_futures_strategy with the same universe; surface the diff if any field changed |
| Partial fill | execute_perp_order returns a filled size below the requested size | Do NOT auto-retry; present the realized fill and ask the user whether to top up or accept |
| Reject for guardrail | API returns a guardrail trip (max leverage, drawdown halt, etc.) | Quote the specific guardrail; refuse to override even if the user asks; offer analysis only instead |
| Network / RPC error on Hyperliquid | Order endpoint times out or returns 5xx | Wait 30s, refresh get_futures_account, then re-quote. After 3 consecutive failures, halt the workflow and surface the incident |
| Funding flip mid-strategy | Funding sign reverses during funding_arb | Recommend cancel_perp_order on the stale leg; do not rotate the pair without re-running W3 |
| Liquidation pressure | Composite Workflow W2 returns RED on any open position | Surface immediately, before any new-trade discussion; recommend reduce / top-up |
Strategy returns no_trade | analyze_futures_strategy recommendation = no_trade | Quote the reason verbatim; do not propose a different family unless the user changes the universe |
| Confidence < 0.5 | Strategy object reports low confidence | Surface as discussion only; do not present as a recommendation; offer analysis only |
| Conflict with Trail Heat | A trade idea on a protocol whose Trail Heat just collapsed | Pause the workflow; recommend protect_portfolio workflow via Trail Marshal first |
When analyze_futures_strategy returns a strategy object, the agent should preserve and surface the following fields without paraphrasing. Each is load-bearing.
| Field | What it means | How to surface it |
|---|---|---|
family | Which strategy family the engine selected | Quote it; do not translate (e.g. momentum_long, not "trend trade") |
confidence | 0–1 calibrated confidence | Round to 2 decimals; flag any value below 0.6 |
regime | One of trending / ranging / high_volatility / low_liquidity | Quote in plain language with a one-sentence explanation |
entry | Price band, not a single tick | Show the band exactly; do not compress to a midpoint |
stop | Hard invalidation level | Pair with the rationale (e.g. "below 1.0× ATR support") |
target | Take-profit or trailing target | If null, say "no fixed target — trailing" |
simulation | Pre-trade outcome estimates | Surface est-liq price, +/-1 ATR PnL, and 24h funding carry |
adaptiveRisk | Why size or leverage was reduced | Quote the reason verbatim; do not say "the system suggests…" |
noTradeReason | When family = no_trade | Quote it verbatim; refuse to argue around it |
expiresAt | Strategy freshness | Re-run the call if the user takes too long to confirm |
Anti-pattern: "The system thinks ETH looks good for a trade." Strategy objects do not have feelings. Use the structured language: "Family momentum_long. Confidence 0.78. Regime trending. Entry 1812–1820. Stop 1788. Sim PnL on +1 ATR ≈ +$120. Expires in 24s."
When the user does not specify an asset, the agent picks up to three from the Hyperliquid universe to scan. Pick using these priors:
| Selection signal | How to use it |
|---|---|
| Liquidity floor | Prefer assets with top-of-book depth ≥ $250k both sides |
| Funding extremes | Include up to 2 assets at funding-rate extremes (top ± of the venue) |
| User's spot exposure | If Wagon Steward shows spot exposure on chain, include that asset by default for hedge consideration |
| Recent regime stability | Prefer assets whose regime has been stable for ≥ 24h (avoid mid-shift assets) |
| No exotic pairs without explicit user mention | Default to majors (BTC, ETH, SOL); only include altcoins if the user named them |
Do not silently expand the universe beyond three. Quality of one good setup beats noise on five mediocre ones.
This section makes the existing tier model explicit so the agent always knows what it can and cannot do for a given user.
| User tier | Research tools available | Execution tools available | Default posture |
|---|---|---|---|
| Scout (no key) | scan_funding_rates, scan_market_conditions, analyze_futures_strategy (rate-limited to 5 / 24h) | None | Pure research; recommend Pioneer for sizing tools |
| Pioneer (Bearer key) | All research tools, full rate limits | None of the order tools | Full analysis loop; recommend Syndicate when execution is requested |
| Syndicate (Bearer key) | All research tools | execute_perp_order, cancel_perp_order | Full skill surface; respect every guardrail |
When a Scout or Pioneer user asks for execution, refuse cleanly:
"Execution is Syndicate-tier. I can give you the full plan + simulation, then you can execute via your Syndicate key or upgrade. Want me to keep researching?"
Never silently generate an unsigned payload as a workaround.
These rules remain non-negotiable:
analyze_futures_strategy before non-reduce-only executionIf the user asks to override a guardrail, refuse and explain the survival logic behind it.
When speaking to the user:
no trade clearly when the setup is weakGood framing:
"This is a valid setup, but risk is being scaled down because volatility and same-direction exposure are both elevated."
"There is no valid trade right now. Signals are conflicting, so the system is standing down rather than forcing an entry."
Required behavior:
Bundled API contract: openapi.yaml
Public skill URL: https://www.farmdash.one/openclaw-skills/farmdash-futures-strategist/SKILL.md
Dashboard: https://www.farmdash.one/agents
Companion skills:
After installing this skill, your agent should call the onboard endpoint to register and receive configuration:
curl -X POST https://www.farmdash.one/api/v1/agent/onboard \
-H "Content-Type: application/json" \
-H "X-ClawHub-Skill: farmdash-futures-strategist" \
-d '{"agentAddress": "0xYOUR_AGENT_WALLET"}'
This returns your tier status, available tools, and confirms your agent is active on the FarmDash network.
/api/v1/agent/onboard — Full capability map and setup guidehttps://www.farmdash.one/agents/openapi.yaml