clawback

Review·Scanned 2/18/2026

This skill automates monitoring congressional disclosures and automatically executes scaled trades via E*TRADE. It requests and stores credentials in ~/.clawback/config.json/.env, runs setup scripts like setup.sh (python3 -m venv ... && pip install -e .), and makes network calls to https://api.etrade.com and https://api.telegram.org.

from clawhub.ai·v1.1.0·367.1 KB·0 installs
Scanned from 1.1.0 at 885f67c · Transparency log ↗
$ vett add clawhub.ai/mainfraame/clawbackReview findings below

ClawBack 🦀

Mirror congressional stock trades with automated broker execution

ClawBack tracks stock trades disclosed by members of Congress and executes scaled positions in your brokerage account. Built on the premise that congressional leaders consistently outperform the market.

Installation

Via ClawHub (Recommended)

# Install from ClawHub registry
clawhub install clawback

# Run setup wizard
clawback setup

Manual Installation

# Clone the repository
git clone https://github.com/mainfraame/clawback.git
cd clawback

# Install
pip install -e .

# Run setup
clawback setup

From Source with Make

git clone https://github.com/mainfraame/clawback.git
cd clawback

# Create venv and install
make deps

# Activate and setup
source venv/bin/activate
clawback setup

Quick Start

# Check system status
clawback status

# Run interactive trading mode
clawback run

# Run as background daemon
clawback daemon

Configuration

Configuration is stored in ~/.clawback/config.json. The setup wizard will guide you through:

  1. Broker Selection - E*TRADE (currently the only supported broker)
  2. Environment - Sandbox (testing) or Production (real money)
  3. API Credentials - From E*TRADE developer portal
  4. Account Selection - Choose which account to trade
  5. Telegram Notifications - Optional alerts via Telegram

Environment Variables

# E*TRADE API (required)
BROKER_API_KEY=your_consumer_key
BROKER_API_SECRET=your_consumer_secret
BROKER_ACCOUNT_ID=your_account_id

# Telegram (optional)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id

Features

  • Real-time disclosure tracking from official House Clerk and Senate eFD sources
  • Automated trade execution via E*TRADE API
  • Smart position sizing - scales trades to your account size
  • Risk management - stop-losses, drawdown limits, position limits
  • Telegram notifications - alerts for new trades and events
  • OpenClaw integration - works as an OpenClaw skill

Architecture

ComponentDescription
Congressional TrackerFetches trade data from official disclosures
Broker AdapterHandles authentication and trading (E*TRADE)
Trade EngineExecutes orders with risk management
Telegram NotifierSends alerts and notifications
DatabaseSQLite storage for trades and positions

Data Sources

Default Tracked Politicians

PoliticianChamberPriority
Nancy PelosiHouse1 (highest)
Dan CrenshawHouse2
Tommy TubervilleSenate2
Marjorie Taylor GreeneHouse3

Trading Strategy

ParameterDefault
Trade Delay3 days after disclosure
Holding Period30 days
Disclosure Checks10:00, 14:00, 18:00 ET

Risk Management

ControlDefault
Max position size5% of portfolio
Max positions20
Daily loss limit3%
Portfolio stop-loss15%
Position stop-loss8%

Authentication Helpers

For manual E*TRADE OAuth authentication:

# Standalone authentication script
source venv/bin/activate
python scripts/auth_script.py

Development

# Show all make commands
make help

# Linting (required before release)
make lint          # Run ruff linter
make lint-fix      # Auto-fix issues

# Version management
make bump-patch    # 1.0.x → 1.0.x+1
make bump-minor    # 1.x.0 → 1.x+1.0
make bump-major    # x.0.0 → x+1.0.0

# Release workflow (lint runs automatically)
make ship-patch    # bump + lint + release + publish
make ship-minor
make ship-major

Support

Disclaimer

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 sandbox accounts before live trading.


Version: 1.1.0 | License: MIT | Author: mainfraame