Binance Trade Hunter 🔥
币安交易机会捕手 — TG 直接玩币。
First-Time Setup (MANDATORY)
When this skill is first loaded or installed, IMMEDIATELY check if src/config.yaml exists in this skill's directory.
If src/config.yaml does NOT exist, you MUST stop and guide the user through setup NOW — do not wait for a command:
- 1. Tell the user: "🔧 Binance Trade Hunter 安装成功!需要完成初始配置才能使用。"
- Copy
src/config.example.yaml to INLINECODE3 - Ask the user for their Binance API Key and Ed25519 private key file path
- ⚠️
Before asking, warn the user: "为了资金安全,强烈建议使用币安
子账户的 API Key 操作,不要使用主账户。子账户可以在币安 App → 账户管理 → 子账户 中创建,单独设置 API 权限和资金额度,即使 Key 泄露也不会影响主账户资产。"
- API Key must have
Spot Trading permission enabled
- Key type must be
Ed25519 (not HMAC-SHA256)
- 3. Ask the user: "是否需要配置独立的 Telegram 通知?如不指定,将默认使用当前对话的 TG Bot 发送通知。"
- If user wants custom TG: ask for
bottoken and
chatid, fill into config.yaml
- If user skips (default): leave telegram section empty or remove it. The skill will auto-detect the current session's TG bot token and chat_id from OpenClaw config.
- 4. Fill the values into INLINECODE4
- Run:
pip install -r src/requirements.txt (if dependencies not installed) - After setup is complete, tell the user: "✅ 配置完成!现在可以开始使用了。试试说「分析潜力币」或「查看余额」。"
Do NOT skip this step. Do NOT proceed to any command if config.yaml is missing.
Usage
All commands use this skill's directory as working dir. Replace SKILL_DIR with the resolved absolute path of this SKILL.md's parent directory.
Instant Commands
All functions return formatted text. Reply directly to user.
Analyze Top Coins — "分析潜力币" / "推荐币" / "analyze coins"
CODEBLOCK0
Analyze Single Coin — "分析 XXX" / "analyze BTC" / "看看 SOL"
cd SKILL_DIR; python -c "import sys; sys.path.insert(0,'src'); from skill_api import analyze_coin; print(analyze_coin('BTC'))"
Replace
'BTC' with user's coin symbol.
Buy — "买 50U 的 ETH" / "buy 100U BTC"
cd SKILL_DIR; python -c "import sys; sys.path.insert(0,'src'); from skill_api import buy; print(buy('ETH', 50))"
Args: coin symbol, USDT amount. ⚠️ Real money trade — confirm with user before executing.
Sell All — "卖掉 BTC" / "sell all ETH"
CODEBLOCK3
Sell Half — "卖一半 BTC" / "sell half ETH"
CODEBLOCK4
Check Positions — "查看持仓" / "仓位" / "positions"
CODEBLOCK5
Check Balance — "查看余额" / "余额" / "balance"
CODEBLOCK6
Background Services
Long-running services. Only start when user explicitly requests.
Pump Alert (异动监控)
Start: "启动异动监控" / "start pump alert"
cd SKILL_DIR; python -c "import sys; sys.path.insert(0,'src'); from skill_api import start_pump_alert; print(start_pump_alert())"
Stop: "停止异动监控" / "stop pump alert"
CODEBLOCK8
Coin Push (定时推送)
Start: "启动定时推送" / "start coin push"
cd SKILL_DIR; python -c "import sys; sys.path.insert(0,'src'); from skill_api import start_coin_push; print(start_coin_push())"
Stop: "停止定时推送" / "stop coin push"
CODEBLOCK10
Service Status — "服务状态" / "service status"
CODEBLOCK11
Dependencies
Python 3.10+ required. Install via:
CODEBLOCK12
Key packages: requests, cryptography, pyyaml, INLINECODE11
Notes
- - All trade commands execute real orders on Binance. Confirm coin and amount before executing.
- Background services run as independent processes. Use service_status to check.
- On Windows, add UTF-8 wrapper if emoji output causes encoding errors:
INLINECODE12
🌊 用 AI 建设加密,和币安一起逐浪 Web3!
Binance Trade Hunter 🔥
币安交易机会捕手 — TG 直接玩币。
首次设置(必做)
当此技能首次加载或安装时,立即检查该技能目录下是否存在 src/config.yaml。
如果 src/config.yaml 不存在,你必须立即停止并引导用户完成设置——不要等待命令:
- 1. 告知用户:🔧 Binance Trade Hunter 安装成功!需要完成初始配置才能使用。
- 将 src/config.example.yaml 复制为 src/config.yaml
- 向用户询问其 币安 API Key 和 Ed25519 私钥文件路径
- ⚠️
询问前,警告用户:为了资金安全,强烈建议使用币安
子账户的 API Key 操作,不要使用主账户。子账户可以在币安 App → 账户管理 → 子账户 中创建,单独设置 API 权限和资金额度,即使 Key 泄露也不会影响主账户资产。
- API Key 必须启用
现货交易 权限
- Key 类型必须为
Ed25519(非 HMAC-SHA256)
- 3. 询问用户:是否需要配置独立的 Telegram 通知?如不指定,将默认使用当前对话的 TG Bot 发送通知。
- 如果用户需要自定义 TG:询问
bottoken 和
chatid,填入 config.yaml
- 如果用户跳过(默认):将 telegram 部分留空或删除。技能将从 OpenClaw 配置中自动检测当前会话的 TG bot token 和 chat_id。
- 4. 将值填入 src/config.yaml
- 运行:pip install -r src/requirements.txt(如果依赖未安装)
- 设置完成后,告知用户:✅ 配置完成!现在可以开始使用了。试试说「分析潜力币」或「查看余额」。
不要跳过此步骤。如果 config.yaml 缺失,不要执行任何命令。
使用方式
所有命令均以此技能目录为工作目录。将 SKILL_DIR 替换为此 SKILL.md 所在父目录的解析绝对路径。
即时命令
所有函数返回格式化文本。直接回复用户。
分析热门币 — 分析潜力币 / 推荐币 / analyze coins
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import analyzetopcoins; print(analyzetopcoins(3))
分析单个币 — 分析 XXX / analyze BTC / 看看 SOL
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import analyzecoin; print(analyzecoin(BTC))
将 BTC 替换为用户指定的币种符号。
买入 — 买 50U 的 ETH / buy 100U BTC
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import buy; print(buy(ETH, 50))
参数:币种符号,USDT 金额。⚠️ 真实资金交易——执行前需与用户确认。
全部卖出 — 卖掉 BTC / sell all ETH
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import sellall; print(sellall(BTC))
卖出一半 — 卖一半 BTC / sell half ETH
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import sellhalf; print(sellhalf(BTC))
查看持仓 — 查看持仓 / 仓位 / positions
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import getpositions; print(getpositions())
查看余额 — 查看余额 / 余额 / balance
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import getbalance; print(getbalance())
后台服务
长时间运行的服务。仅在用户明确请求时启动。
异动监控(Pump Alert)
启动:启动异动监控 / start pump alert
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import startpumpalert; print(startpumpalert())
停止:停止异动监控 / stop pump alert
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import stoppumpalert; print(stoppumpalert())
定时推送(Coin Push)
启动:启动定时推送 / start coin push
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import startcoinpush; print(startcoinpush())
停止:停止定时推送 / stop coin push
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import stopcoinpush; print(stopcoinpush())
服务状态 — 服务状态 / service status
cd SKILLDIR; python -c import sys; sys.path.insert(0,src); from skillapi import servicestatus; print(servicestatus())
依赖
需要 Python 3.10+。通过以下命令安装:
cd SKILL_DIR; pip install -r src/requirements.txt
关键包:requests、cryptography、pyyaml、websocket-client
注意事项
- - 所有交易命令均在币安执行真实订单。执行前请确认币种和金额。
- 后台服务作为独立进程运行。使用 service_status 检查状态。
- 在 Windows 上,如果表情符号输出导致编码错误,请添加 UTF-8 包装器:
import sys,io; sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding=utf-8)
🌊 用 AI 建设加密,和币安一起逐浪 Web3!