clawbackMirror congressional stock trades with automated broker execution and risk management. Use when you want to track and automatically trade based on congressio...
Install via ClawdBot CLI:
clawdbot install mainfraame/clawbackMirror congressional stock trades with automated broker execution
When the user invokes /clawback, execute the appropriate command based on the argument:
| Command | Action |
|---------|--------|
| /clawback setup | Interactive setup - prompt for credentials (see below) |
| /clawback status | Check status: cd {baseDir} && source venv/bin/activate && python -m clawback.cli status |
| /clawback run | Start trading: cd {baseDir} && source venv/bin/activate && python -m clawback.cli run |
| /clawback | Default to status check |
/clawback setup - Interactive Setup FlowWhen 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 ETRADE credentials**
Ask the user for each value:
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."
Direct user to: https://developer.etrade.com
~/.clawback/config.json{baseDir}To check if the user has configured credentials, read ~/.clawback/config.json:
The CLI automatically reads from ~/.clawback/config.json for all operations.
Before running /clawback status or /clawback run, verify:
{baseDir}/venv exists (dependencies installed)~/.clawback/config.json exists with non-empty broker.credentials.apiKeyIf 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.
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 |
| 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 |
| 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.
# Install from ClawHub registry
clawhub install clawback
# Or install from local directory
clawhub install ./clawback
After installation via ClawHub, the install.sh script runs automatically:
If you skip setup during installation, run it manually:
cd ~/.openclaw/skills/clawback
./setup.sh # Interactive setup wizard
# or
clawback setup # CLI-based setup
The setup wizard guides you through configuration:
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
# 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
The clawback daemon command runs continuously with:
ClawBack currently only supports ETRADE. The adapter pattern allows for future broker support, but only ETRADE is implemented and tested.
| Broker | Adapter | Status |
|--------|---------|--------|
| E*TRADE | etrade_adapter.py | Supported |
For manual E*TRADE authentication outside the main CLI:
# Standalone OAuth authentication script
cd {baseDir}
source venv/bin/activate
python scripts/auth_script.py
This generates an authorization URL, prompts for the verification code, and completes authentication.
| File | Purpose |
|------|---------|
| ~/.clawback/config.json | Main configuration |
| ~/.clawback/.access_tokens.json | E*TRADE OAuth tokens |
| ~/.clawback/data/trading.db | SQLite database |
.env fileTrading 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.
Generated Mar 1, 2026
An individual investor with a moderate risk tolerance uses ClawBack to automatically mirror congressional stock trades, aiming to capitalize on the informational advantages of politicians. They set up the skill with their E*TRADE account, configure position sizing to limit exposure, and receive Telegram notifications for trade executions and risk alerts, allowing hands-off management of a portion of their portfolio.
A financial advisory firm integrates ClawBack into their service offerings to provide clients with automated trading based on congressional disclosures, positioning it as a niche strategy for high-net-worth individuals. They use the backtesting engine to demonstrate historical performance, set conservative risk parameters like daily loss limits, and manage multiple accounts through E*TRADE's API, enhancing client engagement with unique investment insights.
A hedge fund employs ClawBack as a research and execution tool to track and analyze congressional trading patterns, using the data to inform broader market strategies. They customize the default politician list to focus on key committees, leverage the automated execution for small-scale trades to test hypotheses, and integrate the skill's outputs into their proprietary analytics platforms for deeper insights.
An online education platform teaching stock market strategies uses ClawBack in a sandbox environment to demonstrate automated trading concepts and risk management to students. They run the setup with E*TRADE's sandbox API, simulate trades without real money, and analyze backtest results to illustrate the potential and limitations of following congressional trades, providing hands-on learning experiences.
A fintech startup developing a robo-advisor app incorporates ClawBack as an optional feature for users interested in alternative data-driven investing. They streamline the setup process with in-app prompts for E*TRADE credentials, use the skill's configuration to align with user risk profiles, and offer notifications via their own app instead of Telegram, creating a seamless user experience.
Offer ClawBack as a premium subscription service where users pay a monthly fee to access automated trading based on congressional disclosures. Revenue is generated through tiered plans with features like advanced backtesting, custom politician lists, and priority support, targeting individual investors and small firms seeking passive income strategies.
License ClawBack to financial institutions, such as brokerages or advisory firms, who rebrand and integrate it into their existing platforms. Revenue comes from upfront licensing fees and ongoing maintenance contracts, allowing partners to offer unique automated trading tools to their clients without developing the technology in-house.
Generate revenue by partnering with E*TRADE and other financial service providers, earning commissions for new account referrals or trade executions facilitated through ClawBack. Promote the skill to users as a value-added tool, with incentives for signing up via affiliate links, creating a passive income stream based on user activity.
š¬ Integration Tip
Ensure users have Python3 and pip installed before setup, and guide them to obtain E*TRADE API credentials from developer.etrade.com to avoid common configuration errors.
A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands.
Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications.
Advanced desktop automation with mouse, keyboard, and screen control
Manage n8n workflows and automations via API. Use when working with n8n workflows, executions, or automation tasks - listing workflows, activating/deactivating, checking execution status, manually triggering workflows, or debugging automation issues.
Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to automate, building workflows across tools, setting up triggers and actions, or optimizing existing automations. Covers automation opportunity identification, workflow design, tool selection (Zapier, Make, n8n), testing, and maintenance. Trigger on "automate", "automation", "workflow automation", "save time", "reduce manual work", "automate my business", "no-code automation".
Browser automation via Playwright MCP server. Navigate websites, click elements, fill forms, extract data, take screenshots, and perform full browser automation workflows.