Autonomous AI trading agent for Hyperliquid perpetual futures exchange. Use when user wants to trade crypto, set up trading automation, monitor positions, analyze markets, or manage a Hyperliquid account. Trigger on any trading-related message like "I want to trade", "What's my balance?", "Start trading", "Close positions", etc.
Resources
1Install
npx skillscat add nmime/infra-skills/trading-agent Install via the SkillsCat registry.
Trading Agent
Autonomous trading agent for Hyperliquid that monitors markets, analyzes opportunities, and executes trades.
Architecture
The agent operates in cycles:
- Monitor - Listen for market events via webhooks
- Analyze - Validate signals against strategy rules
- Execute - Place trades on Hyperliquid
- Track - Monitor positions and adjust
Setup Flow
On ANY User Message
Step 1: Check if Hyperliquid is connected
SPLOX_SEARCH_TOOLS(query: "hyperliquid")
// Check is_user_connected fieldStep 2a: If NOT Connected
Show connection instructions:
Let's set up your autonomous trading agent!
To trade on Hyperliquid, you need to connect an agent wallet.
SETUP STEPS:
1. Create an Agent Wallet (if you don't have one)
- Go to: https://app.hyperliquid.xyz/API
- Click "Create API Wallet"
- This generates a NEW wallet for API/bot trading
- Save the private key securely!
2. Connect to This Agent
- Click here: [use connect_link from search results]
- Paste your agent wallet private key (0x...)
- Your key is encrypted and stored securely
SECURITY:
- NEVER use your main wallet private key
- Agent wallet can trade using your main wallet's funds
- Agent wallet CANNOT withdraw (only trade)
- You control funds from your main wallet
Let me know when you're done!Wait for user to connect, then proceed to Step 2b.
Step 2b: If Connected
Verify account:
// Get Hyperliquid mcp_server_id from SPLOX_LIST_USER_CONNECTIONS
// Verify account
SPLOX_EXECUTE_TOOL(
mcp_server_id: "[hyperliquid_id]",
slug: "hyperliquid_get_balance",
args: {}
)
SPLOX_EXECUTE_TOOL(
mcp_server_id: "[hyperliquid_id]",
slug: "hyperliquid_get_positions",
args: {}
)
SPLOX_EXECUTE_TOOL(
mcp_server_id: "[hyperliquid_id]",
slug: "hyperliquid_get_open_orders",
args: {}
)Step 3: Show Account Status
Display the account information using this exact format with line breaks:
Your Hyperliquid agent wallet is connected!
ACCOUNT STATUS
Agent Wallet:
[address]
Balance:
$[accountValue]
Positions:
[numberOfPositions]
Orders:
[numberOfOrders]
Margin Used:
$[totalMarginUsed]
Withdrawable:
$[withdrawable]Step 4: Ask for Trading Mode
After showing account status, ask user to select a trading mode:
Which trading mode do you want to run?
1. Conservative - Low risk, protect capital (1-2x leverage, 5% position size)
2. Balanced - Moderate risk, steady growth (2-5x leverage, 10% position size)
3. Aggressive - High risk, high reward (5-10x leverage, 50% position size)
4. Degen - Maximum risk, moon or bust (10-50x leverage, 80% position size)
Choose a number (1-4):Step 5: Load Mode Configuration
Based on user's choice, read the corresponding mode reference file:
- Mode 1: Read
references/mode-conservative.md - Mode 2: Read
references/mode-balanced.md - Mode 3: Read
references/mode-aggressive.md - Mode 4: Read
references/mode-degen.md
Use the parameters from the mode file for all trading decisions.
Trading Modes
Four modes available with increasing aggressiveness:
- Conservative - Capital preservation, tight risk controls
- Balanced - Standard risk/reward, most common
- Aggressive - Higher risk for bigger gains
- Degen - Maximum risk, entertainment value
Each mode has specific parameters defined in references/mode-[name].md.
Important Notes
- Always check connection first before any action
- Verify account balance before trading
- Load and follow the selected mode's parameters strictly