返回顶部
b

binance-spot-trader币安现货交易

Autonomous Binance spot trading bot with LLM-powered market analysis. Supports momentum trading, mean reversion, and DCA strategies on any Binance spot pair. Use when user wants to trade on Binance, set up automated crypto trading, build a spot trading bot, or automate DCA buying. Features technical analysis, LLM sentiment evaluation, position sizing, and portfolio tracking.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
3,598
下载量
免费
免费
9
收藏
概述
安装方式
版本历史

binance-spot-trader

Binance 现货交易机器人

适用于Binance的自主现货交易机器人。结合技术指标与LLM驱动的市场情绪分析,可在任何Binance现货交易对上执行交易。

前置条件

  • - Binance账户,需拥有API密钥(已启用现货交易,禁用提现功能)
  • Anthropic API密钥(使用Haiku模型,每次评估约$0.001)
  • Python 3.10+

设置

1. 安装

bash
bash {baseDir}/scripts/setup.sh

2. 配置

创建.env文件:

BINANCEAPIKEY=<你的API密钥>
BINANCESECRETKEY=<你的私钥>
LLMAPIKEY=
PAIRS=BTCUSDT,ETHUSDT,SOLUSDT
STRATEGY=momentum
TRADESIZEPCT=5
MAX_POSITIONS=5

3. 运行

bash
python3 {baseDir}/scripts/trader.py

或通过cron定时任务:

/5 * cd /opt/trader && python3 trader.py >> trader.log 2>&1

策略

动量策略(默认)

  • - 当价格上穿20-EMA且成交量放大时买入
  • 当价格下穿20-EMA或触及止盈/止损时卖出
  • 最适合趋势市场(BTC、ETH、SOL)

均值回归策略

  • - 当RSI < 30(超卖)且价格接近布林带下轨时买入
  • 当RSI > 70(超买)或价格接近布林带上轨时卖出
  • 最适合区间震荡市场

DCA(定投策略)

  • - 无论价格如何,定期定额买入固定金额
  • 可配置间隔(每小时、每日、每周)
  • 长期积累的最低风险策略

LLM增强(适用于所有策略)

  • - 每次交易前,向Claude Haiku询问市场情绪
  • 评估:近期新闻、价格走势、成交量模式、市场结构
  • 若情绪强烈反对,可否决交易信号

交易参数

参数默认值描述
PAIRSBTCUSDT逗号分隔的交易对
STRATEGY
momentum | momentum、mean_reversion或dca | | TRADESIZEPCT | 5 | 每笔交易占投资组合的百分比 | | MAX_POSITIONS | 5 | 最大同时持仓数量 | | TAKEPROFITPCT | 5 | 止盈百分比 | | STOPLOSSPCT | 3 | 止损百分比 | | DCA_INTERVAL | daily | DCA策略:hourly、daily、weekly | | DCAAMOUNTUSDT | 50 | 每次DCA买入的USDT金额 | | USE_LLM | true | 启用LLM情绪过滤器 |

监控

bash

查看投资组合


python3 {baseDir}/scripts/portfolio.py

查看交易历史

tail -50 trades.jsonl

查看日志

tail -f trader.log

⚠️ 安全注意事项

  • - 切勿在API密钥上启用提现功能 — 仅用于交易
  • 在Binance上对API密钥进行IP限制
  • 使用资金有限的子账户进行机器人交易
  • 从小额资金(50-100美元)开始,先进行模拟交易
  • 前24小时积极监控
  • 为所有交易设置Binance邮件提醒
  • API密钥存储在磁盘上 — 确保服务器安全(仅使用SSH密钥、防火墙、chmod 600)

参考

  • - 查看references/binance-api.md获取REST API文档
  • 查看references/indicators.md获取技术分析详情

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 binance-spot-trader-1776419957 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 binance-spot-trader-1776419957 技能

通过命令行安装

skillhub install binance-spot-trader-1776419957

下载

⬇ 下载 binance-spot-trader v1.0.0(免费)

文件大小: 7.53 KB | 发布时间: 2026-4-17 19:30

v1.0.0 最新 2026-4-17 19:30
Initial release: autonomous Binance spot trading with momentum, mean reversion, and DCA strategies plus LLM sentiment analysis

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部