Hyperliquid Trading Agent
An AI-powered agent that uses Claude to analyze markets and trade perpetual futures on Hyperliquid, crypto, stocks, commodities, indices, and forex via HIP-3 markets. The model decides; the code keeps it safe.
How it trades
01
Read the market
Fetches real-time candles and computes indicators locally, EMA, RSI, MACD, ATR, Bollinger Bands, ADX, OBV, VWAP.
02
Ask Claude
Sends full market context to Claude, which decides buy / sell / hold for each asset with reasoning.
03
Execute safely
Places trades with take-profit and stop-loss orders, then manages them through the position’s life.
04
Enforce the guards
Hard-coded limits sit between the model and the exchange, leverage caps, loss protection, and exposure limits the LLM can’t override.
Safety guards
All enforced in code, not just LLM prompts, the model can’t talk its way past them. Every limit is configurable via .env.
Max position size
Single position capped at 10% of portfolio
Force close
Auto-close positions at 20% loss
Max leverage
Hard leverage cap
Total exposure
All positions combined capped at 50%
Daily circuit breaker
Stops new trades at 10% daily drawdown
Mandatory stop-loss
Auto-set if the LLM doesn’t provide one
Max positions
Concurrent position limit
Balance reserve
Won’t trade below 20% of initial balance
Tradeable markets
All 229+ Hyperliquid perp markets, plus HIP-3 tradfi assets.
Crypto
BTC, ETH, SOL, HYPE, AVAX, SUI, ARB, LINK + 200 more
Stocks
TSLA, NVDA, AAPL, GOOGL, AMZN, META, MSFT, COIN, PLTR…
Commodities
Gold, Silver, Brent, Crude, Copper, Nat Gas, Platinum
Indices & FX
S&P 500, XYZ100, EUR, JPY
Experimental software for research and education. Nothing here is financial advice, trading perpetual futures carries real risk of loss.