← Back to Skills Marketplace
zoan37

HyperClaw

by zoan37 · GitHub ↗ · v0.1.15
cross-platform ⚠ suspicious
857
Downloads
2
Stars
2
Active Installs
16
Versions
Install in OpenClaw
/install hyperclaw
Description
Trade on Hyperliquid. Supports 228+ perps, HIP-3 equity/commodity perps (TSLA, GOLD), market scanning, sentiment analysis, Grok web/X search, and prediction...
README (SKILL.md)

HyperClaw - Hyperliquid Trading Skill

Trade on Hyperliquid via CLI. Covers native crypto perps (BTC, ETH, SOL, etc.), HIP-3 builder-deployed perps (equities, commodities, forex), market scanning, and intelligence tools.

Setup

Run the setup script once to create a virtual environment and install dependencies:

bash {baseDir}/scripts/setup.sh

Then configure .env in the skill root directory with your Hyperliquid API credentials:

HL_ACCOUNT_ADDRESS=0x_your_wallet_address
HL_SECRET_KEY=0x_your_api_wallet_private_key
HL_TESTNET=false

Get API keys from: https://app.hyperliquid.xyz/API — use a separate API wallet, not your main wallet private key.

Optional for intelligence commands (sentiment, unlocks, devcheck, ask, search):

XAI_API_KEY=xai-...

After configuring .env, start the caching proxy (prevents rate limiting):

{baseDir}/scripts/.venv/bin/python {baseDir}/scripts/server.py &

How to Run Commands

{baseDir}/scripts/.venv/bin/python {baseDir}/scripts/hyperliquid_tools.py \x3Ccommand> [args]

Command Reference

Account

Command Description Example
status Account balance, account mode, positions, PnL (handles unified/portfolio margin accounts) hyperliquid_tools.py status
positions Detailed position info (leverage, liquidation) hyperliquid_tools.py positions
orders Open orders hyperliquid_tools.py orders
check Position health check (book ratio, funding, PnL, leverage, liquidation warnings) hyperliquid_tools.py check or check --address 0x...
user-funding Your funding payments received/paid hyperliquid_tools.py user-funding --lookback 7d
portfolio Portfolio performance (PnL, volume by period) hyperliquid_tools.py portfolio or portfolio --address 0x...
swap Swap USDC ↔ HIP-3 dex collateral (USDH, USDe, USDT0, USDXL) hyperliquid_tools.py swap 20 or swap 20 --token USDe or swap 10 --to-usdc

Market Data

Command Description Example
price [COINS...] Current prices (supports HIP-3 dex prefix) hyperliquid_tools.py price BTC ETH xyz:TSLA
funding [COINS...] Funding rates (hourly + APR + signal). --predicted shows the estimated rate for the next hourly settlement (can still shift as mark/oracle prices move before the hour closes), with Binance/Bybit comparison (APR-normalized across different intervals). Use predicted to preview upcoming charges and confirm a funding edge isn't HL-specific. hyperliquid_tools.py funding BTC SOL DOGE or funding BTC --predicted
book COIN L2 order book with spread hyperliquid_tools.py book SOL
candles COIN OHLCV candlestick data with SMA hyperliquid_tools.py candles BTC --interval 1h --lookback 7d
funding-history COIN Historical funding rates with summary hyperliquid_tools.py funding-history BTC --lookback 24h
trades COIN Recent trade tape with buy/sell bias hyperliquid_tools.py trades BTC --limit 20
raw COIN Raw JSON data dump for processing hyperliquid_tools.py raw BTC

Analysis

Command Description Example
analyze [COINS...] Comprehensive market analysis (prices, funding, OI, volume, book depth) hyperliquid_tools.py analyze BTC ETH SOL
scan Scan all perps for funding opportunities. --sort {funding|volume|oi|price-change} outputs a single flat table sorted by the chosen metric (default: multi-section view). --reverse reverses sort direction. hyperliquid_tools.py scan --top 20 --min-volume 100000 or scan --sort volume --top 10 --reverse
hip3 [COIN] HIP-3 perp data (price, spread, funding) hyperliquid_tools.py hip3 TSLA
hip3 All HIP-3 dex assets hyperliquid_tools.py hip3
dexes List all HIP-3 dexes and their assets hyperliquid_tools.py dexes
history Trade history from API hyperliquid_tools.py history --limit 20

Trading

