/install byreal-perps-cli
Hyperliquid Perps Trading
Installation
# Check if already installed
which byreal-perps-cli && byreal-perps-cli --version
# Install
npm install -g @byreal-io/byreal-perps-cli
Credentials & Permissions
- All trading commands require account initialization via
byreal-perps-cli account initbefore any trading operations - Read-only commands (account info, position list, order list, account history): Require initialized perps account
- Write commands (order market, order limit, order cancel, position close-market/close-limit/close-all, position leverage): Require initialized perps account with valid agent wallet
- Signal commands (signal scan, signal detail): No account required — uses public market data only
- Perps agent keys are stored locally in the byreal data directory with strict file permissions (mode 0600)
- The CLI never transmits private keys over the network — keys are only used locally for transaction signing
- AI agents should never ask users to paste private keys in chat; always direct them to run
byreal-perps-cli account initinteractively
WebSocket / API Fallback
Some 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:
- The CLI will retry via HTTP API automatically; if it still fails, the issue is likely network connectivity or Hyperliquid API downtime.
- Check network connectivity:
curl -s https://api.hyperliquid.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}' - For testnet, check:
curl -s https://api.hyperliquid-testnet.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}' - If HTTP API also fails, the Hyperliquid service may be temporarily unavailable — retry after a short wait.
Hard Constraints
-o jsononly 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.- Never display private keys — use keypair paths only
- Never call the SDK directly — do NOT write
node -e/tsx -escripts thatimportorrequirepackages like@nktkas/hyperliquidorviem. Always usebyreal-perps-clicommands to interact with Hyperliquid. The SDK is bundled inside the CLI; calling it externally causes CJS/ESM compatibility errors.
Commands Reference
Account Management
# 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
Orders
# Market order (side: buy/sell/long/short, size in coin units)
byreal-perps-cli order market \x3Cside> \x3Csize> \x3Ccoin>
byreal-perps-cli order market buy 0.01 BTC --tp 110000 --sl 90000
# Limit order
byreal-perps-cli order limit \x3Cside> \x3Csize> \x3Ccoin> \x3Cprice>
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 \x3Ccoin> \x3Coid>
# Cancel all orders
byreal-perps-cli order cancel-all -y
Positions
# List open positions
byreal-perps-cli position list
# Set leverage (1-50x)
byreal-perps-cli position leverage \x3Ccoin> \x3Cleverage>
# Close at market price (full or partial)
byreal-perps-cli position close-market \x3Ccoin>
# Close with limit order
byreal-perps-cli position close-limit \x3Ccoin> \x3Cprice>
# Close all positions
byreal-perps-cli position close-all -y
Market Signals
# Scan markets for trading signals
byreal-perps-cli signal scan
# Detailed technical analysis
byreal-perps-cli signal detail \x3Ccoin>
Update
# Check for available CLI updates
byreal-perps-cli update check
# Install the latest CLI version
byreal-perps-cli update install
Testnet
All commands support --testnet:
byreal-perps-cli --testnet account info
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install byreal-perps-cli - After installation, invoke the skill by name or use
/byreal-perps-cli - Provide required inputs per the skill's parameter spec and get structured output
What is Byreal Perps CLI?
Byreal Hyperliquid perpetual futures trading CLI: account setup, market/limit orders with TP/SL, position close-market/close-limit/close-all, leverage contro... It is an AI Agent Skill for Claude Code / OpenClaw, with 128 downloads so far.
How do I install Byreal Perps CLI?
Run "/install byreal-perps-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Byreal Perps CLI free?
Yes, Byreal Perps CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Byreal Perps CLI support?
Byreal Perps CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Byreal Perps CLI?
It is built and maintained by James333 (@ggg223399); the current version is v0.2.2.