Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Backtest and deploy trading strategies on Superior Trade's managed cloud.
.claude/skills/superior-trade-hyperliquid/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 376% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 249% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 218% | 0% |
Backtest and deploy Freqtrade strategies on Hyperliquid through Superior Trade's managed cloud.
Base URL: https://api.superior.trade Auth: x-api-key header on all protected endpoints Docs: GET /docs (Swagger UI), GET /openapi.json (OpenAPI spec), GET /llms.txt
Load these on demand — each is the full detail behind a summary below.
| Read | When | | --- | --- | | references/api.md | You need the exact request/response shape for any endpoint: account, backtesting, deployment, portfolio deposit, getting funds back out (POST /v3/portfolio/hyperliquid/withdraw), or closing everything at once (portfolio exit). | | 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.trade> Key scope notice: The API key can create and start live trading deployments that execute real trades using the user's platform-managed trading wallet. It can also initiate native Arbitrum USDC deposits into Hyperliquid and return Hyperliquid USDC to the user's Superior wallet. It cannot export private keys, bypass the Superior wallet for withdrawals, or move unsupported assets/chains. 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 to app.superior.trade.
Use SUPERIOR_TRADE_API_KEY from the environment or credential manager.
When a user needs to get their API key:
GET /v3/accountst_live_...) from your account settingsSUPERIOR_TRADE_API_KEY in your agent's environment/credential settingsPOST /v3/account/{address}/hyperliquid for the selected trading walletPOST /v2/portfolio/hyperliquid/deposit to deposit it into Hyperliquid before live tradingIf 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 | /docs | Swagger UI | | GET | /openapi.json | OpenAPI 3.0 spec | | GET | /llms.txt | LLM-optimized API docs | | GET | /.well-known/ai-plugin.json | AI plugin 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 /v2/backtesting — create with config, code, and timerange ({ "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" }). If the dates are invalid or omitted, the server picks a suitable duration based on the timeframe.PUT /v2/backtesting/{id}/status with {"action": "start"}GET /v2/backtesting/{id}/status every 10s until completed or failed (1–10 min)GET /v2/backtesting/{id}/logs — the metrics live here. results and resultUrl on the record are null even for a completed run (checked across a month of completed backtests), so parse the Freqtrade summary tables out of the logsGET /v2/backtesting/{id}/logsDELETE /v2/backtesting/{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 /v2/backtesting calls in parallel (different config for each variant; same code unless the variant is a code-level change).PUT /v2/backtesting/{id}/status start calls in parallel.GET /v2/backtesting/{id}/status endpoints in parallel each cycle.GET /v2/backtesting/{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 GET /v2/backtesting/{id}/logs. Freqtrade prints its full summary there — trade counts, win rate, profit, drawdown and duration tables. Do not wait on resultUrl: it is null on completed runs, so an agent that blocks on it will report a successful backtest as broken. Present these key metrics:
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 /v2/deployment with config, code, namePOST /v2/deployment/{id}/credentials with { "exchange": "hyperliquid", "wallet_address": "0x...", "subaccount_address": "0x..." } — wallet_address and subaccount_address are optional; server assigns wallet automatically if omittedPUT /v2/deployment/{id}/status → {"action": "start"}GET /v2/deployment/{id}/status, GET /v2/deployment/{id}/logsPUT /v2/deployment/{id}/status → {"action": "stop"}Before PUT /v2/deployment/{id}/status → {"action":"start"}:
For live deployments (credentials stored):
GET /v3/account, then call POST /v3/account/{address}/hyperliquid for that wallet before live deployment. This is a write-capable bootstrap endpoint: it may set the Hyperliquid referrer, approve Superior's builder fee, create and approve the agent wallet, and persist agent wallet metadata. After it returns, verify readiness with GET /v3/account/{address}/status/hyperliquid; proceed only when onboarding.ready is true and onboarding.blockers is empty. If bootstrap returns wallet_not_exportable, hyperliquid_bootstrap_failed, or readiness still has blockers, stop and report the exact blocker instead of starting live trading.GET /v2/deployment/{id} → credentials_status: "stored". If not, call POST /v2/deployment/{id}/credentials.GET /v2/deployment/{id}/credentials → note wallet_address (agent wallet) and agent_wallet_address.clearinghouseState + spotClearinghouseState for single deployments. If the master account has sub-accounts, also query subAccounts2 and sum total balance across master + all sub-accounts — funds allocated to sub-accounts are not available to the master. Then verify stake_amount × max_open_trades fits within the available balance. The exchange reserves a small fee buffer (~1%), so set stake_amount to no more than ~95% of balance / max_open_trades to avoid silent trade rejections. If Hyperliquid funds are insufficient but the user has native Arbitrum USDC in the platform wallet, ask for explicit confirmation and call POST /v2/portfolio/hyperliquid/deposit, then re-check balances before starting. If both Hyperliquid and platform-wallet funds are insufficient, tell the user they must add more of their own capital to the platform account before live trading can proceed.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.
Two different operations — do not confuse them:
POST /v2/portfolio/hyperliquid/exit closes ALL positions on the given subaccount_address and returns its funds to the master. Sub-account scoped; it does not take money off Hyperliquid.POST /v3/portfolio/hyperliquid/withdraw moves USDC to the server-resolved main Superior wallet on Arbitrum. The destination is resolved server-side, so you cannot send to an arbitrary or external address.Both move real money. State the amount and destination and get an explicit yes first. Stop any strategy trading that account before withdrawing, or the withdrawal can underfund a live position. Hyperliquid also deducts a 1 USDC fee from the withdrawal amount — never withdraw 1 USDC or less. Full shapes and the confirmation template are in references/api.md.
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)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 26,452 | 38,392 | +45% | 1 | 1 | 0% | 5,493 | 11,154 | +103% | 0 | 0 | — |
case-02 | fail→fail | 23,540 | 11,869 | -50% | 1 | 1 | 0% | 2,082 | 6,179 | +197% | 0 | 0 | — |
case-03 | fail→pass | 18,315 | 9,510 | -48% | 1 | 1 | 0% | 2,880 | 7,485 | +160% | 0 | 0 | — |
case-04 | pass→pass | 12,335 | 9,837 | -20% | 1 | 1 | 0% | 2,141 | 7,059 | +230% | 0 | 0 | — |
case-05 | pass→pass | 14,832 | 7,608 | -49% | 1 | 1 | 0% | 2,603 | 6,667 | +156% | 0 | 0 | — |
case-06 | fail→pass | 8,876 | 2,763 | -69% | 1 | 1 | 0% | 1,261 | 6,005 | +376% | 0 | 0 | — |
case-07 | pass→pass | 10,787 | 7,043 | -35% | 1 | 1 | 0% | 2,013 | 6,788 | +237% | 0 | 0 | — |
case-08 | fail→fail | 13,105 | 6,447 | -51% | 1 | 1 | 0% | 2,209 | 6,738 | +205% | 0 | 0 | — |
case-09 | fail→pass | 10,931 | 4,987 | -54% | 1 | 1 | 0% | 1,786 | 6,241 | +249% | 0 | 0 | — |
case-10 | fail→pass | 11,773 | 12,977 | +10% | 1 | 1 | 0% | 2,090 | 6,653 | +218% | 0 | 0 | — |
case-11 | fail→pass | 11,720 | 5,322 | -55% | 1 | 1 | 0% | 2,191 | 6,485 | +196% | 0 | 0 | — |
case-12 | pass→pass | 6,983 | 4,503 | -36% | 1 | 1 | 0% | 1,193 | 6,384 | +435% | 0 | 0 | — |
case-13 | pass→pass | 7,796 | 5,240 | -33% | 1 | 1 | 0% | 1,446 | 6,405 | +343% | 0 | 0 | — |
case-14 | pass→pass | 14,140 | 7,151 | -49% | 1 | 1 | 0% | 2,049 | 6,630 | +224% | 0 | 0 | — |
case-15 | fail→pass | 12,536 | 5,989 | -52% | 1 | 1 | 0% | 2,391 | 6,667 | +179% | 0 | 0 | — |
case-16 | pass→pass | 6,628 | 3,301 | -50% | 1 | 1 | 0% | 1,052 | 6,031 | +473% | 0 | 0 | — |
case-17 | fail→pass | 17,909 | 13,055 | -27% | 1 | 1 | 0% | 2,541 | 7,827 | +208% | 0 | 0 | — |
case-18 | pass→pass | 13,121 | 8,211 | -37% | 1 | 1 | 0% | 2,239 | 6,699 | +199% | 0 | 0 | — |
case-19 | pass→pass | 7,549 | 6,032 | -20% | 1 | 1 | 0% | 1,420 | 6,655 | +369% | 0 | 0 | — |
case-20 | pass→pass | 10,973 | 4,644 | -58% | 1 | 1 | 0% | 1,790 | 6,214 | +247% | 0 | 0 | — |
case-21 | fail→pass | 11,176 | 5,283 | -53% | 1 | 1 | 0% | 1,960 | 6,332 | +223% | 0 | 0 | — |
case-22 | fail→pass | 10,595 | 5,488 | -48% | 1 | 1 | 0% | 1,701 | 6,472 | +280% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 21 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.