Command Description Example
leverage COIN LEV Set leverage for an asset (persists on Hyperliquid) hyperliquid_tools.py leverage SOL 5
leverage COIN LEV --isolated Set leverage with isolated margin hyperliquid_tools.py leverage xyz:TSLA 3 --isolated
buy COIN SIZE Market buy (long) hyperliquid_tools.py buy SOL 0.5
buy COIN SIZE --leverage LEV Market buy with leverage set first hyperliquid_tools.py buy SOL 0.5 --leverage 5
sell COIN SIZE Market sell (short) hyperliquid_tools.py sell SOL 0.5
sell COIN SIZE --leverage LEV Market sell with leverage set first hyperliquid_tools.py sell SOL 0.5 --leverage 5
limit-buy COIN SIZE PRICE Limit buy order (GTC) hyperliquid_tools.py limit-buy SOL 1 120
limit-sell COIN SIZE PRICE Limit sell order (GTC) hyperliquid_tools.py limit-sell SOL 1 140
stop-loss COIN SIZE TRIGGER Stop-loss trigger (market, reduce-only) hyperliquid_tools.py stop-loss SOL 0.5 115
take-profit COIN SIZE TRIGGER Take-profit trigger (market, reduce-only) hyperliquid_tools.py take-profit SOL 0.5 150
close COIN Close entire position (supports HIP-3) hyperliquid_tools.py close SOL
cancel OID Cancel specific order hyperliquid_tools.py cancel 12345
cancel-all Cancel all open orders hyperliquid_tools.py cancel-all
modify-order OID PRICE Modify existing order price/size hyperliquid_tools.py modify-order 12345 130.5 --size 2

Leverage: Leverage is set per-asset on your Hyperliquid account and persists until changed. Each asset has a max leverage (e.g., BTC=40x, ETH=25x, SOL=20x). The leverage command and --leverage flag show the max and block if exceeded. Use positions to see current leverage on open positions. HIP-3 assets require isolated margin (--isolated).

Intelligence (requires XAI_API_KEY)

Command Description Example
sentiment COIN Grok web + X/Twitter sentiment analysis hyperliquid_tools.py sentiment BTC
unlocks [COINS...] Token unlock schedules (defaults to current positions) hyperliquid_tools.py unlocks SOL HYPE
devcheck COIN Developer sentiment and exodus signals hyperliquid_tools.py devcheck SOL
ask QUERY Ask Grok a question — single API call with web + X tools, returns one blended answer. --web for web only, --x for X only. hyperliquid_tools.py ask "what's driving ETH price today?" or ask "BTC whale activity" --x
search QUERY Search web and X/Twitter via Grok — separate API calls per source, prints results in distinct sections for more exhaustive coverage. --web for web only, --x for X only. hyperliquid_tools.py search "Hyperliquid token unlock schedule" or search "SOL news" --web

Prediction Markets

Command Description Example
polymarket [CATEGORY] Active Polymarket prediction markets hyperliquid_tools.py polymarket crypto

Categories: crypto (default), btc, eth, trending, macro

HIP-3 Trading

HIP-3 assets use a dex prefix: dex:SYMBOL

hyperliquid_tools.py buy xyz:TSLA 1          # Buy TSLA on xyz dex
hyperliquid_tools.py sell vntl:ANTHROPIC 1   # Sell ANTHROPIC on vntl dex
hyperliquid_tools.py close xyz:GOLD          # Close GOLD position
hyperliquid_tools.py funding xyz:TSLA vntl:SPACEX km:US500

Known HIP-3 dexes: xyz (equities, commodities), vntl (private companies), flx (crypto/commodities), hyna (crypto), km (indices), abcd, cash. Use dexes command to discover all available dexes dynamically.

HIP-3 differences from native perps:

  • Isolated margin only (no cross margin)
  • Per-position liquidation prices
  • Higher fees (2x normal)
  • Thinner order books (wider spreads)
  • Max leverage varies by asset (10x for most equities, 20x for commodities/metals)
  • Some dexes require non-USDC collateral — swap first (see below)

HIP-3 Collateral: Some dexes use stablecoin collateral other than USDC (e.g. USDH, USDe, USDT0). You must swap USDC to the required collateral before trading on these dexes. Use dexes to check current collateral requirements — they can change.

Collateral Swap command
USDC No swap needed
USDH swap \x3Camount> (default)
USDe swap \x3Camount> --token USDe
USDT0 swap \x3Camount> --token USDT0
USDXL swap \x3Camount> --token USDXL

