Build a Form 4 Insider-Buy Alert Without Parsing SEC XML
Build a Form 4 Insider-Buy Alert Without Parsing SEC XML When a public company CEO buys $500K of their own stock on the open market, that's one of the strongest conviction signals in finance. The d...
Source: dev.to
Build a Form 4 Insider-Buy Alert Without Parsing SEC XML When a public company CEO buys $500K of their own stock on the open market, that's one of the strongest conviction signals in finance. The data is public β SEC Form 4 filings β but getting it into a usable format is the hard part. EDGAR returns XML with nested schemas, accession number lookups, and CIK-to-ticker mapping. Most people spend 3+ days just on the parser before writing any alert logic. I needed this for trading research, so I built an API that does the EDGAR parsing and returns clean JSON. Here's how to build an insider-buy alert system in 40 lines of Python. The Full Script import requests from datetime import datetime, timedelta API_URL = "https://marketplace-price-api-production.up.railway.app" API_KEY = "your-key" # Free tier: 50 calls/month HEADERS = {"X-Api-Key": API_KEY} # Check yesterday's filings yesterday = (datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d") # Track these tickers (or leave empty to scan