{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawback",
    "name": "Clawback",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/mainfraame/clawback",
    "canonicalUrl": "https://clawhub.ai/mainfraame/clawback",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/clawback",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawback",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHANGELOG.md",
      "CLAUDE.md",
      "CODE_IMPROVEMENTS_SUMMARY.md",
      "CONFIGURATION_IMPROVEMENTS.md",
      "DAILY_MAINTENANCE_2026-02-03.md",
      "DAILY_MAINTENANCE_2026-02-04.md"
    ],
    "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. 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. 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/clawback"
    },
    "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/clawback",
    "agentPageUrl": "https://openagent3.xyz/skills/clawback/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawback/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawback/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. 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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "ClawBack",
        "body": "Mirror congressional stock trades with automated broker execution"
      },
      {
        "title": "Agent Instructions",
        "body": "When the user invokes /clawback, execute the appropriate command based on the argument:"
      },
      {
        "title": "Commands",
        "body": "When the user invokes /clawback with any arguments, execute the corresponding command:\n\nCommandAction/clawback setupRun the setup wizard: Execute {baseDir}/bin/clawback.py setup/clawback statusCheck system status: Execute {baseDir}/bin/clawback.py status/clawback runStart trading bot: Execute {baseDir}/bin/clawback.py run/clawback daemonRun as background service: Execute {baseDir}/bin/clawback.py daemon/clawback testTest notifications: Execute {baseDir}/bin/clawback.py test/clawback (no args)Show help: Execute {baseDir}/bin/clawback.py --help"
      },
      {
        "title": "How to Execute Commands",
        "body": "Option 1: Using the wrapper script (recommended)\nWhen executing ClawBack commands, always:\n\nUse the wrapper script at {baseDir}/bin/clawback.py\nPass the command as an argument (e.g., {baseDir}/bin/clawback.py status)\nCapture and display the output to the user\n\nOption 2: Direct Python execution (if wrapper doesn't work)\nIf the wrapper script fails, you can run ClawBack directly:\n\nChange to the skill directory: cd {baseDir}\nActivate the virtual environment: source venv/bin/activate\nRun the CLI: python -m clawback.cli [command]\nCapture and display the output\n\nImportant: Always check if the virtual environment exists at {baseDir}/venv. If not, you may need to run the setup first."
      },
      {
        "title": "/clawback setup - Interactive Setup Flow",
        "body": "When user runs /clawback setup, follow these steps:\n\nStep 1: Install dependencies (if needed)\nCheck if {baseDir}/venv exists. If not, run:\n\ncd {baseDir} && python3 -m venv venv && source venv/bin/activate && pip install -e .\n\nStep 2: Prompt for E*TRADE credentials\nAsk the user for each value:\n\nEnvironment: Ask \"Do you want to use sandbox (testing) or production (real money)?\"\n\nDefault: sandbox\n\n\n\nConsumer Key: Ask \"Enter your E*TRADE Consumer Key (from developer.etrade.com):\"\n\nRequired field\n\n\n\nConsumer Secret: Ask \"Enter your E*TRADE Consumer Secret:\"\n\nRequired field\n\n\n\nAccount ID: Ask \"Enter your E*TRADE Account ID (or leave blank to get it after OAuth):\"\n\nOptional - can be obtained later\n\nStep 3: Save configuration\nCreate/update ~/.clawback/config.json with the provided values:\n\n{\n  \"broker\": {\n    \"adapter\": \"etrade\",\n    \"environment\": \"<sandbox or production>\",\n    \"credentials\": {\n      \"apiKey\": \"<consumer_key>\",\n      \"apiSecret\": \"<consumer_secret>\"\n    }\n  },\n  \"trading\": {\n    \"accountId\": \"<account_id>\",\n    \"initialCapital\": 50000,\n    \"tradeScalePercentage\": 0.01,\n    \"maxPositionPercentage\": 0.05,\n    \"dailyLossLimit\": 0.02\n  },\n  \"notifications\": {\n    \"telegram\": {\n      \"enabled\": true,\n      \"useOpenClaw\": true\n    }\n  },\n  \"congress\": {\n    \"dataSource\": \"official\",\n    \"pollIntervalHours\": 24,\n    \"minimumTradeSize\": 10000\n  }\n}\n\nStep 4: Confirm setup\nTell the user: \"Configuration saved to ~/.clawback/config.json. Run /clawback status to verify.\""
      },
      {
        "title": "Getting E*TRADE API Credentials",
        "body": "Direct user to: https://developer.etrade.com\n\nCreate a developer account\nCreate a new app (sandbox first for testing)\nCopy the Consumer Key and Consumer Secret"
      },
      {
        "title": "Configuration Location",
        "body": "Config file: ~/.clawback/config.json\nSkill directory: {baseDir}"
      },
      {
        "title": "Reading Saved Configuration",
        "body": "To check if the user has configured credentials, read ~/.clawback/config.json:\n\nIf file doesn't exist or credentials are empty → prompt for setup\nIf credentials exist → can proceed with status/run commands\n\nThe CLI automatically reads from ~/.clawback/config.json for all operations."
      },
      {
        "title": "Checking Setup Status",
        "body": "Before running /clawback status or /clawback run, verify:\n\n{baseDir}/venv exists (dependencies installed)\n~/.clawback/config.json exists with non-empty broker.credentials.apiKey\n\nIf either is missing, suggest running /clawback setup first.\n\nClawBack tracks stock trades disclosed by members of Congress (House and Senate) and executes scaled positions in your E*TRADE brokerage account. Built on the premise that congressional leaders consistently outperform the market due to informational advantages."
      },
      {
        "title": "Default Target Politicians",
        "body": "ClawBack monitors these politicians by default (configurable):\n\nPoliticianChamberPriorityNancy PelosiHouse1 (highest)Dan CrenshawHouse2Tommy TubervilleSenate2Marjorie Taylor GreeneHouse3"
      },
      {
        "title": "Trading Strategy Defaults",
        "body": "ParameterDefaultDescriptionTrade Delay3 daysWait after disclosure before tradingHolding Period30 daysTarget hold time for positionsPosition Size5%Max allocation per tradeStop-Loss8%Per-position stop-lossPortfolio Drawdown15%Max portfolio loss before haltDisclosure Checks10:00, 14:00, 18:00 ETDaily check times"
      },
      {
        "title": "Features",
        "body": "Real-time disclosure tracking from official House Clerk and Senate eFD sources\nAutomated trade execution via E*TRADE API (only supported broker)\nSmart position sizing - scales trades to your account size\nTrailing stop-losses - lock in profits, limit losses\nRisk management - drawdown limits, consecutive loss protection\nTelegram notifications - get alerts for new trades and stop-losses\nBacktesting engine - test strategies on historical data"
      },
      {
        "title": "Performance (Backtest Results)",
        "body": "StrategyWin RateReturnSharpe3-day delay, 30-day hold42.9%+6.2%0.399-day delay, 90-day hold57.1%+4.7%0.22\n\nCongressional leaders have outperformed the S&P 500 by 47% annually according to NBER research."
      },
      {
        "title": "Installation via ClawHub",
        "body": "# Install from ClawHub registry\nclawhub install clawback\n\n# Or install from local directory\nclawhub install ./clawback"
      },
      {
        "title": "Common Issues",
        "body": "Skill not executing: If /clawback doesn't work in OpenClaw:\n\nCheck if the skill is in the correct location: {baseDir}/\nVerify the wrapper script is executable: chmod +x {baseDir}/bin/clawback.py\nCheck if virtual environment exists: {baseDir}/venv/\n\n\n\nAuthentication issues: If E*TRADE authentication fails:\n\nRun the authentication utility: python {baseDir}/scripts/auth_utility.py --auth\nRun {baseDir}/bin/clawback.py setup to reconfigure\nCheck credentials in ~/.clawback/config.json\nVerify E*TRADE API keys are valid\n\n\n\nToken expiration: If tokens expire (30-day lifespan):\n\nRun: python {baseDir}/scripts/auth_utility.py --refresh\nOr start new authentication: python {baseDir}/scripts/auth_utility.py --auth\n\n\n\nPython import errors: If you see \"ModuleNotFoundError\":\n\nEnsure virtual environment is activated\nRun pip install -e . in {baseDir}/\nCheck Python path includes {baseDir}/src"
      },
      {
        "title": "Debug Mode",
        "body": "To debug skill execution, add DEBUG=1 environment variable:\n\nDEBUG=1 {baseDir}/bin/clawback.py status\n\nThis will show additional information about the execution context."
      },
      {
        "title": "Post-Installation Setup",
        "body": "After installation via ClawHub, the install.sh script runs automatically:\n\nPython Environment Setup - Creates virtual environment\nPackage Installation - Installs ClawBack via pip\nDirectory Structure - Creates logs/, data/, config/ directories\nSetup Prompt - Asks if you want to run the setup wizard\n\nIf you skip setup during installation, run it manually:\n\ncd ~/.openclaw/skills/clawback\n./setup.sh          # Interactive setup wizard\n# or\nclawback setup      # CLI-based setup"
      },
      {
        "title": "Improved Setup Features",
        "body": "Better input handling - Works in both interactive and non-interactive modes\nInput validation - Validates E*TRADE API key formats\nTimeout handling - Automatically uses defaults if no input\nError recovery - Fallback to manual setup if CLI fails\nConfiguration check - Detects existing config and offers options"
      },
      {
        "title": "Interactive Setup Wizard",
        "body": "The setup wizard guides you through configuration:"
      },
      {
        "title": "Step 1: Environment Selection",
        "body": "Sandbox (recommended for testing): No real trades, uses E*TRADE developer sandbox\nProduction: Real trading with real money"
      },
      {
        "title": "Step 2: E*TRADE API Credentials",
        "body": "Consumer Key: From E*TRADE developer portal\nConsumer Secret: From E*TRADE developer portal"
      },
      {
        "title": "Step 3: Authentication",
        "body": "Automatic OAuth flow with E*TRADE\nOpens browser for authorization\nReturns verification code"
      },
      {
        "title": "Step 4: Account Selection",
        "body": "Lists all available E*TRADE accounts\nChoose which account to trade with"
      },
      {
        "title": "Step 5: Telegram Setup (Optional)",
        "body": "Configure notifications via Telegram bot\nUses OpenClaw's built-in Telegram channel if available"
      },
      {
        "title": "Environment Variables",
        "body": "After setup, credentials are stored in .env:\n\n# E*TRADE API (required)\nBROKER_API_KEY=your_consumer_key_here\nBROKER_API_SECRET=your_consumer_secret_here\nBROKER_ACCOUNT_ID=your_account_id_here\n\n# Telegram (optional)\nTELEGRAM_BOT_TOKEN=your_bot_token_here\nTELEGRAM_CHAT_ID=your_chat_id_here\n\n# FMP API (optional)\nFMP_API_KEY=your_fmp_api_key_here"
      },
      {
        "title": "Usage",
        "body": "# Use the installed CLI command\nclawback run      # Start interactive trading mode\nclawback daemon   # Run as background service\nclawback status   # Check system status\nclawback setup    # Re-run setup wizard\nclawback test     # Test Telegram notifications"
      },
      {
        "title": "Automated Trading",
        "body": "The clawback daemon command runs continuously with:\n\nDisclosure checks at 10:00, 14:00, 18:00 ET (when filings are typically released)\nTrade execution at 9:35 AM ET (5 min after market open)\nToken refresh every 90 minutes (keeps E*TRADE session alive)\nMarket hours enforcement (9:30 AM - 4:00 PM ET)"
      },
      {
        "title": "Data Sources",
        "body": "House Clerk: https://disclosures-clerk.house.gov (PDF parsing)\nSenate eFD: https://efdsearch.senate.gov (web scraping)\nFinancial Modeling Prep: Enhanced financial data (optional)"
      },
      {
        "title": "Supported Brokers",
        "body": "ClawBack currently only supports ETRADE. The adapter pattern allows for future broker support, but only ETRADE is implemented and tested.\n\nBrokerAdapterStatusE*TRADEetrade_adapter.pySupported"
      },
      {
        "title": "Risk Management",
        "body": "Position limits: 5% max per symbol, 20 positions max\nStop-losses: 8% per position, 15% portfolio drawdown\nDaily limits: 3% max daily loss\nPDT compliance: Conservative 2 trades/day limit"
      },
      {
        "title": "Authentication Helpers",
        "body": "For manual E*TRADE authentication outside the main CLI:\n\n# Standalone OAuth authentication script\ncd {baseDir}\nsource venv/bin/activate\npython scripts/auth_script.py\n\nThis generates an authorization URL, prompts for the verification code, and completes authentication."
      },
      {
        "title": "File Locations",
        "body": "FilePurpose~/.clawback/config.jsonMain configuration~/.clawback/.access_tokens.jsonE*TRADE OAuth tokens~/.clawback/data/trading.dbSQLite database"
      },
      {
        "title": "Security",
        "body": "No hardcoded credentials in source code\nEnvironment variable based configuration\nEncrypted token storage for E*TRADE\nGit-ignored .env file\nOptional production encryption"
      },
      {
        "title": "Support",
        "body": "Documentation: See README.md for detailed setup\nIssues: https://github.com/mainfraame/clawback/issues\nCommunity: https://discord.com/invite/clawd"
      },
      {
        "title": "Disclaimer",
        "body": "Trading involves substantial risk of loss. This software is for educational purposes only. Past congressional trading performance does not guarantee future results. Always test with E*TRADE sandbox accounts before live trading."
      }
    ],
    "body": "ClawBack\n\nMirror congressional stock trades with automated broker execution\n\nAgent Instructions\n\nWhen the user invokes /clawback, execute the appropriate command based on the argument:\n\nCommands\n\nWhen the user invokes /clawback with any arguments, execute the corresponding command:\n\nCommand\tAction\n/clawback setup\tRun the setup wizard: Execute {baseDir}/bin/clawback.py setup\n/clawback status\tCheck system status: Execute {baseDir}/bin/clawback.py status\n/clawback run\tStart trading bot: Execute {baseDir}/bin/clawback.py run\n/clawback daemon\tRun as background service: Execute {baseDir}/bin/clawback.py daemon\n/clawback test\tTest notifications: Execute {baseDir}/bin/clawback.py test\n/clawback (no args)\tShow help: Execute {baseDir}/bin/clawback.py --help\nHow to Execute Commands\n\nOption 1: Using the wrapper script (recommended) When executing ClawBack commands, always:\n\nUse the wrapper script at {baseDir}/bin/clawback.py\nPass the command as an argument (e.g., {baseDir}/bin/clawback.py status)\nCapture and display the output to the user\n\nOption 2: Direct Python execution (if wrapper doesn't work) If the wrapper script fails, you can run ClawBack directly:\n\nChange to the skill directory: cd {baseDir}\nActivate the virtual environment: source venv/bin/activate\nRun the CLI: python -m clawback.cli [command]\nCapture and display the output\n\nImportant: Always check if the virtual environment exists at {baseDir}/venv. If not, you may need to run the setup first.\n\n/clawback setup - Interactive Setup Flow\n\nWhen user runs /clawback setup, follow these steps:\n\nStep 1: Install dependencies (if needed) Check if {baseDir}/venv exists. If not, run:\n\ncd {baseDir} && python3 -m venv venv && source venv/bin/activate && pip install -e .\n\n\nStep 2: Prompt for E*TRADE credentials Ask the user for each value:\n\nEnvironment: Ask \"Do you want to use sandbox (testing) or production (real money)?\"\n\nDefault: sandbox\n\nConsumer Key: Ask \"Enter your E*TRADE Consumer Key (from developer.etrade.com):\"\n\nRequired field\n\nConsumer Secret: Ask \"Enter your E*TRADE Consumer Secret:\"\n\nRequired field\n\nAccount ID: Ask \"Enter your E*TRADE Account ID (or leave blank to get it after OAuth):\"\n\nOptional - can be obtained later\n\nStep 3: Save configuration Create/update ~/.clawback/config.json with the provided values:\n\n{\n  \"broker\": {\n    \"adapter\": \"etrade\",\n    \"environment\": \"<sandbox or production>\",\n    \"credentials\": {\n      \"apiKey\": \"<consumer_key>\",\n      \"apiSecret\": \"<consumer_secret>\"\n    }\n  },\n  \"trading\": {\n    \"accountId\": \"<account_id>\",\n    \"initialCapital\": 50000,\n    \"tradeScalePercentage\": 0.01,\n    \"maxPositionPercentage\": 0.05,\n    \"dailyLossLimit\": 0.02\n  },\n  \"notifications\": {\n    \"telegram\": {\n      \"enabled\": true,\n      \"useOpenClaw\": true\n    }\n  },\n  \"congress\": {\n    \"dataSource\": \"official\",\n    \"pollIntervalHours\": 24,\n    \"minimumTradeSize\": 10000\n  }\n}\n\n\nStep 4: Confirm setup Tell the user: \"Configuration saved to ~/.clawback/config.json. Run /clawback status to verify.\"\n\nGetting E*TRADE API Credentials\n\nDirect user to: https://developer.etrade.com\n\nCreate a developer account\nCreate a new app (sandbox first for testing)\nCopy the Consumer Key and Consumer Secret\nConfiguration Location\nConfig file: ~/.clawback/config.json\nSkill directory: {baseDir}\nReading Saved Configuration\n\nTo check if the user has configured credentials, read ~/.clawback/config.json:\n\nIf file doesn't exist or credentials are empty → prompt for setup\nIf credentials exist → can proceed with status/run commands\n\nThe CLI automatically reads from ~/.clawback/config.json for all operations.\n\nChecking Setup Status\n\nBefore running /clawback status or /clawback run, verify:\n\n{baseDir}/venv exists (dependencies installed)\n~/.clawback/config.json exists with non-empty broker.credentials.apiKey\n\nIf either is missing, suggest running /clawback setup first.\n\nClawBack tracks stock trades disclosed by members of Congress (House and Senate) and executes scaled positions in your E*TRADE brokerage account. Built on the premise that congressional leaders consistently outperform the market due to informational advantages.\n\nDefault Target Politicians\n\nClawBack monitors these politicians by default (configurable):\n\nPolitician\tChamber\tPriority\nNancy Pelosi\tHouse\t1 (highest)\nDan Crenshaw\tHouse\t2\nTommy Tuberville\tSenate\t2\nMarjorie Taylor Greene\tHouse\t3\nTrading Strategy Defaults\nParameter\tDefault\tDescription\nTrade Delay\t3 days\tWait after disclosure before trading\nHolding Period\t30 days\tTarget hold time for positions\nPosition Size\t5%\tMax allocation per trade\nStop-Loss\t8%\tPer-position stop-loss\nPortfolio Drawdown\t15%\tMax portfolio loss before halt\nDisclosure Checks\t10:00, 14:00, 18:00 ET\tDaily check times\nFeatures\nReal-time disclosure tracking from official House Clerk and Senate eFD sources\nAutomated trade execution via E*TRADE API (only supported broker)\nSmart position sizing - scales trades to your account size\nTrailing stop-losses - lock in profits, limit losses\nRisk management - drawdown limits, consecutive loss protection\nTelegram notifications - get alerts for new trades and stop-losses\nBacktesting engine - test strategies on historical data\nPerformance (Backtest Results)\nStrategy\tWin Rate\tReturn\tSharpe\n3-day delay, 30-day hold\t42.9%\t+6.2%\t0.39\n9-day delay, 90-day hold\t57.1%\t+4.7%\t0.22\n\nCongressional leaders have outperformed the S&P 500 by 47% annually according to NBER research.\n\nInstallation via ClawHub\n# Install from ClawHub registry\nclawhub install clawback\n\n# Or install from local directory\nclawhub install ./clawback\n\nTroubleshooting\nCommon Issues\n\nSkill not executing: If /clawback doesn't work in OpenClaw:\n\nCheck if the skill is in the correct location: {baseDir}/\nVerify the wrapper script is executable: chmod +x {baseDir}/bin/clawback.py\nCheck if virtual environment exists: {baseDir}/venv/\n\nAuthentication issues: If E*TRADE authentication fails:\n\nRun the authentication utility: python {baseDir}/scripts/auth_utility.py --auth\nRun {baseDir}/bin/clawback.py setup to reconfigure\nCheck credentials in ~/.clawback/config.json\nVerify E*TRADE API keys are valid\n\nToken expiration: If tokens expire (30-day lifespan):\n\nRun: python {baseDir}/scripts/auth_utility.py --refresh\nOr start new authentication: python {baseDir}/scripts/auth_utility.py --auth\n\nPython import errors: If you see \"ModuleNotFoundError\":\n\nEnsure virtual environment is activated\nRun pip install -e . in {baseDir}/\nCheck Python path includes {baseDir}/src\nDebug Mode\n\nTo debug skill execution, add DEBUG=1 environment variable:\n\nDEBUG=1 {baseDir}/bin/clawback.py status\n\n\nThis will show additional information about the execution context.\n\nPost-Installation Setup\n\nAfter installation via ClawHub, the install.sh script runs automatically:\n\nPython Environment Setup - Creates virtual environment\nPackage Installation - Installs ClawBack via pip\nDirectory Structure - Creates logs/, data/, config/ directories\nSetup Prompt - Asks if you want to run the setup wizard\n\nIf you skip setup during installation, run it manually:\n\ncd ~/.openclaw/skills/clawback\n./setup.sh          # Interactive setup wizard\n# or\nclawback setup      # CLI-based setup\n\nImproved Setup Features\nBetter input handling - Works in both interactive and non-interactive modes\nInput validation - Validates E*TRADE API key formats\nTimeout handling - Automatically uses defaults if no input\nError recovery - Fallback to manual setup if CLI fails\nConfiguration check - Detects existing config and offers options\nInteractive Setup Wizard\n\nThe setup wizard guides you through configuration:\n\nStep 1: Environment Selection\nSandbox (recommended for testing): No real trades, uses E*TRADE developer sandbox\nProduction: Real trading with real money\nStep 2: E*TRADE API Credentials\nConsumer Key: From E*TRADE developer portal\nConsumer Secret: From E*TRADE developer portal\nStep 3: Authentication\nAutomatic OAuth flow with E*TRADE\nOpens browser for authorization\nReturns verification code\nStep 4: Account Selection\nLists all available E*TRADE accounts\nChoose which account to trade with\nStep 5: Telegram Setup (Optional)\nConfigure notifications via Telegram bot\nUses OpenClaw's built-in Telegram channel if available\nEnvironment Variables\n\nAfter setup, credentials are stored in .env:\n\n# E*TRADE API (required)\nBROKER_API_KEY=your_consumer_key_here\nBROKER_API_SECRET=your_consumer_secret_here\nBROKER_ACCOUNT_ID=your_account_id_here\n\n# Telegram (optional)\nTELEGRAM_BOT_TOKEN=your_bot_token_here\nTELEGRAM_CHAT_ID=your_chat_id_here\n\n# FMP API (optional)\nFMP_API_KEY=your_fmp_api_key_here\n\nUsage\n# Use the installed CLI command\nclawback run      # Start interactive trading mode\nclawback daemon   # Run as background service\nclawback status   # Check system status\nclawback setup    # Re-run setup wizard\nclawback test     # Test Telegram notifications\n\nAutomated Trading\n\nThe clawback daemon command runs continuously with:\n\nDisclosure checks at 10:00, 14:00, 18:00 ET (when filings are typically released)\nTrade execution at 9:35 AM ET (5 min after market open)\nToken refresh every 90 minutes (keeps E*TRADE session alive)\nMarket hours enforcement (9:30 AM - 4:00 PM ET)\nData Sources\nHouse Clerk: https://disclosures-clerk.house.gov (PDF parsing)\nSenate eFD: https://efdsearch.senate.gov (web scraping)\nFinancial Modeling Prep: Enhanced financial data (optional)\nSupported Brokers\n\nClawBack currently only supports ETRADE. The adapter pattern allows for future broker support, but only ETRADE is implemented and tested.\n\nBroker\tAdapter\tStatus\nE*TRADE\tetrade_adapter.py\tSupported\nRisk Management\nPosition limits: 5% max per symbol, 20 positions max\nStop-losses: 8% per position, 15% portfolio drawdown\nDaily limits: 3% max daily loss\nPDT compliance: Conservative 2 trades/day limit\nAuthentication Helpers\n\nFor manual E*TRADE authentication outside the main CLI:\n\n# Standalone OAuth authentication script\ncd {baseDir}\nsource venv/bin/activate\npython scripts/auth_script.py\n\n\nThis generates an authorization URL, prompts for the verification code, and completes authentication.\n\nFile Locations\nFile\tPurpose\n~/.clawback/config.json\tMain configuration\n~/.clawback/.access_tokens.json\tE*TRADE OAuth tokens\n~/.clawback/data/trading.db\tSQLite database\nSecurity\nNo hardcoded credentials in source code\nEnvironment variable based configuration\nEncrypted token storage for E*TRADE\nGit-ignored .env file\nOptional production encryption\nSupport\nDocumentation: See README.md for detailed setup\nIssues: https://github.com/mainfraame/clawback/issues\nCommunity: https://discord.com/invite/clawd\nDisclaimer\n\nTrading involves substantial risk of loss. This software is for educational purposes only. Past congressional trading performance does not guarantee future results. Always test with E*TRADE sandbox accounts before live trading."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mainfraame/clawback",
    "publisherUrl": "https://clawhub.ai/mainfraame/clawback",
    "owner": "mainfraame",
    "version": "1.1.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawback",
    "downloadUrl": "https://openagent3.xyz/downloads/clawback",
    "agentUrl": "https://openagent3.xyz/skills/clawback/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawback/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawback/agent.md"
  }
}