← 返回 Skills 市场
82
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install erong-okx-trading-analyst
功能描述
OKX加密货币技术分析工具 — 使用欧易API获取实时行情数据,计算技术指标(MA、MACD、RSI、布林带等),生成交易信号。当用户需要加密货币行情分析、技术指标计算、或交易信号时触发此skill。
使用说明 (SKILL.md)
OKX Trading Analyst
使用欧易OKX API进行加密货币技术分析和交易信号生成。
API配置
你需要在 OKX 交易所申请 API Key(只需要读取权限即可),然后在项目根目录创建 .env 文件:
OKX_API_KEY=your-api-key-here
OKX_API_SECRET=your-api-secret-here
OKX 公开接口免费使用,不需要签名认证,只需要 API Key 即可。
权限要求: 仅需要行情读取权限,不要给交易权限。
功能
- 实时数据: 获取OKX K线数据和最新行情
- 技术指标: MA、MACD、RSI、布林带、ATR
- 交易信号: 综合评分系统,生成买卖建议
- 多周期: 支持1m/5m/15m/30m/1H/4H/1D等周期
使用方法
命令行
# 分析BTC 4小时周期
python3 scripts/okx_analyst.py BTC-USDT
# 分析ETH 1小时周期
python3 scripts/okx_analyst.py ETH-USDT --timeframe 1H
# 只输出交易信号
python3 scripts/okx_analyst.py BTC-USDT --signal-only
Python调用
from scripts.okx_analyst import OKXAnalyzer
analyzer = OKXAnalyzer()
# 获取数据并分析
df = analyzer.get_klines("BTC-USDT", bar="4H", limit=200)
df = analyzer.calculate_indicators(df)
signals = analyzer.generate_signals(df)
print(f"信号: {signals['recommendation']['signal']}")
print(f"强度: {signals['strength']}/+10")
输出示例
============================================================
📊 BTC-USDT 技术分析报告 (4H周期)
============================================================
【价格信息】
当前价格: $67,423.50
【交易信号】
🟢 温和看涨 (强度: +3/+10)
建议操作: 轻仓试多
止损: $65,423 (-3%)
目标: $70,795 (+5%)
信号详情:
✅ [趋势] MA20 > MA60,中长期趋势向上
✅ [趋势] 价格站上MA20短期均线
✅ [动量] MACD金叉,动量转强
ℹ️ [动量] RSI中性 (58.32)
============================================================
信号说明
| 强度 | 信号 | 建议 |
|---|---|---|
| +5以上 | 🟢 强烈看涨 | 逢低做多 |
| +2~+4 | 🟡 温和看涨 | 轻仓试多 |
| -1~+1 | ⚪ 中性 | 观望 |
| -2~-4 | 🟠 温和看跌 | 轻仓试空 |
| -5以下 | 🔴 强烈看跌 | 逢高做空 |
风险提示
⚠️ 技术分析仅供参考,不构成投资建议。加密货币市场波动剧烈,请严格设置止损。
依赖
pip install requests pandas numpy
文件结构
okx-trading-analyst/
├── SKILL.md
└── scripts/
└── okx_analyst.py
安全使用建议
This skill mostly does what it says (fetch OKX candles and compute indicators), but several inconsistencies deserve caution:
- Metadata vs reality: The registry lists no required env vars, but both SKILL.md and the code require OKX_API_KEY and OKX_API_SECRET. Do not assume a skill needs no secrets when its files ask for them.
- Secrets handling: The code asks for your API_SECRET. Provide only read-only API keys with the minimum scope and, if possible, restrict them by IP/whitelist and rotate them after use. Never reuse high-privilege keys.
- Undeclared external endpoint: okx_analyst.py defines NS3_BASE (https://api.ns3.ai/feed) which is not mentioned in the README — review the full script to see if it sends any of your data to that service. If you cannot audit the code end-to-end, avoid providing credentials.
- Local persistence: quick_check.py writes state to ~/.openclaw/skills/okx-trading-analyst/data/last_state.json. Expect local files to be created; inspect contents if you are concerned about what is stored.
- Origin and trust: Source/homepage are unknown. Prefer skills from known authors or with a public repo you can audit. If you decide to install:
- Inspect okx_analyst.py and quick_check.py fully (search for network calls, POST requests, or unexpected data uploads).
- Run in a sandboxed environment or VM first.
- Use read-only OKX keys with minimal privileges and rotate them after testing.
- If you don't want any secrets on disk, avoid creating the .env and use mocked/local data instead.
If you want, I can scan the remainder of okx_analyst.py (the truncated portion) for uses of NS3_BASE or any other outbound POST/PUT/requests that might transmit data beyond OKX.
功能分析
Type: OpenClaw Skill
Name: erong-okx-trading-analyst
Version: 1.0.0
The script `scripts/okx_analyst.py` contains hardcoded absolute paths to a specific user's home directory (`/Users/yirongcao/`) and attempts to execute external scripts via `subprocess.run`. Additionally, `scripts/analyze.js` uses `execSync` to run commands constructed from arguments without sufficient sanitization, creating a potential shell injection vulnerability. While the core logic aligns with the stated trading analysis purpose, these risky execution patterns and the handling of sensitive API keys are significant security flaws.
能力标签
能力评估
Purpose & Capability
The name/description say the skill uses OKX to fetch market data and compute indicators, which matches the code. However the published registry metadata declares no required environment variables or primary credential, while the SKILL.md and scripts clearly expect OKX API key/secret. That mismatch between declared requirements and actual code is incoherent and could mislead users.
Instruction Scope
SKILL.md instructs creating a .env with OKX API credentials and running scripts, which aligns with functionality. But runtime behavior goes beyond the README in two ways: (1) quick_check.py persists state under ~/.openclaw/skills/okx-trading-analyst/data/last_state.json (not documented in SKILL.md's file-structure section), and (2) okx_analyst.py defines an NS3 news API base URL (https://api.ns3.ai/feed) not mentioned in the README — the code may call additional external endpoints beyond OKX.
Install Mechanism
No install spec is provided (instruction-only install), and SKILL.md lists simple pip dependencies (requests, pandas, numpy) which matches the Python code. analyze.js uses child_process.execSync to invoke the Python script — expected for a small CLI wrapper. No remote download/extraction behavior was found.
Credentials
The skill requires OKX API_KEY and API_SECRET according to SKILL.md and the scripts, which is proportionate for fetching authenticated market endpoints. However the registry metadata incorrectly lists no required env vars. Also the code demands an API_SECRET (sensitive) even though the README says only read permissions are needed; a user should only supply keys with read-only scope and IP restrictions. The secret is requested but not declared in metadata — a transparency issue.
Persistence & Privilege
always:false and the skill is user-invocable (normal). The quick_check script persists state to a file under the user's home (~/.openclaw/skills/okx-trading-analyst/data/last_state.json). This is limited-scope persistence but it is not documented in the metadata and creates files in the user's profile, so users should be aware of this local state storage.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install erong-okx-trading-analyst - 安装完成后,直接呼叫该 Skill 的名称或使用
/erong-okx-trading-analyst触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
OKX Trading Analyst 1.0.0 — Initial Release
- Fetches real-time cryptocurrency data from OKX API.
- Computes key technical indicators: MA, MACD, RSI, Bollinger Bands, ATR.
- Provides automated trading signals with grading/strength.
- Supports multiple timeframes (from 1m to 1D).
- Usable via command-line or as a Python module.
- Only requires OKX API key with read-only permission.
元数据
常见问题
Okx Trading Analyst 是什么?
OKX加密货币技术分析工具 — 使用欧易API获取实时行情数据,计算技术指标(MA、MACD、RSI、布林带等),生成交易信号。当用户需要加密货币行情分析、技术指标计算、或交易信号时触发此skill。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。
如何安装 Okx Trading Analyst?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install erong-okx-trading-analyst」即可一键安装,无需额外配置。
Okx Trading Analyst 是免费的吗?
是的,Okx Trading Analyst 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Okx Trading Analyst 支持哪些平台?
Okx Trading Analyst 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Okx Trading Analyst?
由 Yirong(@erongcao)开发并维护,当前版本 v1.0.0。
推荐 Skills