/superior-skills:hyperliquidfrom superior-skills
Backtests and deploys Freqtrade strategies on Hyperliquid via Superior Trade Unified API. Handles venue setup, wallet checks, HIP-3 perp trading, and deployment diagnostics.
Ships in superior-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Backtest and deploy Freqtrade strategies on Hyperliquid through Superior Trade's managed cloud.
Read ../../references/unified-runtime.md
before any Superior Trade request. Use only current Unified API methods and
payload fields.
Base URL: https://api.superior.trade
Auth: x-api-key header on all protected endpoints
Discovery: GET /openapi.json (OpenAPI), GET /install.txt, and GET /.well-known/mcp.json
Before venue setup, backtesting, deployment, or execution, read
../../references/unified-runtime.md.
Use GET /context/venues and GET /runtime/frameworks to discover support,
then use the Unified runtime endpoints. If a required Hyperliquid operation is
absent from the contract, report it as unavailable.
Load these on demand — each is the full detail behind a summary below.
| Read | When |
|---|---|
references/api.md | You need Unified route selection for account, context, backtesting, deployment, typed execution, or withdrawal (POST /wallet/withdraw). |
references/strategy-config.md | You are writing or fixing config JSON or strategy Python — config fields, code template, TA-Lib usage, multi-entry (DCA/grid), funding-rate access, minimal_roi shapes. |
references/wallets-and-accounts.md | Anything about wallets, balances, deposits, sub-accounts, multi-strategy capacity, pair formats, or HIP-3 tickers. |
references/troubleshooting.md | A deployment or backtest is failing, trading zero times, hitting rate limits, or showing orphan positions. |
Environment-specific facts that defy reasonable assumptions. Read these before acting.
XYZ-AAPL/USDC:USDC is correct; XYZ:AAPL/USDC:USDC is the single most common format mistake. HIP-3 pairs are also absent from the default {"type":"meta"} call — you must pass the dex, e.g. {"type":"meta","dex":"xyz"}.stake_amount × max_open_trades exactly will still fail. The exchange reserves roughly 1% for fees, so cap stake_amount at ~95% of balance / max_open_trades or entries get rejected silently.https://account.superior.trade. Never send users to app.superior.trade, including when an API error message itself contains that older URL.talib.BBANDS(...) and friends crash at runtime if unpacked as a single value — see references/strategy-config.md.subAccounts2; funds sitting in a sub-account cannot back a master deployment.wallet_address when storing credentials and the server assigns the next idle trading account.This skill requires exactly one credential: an x-api-key header value. The only secret the agent uses is SUPERIOR_TRADE_API_KEY from the environment.
Security rules (non-negotiable):
app.superior.trade — the correct URL is https://account.superior.tradeKey scope notice: The API key can create and start live deployments that execute real trades using the user's managed wallet, submit contract-supported typed executions, and request a Unified wallet withdrawal after confirmation. It cannot export private keys or provide an undocumented venue-specific deposit/transfer action. Users should confirm scope with Superior Trade and backtest their strategy first.
| Can do | Cannot do |
|---|---|
| Create, list, delete backtests | Access other users' data |
| Create, start, stop, delete deployments (including live trading with real funds) | Export or view private keys |
| Trigger server-side credential resolution (no user secrets collected) | Ask users for wallet secrets |
| View deployment logs, status, wallet metadata | Move unsupported assets or use unsupported chains |
| Deposit native Arbitrum USDC from the user's platform wallet into Hyperliquid via the API | Bridge from external wallets |
| Return Hyperliquid USDC to the server-resolved Superior wallet via the API | Withdraw to an arbitrary external address |
Before any live deployment, the agent MUST present this summary and wait for explicit confirmation:
Deployment Summary:
• Strategy: [name]
• Exchange: hyperliquid
• Trading mode: [spot/futures]
• Pairs: [list]
• Stake amount: [amount] USDC per trade
• Max open trades: [n]
• Stoploss: [percentage]
• Margin mode: [cross/isolated] (futures only)
⚠️ This will trade with REAL funds. Proceed? (yes/no)
Do NOT start a live deployment without an explicit affirmative response.
IMPORTANT: The correct URL is https://account.superior.trade — NOT
app.superior.trade. Never send users toapp.superior.trade.
Use SUPERIOR_TRADE_API_KEY from the environment or credential manager.
When a user needs to get their API key:
GET /walletst_live_...) from your account settingsSUPERIOR_TRADE_API_KEY in your agent's environment/credential settingsGET /context/venues and GET /runtime/frameworksGET /openapi.json, report it as unavailableIf the SUPERIOR_TRADE_API_KEY env var is already set, use it directly in the x-api-key header without prompting the user.
| Method | Path | Description |
|---|---|---|
| GET | /health | { "status": "ok", "timestamp": "..." } |
| GET | /openapi.json | Unified OpenAPI contract |
| GET | /install.txt | Installation instructions |
| GET | /.well-known/mcp.json | MCP discovery manifest |
Check Hyperliquid balances with BOTH endpoints:
POST https://api.hyperliquid.xyz/info → {"type":"clearinghouseState","user":"0x..."}POST https://api.hyperliquid.xyz/info → {"type":"spotClearinghouseState","user":"0x..."}If the agent fails the same task 3+ times (e.g. strategy code keeps crashing, backtest keeps failing), stop and:
POST /runtime/backtests — create with framework: "freqtrade", venue: "hyperliquid", strategy source/config, instruments, and timerange fields from GET /openapi.json.GET /runtime/backtests/{id} every 10s until completed or failed (1–10 min)GET /runtime/backtests/{id}/logs for framework output and diagnosticsGET /runtime/backtests/{id}/logsDELETE /runtime/backtests/{id}Backtests are simulations. Do not size a backtest from the user's live wallet by default; use simulated capital to evaluate the strategy. Only mirror the user's current wallet if they explicitly ask for a live-wallet simulation.
dry_run_wallet is the total simulated wallet inventory by asset. It is an object/map, not a scalar. Examples: { "USDC": 1000 }, { "USDC": 100, "BTC": 0.1 }.stake_amount is the amount the backtest/bot may allocate per trade slot. A numeric value is fixed stake per entry slot; "unlimited" divides the simulated wallet across max_open_trades slots.dry_run_wallet to the total simulated balances so PnL is measured against the correct capital base. Example: a $50 USDC simulation with $45 usable per trade uses stake_amount: 45 and dry_run_wallet: { "USDC": 50 }.stake_amount at or below ~90% of USDC / max_open_trades; for HIP-3 assets, use ~70% because fees and isolated-margin buffers are higher.stake_amount: "unlimited" with max_open_trades: -1. When stake is unlimited, max_open_trades must be a finite positive integer so the wallet can be divided across slots.position_adjustment_enable and adjust_trade_position, stake_amount may be fixed or "unlimited". If using "unlimited", you must control the initial entry size in custom_stake_amount; otherwise the first entry can consume all available capital. In either mode, dry_run_wallet must cover the maximum laddered exposure, not just the first entry.For the first backtest of any new idea on a given pair, do not submit a single config. Submit a 3-variant sweep that varies ONE parameter, run all 3 in parallel, then compare horizontally.
Why: building a config is the expensive cognitive step; running a backtest is cheap. A single result tells you whether one point worked; three neighboring points tell you whether the region works and which direction to iterate.
How to fan out:
POST /runtime/backtests calls in parallel (different config for each variant; same code unless the variant is a code-level change).GET /runtime/backtests/{id} endpoints in parallel each cycle.GET /runtime/backtests/{id} results in parallel once status is completed.Each backtest runs in isolation, so parallel execution does not slow any single run.
What to vary (pick ONE axis per sweep):
| Strategy family | Parameter to vary | Three variants |
|---|---|---|
| Momentum / EMA cross | EMA periods | 5/10/20, 8/13/21, 12/26/50 |
| Trend-following | ATR stop multiplier | 2.0, 3.0, 4.0 |
| Mean-reversion (RSI) | Oversold threshold | <25, <30, <35 |
| Bollinger Bands | Std-dev width | 1.5, 2.0, 2.5 |
| Breakout | Lookback window | 20, 50, 100 candles |
When NOT to sweep:
After status = completed, read both GET /runtime/backtests/{id} and
GET /runtime/backtests/{id}/logs. Present only metrics actually returned by
the Unified API or its framework logs:
Before suggesting deployment, always run a backtest first. If the backtest produced zero trades over a timerange that should have generated signals (e.g. weeks on a 5m timeframe), do not offer deployment — the strategy or pair likely has an issue. If PnL is negative, note the timerange may be unsuitable but don't dismiss the strategy outright. If PnL is positive, present results without overpromising — strong backtest fit can indicate overfitting. Stay neutral and let the user decide.
For 3-variant sweeps, present results as a single table (Variant | Config | PnL% | Trades | Sharpe | Max DD), then read the shape:
Zero-trade rule for sweeps: zeros in 1–2 variants of a sweep are informative (the parameter was too tight), not a failure. Only treat the sweep as failed when ALL 3 variants return zero trades.
POST /runtime/deployments with top-level framework, venue, mode, name, code, and configPUT /runtime/deployments/{id}/credentials with a credential form published by GET /openapi.jsonPUT /runtime/deployments/{id}/status → {"action": "start"}GET /runtime/deployments/{id}, GET /runtime/deployments/{id}/logsPUT /runtime/deployments/{id}/status → {"action": "stop"}Before PUT /runtime/deployments/{id}/status → {"action":"start"}:
For live deployments (credentials stored):
GET /wallet and GET /context/venues. Proceed only when the returned wallet and Hyperliquid capability data show the required support; otherwise report the blocker.GET /runtime/deployments/{id}. If credentials are required, attach the exact contract-defined payload with PUT /runtime/deployments/{id}/credentials.GET /runtime/deployments/{id} → note wallet_address (agent wallet) and agent_wallet_address.stake_amount × max_open_trades fits within available collateral with a fee buffer. If funding is insufficient and Unified API does not publish a venue deposit action, stop and tell the user what funding step remains unavailable.clearinghouseState for open positions on the main wallet. If positions or orders exist, show the user details (pair, side, size, PnL) and ask them to close before deploying — leftover positions can block new entries or cause unexpected margin usage.For dry-run deployments (no credentials): Skip steps 1–5, the deployment runs in simulation mode without real funds.
POST https://api.hyperliquid.xyz/info → {"type":"meta"} for standard perps, or {"type":"meta", "dex":"xyz"} (or the relevant dex name) for HIP3 pairs. Verify the coin name exists in the universe array.Do NOT skip any step or assume it passed without the API call.
Use POST /wallet/withdraw only with the request shape and verified destination
published by the Unified contract. A typed POST /runtime/executions request may
place or cancel supported orders; it is not an undocumented exit-all or
sub-account transfer primitive. If the required unwind action is absent from
GET /openapi.json, report it as unavailable. Every money-moving action
requires an exact summary and explicit confirmation first.
Strategy templates and primitives are separate skills in this library. Load one when the user's idea matches it, rather than writing a strategy from scratch.
Strategy templates: dca-weekly, grid-trading, funding-rate-arbitrage, funding-squeeze, basis-arb, breakout, mean-reversion, bollinger-reverter-4h, donchian-strong-regime, scalping
Primitives: regime-overlay (trend gate), dsl-exit-engine (ROI ladder + ratcheting trail), trade-thesis (pre-trade bull/bear case), backtesting (windows, sweeps, walk-forward), fees-optimizations (maker vs taker, fee budgeting)
Market scanning: intelligence — live multi-bucket scoring across Hyperliquid alts and HIP-3, deployed as multi-pair buckets
Other venues: aerodrome (Base spot AMM), lighter, polymarket
Funding an account: deposit-qr (payment QR for a Superior-managed wallet), external-deposit (bridging in from an external wallet)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub superior-trade/superior-skills --plugin superior-skills30 skills in this plugin
/aerodromeUse when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade configs using exchange.name "aerodrome", AERO/USDC or CHECK/USDC pairs, AMM market swaps, wallet/gas balance checks, no-orderbook pricing, or Aerodrome live deployment safety./backtestingUse when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count thresholds, exit-reason mix, parameter sweeps, walk-forward validation, zero-trade diagnosis, compute-cost estimation, or "is this backtest result trustworthy?". Pair with the relevant strategy skill, such as mean-reversion or breakout./basis-arbUse when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Long-perp leg only — pure two-leg basis arb requires a paired spot short (or long) which Freqtrade can't run cleanly. The strategy below captures the directional read, not the hedged carry./bollinger-reverter-4hUse when writing a symmetric Bollinger-band mean-reversion strategy on the 4h timeframe — BB reverter, range trader, chop strategy, ADX<25 mean reversion, band-fade with a minimal_roi ladder. Long-or-short on 2-sigma band touches with RSI confirmation. Validated on BTC/ETH/SOL/DOGE; numbers and the exact ROI ladder are in the body./breakoutUse when writing a swing/intraday breakout strategy on Superior Trade — anything described as breakout, momentum, trend following, 12-hour high, range expansion, riding new highs, Donchian breakout. Note this template was unprofitable in our reference backtest (long-only in a -13% market); explain regime sensitivity to the user./catalyst-confirmationUse when a Polymarket prediction-market thesis rests on an external event — CPI, Fed, elections, court rulings, ETF decisions — and needs market confirmation before committing.Other plugins' skills for the same job