← 返回 Skills 市场
ggg223399

Byreal Perps CLI

作者 James333 · GitHub ↗ · v0.2.2 · MIT-0
cross-platform ✓ 安全检测通过
128
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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 init before 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 init interactively

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:

  1. The CLI will retry via HTTP API automatically; if it still fails, the issue is likely network connectivity or Hyperliquid API downtime.
  2. Check network connectivity: curl -s https://api.hyperliquid.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'
  3. For testnet, check: curl -s https://api.hyperliquid-testnet.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'
  4. If HTTP API also fails, the Hyperliquid service may be temporarily unavailable — retry after a short wait.

Hard Constraints

  1. -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.
  2. Never display private keys — use keypair paths only
  3. Never call the SDK directly — do NOT write 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.

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
安全使用建议
This skill is internally consistent for a trading CLI, but take standard precautions before installing and using it with real funds: 1) Inspect the npm package and GitHub repo (maintainer, recent commits, issues) to confirm authenticity and that the package name isn't a typo-squat. 2) Review the package code (or request a third-party audit) to confirm key storage and networking behavior — SKILL.md's claim that private keys are never transmitted is not independently verified. 3) Prefer installing in an isolated environment/container and test on testnet (--testnet) with small amounts first. 4) Never paste private keys into chat; use the provided interactive account init. 5) Keep npm package versions pinned and verify package integrity (checksums/signatures) when possible.
功能分析
Type: OpenClaw Skill Name: byreal-perps-cli Version: 0.2.2 The skill bundle provides instructions for an AI agent to interact with the `byreal-perps-cli` tool for Hyperliquid trading. The documentation in SKILL.md includes strong security practices, explicitly instructing the agent never to ask for private keys and highlighting that keys are stored locally with restricted permissions (0600). The commands and metadata (including URLs like api.hyperliquid.xyz) are consistent with the stated purpose of a trading CLI, and no evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
能力评估
Purpose & Capability
Name/description, required binary (byreal-perps-cli), and npm install (@byreal-io/byreal-perps-cli) are coherent for a trading CLI. No unrelated credentials or unrelated binaries are requested.
Instruction Scope
SKILL.md instructs only to install/use the CLI, run trading and signal commands, and provides network fallbacks and curl checks. It explicitly warns agents not to ask users to paste private keys and not to call bundled SDKs directly. It does not instruct reading unrelated system files or exfiltrating data.
Install Mechanism
Install spec uses a public npm package (@byreal-io/byreal-perps-cli) with global install. This is a normal delivery for a JS CLI but carries standard supply-chain risk (npm package integrity, typosquatting). The package homepage is a GitHub repo, which is a positive signal but should be verified.
Credentials
No environment variables or external credentials are declared; account initialization is done interactively and keys are stored locally per the docs. That is proportionate for a CLI that signs transactions locally. However, the claim that private keys 'never' leave the machine is asserted by the docs and not independently verified here.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other concerning privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install byreal-perps-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /byreal-perps-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.2
- Improved documentation and command reference in SKILL.md, detailing installation, credential management, command usage, and API/WebSocket fallback. - Added clear guidance on permissions, data privacy, and security practices for running trading and signal commands. - Explicitly listed hard constraints: only use the CLI interface, do not expose private keys, and avoid raw SDK calls. - Provided updated examples for key commands: account management, order/position handling, market signals, updates, and testnet usage. - Enhanced troubleshooting information for API connectivity issues.
元数据
Slug byreal-perps-cli
版本 0.2.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 128 次。

如何安装 Byreal Perps CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install byreal-perps-cli」即可一键安装,无需额外配置。

Byreal Perps CLI 是免费的吗?

是的,Byreal Perps CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Byreal Perps CLI 支持哪些平台?

Byreal Perps CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Byreal Perps CLI?

由 James333(@ggg223399)开发并维护,当前版本 v0.2.2。

💬 留言讨论