Install
openclaw skills install byreal-perps-cliByreal Hyperliquid perpetual futures trading CLI: account setup, market/limit orders with TP/SL, position close-market/close-limit/close-all, leverage contro...
openclaw skills install byreal-perps-cli# Check if already installed
which byreal-perps-cli && byreal-perps-cli --version
# Install
npm install -g @byreal-io/byreal-perps-cli
byreal-perps-cli account init before any trading operationsbyreal-perps-cli account init interactivelySome commands (account info, position list, position close-market, position close-limit, position close-all) use WebSocket subscriptions to fetch real-time data. If the WebSocket connection fails or times out, the CLI automatically falls back to HTTP API calls. No user action is needed.
If a command returns a connection error:
curl -s https://api.hyperliquid.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'curl -s https://api.hyperliquid-testnet.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'-o json only for parsing — when showing results to the user, omit it and let the CLI's built-in tables render directly. Never fetch JSON then re-draw tables yourself.node -e / tsx -e scripts that import or require packages like @nktkas/hyperliquid or viem. Always use byreal-perps-cli commands to interact with Hyperliquid. The SDK is bundled inside the CLI; calling it externally causes CJS/ESM compatibility errors.# Initialize perps account (interactive wizard)
byreal-perps-cli account init
# Show account info & balance
byreal-perps-cli account info
# Show recent trade history
byreal-perps-cli account history
# Market order (side: buy/sell/long/short, size in coin units)
byreal-perps-cli order market <side> <size> <coin>
byreal-perps-cli order market buy 0.01 BTC --tp 110000 --sl 90000
# Limit order
byreal-perps-cli order limit <side> <size> <coin> <price>
byreal-perps-cli order limit sell 1 ETH 4000
# List open orders
byreal-perps-cli order list
# Cancel an order
byreal-perps-cli order cancel <coin> <oid>
# Cancel all orders
byreal-perps-cli order cancel-all -y
# List open positions
byreal-perps-cli position list
# Set leverage (1-50x)
byreal-perps-cli position leverage <coin> <leverage>
# Close at market price (full or partial)
byreal-perps-cli position close-market <coin>
# Close with limit order
byreal-perps-cli position close-limit <coin> <price>
# Close all positions
byreal-perps-cli position close-all -y
# Scan markets for trading signals
byreal-perps-cli signal scan
# Detailed technical analysis
byreal-perps-cli signal detail <coin>
# Check for available CLI updates
byreal-perps-cli update check
# Install the latest CLI version
byreal-perps-cli update install
All commands support --testnet:
byreal-perps-cli --testnet account info
npm i -g @byreal-io/byreal-perps-cli