hyperliquid
Trade and monitor Hyperliquid perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about Hyperliquid trading, portfolio status, crypto positions, or wants to execute trades on Hyperliquid.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-12
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- hyperliquid
- description
- Trade and monitor Hyperliquid perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about Hyperliquid trading, portfolio status, crypto positions, or wants to execute trades on Hyperliquid.
02 资源文件 13
- 参考文档_meta.json138 B
- 参考文档README.md7.6 KB
- 参考文档references/api.md3.2 KB
- 脚本scripts/analyze-coingecko.mjs4.8 KB
- 脚本scripts/analyze-market.mjs3.7 KB
- 脚本scripts/check-positions.mjs2.9 KB
- 脚本scripts/hyperliquid.mjs6.6 KB
- 脚本scripts/package-lock.json18.8 KB
- 脚本scripts/package.json200 B
- 脚本scripts/scan-market.mjs896 B
- 参考文档skill-card.md2.5 KB
- 参考文档SOURCE.md268 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Hyperliquid Trading Skill
Full trading and portfolio management for Hyperliquid perpetual futures exchange.
Prerequisites
Install dependencies once:
cd skills/hyperliquid/scripts && npm install
Authentication
For read-only operations (balance, positions, prices):
- Set
HYPERLIQUID_ADDRESSenvironment variable - No private key needed
For trading operations:
- Set
HYPERLIQUID_PRIVATE_KEYenvironment variable - Address derived automatically from private key
Testnet:
- Set
HYPERLIQUID_TESTNET=1to use testnet
Core Operations
Portfolio Monitoring
Check balance:
HYPERLIQUID_ADDRESS=0x... node scripts/hyperliquid.mjs balance
View positions with P&L:
HYPERLIQUID_ADDRESS=0x... node scripts/hyperliquid.mjs positions
Check open orders:
HYPERLIQUID_ADDRESS=0x... node scripts/hyperliquid.mjs orders
View trade history:
HYPERLIQUID_ADDRESS=0x... node scripts/hyperliquid.mjs fills
Get price for a coin:
node scripts/hyperliquid.mjs price BTC
Trading Operations
All trading commands require HYPERLIQUID_PRIVATE_KEY.
Place limit orders:
# Buy 0.1 BTC at $45,000
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs buy BTC 0.1 45000
# Sell 1 ETH at $3,000
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs sell ETH 1 3000
Market orders (with 5% slippage protection):
# Market buy 0.5 BTC
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs market-buy BTC 0.5
# Market sell 2 ETH
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs market-sell ETH 2
Cancel orders:
# Cancel specific order
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs cancel BTC 12345
# Cancel all orders
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs cancel-all
# Cancel all orders for specific coin
HYPERLIQUID_PRIVATE_KEY=0x... node scripts/hyperliquid.mjs cancel-all BTC
Output Formatting
All commands output JSON. Parse and format for chat display:
For balance/portfolio:
- Show total equity, available balance
- List positions with size, entry price, unrealized P&L
- Summarize open orders
For trade execution:
- Confirm order details before executing
- Report order ID and status after execution
- Show filled price if immediately executed
Safety Guidelines
Before executing trades:
- Confirm trade parameters with user (coin, size, direction, price)
- Show current price and position for context
- Calculate estimated cost/proceeds
Position sizing:
- Warn if trade is >20% of account equity
- Suggest appropriate sizes based on account balance
Price checks:
- For limit orders, compare limit price to current market price
- Warn if limit price is >5% away from market (likely mistake)
Error Handling
Common errors:
- "Address required" → Set HYPERLIQUID_ADDRESS or HYPERLIQUID_PRIVATE_KEY
- "Private key required" → Trading needs HYPERLIQUID_PRIVATE_KEY
- "Unknown coin" → Check available coins with
metacommand - HTTP errors → Check network connection and API status
When errors occur:
- Show the error message to user
- Suggest fixes (set env vars, check coin names, verify balance)
- Don't retry trades automatically
Workflow Examples
"How's my Hyperliquid portfolio?"
- Run
balanceto get total equity - Run
positionsto get open positions - Format summary: equity, positions with P&L, total unrealized P&L
"Buy 0.5 BTC on Hyperliquid"
- Run
price BTCto get current price - Run
balanceto verify sufficient funds - Confirm with user: "Buy 0.5 BTC at market? Current price: $X. Estimated cost: $Y"
- Execute
market-buy BTC 0.5 - Report order result
"What's the current BTC price on Hyperliquid?"
- Run
price BTC - Format response: "BTC: $X on Hyperliquid"
"Close my ETH position"
- Run
positionsto get current ETH position size - If long → market-sell, if short → market-buy
- Execute with position size
- Report result
Advanced Features
List all available coins:
node scripts/hyperliquid.mjs meta
Query other addresses:
# Check someone else's positions (read-only, public data)
node scripts/hyperliquid.mjs positions 0x1234...
Notes
- All sizes are in base currency (BTC, ETH, etc.)
- Prices are in USD
- Market orders use limit orders with 5% slippage protection
- Hyperliquid uses perpetual futures, not spot trading
- Check references/api.md for full API documentation
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.