Polling insider trades
Form 4 buys and sells, as they are filed.
curl "https://api.gloom.sh/v1/insider-trades?symbols=CRBG&side=buy&limit=3" \
-H "Authorization: Bearer $GLOOM_DATASETS_KEY"{
"data": [
{
"symbol": "CRBG",
"accessionNumber": "0001193125-26-430508",
"form": "4",
"filingDate": "2026-10-23",
"acceptedAt": "2026-10-23T20:30:03.000Z",
"observedAt": "2026-10-23T20:33:45.160Z",
"sourceUrl": "https://www.sec.gov/Archives/edgar/data/1889539/000119312526430508/0001193125-26-430508-index.htm",
"issuerName": "Corebridge Financial, Inc.",
"ticker": "CRBG",
"transactionType": "P",
"side": "buy",
"transactionDate": "2026-10-21",
"reportedName": "NIPPON LIFE INSURANCE CO",
"role": "10% owner",
"shares": 217182,
"pricePerShare": 35.382,
"totalValue": 7684333.524,
"sharesOwned": 130420666,
"counted": true,
"exclusion": null,
"source": "index"
}
],
"meta": {
"dataThrough": "2026-10-23T20:30:03.000Z",
"historyStart": "2024-10-28",
"page": { "limit": 3, "hasMore": true, "nextCursor": "eyJiIjpbWzAsM11dLCJzIjoiRHVpaFRVWi05cG9wIn0", "total": 36 },
"notices": [
{
"code": "disclaimer",
"message": "Insider trades come from the Form 4 index, which starts 2024-10-28: earlier trades are not listed."
}
]
}
}Trimmed from a real answer: one of three rows, and some fields left out.
The rows
- Every Form 4 and 4/A line coded P (
sidebuy, an open-market purchase) or S (sidesell, an open-market sale). Lines with other codes, such as awards (A), option exercises (M), tax withholding (F) and gifts (G), are not listed. - Each cites its filing:
accessionNumber,sourceUrl(the filing on EDGAR) andacceptedAt, when SEC accepted it.observedAtis when the filing was added to this dataset. - The dataset covers SEC Forms 3, 4 and 5 only. Director dealings filed with exchanges outside the US, such as HKEX, TSE, KRX or SGX, are not included yet. A home listing such as
2330.TWreads the Form 4s of its company's US depositary receipts, when it files any. titleis the officer title as filed ("SVP, General Counsel"), on counted and excluded lines alike, else therole.rule10b51is true when the form declares a trade on it made under a Rule 10b5-1 plan, or a note puts the line under one. It is false when the form says not, and null when the form has no such box. A plan's sale is excluded. A plan's buy is listedcounted: true, but insider signals leave it out of their score and show it apart, asplanValue: the flag tells them apart.
What counted means
counted says whether the line counts toward insider signals: the open-market trade of an insider acting for themselves. It is not a mark of size or interest: a large trade can be excluded. exclusion says why a line is not counted:
exclusion | The line |
|---|---|
10b5-1 | A sale under a Rule 10b5-1 plan |
tax, exercise, transfer | Shares sold to pay tax or an exercise, or that only changed holdings |
plan, offering, blank-check, private, deal | A company plan, an offering, a blank-check company's shares, a private sale or a sale into a deal |
corporate-owner, owner-is-issuer | Filed by a listed company, or by the issuer itself, not a person |
no-insider-role | The filer names no officer, director or 10% owner role |
derivative, not-shares, incomplete, acquired, disposed | Not the company's shares, no day, shares or price, or coded against its direction |
A listed company buying another's shares, such as Berkshire Hathaway's SIRI buys, is counted: false with exclusion: "corporate-owner".
sourceisindex, the Form 4 index, which starts atmeta.historyStart. A company with no trade there, asked for older history, is read live from its newest Form 4s:sourceislive.tickeris the one the filing gave. WithasOforuntil,symbolsreads as the company that filed under that ticker by then: a company delisted since keeps its trades, and a ticker another company took later does not lead to it.
The summary block
include=summary adds each listing's totals under included.summary, at no extra cost. Add it to the call above, and the answer also holds:
{
"included": {
"summary": {
"CRBG": {
"source": "index",
"totalRows": 36,
"complete": false,
"foreignPrivateIssuer": false
}
}
}
}totalRowscounts every row that matches the query (symbols,since,side) on every page.meta.page.hasMoreis true when more of them follow this page.meta.nextreads them.completeis false when the query reaches back past what the source holds: nosince, or one before the index starts, or past the oldest Form 4 a live read got to. A notice inmeta.noticessays so.foreignPrivateIssueris true for a company that reports as a foreign private issuer: its insiders file no Form 4.
Polling
/v1/insider-trades?since= keeps the filings SEC accepted at or after since. A filing without an acceptance time counts from 00:00 UTC on the day it was filed. A company with nothing new is free, so a watchlist poll that finds nothing costs nothing. A company with rows costs the route's price.
The feed is cheaper for a poller. It lists each filing once, whole, in the order the filings were added, so a filing that reached the index late is still seen. A call costs one credit whatever it lists, so how you send your watchlist sets the price:
| Watchlist | Poll | Credits a poll |
|---|---|---|
| Any size | No symbols: every filing, kept or dropped on your side by symbol | 1 |
| Up to 50 | symbols= with the watchlist | 1, even when nothing is new |
| 2,000 | 40 calls of 50 symbols | 40 |
A large watchlist polls cheapest without symbols. On a weekday the whole feed adds 400 to 800 filings, a handful every five minutes, so a poll is one page; read on while meta.page.hasMore is true, one credit a page.
watchlist = {"AAPL", "NVDA", "CRBG"} # any size
cursor = None
while True:
query = {"since": "2026-10-24T00:00:00Z"}
if cursor:
query["cursor"] = cursor
page = get("/v1/insider-trades/changes", query)
alert([row for row in page["data"] if row["symbol"] in watchlist])
cursor = page["meta"]["cursor"]
if not page["meta"]["page"]["hasMore"]:
sleep(15 * 60)- Keep
sincefixed and sendmeta.cursorback ascursor: one for all yoursymbols. It moves past the filings your filters leave out. A cursor past the feed's newest filing is none it gave: a free400 cursor_invalid. meta.page.hasMoreis true when more filings are there already: read again at once, or followmeta.next. Caught up, it is false andmeta.nextis null, so awhile nextloop stops;meta.cursoris where the next poll starts.- A filing shows up a few minutes after SEC accepts it, and 30 seconds after it is added, so a filing still being written is never skipped.
- Each filing is listed once, when it is first added. A filing that a rule change later gives new trade lines keeps its place and is not listed again:
/v1/insider-tradesshows its lines. - Filings added to the index's history, from before its first day, are not listed: they are not new.
/v1/insider-tradesserves them, withasOfanduntilread againstacceptedAt. - Filters:
symbols(up to 50) andside.limitcounts rows, up to 200; a page ends on a whole filing. - Each row names its listing in
symbol: the one insymbolswhose company filed it, else the company'sticker. - A listing in
symbolsreads as the company SEC lists under it today, else the company that last filed under it, or that its delisting names:HESis Hess Corporation, as on/v1/insider-trades. With nothing new it isempty. - A listing Gloom knows that files no Form 4s, such as
0700.HKor005930.KS, isemptyand not read, and anoutside_coveragenotice names it. A symbol Gloom does not know, such as a typo, isnot_found. Both are free, and a call that reads neither kind is free. - A page with no rows still has
meta.updatedAt, when the newest filing was added, andmeta.dataThrough: a quiet night is told from a stalled feed./v1/insider-tradeswith no rows gives the same,meta.dataThroughbeing when SEC accepted the newest filing the index holds. meta.checkedAtis when the collector last read SEC's feed and daily indexes to the end, filings or none: about every five minutes. Over a quiet weekendmeta.dataThroughstays at Friday's last filing whilecheckedAtkeeps moving; one that stops moving is a stalled feed. It is in noETag, so an unchanged page still answers304, and theX-Checked-Atheader carries it on the304too.meta.page.totalis null: a feed counts no total.
From a backfill to the feed
To load the history once, then follow the feed with no gap and no hole:
- Note the time,
T0, before you start. - Read
/v1/insider-trades/changes?since=T0to the end and keep itsmeta.cursor. - Read the history with
/v1/insider-tradesfor yoursymbols, withsinceas far back as you want, followingmeta.next. - Write both into one table keyed on
(accessionNumber, isDerivative, line): a filing added afterT0comes back from both reads, andlinecounts each table of the form, derivative or not, from 0.
Then poll the feed from that cursor, as above.
The feed starts on 2026-10-17: it lists the filings added from then on, with the filings filed from 2026-07-20 that the index held that day. It keeps every one: a filing with a trade line is never dropped, so a cursor from any day resumes. The history loaded later, filings from 2024-10-28 to 2026-07-17, is not in the feed: read it with /v1/insider-trades.
A row corrected after it was listed, such as a price currency read again, is not listed again. Read it with /v1/insider-trades.