← All posts · Published 2026-07-25
Building Real-Time SEC Filing Webhook Alerts
RSS feeds, REST APIs, and WebSockets each offer different latency and reliability tradeoffs for monitoring SEC filings. Here's how to pick the right stack for your strategy.
The Latency Problem with SEC Filing Feeds
If you're running a quantitative strategy that depends on timely detection of material corporate events, you've probably hit the frustration ceiling with EDGAR RSS feeds. A typical SEC filing (10-K, 8-K, Form 4) lands first in EDGAR's system, propagates through RSS, and reaches downstream consumers with delays that range from seconds to tens of minutes. When volatility spikes on an earnings miss or insider transaction, you're often already behind the market.
The core issue isn't with the SEC itself. EDGAR operates reliably and publishes documents in real-time. The bottleneck is in how efficiently you can consume that data stream. Three main architectures compete here: RSS feeds, REST APIs with polling, and WebSocket connections. Each has a latency profile, cost structure, and operational complexity. Choosing wrong can mean missing alpha or building unnecessary infrastructure debt.
RSS Feeds: The Baseline
The SEC publishes the official EDGAR RSS feed at a granular level. You can subscribe to feeds by CIK, form type (e.g., 8-K, SC 13G/A), or filing date. The feed includes metadata like company name, accession number, and filing date, but not the full document text.
Latency profile: 5-15 minutes from filing acceptance to RSS item publication is typical. Some filings appear faster, others slower. The variance matters.
- Pros: No authentication, no rate limits, free, standardized format, easy to parse
- Cons: Pull-based (you must poll), no guarantees on update frequency, no real-time push, high variance in latency
For a discretionary trader checking a watchlist once a day, RSS is sufficient. For anything quant, it's a foundation, not the full answer. You can run a simple RSS poller that checks the SEC feed every 60 seconds, but you're now introducing your own 30-second average polling lag on top of the 5-15 minute feed lag. Total latency can easily hit 20+ minutes from filing acceptance to your alert firing.
REST API Polling: Higher Frequency, More Cost
Several data vendors (including public EDGAR APIs) allow you to poll for recent filings at higher frequency than RSS. The U.S. SEC's EDGAR system itself doesn't officially publish a documented REST API, but third-party aggregators and APIs like the SEC's own EDGAR Search API (www.sec.gov/cgi-bin/browse-edgar) can be queried programmatically. More practically, services like Edgar Online, SEC Filings API providers, or your broker's data terminal expose filing data via REST endpoints.
Typical polling strategy: Hit an endpoint every 5-10 seconds to fetch filings from the last 60 seconds. Parse the response, extract accession numbers, and enrich or alert.
- Pros: Higher frequency than RSS, lower variance in latency (if provider maintains SLA), you control polling cadence
- Cons: API rate limits (hitting you fast at 10-second intervals), provider-dependent uptime, no native push, costs per request or per month
Expected latency: 30 seconds to 2 minutes from filing acceptance to your system, assuming a reliable provider. You pay via API credits or subscription tiers. A quant shop polling for 200 watched tickers every 10 seconds will rack up costs quickly.
WebSockets: The Real-Time Option
WebSocket connections maintain a persistent, bidirectional channel between your client and a server. Instead of polling, the server pushes data to you the moment something relevant happens. This is the lowest-latency option available to retail and institutional traders without direct exchange connectivity.
Architecture: You open a WebSocket connection to a data provider, authenticate, subscribe to filing events (by CIK, form type, or other filters), and your handler fires immediately when a matching filing lands. No polling, no variance from pull-based delays.
- Pros: True push-based delivery, sub-second latency from filing acceptance to your alert (if provider is fast), single persistent connection (lower overhead than repeated REST calls), built-in backpressure and error handling
- Cons: Requires stateful connection management, provider-dependent (you're tied to their infrastructure), costs vary widely, need to handle reconnection logic
Expected latency: 100-500ms from filing acceptance to your system, depending on the provider's connection to EDGAR and their processing pipeline. High-frequency shops and volatility arbitrage strategies can justify the cost and complexity here.
Practical Comparison: A Concrete Example
Imagine you're tracking insider transactions (Form 4) for a basket of 50 names (e.g., AAPL, MSFT, TSLA, etc.) and you want to detect possible insider buys or sells before the market reacts.
RSS approach: Poll the SEC's Form 4 RSS feed every 60 seconds. You receive updates in batches. A Form 4 filed at 9:30:00 AM might appear in the RSS at 9:42:00 AM. Your polling catches it at 9:43:00 AM. Total latency: ~13 minutes. Cost: zero, plus hosting a simple Python script.
REST API approach: Query an API every 10 seconds for Form 4 filings in your CIK list. Average latency from filing to your system: 45 seconds to 2 minutes. Cost: 50 API calls per company per 10-minute window. For 50 companies, that's 300 calls per 10 minutes, or ~2,600 calls per day. At typical provider rates (0.001-0.01 per call), you're looking at $2.60-$26/day, or $75-$780/month for a single signal.
WebSocket approach: Connect once, subscribe to Form 4 events for your CIK list. Latency: 200ms average from filing acceptance to webhook delivery. Cost: $100-$500/month depending on provider, all-inclusive. You can monitor as many companies as you like.
Building a Hybrid Stack
Most serious quant teams don't pick one. They layer them.
Use RSS as a sanity check and backup alerting mechanism. If your WebSocket connection drops (it will, at some point), you're still catching filings with a 10-15 minute lag. Use REST polling for medium-importance signals where sub-minute latency is nice but not critical. Save WebSocket for your core alpha signals where latency directly impacts P&L.
A robust webhook architecture looks like this:
- WebSocket client subscribes to high-priority form types (8-K, Form 4, Schedule 13D/13G) for your core watchlist
- Fallback: Hourly REST API scan of your full universe for anything missed
- Validation: Cross-check against SEC EDGAR HTML/JSON responses to ensure no false positives
- Logging: Store accession numbers, timestamps, and processing latency for performance monitoring
When a filing hits your WebSocket handler, extract the accession number and immediately fetch the full document (either via REST API or direct EDGAR HTTP). Parse the document text (10-K Item 105 risk factors, 8-K exhibits, Form 4 transaction tables), extract the signal, and fire your alert or trade.
Latency Measurement and Monitoring
Don't assume your provider's latency claims. Test them yourself.
Inject a test filing (or monitor known filings) and measure the delta between the filing acceptance timestamp (visible in EDGAR headers and the RSS/API response) and the time your code receives the alert. Do this across 100+ filings over a week. Calculate median, 95th percentile, and max latency. If your provider's 95th percentile latency is > 60 seconds for WebSocket, push back or switch vendors.
Operational Considerations
WebSocket connections require heartbeating and reconnection logic. EDGAR filing volume is lumpy: you'll have periods of silence, then 50 filings in one second around earnings season or 13F filing deadlines. Your event handler must be fast enough to process the spike without dropping messages. Queue incoming messages to an event bus (Kafka, AWS Kinesis, or even a simple Redis list) and process them asynchronously.
Authentication tokens expire. Monitor token lifetime and refresh proactively. Log all connection events, disconnections, and message counts. Set up alerts if you haven't seen a filing in unusual amounts of time (e.g., no 8-K or Form 4 from your watchlist in the past 24 hours suggests a feed problem, not market calm).
When to Use Each
Use RSS if you're building a low-frequency scanner or news aggregator. Use REST polling if you need sub-10-minute latency and have budget constraints. Use WebSocket if latency matters to your alpha model and you can operate the infrastructure.
If you're hunting for edge in earnings surprises, insider transactions, or material event disclosures, don't rely solely on EDGAR RSS. The 13-minute average delay from our own research into SEC filing latency patterns puts you well behind the algorithmic front-runners already parsing financial news and SEC data in parallel. WebSocket-based delivery cuts that delay by an order of magnitude.
For building production webhook systems, tools like FilingFirehose can handle the infrastructure complexity: persistent WebSocket connections, automatic reconnection, message deduplication, and direct EDGAR document fetching, all abstracted behind a single API key. That lets you focus on signal extraction and backtesting, not connection state machines.
Start with RSS for validation and cost-free baseline coverage. Upgrade to polling or WebSockets only if you've proved that latency drives measurable alpha. Measure everything. The difference between catching a 8-K at filing time versus 15 minutes later can mean the difference between exiting a position profitably and getting whipsawed.
Start a free FilingFirehose trial →
Try it on your stack
Get an API key in 2 minutes. Self-serve via Stripe, cancel anytime.
View pricing → Read API docs