{
  "schemaVersion": "1.0",
  "item": {
    "slug": "crypto-executor",
    "name": "Crypto Executor",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/georges91560/crypto-executor",
    "canonicalUrl": "https://clawhub.ai/georges91560/crypto-executor",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/crypto-executor",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=crypto-executor",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CONFIGURATION.md",
      "README.md",
      "SKILL.md",
      "SYSTEMD_SETUP.md",
      "executor.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/crypto-executor"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/crypto-executor",
    "agentPageUrl": "https://openagent3.xyz/skills/crypto-executor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/crypto-executor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/crypto-executor/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "🎯 WHAT IT DOES",
        "body": "Professional autonomous trading bot with COMPLETE feature set:\n\n✅ WebSocket real-time - Sub-100ms price updates (websocket-client required, REST 1s fallback auto)\n✅ OCO orders - Binance-managed TP/SL (instant protection)\n✅ Kelly Criterion - Optimal position sizing (adaptive)\n✅ Trailing stops - Lock profits automatically\n✅ Circuit breakers - 4-level protection system\n✅ Daily reports - Performance analytics (9am UTC)\n✅ Parallel scanning - 10 symbols in 500ms (10x faster)\n✅ Multi-strategy - Scalping, momentum, statistical arbitrage\n✅ Performance tracking - Win rate, Sharpe ratio, Kelly optimization\n✅ Adaptive strategy mixing - Self-learning, adjusts daily\n✅ Memory persistence - Remembers best config across restarts\n✅ LOT_SIZE validation - Binance quantity compliance (no rejected orders)\n✅ OCO monitoring - Detects TP/SL closes, updates Kelly in real-time\n\nThis is the COMPLETE version with ALL advanced features for maximum safety and profitability."
      },
      {
        "title": "⚠️ EXTERNAL DEPENDENCY",
        "body": "crypto-sniper-oracle (optional — enriches signals with OBI/VWAP data)\n\nSource: https://github.com/georges91560/crypto-sniper-oracle\nPurpose: Provides order book imbalance, VWAP, and microstructure analysis\nExecution: Called via subprocess during market scanning\nSecurity: MUST be audited before installation (external code execution)\n\nWhat it does:\n\nFetches Binance market data\nCalculates order book metrics\nReturns JSON signals\nNO credential requirements\nNO network calls except Binance\n\nInstallation instructions in CONFIGURATION.md"
      },
      {
        "title": "🤖 Pre-Installation Check (Terminal / Hostinger)",
        "body": "Why pre-install? The script is 1722 lines. Pre-installing it on the server means the AI agent never needs to recreate it from scratch — it launches in seconds and loads its learned memory immediately. Overwriting an existing install would erase learned_config.json and performance_metrics.json — the bot's brain.\n\nAlways run this check first:\n\n# Check if already installed\nls /workspace/skills/crypto-executor/executor.py\n\n# ✅ Already installed → just launch:\nsource /etc/crypto-executor/credentials.env\npython3 /workspace/skills/crypto-executor/executor.py\n\n# ❌ Not installed → full install (run once):\nmkdir -p /workspace/skills/crypto-executor /workspace/reports/daily /workspace/config_history\ncd /workspace/skills\ngit clone https://github.com/georges91560/crypto-executor.git crypto-executor-repo\n# SECURITY: pin a specific commit instead of HEAD — verify tag on GitHub first\n# git checkout <commit-hash-or-tag>\ncp crypto-executor-repo/executor.py /workspace/skills/crypto-executor/executor.py  # filename is lowercase\npip install websocket-client --break-system-packages\n# On VPS/standard server: prefer → python3 -m venv venv && source venv/bin/activate && pip install websocket-client\n\n# Verify before launch\npython3 -c \"\nimport os; from pathlib import Path\nchecks = {\n    'executor.py': Path('/workspace/skills/crypto-executor/executor.py').exists(),\n    'oracle':      Path('/workspace/skills/crypto-sniper-oracle/crypto_oracle.py').exists(),\n    'API_KEY':     bool(os.getenv('BINANCE_API_KEY')),\n    'API_SECRET':  bool(os.getenv('BINANCE_API_SECRET')),\n}\n[print(('✅' if v else '❌') + ' ' + k) for k,v in checks.items()]\nprint('READY — run executor.py' if all(checks.values()) else 'FIX ABOVE FIRST')\n\"\n\nFull step-by-step guide with explanations: CONFIGURATION.md"
      },
      {
        "title": "1. WebSocket Real-Time Streaming",
        "body": "# With websocket-client installed (recommended):\npip install websocket-client --break-system-packages\n# On VPS/standard server: prefer → python3 -m venv venv && source venv/bin/activate && pip install websocket-client\n# → Sub-100ms updates via wss://stream.binance.com:9443/ws/\n# → Auto-reconnect on disconnect\n# → Ping keepalive every 20s\n\n# Without websocket-client (fallback automatic):\n# → REST polling every 1s\n# → No config needed, bot works normally\n\n# Benefits vs v1.0:\n- 300x faster position monitoring\n- Instant stop loss execution\n- bid/ask spread available in cache"
      },
      {
        "title": "2. OCO Orders (One-Cancels-Other)",
        "body": "# Binance manages TP/SL automatically\nEntry: Market BUY executed\n↓\nOCO order created instantly:\n├─ Take Profit: Binance sells at TP\n└─ Stop Loss: Binance sells at SL\n\n# When TP hits → SL cancels\n# When SL hits → TP cancels\n# Zero lag, managed by Binance\n\n# v2.3 addition: OCO monitoring\n# Bot detects when Binance closes position\n# → Updates portfolio, Kelly, performance metrics instantly\n\nProtection window:\n\nv1.0: Up to 5 minutes unprotected\nv2.3: <1 second protection ✅"
      },
      {
        "title": "3. Kelly Criterion Position Sizing",
        "body": "# Adaptive position sizing based on performance\nkelly = (win_rate × avg_win - (1 - win_rate) × avg_loss) / avg_win\n\n# Example:\nWin rate: 85%\nAvg win: +0.3%\nAvg loss: -0.5%\n\nKelly = (0.85 × 0.003 - 0.15 × 0.005) / 0.003\n      = 0.60 (60% of capital suggested)\n\n# Use 50% Kelly (conservative default)\nPosition size = 60% × 0.5 × signal_confidence\n\n# Adapts automatically as performance changes!\n# Default: 60% (prudent start, no history)\n\nBenefits:\n\nIncreases size when winning\nReduces size when losing\nOptimal growth rate (mathematically proven)"
      },
      {
        "title": "4. Trailing Stops (Lock Profits)",
        "body": "# Automatically lock profits as price moves up\nEntry: $45,000\n\nPrice reaches $45,450 (+1%)\n→ Trailing stop: $45,000 (breakeven)\n\nPrice reaches $45,900 (+2%)\n→ Trailing stop: $45,450 (lock +1%)\n\nPrice reaches $46,350 (+3%)\n→ Trailing stop: $45,900 (lock +2%)\n\n# Lets winners run, protects gains!\n\nImpact:\n\nv1.0: Fixed TP at +0.3%, missed big moves\nv2.3: Captures +1% to +5% on strong trends ✅"
      },
      {
        "title": "5. Circuit Breakers (4-Level Protection)",
        "body": "# Level 1: Daily Loss Limit\nDaily loss > 2%\n→ Pause trading for 2 hours\n→ Auto-resume\n\n# Level 2: Weekly Loss Limit\nWeekly loss > 5%\n→ Reduce position sizes by 50%\n→ Conservative mode active\n\n# Level 3: Drawdown Pause\nDrawdown > 7%\n→ Pause trading for 48 hours\n→ Manual review required\n\n# Level 4: Kill Switch\nDrawdown > 10%\n→ STOP ALL TRADING\n→ Manual restart only\n\nMaximum possible loss: 10% (kill switch prevents catastrophe)"
      },
      {
        "title": "6. Daily Performance Reports",
        "body": "# Generated at 9am UTC every day\n# Sent via Telegram\n\nReport includes:\n├─ Total equity\n├─ Daily P&L ($, %)\n├─ Number of trades\n├─ Win rate\n├─ Sharpe ratio\n├─ Drawdown %\n├─ Strategy mix active\n└─ Status (on track / below target)\n\nExample report:\n\n📊 DAILY PERFORMANCE REPORT\n2026-02-28 09:00 UTC\n\n💰 PORTFOLIO\nTotal: $10,543.20\nCash: $3,200.00 USDT\nPositions: 3 open\n\nDay P&L: +$243.20 (+2.36%)\nDrawdown: 1.2%\n\n📈 TRADING\nTrades Today: 12\nWin Rate: 91.7%\n\n🎯 STATUS\n✅ On Track"
      },
      {
        "title": "7. Parallel Market Scanning",
        "body": "# 10 symbols scanned simultaneously\nThreadPoolExecutor(max_workers=10)\n\nv1.0: Sequential → 5 symbols × 500ms = 5000ms\nv2.3: Parallel   → 10 symbols × 500ms = 500ms (10x faster)\n\n# Symbols scanned:\nPRIMARY:   BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, ADAUSDT\nSECONDARY: DOGEUSDT, MATICUSDT, AVAXUSDT, DOTUSDT, LINKUSDT"
      },
      {
        "title": "8. Multi-Strategy Trading",
        "body": "Scalping (70% allocation)\n\nEntry: OBI > 0.10, spread < 8 bps\nTarget: +0.3%\nStop: -0.5%\nHold: 30s - 5min\nWin rate: 85-92%\n\nMomentum (25% allocation)\n\nEntry: OBI > 0.12, price surge > 0.8%\nTarget: +1.5%\nStop: -0.8%\nHold: 5-60min\nWin rate: 75-85%\n\nStatistical Arbitrage (5% allocation)\n\nEntry: BTC/ETH ratio divergence > 2σ\nTarget: Mean reversion (+1%)\nStop: -1%\nHold: Hours to days\nWin rate: 70-80%"
      },
      {
        "title": "9. Performance Analytics",
        "body": "# Tracked metrics:\n- Total trades\n- Winning trades / Losing trades\n- Average win / Average loss\n- Win rate (updated on every close)\n- Kelly fraction (recalculated)\n- Sharpe ratio (annualized)\n- Max drawdown\n- ROI (daily, weekly, monthly)\n\n# Used for:\n- Kelly position sizing (real-time)\n- Strategy allocation adjustment\n- Risk limit calibration\n- Adaptive mixing decisions"
      },
      {
        "title": "📊 PERFORMANCE IMPROVEMENTS",
        "body": "Metricv1.0v2.3 ProductionImprovementMarket scan5-10s0.5s10-20x fasterTP/SL detection5 min<1s300x fasterTrade entry2-3s0.5s4-6x fasterPosition sizingFixedKelly adaptiveOptimal growthProfit captureFixed TPTrailing stops+50-200%Risk protectionBasic4-level breakers10% max lossVisibilityLogs onlyDaily reports + SharpeFull analyticsOrder rejectionFrequentNone (LOT_SIZE)100% fill rateSymbols scanned5102x opportunity"
      },
      {
        "title": "Conservative Profile",
        "body": "Capital: $5,000-$10,000\nStrategy mix: Scalping 80%, Momentum 20%\nPosition size: Kelly 50% (adaptive)\n\nDaily:   50-100 trades | Win rate 88-92% | ROI +0.5% to +1.2%\nMonthly: ROI 10-20% | Max drawdown 3-5% | Sharpe 2.5-3.5"
      },
      {
        "title": "Balanced Profile",
        "body": "Capital: $10,000-$25,000\nStrategy mix: Scalping 70%, Momentum 25%, Stat Arb 5%\nPosition size: Kelly 50%\n\nDaily:   100-200 trades | Win rate 85-90% | ROI +0.8% to +1.8%\nMonthly: ROI 15-30% | Max drawdown 5-7% | Sharpe 2.0-3.0"
      },
      {
        "title": "Aggressive Profile",
        "body": "Capital: $50,000+\nStrategy mix: All strategies active\nPosition size: Kelly 60%\n\nDaily:   150-250 trades | Win rate 82-88% | ROI +1.0% to +2.5%\nMonthly: ROI 20-40% | Max drawdown 7-10% | Sharpe 1.8-2.5\n\nNote: Higher returns = higher drawdowns. Circuit breakers protect at 10% max."
      },
      {
        "title": "Position Level",
        "body": "Kelly Criterion sizing (adapts to performance)\nMax 12% of capital per trade\nLOT_SIZE validation (no Binance rejections)\nStop loss mandatory on every trade\nTrailing stops lock profits"
      },
      {
        "title": "Daily Level",
        "body": "Loss limit: 2% of capital → Pause 2 hours"
      },
      {
        "title": "Weekly Level",
        "body": "Loss limit: 5% of capital → Reduce sizes 50%"
      },
      {
        "title": "Portfolio Level",
        "body": "Drawdown pause: 7% (48h)\nKill switch: 10%\nMax open positions: 10"
      },
      {
        "title": "Execution Level",
        "body": "OCO orders (instant protection)\nEmergency SL if OCO fails\nWebSocket monitoring (sub-100ms)\nParallel execution (no delays)"
      },
      {
        "title": "Trade Alerts",
        "body": "🔔 TRADE EXECUTED\n\nBUY 0.22 BTCUSDT\nEntry: $45,000.00\nTP: $45,135.00\nSL: $44,775.00\n\nStrategy: scalping\nPosition Size: 8.2% of capital"
      },
      {
        "title": "Circuit Breaker Alerts",
        "body": "🚨 CIRCUIT BREAKER - LEVEL 3\n\nReason: Drawdown 7.2% > 7.0%\n\nTrading paused for 48 hours.\nReview required."
      },
      {
        "title": "Adaptive Adjustment Alert",
        "body": "🔄 ADAPTIVE ADJUSTMENT\n\nStrategy mix updated:\n• scalping: 65%\n• momentum: 30%\n• stat_arb: 5%"
      },
      {
        "title": "Daily Reports",
        "body": "📊 DAILY PERFORMANCE REPORT\n[Full report at 9am UTC]"
      },
      {
        "title": "Risk Limits (Environment Variables)",
        "body": "MAX_POSITION_SIZE_PCT=12        # Max 12% per trade\nDAILY_LOSS_LIMIT_PCT=2          # Pause at -2% daily\nWEEKLY_LOSS_LIMIT_PCT=5         # Reduce at -5% weekly\nDRAWDOWN_PAUSE_PCT=7            # Pause at 7% drawdown\nDRAWDOWN_KILL_PCT=10            # Kill switch at 10%"
      },
      {
        "title": "Strategy Mix (In Code)",
        "body": "strategy_mix = {\n    \"scalping\": 0.70,    # 70%\n    \"momentum\": 0.25,    # 25%\n    \"stat_arb\": 0.05     # 5%\n}"
      },
      {
        "title": "🚀 EXECUTION WORKFLOW",
        "body": "WebSocket Streams (24/7 real-time)\n├─ Price updates <100ms\n├─ PRICE_CACHE updated (price + bid + ask)\n└─ Position monitoring\n\n↓ Every 5 seconds ↓\n\nParallel Scan (500ms)\n├─ 10 symbols simultaneously\n├─ Oracle data fetched\n└─ Market conditions analyzed\n\n↓\n\nSignal Generation (<10ms)\n├─ Scalping (OBI > 0.10)\n├─ Momentum (price_change > 0.8%)\n└─ Stat arb (BTC/ETH Z-score > 2σ)\n\n↓\n\nRisk Check (<5ms)\n├─ Kelly position sizing\n├─ LOT_SIZE validation\n├─ Circuit breaker check\n└─ Limit validation\n\n↓\n\nExecution (500ms)\n├─ Market entry order\n├─ OCO TP/SL order (emergency SL if OCO fails)\n└─ Position tracking\n\n↓\n\nMonitoring (continuous)\n├─ Trailing stop updates\n├─ OCO close detection → Kelly update\n└─ Performance tracking + Sharpe\n\n↓ 9am UTC ↓\n\nDaily Report\n├─ Generate metrics\n├─ Send Telegram\n└─ Archive report"
      },
      {
        "title": "📂 FILES GENERATED",
        "body": "/workspace/\n├── portfolio_state.json          # Current portfolio\n├── open_positions.json           # Active positions\n├── trades_history.jsonl          # All trades log\n├── performance_metrics.json      # Win rate, Kelly, Sharpe\n├── learned_config.json           # Best known strategy mix\n├── strategy_adjustments.jsonl    # Adaptive history\n└── reports/\n    └── daily/\n        ├── report_2026-02-27.txt\n        ├── report_2026-02-28.txt\n        └── ..."
      },
      {
        "title": "Capital Requirements",
        "body": "Minimum: $1,000 (limited opportunities)\nRecommended: $5,000-$10,000 (balanced)\nProfessional: $25,000+ (full strategies)"
      },
      {
        "title": "Binance API",
        "body": "Trading enabled ✅\nWithdrawals DISABLED ✅ (security)\nIP whitelist recommended"
      },
      {
        "title": "Risk Disclaimer",
        "body": "Real money trading\nPast performance ≠ future results\nCan lose capital\nStart small, scale gradually\nMonitor daily reports"
      },
      {
        "title": "🎯 WHY THIS VERSION IS COMPLETE",
        "body": "v1.0 had: Basic features, fixed sizing, manual monitoring\nv2.3 PRODUCTION has: Everything you need for safe, profitable, professional trading\n\n✅ Kelly Criterion → Optimal position sizing\n✅ Trailing stops → Capture big moves\n✅ Circuit breakers → Protect from catastrophe\n✅ Daily reports → Full visibility + Sharpe ratio\n✅ Performance tracking → Continuous optimization\n✅ WebSocket + OCO → Fastest execution\n✅ Parallel scanning → 10 symbols, maximum efficiency\n✅ Adaptive mixing → Self-learning strategy allocation\n✅ Memory persistence → No cold-start degradation\n✅ LOT_SIZE validation → Zero order rejections\n✅ OCO monitoring → Real-time Kelly updates\n\nThis is production-ready, professional-grade trading automation.\n\nVersion: 2.3.0 - PRODUCTION READY\nLicense: MIT\nAuthor: Georges Andronescu (Wesley Armando)\n\nCOMPLETE FEATURES. MAXIMUM SAFETY. OPTIMAL PROFITS. ⚡💰\n\nEND OF SKILL"
      }
    ],
    "body": "Crypto Executor v2.3 — PRODUCTION READY ⚡\n🎯 WHAT IT DOES\n\nProfessional autonomous trading bot with COMPLETE feature set:\n\n✅ WebSocket real-time - Sub-100ms price updates (websocket-client required, REST 1s fallback auto) ✅ OCO orders - Binance-managed TP/SL (instant protection) ✅ Kelly Criterion - Optimal position sizing (adaptive) ✅ Trailing stops - Lock profits automatically ✅ Circuit breakers - 4-level protection system ✅ Daily reports - Performance analytics (9am UTC) ✅ Parallel scanning - 10 symbols in 500ms (10x faster) ✅ Multi-strategy - Scalping, momentum, statistical arbitrage ✅ Performance tracking - Win rate, Sharpe ratio, Kelly optimization ✅ Adaptive strategy mixing - Self-learning, adjusts daily ✅ Memory persistence - Remembers best config across restarts ✅ LOT_SIZE validation - Binance quantity compliance (no rejected orders) ✅ OCO monitoring - Detects TP/SL closes, updates Kelly in real-time\n\nThis is the COMPLETE version with ALL advanced features for maximum safety and profitability.\n\n⚠️ EXTERNAL DEPENDENCY\n\ncrypto-sniper-oracle (optional — enriches signals with OBI/VWAP data)\n\nSource: https://github.com/georges91560/crypto-sniper-oracle\nPurpose: Provides order book imbalance, VWAP, and microstructure analysis\nExecution: Called via subprocess during market scanning\nSecurity: MUST be audited before installation (external code execution)\n\nWhat it does:\n\nFetches Binance market data\nCalculates order book metrics\nReturns JSON signals\nNO credential requirements\nNO network calls except Binance\n\nInstallation instructions in CONFIGURATION.md\n\n🤖 Pre-Installation Check (Terminal / Hostinger)\n\nWhy pre-install? The script is 1722 lines. Pre-installing it on the server means the AI agent never needs to recreate it from scratch — it launches in seconds and loads its learned memory immediately. Overwriting an existing install would erase learned_config.json and performance_metrics.json — the bot's brain.\n\nAlways run this check first:\n\n# Check if already installed\nls /workspace/skills/crypto-executor/executor.py\n\n# ✅ Already installed → just launch:\nsource /etc/crypto-executor/credentials.env\npython3 /workspace/skills/crypto-executor/executor.py\n\n# ❌ Not installed → full install (run once):\nmkdir -p /workspace/skills/crypto-executor /workspace/reports/daily /workspace/config_history\ncd /workspace/skills\ngit clone https://github.com/georges91560/crypto-executor.git crypto-executor-repo\n# SECURITY: pin a specific commit instead of HEAD — verify tag on GitHub first\n# git checkout <commit-hash-or-tag>\ncp crypto-executor-repo/executor.py /workspace/skills/crypto-executor/executor.py  # filename is lowercase\npip install websocket-client --break-system-packages\n# On VPS/standard server: prefer → python3 -m venv venv && source venv/bin/activate && pip install websocket-client\n\n# Verify before launch\npython3 -c \"\nimport os; from pathlib import Path\nchecks = {\n    'executor.py': Path('/workspace/skills/crypto-executor/executor.py').exists(),\n    'oracle':      Path('/workspace/skills/crypto-sniper-oracle/crypto_oracle.py').exists(),\n    'API_KEY':     bool(os.getenv('BINANCE_API_KEY')),\n    'API_SECRET':  bool(os.getenv('BINANCE_API_SECRET')),\n}\n[print(('✅' if v else '❌') + ' ' + k) for k,v in checks.items()]\nprint('READY — run executor.py' if all(checks.values()) else 'FIX ABOVE FIRST')\n\"\n\n\nFull step-by-step guide with explanations: CONFIGURATION.md\n\n🔥 COMPLETE FEATURES\n1. WebSocket Real-Time Streaming\n# With websocket-client installed (recommended):\npip install websocket-client --break-system-packages\n# On VPS/standard server: prefer → python3 -m venv venv && source venv/bin/activate && pip install websocket-client\n# → Sub-100ms updates via wss://stream.binance.com:9443/ws/\n# → Auto-reconnect on disconnect\n# → Ping keepalive every 20s\n\n# Without websocket-client (fallback automatic):\n# → REST polling every 1s\n# → No config needed, bot works normally\n\n# Benefits vs v1.0:\n- 300x faster position monitoring\n- Instant stop loss execution\n- bid/ask spread available in cache\n\n2. OCO Orders (One-Cancels-Other)\n# Binance manages TP/SL automatically\nEntry: Market BUY executed\n↓\nOCO order created instantly:\n├─ Take Profit: Binance sells at TP\n└─ Stop Loss: Binance sells at SL\n\n# When TP hits → SL cancels\n# When SL hits → TP cancels\n# Zero lag, managed by Binance\n\n# v2.3 addition: OCO monitoring\n# Bot detects when Binance closes position\n# → Updates portfolio, Kelly, performance metrics instantly\n\n\nProtection window:\n\nv1.0: Up to 5 minutes unprotected\nv2.3: <1 second protection ✅\n3. Kelly Criterion Position Sizing\n# Adaptive position sizing based on performance\nkelly = (win_rate × avg_win - (1 - win_rate) × avg_loss) / avg_win\n\n# Example:\nWin rate: 85%\nAvg win: +0.3%\nAvg loss: -0.5%\n\nKelly = (0.85 × 0.003 - 0.15 × 0.005) / 0.003\n      = 0.60 (60% of capital suggested)\n\n# Use 50% Kelly (conservative default)\nPosition size = 60% × 0.5 × signal_confidence\n\n# Adapts automatically as performance changes!\n# Default: 60% (prudent start, no history)\n\n\nBenefits:\n\nIncreases size when winning\nReduces size when losing\nOptimal growth rate (mathematically proven)\n4. Trailing Stops (Lock Profits)\n# Automatically lock profits as price moves up\nEntry: $45,000\n\nPrice reaches $45,450 (+1%)\n→ Trailing stop: $45,000 (breakeven)\n\nPrice reaches $45,900 (+2%)\n→ Trailing stop: $45,450 (lock +1%)\n\nPrice reaches $46,350 (+3%)\n→ Trailing stop: $45,900 (lock +2%)\n\n# Lets winners run, protects gains!\n\n\nImpact:\n\nv1.0: Fixed TP at +0.3%, missed big moves\nv2.3: Captures +1% to +5% on strong trends ✅\n5. Circuit Breakers (4-Level Protection)\n# Level 1: Daily Loss Limit\nDaily loss > 2%\n→ Pause trading for 2 hours\n→ Auto-resume\n\n# Level 2: Weekly Loss Limit\nWeekly loss > 5%\n→ Reduce position sizes by 50%\n→ Conservative mode active\n\n# Level 3: Drawdown Pause\nDrawdown > 7%\n→ Pause trading for 48 hours\n→ Manual review required\n\n# Level 4: Kill Switch\nDrawdown > 10%\n→ STOP ALL TRADING\n→ Manual restart only\n\n\nMaximum possible loss: 10% (kill switch prevents catastrophe)\n\n6. Daily Performance Reports\n# Generated at 9am UTC every day\n# Sent via Telegram\n\nReport includes:\n├─ Total equity\n├─ Daily P&L ($, %)\n├─ Number of trades\n├─ Win rate\n├─ Sharpe ratio\n├─ Drawdown %\n├─ Strategy mix active\n└─ Status (on track / below target)\n\n\nExample report:\n\n📊 DAILY PERFORMANCE REPORT\n2026-02-28 09:00 UTC\n\n💰 PORTFOLIO\nTotal: $10,543.20\nCash: $3,200.00 USDT\nPositions: 3 open\n\nDay P&L: +$243.20 (+2.36%)\nDrawdown: 1.2%\n\n📈 TRADING\nTrades Today: 12\nWin Rate: 91.7%\n\n🎯 STATUS\n✅ On Track\n\n7. Parallel Market Scanning\n# 10 symbols scanned simultaneously\nThreadPoolExecutor(max_workers=10)\n\nv1.0: Sequential → 5 symbols × 500ms = 5000ms\nv2.3: Parallel   → 10 symbols × 500ms = 500ms (10x faster)\n\n# Symbols scanned:\nPRIMARY:   BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, ADAUSDT\nSECONDARY: DOGEUSDT, MATICUSDT, AVAXUSDT, DOTUSDT, LINKUSDT\n\n8. Multi-Strategy Trading\nScalping (70% allocation)\nEntry: OBI > 0.10, spread < 8 bps\nTarget: +0.3%\nStop: -0.5%\nHold: 30s - 5min\nWin rate: 85-92%\n\nMomentum (25% allocation)\nEntry: OBI > 0.12, price surge > 0.8%\nTarget: +1.5%\nStop: -0.8%\nHold: 5-60min\nWin rate: 75-85%\n\nStatistical Arbitrage (5% allocation)\nEntry: BTC/ETH ratio divergence > 2σ\nTarget: Mean reversion (+1%)\nStop: -1%\nHold: Hours to days\nWin rate: 70-80%\n\n9. Performance Analytics\n# Tracked metrics:\n- Total trades\n- Winning trades / Losing trades\n- Average win / Average loss\n- Win rate (updated on every close)\n- Kelly fraction (recalculated)\n- Sharpe ratio (annualized)\n- Max drawdown\n- ROI (daily, weekly, monthly)\n\n# Used for:\n- Kelly position sizing (real-time)\n- Strategy allocation adjustment\n- Risk limit calibration\n- Adaptive mixing decisions\n\n📊 PERFORMANCE IMPROVEMENTS\nMetric\tv1.0\tv2.3 Production\tImprovement\nMarket scan\t5-10s\t0.5s\t10-20x faster\nTP/SL detection\t5 min\t<1s\t300x faster\nTrade entry\t2-3s\t0.5s\t4-6x faster\nPosition sizing\tFixed\tKelly adaptive\tOptimal growth\nProfit capture\tFixed TP\tTrailing stops\t+50-200%\nRisk protection\tBasic\t4-level breakers\t10% max loss\nVisibility\tLogs only\tDaily reports + Sharpe\tFull analytics\nOrder rejection\tFrequent\tNone (LOT_SIZE)\t100% fill rate\nSymbols scanned\t5\t10\t2x opportunity\n💰 EXPECTED PERFORMANCE\nConservative Profile\nCapital: $5,000-$10,000\nStrategy mix: Scalping 80%, Momentum 20%\nPosition size: Kelly 50% (adaptive)\n\nDaily:   50-100 trades | Win rate 88-92% | ROI +0.5% to +1.2%\nMonthly: ROI 10-20% | Max drawdown 3-5% | Sharpe 2.5-3.5\n\nBalanced Profile\nCapital: $10,000-$25,000\nStrategy mix: Scalping 70%, Momentum 25%, Stat Arb 5%\nPosition size: Kelly 50%\n\nDaily:   100-200 trades | Win rate 85-90% | ROI +0.8% to +1.8%\nMonthly: ROI 15-30% | Max drawdown 5-7% | Sharpe 2.0-3.0\n\nAggressive Profile\nCapital: $50,000+\nStrategy mix: All strategies active\nPosition size: Kelly 60%\n\nDaily:   150-250 trades | Win rate 82-88% | ROI +1.0% to +2.5%\nMonthly: ROI 20-40% | Max drawdown 7-10% | Sharpe 1.8-2.5\n\n\nNote: Higher returns = higher drawdowns. Circuit breakers protect at 10% max.\n\n🛡️ RISK MANAGEMENT (Complete)\nPosition Level\nKelly Criterion sizing (adapts to performance)\nMax 12% of capital per trade\nLOT_SIZE validation (no Binance rejections)\nStop loss mandatory on every trade\nTrailing stops lock profits\nDaily Level\nLoss limit: 2% of capital → Pause 2 hours\nWeekly Level\nLoss limit: 5% of capital → Reduce sizes 50%\nPortfolio Level\nDrawdown pause: 7% (48h)\nKill switch: 10%\nMax open positions: 10\nExecution Level\nOCO orders (instant protection)\nEmergency SL if OCO fails\nWebSocket monitoring (sub-100ms)\nParallel execution (no delays)\n📱 TELEGRAM ALERTS\nTrade Alerts\n🔔 TRADE EXECUTED\n\nBUY 0.22 BTCUSDT\nEntry: $45,000.00\nTP: $45,135.00\nSL: $44,775.00\n\nStrategy: scalping\nPosition Size: 8.2% of capital\n\nCircuit Breaker Alerts\n🚨 CIRCUIT BREAKER - LEVEL 3\n\nReason: Drawdown 7.2% > 7.0%\n\nTrading paused for 48 hours.\nReview required.\n\nAdaptive Adjustment Alert\n🔄 ADAPTIVE ADJUSTMENT\n\nStrategy mix updated:\n• scalping: 65%\n• momentum: 30%\n• stat_arb: 5%\n\nDaily Reports\n📊 DAILY PERFORMANCE REPORT\n[Full report at 9am UTC]\n\n⚙️ CONFIGURATION\nRisk Limits (Environment Variables)\nMAX_POSITION_SIZE_PCT=12        # Max 12% per trade\nDAILY_LOSS_LIMIT_PCT=2          # Pause at -2% daily\nWEEKLY_LOSS_LIMIT_PCT=5         # Reduce at -5% weekly\nDRAWDOWN_PAUSE_PCT=7            # Pause at 7% drawdown\nDRAWDOWN_KILL_PCT=10            # Kill switch at 10%\n\nStrategy Mix (In Code)\nstrategy_mix = {\n    \"scalping\": 0.70,    # 70%\n    \"momentum\": 0.25,    # 25%\n    \"stat_arb\": 0.05     # 5%\n}\n\n🚀 EXECUTION WORKFLOW\nWebSocket Streams (24/7 real-time)\n├─ Price updates <100ms\n├─ PRICE_CACHE updated (price + bid + ask)\n└─ Position monitoring\n\n↓ Every 5 seconds ↓\n\nParallel Scan (500ms)\n├─ 10 symbols simultaneously\n├─ Oracle data fetched\n└─ Market conditions analyzed\n\n↓\n\nSignal Generation (<10ms)\n├─ Scalping (OBI > 0.10)\n├─ Momentum (price_change > 0.8%)\n└─ Stat arb (BTC/ETH Z-score > 2σ)\n\n↓\n\nRisk Check (<5ms)\n├─ Kelly position sizing\n├─ LOT_SIZE validation\n├─ Circuit breaker check\n└─ Limit validation\n\n↓\n\nExecution (500ms)\n├─ Market entry order\n├─ OCO TP/SL order (emergency SL if OCO fails)\n└─ Position tracking\n\n↓\n\nMonitoring (continuous)\n├─ Trailing stop updates\n├─ OCO close detection → Kelly update\n└─ Performance tracking + Sharpe\n\n↓ 9am UTC ↓\n\nDaily Report\n├─ Generate metrics\n├─ Send Telegram\n└─ Archive report\n\n📂 FILES GENERATED\n/workspace/\n├── portfolio_state.json          # Current portfolio\n├── open_positions.json           # Active positions\n├── trades_history.jsonl          # All trades log\n├── performance_metrics.json      # Win rate, Kelly, Sharpe\n├── learned_config.json           # Best known strategy mix\n├── strategy_adjustments.jsonl    # Adaptive history\n└── reports/\n    └── daily/\n        ├── report_2026-02-27.txt\n        ├── report_2026-02-28.txt\n        └── ...\n\n⚠️ IMPORTANT NOTES\nCapital Requirements\nMinimum: $1,000 (limited opportunities)\nRecommended: $5,000-$10,000 (balanced)\nProfessional: $25,000+ (full strategies)\nBinance API\nTrading enabled ✅\nWithdrawals DISABLED ✅ (security)\nIP whitelist recommended\nRisk Disclaimer\nReal money trading\nPast performance ≠ future results\nCan lose capital\nStart small, scale gradually\nMonitor daily reports\n🎯 WHY THIS VERSION IS COMPLETE\n\nv1.0 had: Basic features, fixed sizing, manual monitoring v2.3 PRODUCTION has: Everything you need for safe, profitable, professional trading\n\n✅ Kelly Criterion → Optimal position sizing ✅ Trailing stops → Capture big moves ✅ Circuit breakers → Protect from catastrophe ✅ Daily reports → Full visibility + Sharpe ratio ✅ Performance tracking → Continuous optimization ✅ WebSocket + OCO → Fastest execution ✅ Parallel scanning → 10 symbols, maximum efficiency ✅ Adaptive mixing → Self-learning strategy allocation ✅ Memory persistence → No cold-start degradation ✅ LOT_SIZE validation → Zero order rejections ✅ OCO monitoring → Real-time Kelly updates\n\nThis is production-ready, professional-grade trading automation.\n\nVersion: 2.3.0 - PRODUCTION READY License: MIT Author: Georges Andronescu (Wesley Armando)\n\nCOMPLETE FEATURES. MAXIMUM SAFETY. OPTIMAL PROFITS. ⚡💰\n\nEND OF SKILL"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/georges91560/crypto-executor",
    "publisherUrl": "https://clawhub.ai/georges91560/crypto-executor",
    "owner": "georges91560",
    "version": "2.3.4",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/crypto-executor",
    "downloadUrl": "https://openagent3.xyz/downloads/crypto-executor",
    "agentUrl": "https://openagent3.xyz/skills/crypto-executor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/crypto-executor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/crypto-executor/agent.md"
  }
}