Note on USDXL: USDXL (Last USD) is not on Hyperliquid's strict list and has lower liquidity than other collateral tokens. Expect wider spreads when swapping. No HIP-3 dex currently uses USDXL as collateral, but the swap is available if needed.

To swap collateral back to USDC: swap \x3Camount> --to-usdc (or swap \x3Camount> --token USDe --to-usdc).

Example workflow for km:US500:

hyperliquid_tools.py swap 20                          # Swap 20 USDC → USDH
hyperliquid_tools.py leverage km:US500 10 --isolated  # Set leverage
hyperliquid_tools.py buy km:US500 0.02                # Trade
hyperliquid_tools.py close km:US500                   # Close when done
hyperliquid_tools.py swap 20 --to-usdc                # Swap USDH back to USDC

Caching Proxy (Default — Start First)

Each CLI invocation cold-starts the SDK and burns ~40 API weight units just to initialize. With a 1200 weight/min IP limit, agents hit rate limits after ~30 commands. Always start the proxy before running commands.

Start the proxy:

{baseDir}/scripts/.venv/bin/python {baseDir}/scripts/server.py &

The .env file includes HL_PROXY_URL=http://localhost:18731 by default. All read commands will route through the proxy automatically. To disable the proxy (not recommended), comment out or remove HL_PROXY_URL from .env.

Restart the proxy after installing or updating the skill (e.g. git pull, dependency changes). The proxy runs in-memory — it won't pick up code or config changes until restarted:

# Find and kill existing proxy, then restart
kill $(lsof -ti:18731) 2>/dev/null; {baseDir}/scripts/.venv/bin/python {baseDir}/scripts/server.py &

Proxy endpoints:

Endpoint Description
GET /health Check proxy status and uptime
GET /cache/stats Cache hit/miss rates per type
POST /cache/clear Clear cache (optional body: {"type":"..."} or {"user":"0x..."})

The proxy caches /info read responses (metadata 300s, prices 5s, user state 2s). Trading commands (buy, sell, close, etc.) always go directly to the real Hyperliquid API — they bypass the proxy entirely because the SDK requires the real URL for transaction signing. The proxy is a read cache only. Responses include X-Cache: HIT or X-Cache: MISS headers.

Proxy env vars:

Variable Default Description
HL_UPSTREAM_URL https://api.hyperliquid.xyz Upstream API
HL_PROXY_PORT 18731 Proxy port
HL_CACHE_WARMUP true Pre-warm cache on startup

Environment Variables

