clawback
Mirror congressional stock trades with automated broker execution and risk management. Use when you want to track and automatically trade based on congressional disclosures from House Clerk and Senate eFD sources.
Install
mkdir -p .claude/skills/clawback && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7323" && unzip -o skill.zip -d .claude/skills/clawback && rm skill.zipInstalls to .claude/skills/clawback
About this skill
ClawBack
Mirror congressional stock trades with automated broker execution
Agent Instructions
When the user invokes /clawback, execute the appropriate command based on the argument:
Commands
When the user invokes /clawback with any arguments, execute the corresponding command:
| Command | Action |
|---|---|
/clawback setup | Run the setup wizard: Execute {baseDir}/bin/clawback.py setup |
/clawback status | Check system status: Execute {baseDir}/bin/clawback.py status |
/clawback run | Start trading bot: Execute {baseDir}/bin/clawback.py run |
/clawback daemon | Run as background service: Execute {baseDir}/bin/clawback.py daemon |
/clawback test | Test notifications: Execute {baseDir}/bin/clawback.py test |
/clawback (no args) | Show help: Execute {baseDir}/bin/clawback.py --help |
How to Execute Commands
Option 1: Using the wrapper script (recommended) When executing ClawBack commands, always:
- Use the wrapper script at
{baseDir}/bin/clawback.py - Pass the command as an argument (e.g.,
{baseDir}/bin/clawback.py status) - Capture and display the output to the user
Option 2: Direct Python execution (if wrapper doesn't work) If the wrapper script fails, you can run ClawBack directly:
- Change to the skill directory:
cd {baseDir} - Activate the virtual environment:
source venv/bin/activate - Run the CLI:
python -m clawback.cli [command] - Capture and display the output
Important: Always check if the virtual environment exists at {baseDir}/venv. If not, you may need to run the setup first.
/clawback setup - Interactive Setup Flow
When user runs /clawback setup, follow these steps:
Step 1: Install dependencies (if needed)
Check if {baseDir}/venv exists. If not, run:
cd {baseDir} && python3 -m venv venv && source venv/bin/activate && pip install -e .
Step 2: Prompt for E*TRADE credentials Ask the user for each value:
-
Environment: Ask "Do you want to use sandbox (testing) or production (real money)?"
- Default: sandbox
-
Consumer Key: Ask "Enter your E*TRADE Consumer Key (from developer.etrade.com):"
- Required field
-
Consumer Secret: Ask "Enter your E*TRADE Consumer Secret:"
- Required field
-
Account ID: Ask "Enter your E*TRADE Account ID (or leave blank to get it after OAuth):"
- Optional - can be obtained later
Step 3: Save configuration
Create/update ~/.clawback/config.json with the provided values:
{
"broker": {
"adapter": "etrade",
"environment": "<sandbox or production>",
"credentials": {
"apiKey": "<consumer_key>",
"apiSecret": "<consumer_secret>"
}
},
"trading": {
"accountId": "<account_id>",
"initialCapital": 50000,
"tradeScalePercentage": 0.01,
"maxPositionPercentage": 0.05,
"dailyLossLimit": 0.02
},
"notifications": {
"telegram": {
"enabled": true,
"useOpenClaw": true
}
},
"congress": {
"dataSource": "official",
"pollIntervalHours": 24,
"minimumTradeSize": 10000
}
}
Step 4: Confirm setup
Tell the user: "Configuration saved to ~/.clawback/config.json. Run /clawback status to verify."
Getting E*TRADE API Credentials
Direct user to: https://developer.etrade.com
- Create a developer account
- Create a new app (sandbox first for testing)
- Copy the Consumer Key and Consumer Secret
Configuration Location
- Config file:
~/.clawback/config.json - Skill directory:
{baseDir}
Reading Saved Configuration
To check if the user has configured credentials, read ~/.clawback/config.json:
- If file doesn't exist or credentials are empty → prompt for setup
- If credentials exist → can proceed with status/run commands
The CLI automatically reads from ~/.clawback/config.json for all operations.
Checking Setup Status
Before running /clawback status or /clawback run, verify:
{baseDir}/venvexists (dependencies installed)~/.clawback/config.jsonexists with non-emptybroker.credentials.apiKey
If either is missing, suggest running /clawback setup first.
ClawBack 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.
Default Target Politicians
ClawBack monitors these politicians by default (configurable):
| Politician | Chamber | Priority |
|---|---|---|
| Nancy Pelosi | House | 1 (highest) |
| Dan Crenshaw | House | 2 |
| Tommy Tuberville | Senate | 2 |
| Marjorie Taylor Greene | House | 3 |
Trading Strategy Defaults
| Parameter | Default | Description |
|---|---|---|
| Trade Delay | 3 days | Wait after disclosure before trading |
| Holding Period | 30 days | Target hold time for positions |
| Position Size | 5% | Max allocation per trade |
| Stop-Loss | 8% | Per-position stop-loss |
| Portfolio Drawdown | 15% | Max portfolio loss before halt |
| Disclosure Checks | 10:00, 14:00, 18:00 ET | Daily check times |
Features
- Real-time disclosure tracking from official House Clerk and Senate eFD sources
- Automated trade execution via E*TRADE API (only supported broker)
- Smart position sizing - scales trades to your account size
- Trailing stop-losses - lock in profits, limit losses
- Risk management - drawdown limits, consecutive loss protection
- Telegram notifications - get alerts for new trades and stop-losses
- Backtesting engine - test strategies on historical data
Performance (Backtest Results)
| Strategy | Win Rate | Return | Sharpe |
|---|---|---|---|
| 3-day delay, 30-day hold | 42.9% | +6.2% | 0.39 |
| 9-day delay, 90-day hold | 57.1% | +4.7% | 0.22 |
Congressional leaders have outperformed the S&P 500 by 47% annually according to NBER research.
Installation via ClawHub
# Install from ClawHub registry
clawhub install clawback
# Or install from local directory
clawhub install ./clawback
Troubleshooting
Common Issues
-
Skill not executing: If
/clawbackdoesn't work in OpenClaw:- Check if the skill is in the correct location:
{baseDir}/ - Verify the wrapper script is executable:
chmod +x {baseDir}/bin/clawback.py - Check if virtual environment exists:
{baseDir}/venv/
- Check if the skill is in the correct location:
-
Authentication issues: If E*TRADE authentication fails:
- Run the authentication utility:
python {baseDir}/scripts/auth_utility.py --auth - Run
{baseDir}/bin/clawback.py setupto reconfigure - Check credentials in
~/.clawback/config.json - Verify E*TRADE API keys are valid
- Run the authentication utility:
-
Token expiration: If tokens expire (30-day lifespan):
- Run:
python {baseDir}/scripts/auth_utility.py --refresh - Or start new authentication:
python {baseDir}/scripts/auth_utility.py --auth
- Run:
-
Python import errors: If you see "ModuleNotFoundError":
- Ensure virtual environment is activated
- Run
pip install -e .in{baseDir}/ - Check Python path includes
{baseDir}/src
Debug Mode
To debug skill execution, add DEBUG=1 environment variable:
DEBUG=1 {baseDir}/bin/clawback.py status
This will show additional information about the execution context.
Post-Installation Setup
After installation via ClawHub, the install.sh script runs automatically:
- Python Environment Setup - Creates virtual environment
- Package Installation - Installs ClawBack via pip
- Directory Structure - Creates logs/, data/, config/ directories
- Setup Prompt - Asks if you want to run the setup wizard
If you skip setup during installation, run it manually:
cd ~/.openclaw/skills/clawback
./setup.sh # Interactive setup wizard
# or
clawback setup # CLI-based setup
Improved Setup Features
- Better input handling - Works in both interactive and non-interactive modes
- Input validation - Validates E*TRADE API key formats
- Timeout handling - Automatically uses defaults if no input
- Error recovery - Fallback to manual setup if CLI fails
- Configuration check - Detects existing config and offers options
Interactive Setup Wizard
The setup wizard guides you through configuration:
Step 1: Environment Selection
- Sandbox (recommended for testing): No real trades, uses E*TRADE developer sandbox
- Production: Real trading with real money
Step 2: E*TRADE API Credentials
- Consumer Key: From E*TRADE developer portal
- Consumer Secret: From E*TRADE developer portal
Step 3: Authentication
- Automatic OAuth flow with E*TRADE
- Opens browser for authorization
- Returns verification code
Step 4: Account Selection
- Lists all available E*TRADE accounts
- Choose which account to trade with
Step 5: Telegram Setup (Optional)
- Configure notifications via Telegram bot
- Uses OpenClaw's built-in Telegram channel if available
Environment Variables
After setup, credentials are stored in .env:
# E*TRADE API (required)
BROKER_API_KEY=your_consumer_key_here
BROKER_API_SECRET=your_consumer_secret_here
BROKER_ACCOUNT_ID=your_account_id_here
# Telegram (optional)
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
# FMP API (optional)
FMP_API_KEY=your_fmp_api_key_here
Usage
# Use the installed CLI command
clawback run # Start interactive trading mode
clawback daemon # Run as background service
clawback status # Check system status
clawback setup # Re-run setup wizard
clawback test # Test Telegram notifications
Automated Trading
The clawback daemon command runs continuously with:
- Disclosure checks at 10:00, 14:00, 18:00 ET (when filings are typically released)
- Trade execution at 9:35 AM ET (5 min after market open)
- **Token refre
Content truncated.
More by openclaw
View all skills by openclaw →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversTrade It: Execute stock, crypto, and options trades instantly using natural language commands — fast, secure, and intuit
Access stock price for NVDA, income statements, balance sheets, and market news via the Financial Datasets server and AP
AkTools MCP Server — comprehensive stock market data and crypto market data with price history, technical indicators, fi
Analyze lrcx stock in real-time with Investor Agent using yfinance and CNN data for portfolio and market sentiment insig
Access real-time and historical Chinese stock data including baba stock china and nio stock china, plus news and financi
Access real-time financial data and market trends with Yahoo Finance tools for in-depth investment research and analysis
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.