Hyperliquid Trading & Analysis

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 tradi…

Ana

@anajuliabit

What This Skill Does

Command-line tool for trading and monitoring Hyperliquid perpetual futures. Supports checking balances, viewing positions with P&L, placing/canceling orders, and executing market trades with slippage protection. Requires environment variable setup for read-only or trading access.

Replaces manual Hyperliquid exchange UI interactions by exposing all core trading and portfolio operations through a single CLI with safety checks.

When to Use It

  • Check your Hyperliquid account balance and available equity
  • View open positions with unrealized profit and loss details
  • Place a limit order to buy or sell a perpetual futures contract
  • Execute a market order with slippage protection on Hyperliquid
  • Cancel all open orders for a specific coin or across your account
  • Get the current price of a cryptocurrency on Hyperliquid

Install

$ openclaw skills install @anajuliabit/hyperliquid-trading

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_ADDRESS environment variable
  • No private key needed

For trading operations:

  • Set HYPERLIQUID_PRIVATE_KEY environment variable
  • Address derived automatically from private key

Testnet:

  • Set HYPERLIQUID_TESTNET=1 to 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:

  1. Confirm trade parameters with user (coin, size, direction, price)
  2. Show current price and position for context
  3. 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 meta command
  • 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?"

  1. Run balance to get total equity
  2. Run positions to get open positions
  3. Format summary: equity, positions with P&L, total unrealized P&L

"Buy 0.5 BTC on Hyperliquid"

  1. Run price BTC to get current price
  2. Run balance to verify sufficient funds
  3. Confirm with user: "Buy 0.5 BTC at market? Current price: $X. Estimated cost: $Y"
  4. Execute market-buy BTC 0.5
  5. Report order result

"What's the current BTC price on Hyperliquid?"

  1. Run price BTC
  2. Format response: "BTC: $X on Hyperliquid"

"Close my ETH position"

  1. Run positions to get current ETH position size
  2. If long → market-sell, if short → market-buy
  3. Execute with position size
  4. 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

Top skills in this category

Stock Analysis

@udiedrichsen

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.

25757k

Stock Market Pro

@kys42

Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...

15531k

A股量化 AkShare

@mbpz

A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。

10031k

Stock Watcher

@robin797860

Manage and monitor a personal stock watchlist with support for adding, removing, listing stocks, and summarizing their recent performance using data from 10jqka.com.cn. Use when the user wants to track specific stocks, get performance summaries, or manage their watchlist.

8636k

Intelligent Stocks Screener

@financial-ai-analyst

基于东方财富数据库,支持通过自然语言输入筛选A港美股、基金、债券等多种资产,支持多元指标筛选,含技术面、消息面、基本面及市场情绪等,可用于全球资产速筛、跨市场监控、投资组合构建、策略回测等场景。返回结果包含数据说明及 csv 文件。Natural language screener for investment...

10626k