← Back to DevOps & Cloud
DevOps & Cloud by @in-liberty420

sec-filing-watcher

Monitor SEC EDGAR for new filings and get

0
Source Code

SEC Filing Watcher

Monitors SEC EDGAR for new filings from a watchlist of tickers. When a new filing appears, notifies Clawdbot which fetches, summarizes, and sends to Telegram.

Quick Setup

1. Create watchlist

cp assets/watchlist.example.json watchlist.json
# Edit watchlist.json with your tickers

2. Configure environment

Set the following env vars (e.g. in your shell profile or OpenClaw skill config):

Variable Required Description
OPENCLAW_HOOKS_TOKEN Yes Your OpenClaw hooks token
SEC_WATCHER_RECIPIENT Yes Chat/user ID to deliver notifications to
SEC_WATCHER_CHANNEL No Channel plugin to deliver via (default: telegram)
SEC_WATCHER_USER_AGENT No SEC API User-Agent string (SEC requires contact info)

3. Test run

node scripts/watcher.js

First run seeds existing filings (no notifications). Second run checks for new filings.

4. Schedule (every 15 min)

macOS:

cp assets/com.sec-watcher.plist ~/Library/LaunchAgents/
# Edit the plist to set correct paths
launchctl load ~/Library/LaunchAgents/com.sec-watcher.plist

Linux:

crontab -e
# Add: */15 * * * * /usr/bin/node /path/to/scripts/watcher.js >> /path/to/watcher.log 2>&1

Managing Tickers

Add or remove tickers in watchlist.json:

{
  "tickers": ["AAPL", "MSFT", "TSLA"],
  "formTypes": ["10-K", "10-Q", "8-K", "4"]
}

New tickers are auto-seeded (existing filings won't spam you).

See references/form-types.md for common SEC form types.

Commands

Check status:

launchctl list | grep sec-watcher

View logs:

cat ~/clawd/sec-filing-watcher/watcher.log

Stop:

launchctl unload ~/Library/LaunchAgents/com.sec-watcher.plist

Start:

launchctl load ~/Library/LaunchAgents/com.sec-watcher.plist

Manual run:

node scripts/watcher.js

Files

File Purpose
scripts/watcher.js Main watcher script
watchlist.json Your tickers and form types
state.json Tracks seen filings (auto-created)
watcher.log Output log (if configured)

Troubleshooting

No notifications:

  • Check state.json exists (first run seeds, second run notifies)
  • Verify webhook URL and token in watcher.js CONFIG
  • Check Clawdbot is running: clawdbot status

SEC blocking requests:

  • Script uses proper User-Agent header
  • If blocked, wait 10 minutes (SEC rate limit cooldown)

Duplicate notifications:

  • Check state.json isn't corrupted
  • Delete state.json to re-seed (will seed all existing filings again)