Trade on Hyperliquid's perp markets (native + HIP-3) with intelligent order routing and cross-market splitting. Use when the user wants to trade crypto, stocks, or commodities on Hyperliquid, get best execution across fragmented markets, split large orders across multiple venues, compare funding rates, view aggregated orderbooks, or manage positions across multiple collateral types. Routes across both native HL perps (ETH, BTC) and HIP-3 deployer markets. Handles collateral swaps (USDC→USDH/USDT0) automatically during execution when the best liquidity requires it.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install hyperliquid-prime或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install hyperliquid-prime⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/hyperliquid-prime/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: hyperliquid-prime description: Trade on Hyperliquid's perp markets (native + HIP-3) with intelligent order routing and cross-market splitting. Use when the user wants to trade crypto, stocks, or commodities on Hyperliquid, get best execution across fragmented markets, split large orders across multiple venues, compare funding rates, view aggregated orderbooks, or manage positions across multiple collateral types. Routes across both native HL perps (ETH, BTC) and HIP-3 deployer markets. Handles collateral swaps (USDC→USDH/USDT0) automatically during execution when the best liquidity requires it. ---
A TypeScript SDK that acts as a prime broker layer on top of Hyperliquid's perp markets — both native (ETH, BTC) and HIP-3 deployer markets. Automatically discovers all markets for an asset, compares liquidity/funding/cost, and routes to the best execution — or splits across multiple venues for optimal fills with automatic collateral swaps.
npm install hyperliquid-prime
import { HyperliquidPrime } from 'hyperliquid-prime'
const hp = new HyperliquidPrime({ testnet: true })
await hp.connect()
// Get all perp markets for an asset (native + HIP-3)
const markets = hp.getMarkets('ETH') // or 'TSLA', 'BTC', etc.
// Get routing quote for best execution
const quote = await hp.quote('TSLA', 'buy', 50)
const quoteWithLev = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })
// Aggregated orderbook
const book = await hp.getAggregatedBook('TSLA')
// Funding rate comparison
const funding = await hp.getFundingComparison('TSLA')
await hp.disconnect()
const hp = new HyperliquidPrime({
privateKey: '0x...',
testnet: true,
})
await hp.connect()
// Quote then execute (recommended)
const quote = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })
const receipt = await hp.execute(quote.plan)
// One-step convenience
const receipt2 = await hp.long('TSLA', 50, { leverage: 5 })
const receipt3 = await hp.short('TSLA', 25, { leverage: 3, isCross: false })
// Split across multiple markets for better fills
const splitQuote = await hp.quoteSplit('TSLA', 'buy', 200, { leverage: 4 })
const splitReceipt = await hp.executeSplit(splitQuote.splitPlan)
// Or one-step: await hp.longSplit('TSLA', 200)
// Unified position view
const positions = await hp.getGroupedPositions()
await hp.disconnect()
# Show all perp markets for an asset (native + HIP-3)
hp markets ETH
hp markets TSLA
# Aggregated orderbook
hp book TSLA
# Compare funding rates
hp funding TSLA
# Get routing quote
hp quote TSLA buy 50
hp quote TSLA buy 50 --leverage 5
hp quote TSLA buy 50 --leverage 3 --isolated
# Execute trades
HP_PRIVATE_KEY=0x... hp long TSLA 50
HP_PRIVATE_KEY=0x... hp short TSLA 25
HP_PRIVATE_KEY=0x... hp long TSLA 50 --leverage 5
HP_PRIVATE_KEY=0x... hp short TSLA 25 --leverage 3 --isolated
# View positions and balance
HP_PRIVATE_KEY=0x... hp positions
HP_PRIVATE_KEY=0x... hp balance
# Use testnet
hp markets TSLA --testnet
Builder Fee: A 1 basis point (0.01%) builder fee is charged by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. On the first trading order from a wallet, the SDK sends an on-chain approval transaction to authorize this fee. To disable entirely, set builder: null in the config.
Collateral Swaps (Split Orders Only): When executeSplit() routes orders to non-USDC collateral markets, the SDK automatically:
These actions only occur during split order execution and only when the best liquidity requires non-USDC collateral.
Read-Only Operations: Quotes, orderbooks, funding comparisons, and market discovery require no wallet, no fees, and perform no on-chain actions.
Credentials: Trading operations require a private key via HP_PRIVATE_KEY environment variable or the privateKey config option. The key is used to sign transactions sent to the Hyperliquid API. Source code is available for audit at
User Confirmation Flow: The SDK uses a quote-then-execute pattern as the confirmation mechanism:
quote() / quoteSplit() are read-only — they return an execution plan with estimated prices, markets, and costs. No on-chain actions are taken.execute() / executeSplit() must be explicitly called to perform on-chain actions (place orders, approve fees, swap collateral).long(), short(), longSplit(), shortSplit()) combine both steps — use quote-then-execute for explicit control.Implementation Note: This skill bundle contains instructions only (SKILL.md). The SDK implementation must be installed separately via npm install hyperliquid-prime. The source code is open-source and available for audit at the GitHub repository before installation.
When you call hp.quote("TSLA", "buy", 50), the router:
- Price impact (dominant) — cost in basis points to fill - Funding rate (secondary) — prefers favorable funding direction - Collateral swap cost (penalty) — estimated cost to swap into the required collateral
For split orders (quoteSplit), the router merges all orderbooks, walks the combined book greedily to consume the cheapest liquidity first across all venues, and builds split execution legs. Collateral requirements and swaps are estimated and executed at executeSplit(...) time using live balances. If leverage is included in the quote options, execution applies that leverage per market leg before order placement.
For single-market orders, leverage included in quote(...) is carried into the execution plan and applied before the order is sent.
interface HyperliquidPrimeConfig {
privateKey?: `0x${string}` // Required for trading
walletAddress?: string // Derived from privateKey if not provided
testnet?: boolean // Default: false
defaultSlippage?: number // Default: 0.01 (1%)
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent'
prettyLogs?: boolean // Default: false
builder?: BuilderConfig | null // Builder fee (default: 1 bps, null to disable)
}
A 1 basis point (0.01%) builder fee is included by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. The fee is auto-approved on the trader's first order. Set builder: null to disable, or provide a custom { address, feeBps } to override.
...
安装 Hyperliquid Prime 后,可以对 AI 说这些话来触发它
Help me get started with Hyperliquid Prime
Explains what Hyperliquid Prime does, walks through the setup, and runs a quick demo based on your current project
Use Hyperliquid Prime to trade on Hyperliquid's perp markets (native + HIP-3) with intellige...
Invokes Hyperliquid Prime with the right parameters and returns the result directly in the conversation
What can I do with Hyperliquid Prime in my finance & investment workflow?
Lists the top use cases for Hyperliquid Prime, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/hyperliquid-prime/ 目录(个人级,所有项目可用),或 .claude/skills/hyperliquid-prime/(项目级)。重启 AI 客户端后,用 /hyperliquid-prime 主动调用,或让 AI 根据上下文自动发现并使用。
Hyperliquid Prime 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Hyperliquid Prime 可免费安装使用。请查阅仓库了解许可证信息。
Trade on Hyperliquid's perp markets (native + HIP-3) with intelligent order routing and cross-market splitting. Use when the user wants to trade crypto, stocks, or commodities on Hyperliquid, get best execution across fragmented markets, split large orders across multiple venues, compare funding rates, view aggregated orderbooks, or manage positions across multiple collateral types. Routes across both native HL perps (ETH, BTC) and HIP-3 deployer markets. Handles collateral swaps (USDC→USDH/USDT0) automatically during execution when the best liquidity requires it.
Automate my finance & investment tasks using Hyperliquid Prime
Identifies repetitive steps in your workflow and sets up Hyperliquid Prime to handle them automatically
Hyperliquid Prime 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。