Crypto Executor Optimizer
简介
Crypto Executor Optimizer
原始描述
Autonomous optimizer skill for Wesley — reads Binance trading performance every 6 hours, analyzes win rate and strategy metrics, then safely tunes executor.p...
通过你的 Agent 添加
安装目录:crypto-executor-optimizer/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: crypto-executor-optimizer
description: Skill for Wesley to optimize the crypto-executor trading bot every 6 hours. Wesley reads the performance metrics, analyzes them, decides what to change in executor.py, then uses apply_optimization.sh to apply the changes safely (backup, validate, restart).
version: 2.0.0
author: Georges Andronescu (Wesley Armando)
license: MIT
metadata:
openclaw:
emoji: "🤖"
requires:
bins:
- python3
- bash
- systemctl
env: []
optional_env:
- TELEGRAM_BOT_TOKEN
- TELEGRAM_CHAT_ID
install_notes: "apply_optimization.sh modifies executor.py via regex at runtime — this is expected behavior. It always creates a backup before modifying and validates Python syntax before restarting."
Crypto Executor Optimizer 🤖
Ce skill permet à Wesley d'optimiser automatiquement le bot de trading crypto-executor toutes les 6 heures.
Rôle de Wesley
Wesley est l'intelligence. Wesley lit les données de performance, analyse, décide des changements, puis exécute les scripts bash pour les appliquer.
Ce que Wesley doit faire toutes les 6 heures
Étape 1 — Lire les données
cat /workspace/performance_metrics.json
cat /workspace/learned_config.json
cat /workspace/skills/crypto-executor/executor.py
Étape 2 — Analyser les performances
Wesley analyse :
Win rate :
- < 80% → serrer les seuils OBI (+0.02), réduire les stratégies agressives
- 80–88% → ajustements mineurs seulement
-
88% → peut augmenter le Kelly factor (max 0.6)
Trades par jour :
- < 20 trades/jour → baisser les seuils OBI (-0.01), baisser price_change trigger
-
80 trades/jour → monter les seuils (qualité > quantité)
Win rate par stratégie :
- < 70% → réduire son allocation de 10%, redistribuer vers la meilleure
-
92% → augmenter son allocation de 5%
Si tout est optimal (win rate > 90%, 30–60 trades/jour, toutes stratégies > 85%) : → Aucun changement. Wesley note "no changes needed" dans le log.
Étape 3 — Décider des nouvelles valeurs
Wesley détermine les nouvelles valeurs pour ces paramètres :
| Paramètre | Valeur par défaut | Plage autorisée |
|---|---|---|
obi > X scalping |
0.10 | 0.06 – 0.18 |
obi > X momentum |
0.12 | 0.08 – 0.20 |
price_change > X |
0.8 | 0.4 – 2.0 |
spread_bps < X |
8 | 4 – 15 |
kelly * X factor |
0.5 | 0.3 – 0.6 |
| strategy mix scalping | 0.70 | 0.50 – 0.90 |
| strategy mix momentum | 0.25 | 0.05 – 0.40 |
| strategy mix stat_arb | 0.05 | 0.02 – 0.15 |
Wesley ne doit JAMAIS modifier :
- Les credentials Binance (API key/secret)
- La structure des classes (BinanceClient, PortfolioManager, RiskEngine, BinanceWebSocket)
- Les circuit breakers et stop loss
- DRAWDOWN_KILL_PCT, DRAWDOWN_PAUSE_PCT
- Le code WebSocket
Étape 4 — Appliquer les changements
Wesley appelle le script avec les nouvelles valeurs :
bash /workspace/skills/crypto-executor-optimizer/apply_optimization.sh \
--obi-scalping 0.11 \
--obi-momentum 0.13 \
--price-change 0.9 \
--spread-bps 9 \
--kelly-factor 0.5 \
--mix-scalping 0.72 \
--mix-momentum 0.23 \
--mix-stat-arb 0.05 \
--reason "Win rate 76%, tightening OBI thresholds"
Le script va automatiquement :
- Créer un backup horodaté
- Modifier les valeurs dans executor.py
- Valider la syntaxe Python
- Redémarrer le bot via systemd
- Envoyer une alerte Telegram
- Logger les changements
Étape 5 — Si aucun changement nécessaire
bash /workspace/skills/crypto-executor-optimizer/apply_optimization.sh --no-changes \
--reason "Performance optimal, no changes needed"
Fichiers importants
Fichier
Rôle
/workspace/performance_metrics.json
Stats de performance du bot
/workspace/learned_config.json
Historique des configurations précédentes
/workspace/skills/crypto-executor/executor.py
Le bot à optimiser
/workspace/logs/auto_optimize.log
Log des cycles d'optimisation
/workspace/logs/wesley_optimizations.log
Historique des décisions de Wesley
Monitoring
# Voir le dernier cycle
tail -50 /workspace/logs/auto_optimize.log
# Historique des optimisations
tail -100 /workspace/logs/wesley_optimizations.log
# Backups disponibles
ls -lh /workspace/skills/crypto-executor/executor_backup_*.py
# Status du bot
sudo systemctl status crypto-executor
bash /workspace/skills/crypto-executor-optimizer/apply_optimization.sh --no-changes \
--reason "Performance optimal, no changes needed"
| Fichier | Rôle |
|---|---|
/workspace/performance_metrics.json |
Stats de performance du bot |
/workspace/learned_config.json |
Historique des configurations précédentes |
/workspace/skills/crypto-executor/executor.py |
Le bot à optimiser |
/workspace/logs/auto_optimize.log |
Log des cycles d'optimisation |
/workspace/logs/wesley_optimizations.log |
Historique des décisions de Wesley |
Monitoring
# Voir le dernier cycle
tail -50 /workspace/logs/auto_optimize.log
# Historique des optimisations
tail -100 /workspace/logs/wesley_optimizations.log
# Backups disponibles
ls -lh /workspace/skills/crypto-executor/executor_backup_*.py
# Status du bot
sudo systemctl status crypto-executor
# Voir le dernier cycle
tail -50 /workspace/logs/auto_optimize.log
# Historique des optimisations
tail -100 /workspace/logs/wesley_optimizations.log
# Backups disponibles
ls -lh /workspace/skills/crypto-executor/executor_backup_*.py
# Status du bot
sudo systemctl status crypto-executor
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。