How to Track Insider Buying and Selling With Public Data
A practical guide to tracking insider buying and selling using public Form 4 data, including real time alerts, filters and historical bulk downloads.
- Insider trading trackers are built on Form 3, 4 and 5 filings, which are public and free on EDGAR.
- Filtering by transaction code and dollar value cuts out routine, non-discretionary activity.
- Real time alerts need either polling or a push mechanism such as a webhook or a server sent events stream.
- Historical analysis is easier with a bulk dataset than by replaying years of individual filings.
An insider trading tracker is any tool that watches Form 3, 4 and 5 filings and surfaces the transactions that matter: who bought, who sold, how much and when. Building one well is less about finding the data, which is free and public, and more about filtering out noise and deciding how fresh the feed needs to be. This guide walks through the design choices and the API calls behind each one.
What the underlying data actually is
Everything an insider trading tracker shows comes from three EDGAR forms, all filed under Section 16(a) of the Securities Exchange Act of 1934:
| Form | Purpose |
|---|---|
| Form 3 | Initial statement of beneficial ownership, filed when someone becomes an insider |
| Form 4 | Changes in ownership, filed within two business days of most transactions |
| Form 5 | Annual statement covering a small number of transactions eligible for deferred reporting |
Each filing lists one or more transactions, each tagged with a one letter code such as P for an open market purchase or S for an open market sale. A tracker's first job is reading that code correctly, because a large dollar figure next to code F (shares withheld for taxes) or code M (an option exercise) is not the same signal as the same figure next to code P or S.
Deciding what counts as signal
Raw Form 4 data includes a lot of activity that is mechanical rather than discretionary: tax withholding, scheduled option exercises, 10b5-1 plan trades set up months earlier, and small routine transactions. A useful tracker applies filters before showing anything to a user:
- Transaction code. Keep P and S, which usually reflect a choice made close to the filing date. Treat A, F, M and C as background unless you specifically want to see award and exercise activity.
- Minimum dollar value. A $2,000 purchase by a director is very different from a $5 million purchase by a CEO. Set a floor that fits your use case.
- Rule 10b5-1 flag. Since 2023, Form 4 reports whether a transaction was made under a prearranged trading plan. A plan trade reflects a decision made well in advance, not a reaction to current events.
- Role. Officers and directors have different incentives than a 10% owner that is itself a fund.
Get this data as clean JSON
SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading?code=P&minValue=100000. 500 free calls a month.
Querying insider transactions
SecFeed parses every Form 3, 4 and 5 into rows with the transaction code, price, share counts and the 10b5-1 flag already extracted, so a tracker does not need to parse XML itself. To watch purchases over $100,000 across every company:
curl "https://secfeedapi.com/v1/insider-trading?code=P&minValue=100000&size=25" \
-H "Authorization: Bearer YOUR_API_KEY"
To watch one company instead, filter by ticker or CIK:
from secfeed import Client
sf = Client("YOUR_API_KEY")
rows = sf.insider_trades(ticker="NVDA", code="S", minValue=250000)
for r in rows:
print(r["owner"], r["code"], r["shares"], r["price"], r["transactionDate"])
The same endpoint accepts a table parameter to separate non-derivative transactions (common stock) from derivative transactions (options and similar instruments), and an owner parameter to follow a specific person by name across every company they file for.
Making it real time
A tracker that only checks once a day will always be a day behind. There are two ways to get closer to real time:
- Server sent events. The
/v1/streamendpoint pushes each new filing the moment EDGAR publishes it, and accepts aformTypesfilter so you can subscribe to form 4 alone. - Webhooks.
/v1/webhookslets you register an HTTPS endpoint and a list of form types or CIKs, and SecFeed posts each matching filing to your endpoint as it arrives, instead of you polling.
curl -X POST "https://secfeedapi.com/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"url": "https://example.com/hooks/insiders", "formTypes": ["4"], "ciks": ["320193"]}'
Either approach removes the need to poll the search endpoint on a schedule and parse out what changed since the last check.
Building history instead of a live feed
Live monitoring answers "what just happened." Research questions, like how often a company's directors have bought shares around earnings dates over the last two years, need history instead. Replaying years of individual filings through a search endpoint is slow. The /v1/bulk/download endpoint serves a full month of a dataset as gzipped JSON Lines, which is a better fit for that kind of analysis:
curl "https://secfeedapi.com/v1/bulk/download?dataset=insider-transactions&month=2026-09" \
-H "Authorization: Bearer YOUR_API_KEY" -o 2026-09.jsonl.gz
Downloading a run of months and loading them into a dataframe is usually faster than paging through the search endpoint one request at a time.
A simple tracker design
A reasonable starting design combines the pieces above:
- Subscribe to a webhook for form type 4, optionally scoped to a watchlist of CIKs.
- On each incoming filing, keep only lines with code P or S above a minimum dollar value.
- Store the result somewhere you control, so you are not re-querying the API for history you already have.
- Backfill with
/v1/bulk/downloadto seed history before the webhook was set up.
Frequently asked questions
Is insider trading tracking legal?
Yes. Form 3, 4 and 5 filings are public records that the SEC requires insiders to disclose. Reading, storing and analyzing them is unrestricted. "Insider trading" as a legal violation refers to trading on material nonpublic information, which is a separate matter investigated by the SEC and is not what a public filings tracker observes.
How fast can a tracker see a new Form 4?
As fast as EDGAR publishes it. A webhook or server sent events subscription delivers each new filing within moments of its acceptance by EDGAR, rather than waiting for the next scheduled poll.
Does a large insider purchase predict the stock's future price?
The filing does not say, and no public dataset can answer that reliably. Treat insider transactions as one input to understand ownership changes, not as a standalone signal.
What is the difference between tracking by ticker and tracking by owner?
Tracking by ticker shows every insider transaction at one company. Tracking by owner follows one person's transactions across every company where they hold an insider role, which matters for people who sit on multiple boards.
Can I track Form 3 filings too?
Yes. The same insider trading endpoint covers Forms 3 and 5 alongside Form 4, so you can see a new insider's starting position as well as every later change. See the insider trading endpoint for the full parameter list, and read more about the underlying form in SEC Form 4 Explained.
Get this data as clean JSON
SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading?code=P&minValue=100000. 500 free calls a month.
For information only, not investment advice. Data from public SEC filings; verify important figures on SEC.gov. See our AI Disclosure.