Variable Required Description
HL_ACCOUNT_ADDRESS For trading/status Hyperliquid wallet address
HL_SECRET_KEY For trading API wallet private key
HL_TESTNET No false for mainnet (default), true for testnet
HL_PROXY_URL Recommended Caching proxy URL (default: http://localhost:18731)
HL_ENV_FILE No Override .env file path. When set, loads env vars from this file instead of default .env discovery. Useful for wrapper scripts that route to hyperclaw from other projects.
XAI_API_KEY For intelligence Grok API key for sentiment/unlocks/devcheck/ask/search

Read-only commands (price, funding, book, scan, hip3, dexes, raw, polymarket) work without credentials. Trading and account commands require HL_ACCOUNT_ADDRESS and HL_SECRET_KEY.

Account Abstraction Modes

Unified mode is recommended for API wallet trading. In standard mode, funds are split between spot and perp clearinghouses, and API wallets cannot transfer between them. Unified mode pools all funds into a single balance, so cross-margin perps can access your full balance without manual transfers. HIP-3 dexes that require non-USDC collateral work in both modes — just use the swap command to convert USDC to the required collateral.

Hyperliquid accounts operate in one of several modes that affect where balances live. The status command auto-detects the mode and shows it as a badge ([unified], [portfolio margin], or [standard]).

Mode Badge How balances work
Unified (default) [unified] Single balance per asset across all DEXes. Spot and perp share collateral. All balances appear in the spot clearinghouse.
Portfolio Margin [portfolio margin] All eligible assets (HYPE, BTC, USDH, USDC) unified into one margin calculation. Most capital-efficient. Pre-alpha.
Standard [standard] Separate balances for perps and spot on each DEX. No cross-collateralization.
DEX Abstraction [unified] Deprecated. USDC defaults to perps balance, other collateral to spot. Shown as [unified] since behavior is similar.

For position sizing, always use "Portfolio Value" from status. In standard mode this equals the perp account value. In unified/portfolio margin mode it equals perp accountValue + spot balances, since funds can live in either clearinghouse. The "Perp Margin" sub-line (only shown for non-standard modes) is just the perp clearinghouse portion — don't use it for sizing.

Usage Guidance
This skill appears coherent for trading on Hyperliquid, but it requires your HL_SECRET_KEY (a private key) — only provide an API wallet/private key with limited funds and permissions. Review the included scripts before running: setup.sh will pip-install packages into a created venv, and server.py runs a local caching proxy (default port 18731) that listens for requests. If you don't want a background server, you can skip starting it and point HL_PROXY_URL to the upstream API. Prefer running the skill in an isolated environment (container or VM), keep your main wallet keys offline, and audit optional intelligence integrations (XAI_API_KEY) before enabling them. If you want further checking, paste the remainder of hyperliquid_tools.py and server.py (they were truncated) so I can inspect any remaining handlers or external calls.
Capability Analysis
Type: OpenClaw Skill Name: hyperclaw Version: 0.1.15 This skill is classified as suspicious due to its direct handling of a highly sensitive credential (Ethereum private key via `HL_SECRET_KEY`) for financial transactions, and its integration with the Grok API (`XAI_API_KEY`) which introduces a prompt-injection attack surface against the AI agent. While these capabilities are necessary for the skill's stated purpose of trading on Hyperliquid and performing intelligence gathering, the exposure of a private key in environment variables (`scripts/hyperliquid_tools.py`) and the potential for an agent to misuse the Grok `ask` or `search` commands to query for sensitive data (even if not explicitly instructed by the skill itself) represent significant vulnerabilities. There is no evidence of intentional malicious behavior within the code, such as exfiltration to unauthorized endpoints or backdoor installation.
Capability Assessment
Purpose & Capability
Name/description (Hyperliquid trading, market scanning, intelligence) align with the requested secrets (HL_ACCOUNT_ADDRESS, HL_SECRET_KEY) and with the provided CLI and SDK-based implementation. The skill needs a private key to sign trades — appropriate for a trading agent.
Instruction Scope
SKILL.md instructs the user/agent to run setup.sh, create a venv, install packages, run a local caching proxy (server.py) and then invoke hyperliquid_tools.py commands. The runtime will read .env and a handful of environment variables. The instructions and code do not appear to request unrelated system files or arbitrary external endpoints beyond Hyperliquid and (optionally) an external intelligence API. The skill does use a local proxy and an optional Grok/XAI integration (XAI_API_KEY) for intelligence features — those are separate concerns and are documented as optional.
Install Mechanism
There is no automated remote installer in the registry metadata, but the included setup.sh creates a Python venv and runs pip install -r requirements.txt. Dependencies come from PyPI (hyperliquid-python-sdk, eth-account, httpx, fastapi, uvicorn, etc.). This is standard but does execute package installs on the host; there are no downloads from ad-hoc URLs or extracts from personal servers in the manifest.
Credentials
Declared required env vars (HL_ACCOUNT_ADDRESS, HL_SECRET_KEY) match the trading purpose. HL_SECRET_KEY is a sensitive private key and is legitimately required to sign orders; the README and SKILL.md explicitly recommend using a separate API wallet. The code also reads additional environment variables (HL_TESTNET, HL_PROXY_URL, HL_ENV_FILE, HL_PROXY_PORT, HL_UPSTREAM_URL, HL_CACHE_WARMUP) that are not listed in requires.env; some are optional and documented but HL_ENV_FILE and HL_PROXY_URL are not prominently documented in SKILL.md. Optional intelligence features reference XAI_API_KEY but it is optional.
Persistence & Privilege
always:false (no forced inclusion). The skill does not request to be permanently injected or to modify other skills. It does instruct running a background caching proxy (server.py) which will open a local HTTP endpoint and run while the user leaves it running — this is normal for the described caching behavior but is an extra persistent process you should be aware of.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hyperclaw
  3. After installation, invoke the skill by name or use /hyperclaw
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.15
# hyperclaw v0.1.15 - Added "ask" and "search" intelligence commands for Grok-powered web and X/Twitter market research. - Updated "scan" analysis command to support `--reverse` for sort direction. - Intelligence commands now document `ask` and `search` with relevant CLI usage and flags. - README and documentation expanded to reflect new features and options.
v0.1.14
hyperclaw 0.1.14 - Updated scripts/hyperliquid_tools.py (details not specified). - No user-facing documentation or command changes.
v0.1.13
## hyperclaw v0.1.13 - Modified `scripts/hyperliquid_tools.py`. - No user-facing command or documentation changes detected.
v0.1.12
- Default value for HL_TESTNET is now set to false in setup instructions. - Removed OpenClaw-specific environment variable instructions from documentation for simpler setup. - Updated HIP-3 dex discovery instructions to encourage use of the `dexes` command for dynamic lookup. - Minor cleanups in documentation for clarity and accuracy.
v0.1.11
- Added instructions for OpenClaw users to set global API credentials in `~/.openclaw/.env` for persistence across reinstalls/updates. - Updated setup documentation to mention OpenClaw environment variable support with reference to official docs. - No changes to skill behavior or command interface.
v0.1.10
- Added USDXL token support for collateral swaps in HIP-3 dexes. - Updated SKILL.md to list USDXL and improve documentation for swap command.
v0.1.9
0.1.9 — No code or documentation changes detected in this release. - No updates made to any files. - Skill definition and documentation remain unchanged.
v0.1.8
## hyperclaw 0.1.8 - Internal changes to `scripts/hyperliquid_tools.py`. - No visible command or user-facing documentation changes.
v0.1.7
hyperclaw v0.1.7 - Updated scripts/hyperliquid_tools.py (details not shown). - No changes to features or documentation in SKILL.md.
v0.1.6
- Added --sort flag to the scan command, allowing results to be output as a single, flat table sorted by funding, volume, open interest, or price-change. - Updated command documentation for scan to reflect new sorting options and clarify output modes.
v0.1.5
- Funding command now supports the --predicted flag to show estimated rates for the next hourly settlement, with Binance/Bybit APR-normalized comparison. - Portfolio command documentation updated to clarify optional address argument: `portfolio --address 0x...`. - Funding command reference expanded with details about predicted values and cross-exchange APR comparison.
v0.1.4
- Minor update in scripts/hyperliquid_tools.py with no user-facing changes documented. - Documentation remains unchanged for usage and commands.
v0.1.3
hyperclaw v0.1.3 - Documentation updated in SKILL.md (no functional/code changes). - Clarifies usage, commands, and examples for trading and intelligence tools. - No changes to environment variables or API requirements.
v0.1.2
Version 0.1.2 of hyperclaw adds HIP-3 collateral swap support and related documentation. - Added `swap` command to handle USDC to HIP-3 dex collateral conversions (USDH, USDe, USDT0) and vice versa. - Updated command reference and examples in documentation to include swap and clarify collateral handling for HIP-3 dexes. - Expanded guidance on checking dex collateral requirements and using swap for non-USDC assets.
v0.1.1
- Added a new account health check command (`check`) for position risk and liquidation warnings. - Improved `status` command to display unified/portfolio margin account mode. - Updated documentation in SKILL.md to include new command and clarify margin account support. - General improvements and clarifications in account-related command descriptions.
v0.1.0
Initial release of HyperClaw skill for trading on Hyperliquid. - Provides CLI commands for trading 228+ perps, including HIP-3 equity/commodity/fx perps (TSLA, GOLD, etc.). - Includes account management, orders, and portfolio status tools. - Supports deep market data, funding rates, order book, and analytics. - Features market scanning and intelligence tools, including sentiment analysis and token unlocks (with XAI API). - Integrates prediction market data (Polymarket). - Uses a caching proxy by default to prevent API rate limits. - Requires setup with Hyperliquid API credentials and environment configuration.
Metadata
Slug hyperclaw
Version 0.1.15
License
All-time Installs 2
Active Installs 2
Total Versions 16
Frequently Asked Questions

What is HyperClaw?

Trade on Hyperliquid. Supports 228+ perps, HIP-3 equity/commodity perps (TSLA, GOLD), market scanning, sentiment analysis, Grok web/X search, and prediction... It is an AI Agent Skill for Claude Code / OpenClaw, with 857 downloads so far.

How do I install HyperClaw?

Run "/install hyperclaw" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is HyperClaw free?

Yes, HyperClaw is completely free (open-source). You can download, install and use it at no cost.

Which platforms does HyperClaw support?

HyperClaw is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created HyperClaw?

It is built and maintained by zoan37 (@zoan37); the current version is v0.1.15.

💬 Comments