Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

HyperClaw

v0.1.15

Trade on Hyperliquid. Supports 228+ perps, HIP-3 equity/commodity perps (TSLA, GOLD), market scanning, sentiment analysis, Grok web/X search, and prediction...

2· 724·2 current·2 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk9744c1n1r2dz6k7fy2dxx4tv9824f1t

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

EnvHL_ACCOUNT_ADDRESS, HL_SECRET_KEY

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 <command> [args]

Command Reference

Account

CommandDescriptionExample
statusAccount balance, account mode, positions, PnL (handles unified/portfolio margin accounts)hyperliquid_tools.py status
positionsDetailed position info (leverage, liquidation)hyperliquid_tools.py positions
ordersOpen ordershyperliquid_tools.py orders
checkPosition health check (book ratio, funding, PnL, leverage, liquidation warnings)hyperliquid_tools.py check or check --address 0x...
user-fundingYour funding payments received/paidhyperliquid_tools.py user-funding --lookback 7d
portfolioPortfolio performance (PnL, volume by period)hyperliquid_tools.py portfolio or portfolio --address 0x...
swapSwap 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

CommandDescriptionExample
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 COINL2 order book with spreadhyperliquid_tools.py book SOL
candles COINOHLCV candlestick data with SMAhyperliquid_tools.py candles BTC --interval 1h --lookback 7d
funding-history COINHistorical funding rates with summaryhyperliquid_tools.py funding-history BTC --lookback 24h
trades COINRecent trade tape with buy/sell biashyperliquid_tools.py trades BTC --limit 20
raw COINRaw JSON data dump for processinghyperliquid_tools.py raw BTC

Analysis

CommandDescriptionExample
analyze [COINS...]Comprehensive market analysis (prices, funding, OI, volume, book depth)hyperliquid_tools.py analyze BTC ETH SOL
scanScan 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
hip3All HIP-3 dex assetshyperliquid_tools.py hip3
dexesList all HIP-3 dexes and their assetshyperliquid_tools.py dexes
historyTrade history from APIhyperliquid_tools.py history --limit 20

Trading

CommandDescriptionExample
leverage COIN LEVSet leverage for an asset (persists on Hyperliquid)hyperliquid_tools.py leverage SOL 5
leverage COIN LEV --isolatedSet leverage with isolated marginhyperliquid_tools.py leverage xyz:TSLA 3 --isolated
buy COIN SIZEMarket buy (long)hyperliquid_tools.py buy SOL 0.5
buy COIN SIZE --leverage LEVMarket buy with leverage set firsthyperliquid_tools.py buy SOL 0.5 --leverage 5
sell COIN SIZEMarket sell (short)hyperliquid_tools.py sell SOL 0.5
sell COIN SIZE --leverage LEVMarket sell with leverage set firsthyperliquid_tools.py sell SOL 0.5 --leverage 5
limit-buy COIN SIZE PRICELimit buy order (GTC)hyperliquid_tools.py limit-buy SOL 1 120
limit-sell COIN SIZE PRICELimit sell order (GTC)hyperliquid_tools.py limit-sell SOL 1 140
stop-loss COIN SIZE TRIGGERStop-loss trigger (market, reduce-only)hyperliquid_tools.py stop-loss SOL 0.5 115
take-profit COIN SIZE TRIGGERTake-profit trigger (market, reduce-only)hyperliquid_tools.py take-profit SOL 0.5 150
close COINClose entire position (supports HIP-3)hyperliquid_tools.py close SOL
cancel OIDCancel specific orderhyperliquid_tools.py cancel 12345
cancel-allCancel all open ordershyperliquid_tools.py cancel-all
modify-order OID PRICEModify existing order price/sizehyperliquid_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)

CommandDescriptionExample
sentiment COINGrok web + X/Twitter sentiment analysishyperliquid_tools.py sentiment BTC
unlocks [COINS...]Token unlock schedules (defaults to current positions)hyperliquid_tools.py unlocks SOL HYPE
devcheck COINDeveloper sentiment and exodus signalshyperliquid_tools.py devcheck SOL
ask QUERYAsk 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 QUERYSearch 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

CommandDescriptionExample
polymarket [CATEGORY]Active Polymarket prediction marketshyperliquid_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.

CollateralSwap command
USDCNo swap needed
USDHswap <amount> (default)
USDeswap <amount> --token USDe
USDT0swap <amount> --token USDT0
USDXLswap <amount> --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 <amount> --to-usdc (or swap <amount> --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:

EndpointDescription
GET /healthCheck proxy status and uptime
GET /cache/statsCache hit/miss rates per type
POST /cache/clearClear 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:

VariableDefaultDescription
HL_UPSTREAM_URLhttps://api.hyperliquid.xyzUpstream API
HL_PROXY_PORT18731Proxy port
HL_CACHE_WARMUPtruePre-warm cache on startup

Environment Variables

VariableRequiredDescription
HL_ACCOUNT_ADDRESSFor trading/statusHyperliquid wallet address
HL_SECRET_KEYFor tradingAPI wallet private key
HL_TESTNETNofalse for mainnet (default), true for testnet
HL_PROXY_URLRecommendedCaching proxy URL (default: http://localhost:18731)
HL_ENV_FILENoOverride .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_KEYFor intelligenceGrok 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]).

ModeBadgeHow 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.

Files

6 total
Select a file
Select a file to preview.

Comments

Loading comments…