Polling insider trades

Form 4 buys and sells, as they are filed.

bash
curl "https://api.gloom.sh/v1/insider-trades?symbols=CRBG&side=buy&limit=3" \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY"
json
{
  "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 (side buy, an open-market purchase) or S (side sell, 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) and acceptedAt, when SEC accepted it. observedAt is 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.TW reads the Form 4s of its company's US depositary receipts, when it files any.
  • title is the officer title as filed ("SVP, General Counsel"), on counted and excluded lines alike, else the role.
  • rule10b51 is 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 listed counted: true, but insider signals leave it out of their score and show it apart, as planValue: 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:

exclusionThe line
10b5-1A sale under a Rule 10b5-1 plan
tax, exercise, transferShares sold to pay tax or an exercise, or that only changed holdings
plan, offering, blank-check, private, dealA company plan, an offering, a blank-check company's shares, a private sale or a sale into a deal
corporate-owner, owner-is-issuerFiled by a listed company, or by the issuer itself, not a person
no-insider-roleThe filer names no officer, director or 10% owner role
derivative, not-shares, incomplete, acquired, disposedNot 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".

  • source is index, the Form 4 index, which starts at meta.historyStart. A company with no trade there, asked for older history, is read live from its newest Form 4s: source is live.
  • ticker is the one the filing gave. With asOf or until, symbols reads 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:

json
{
  "included": {
    "summary": {
      "CRBG": {
        "source": "index",
        "totalRows": 36,
        "complete": false,
        "foreignPrivateIssuer": false
      }
    }
  }
}
  • totalRows counts every row that matches the query (symbols, since, side) on every page.
  • meta.page.hasMore is true when more of them follow this page. meta.next reads them.
  • complete is false when the query reaches back past what the source holds: no since, or one before the index starts, or past the oldest Form 4 a live read got to. A notice in meta.notices says so.
  • foreignPrivateIssuer is 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:

WatchlistPollCredits a poll
Any sizeNo symbols: every filing, kept or dropped on your side by symbol1
Up to 50symbols= with the watchlist1, even when nothing is new
2,00040 calls of 50 symbols40

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.

python
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 since fixed and send meta.cursor back as cursor: one for all your symbols. It moves past the filings your filters leave out. A cursor past the feed's newest filing is none it gave: a free 400 cursor_invalid.
  • meta.page.hasMore is true when more filings are there already: read again at once, or follow meta.next. Caught up, it is false and meta.next is null, so a while next loop stops; meta.cursor is 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-trades shows its lines.
  • Filings added to the index's history, from before its first day, are not listed: they are not new. /v1/insider-trades serves them, with asOf and until read against acceptedAt.
  • Filters: symbols (up to 50) and side. limit counts rows, up to 200; a page ends on a whole filing.
  • Each row names its listing in symbol: the one in symbols whose company filed it, else the company's ticker.
  • A listing in symbols reads as the company SEC lists under it today, else the company that last filed under it, or that its delisting names: HES is Hess Corporation, as on /v1/insider-trades. With nothing new it is empty.
  • A listing Gloom knows that files no Form 4s, such as 0700.HK or 005930.KS, is empty and not read, and an outside_coverage notice names it. A symbol Gloom does not know, such as a typo, is not_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, and meta.dataThrough: a quiet night is told from a stalled feed. /v1/insider-trades with no rows gives the same, meta.dataThrough being when SEC accepted the newest filing the index holds.
  • meta.checkedAt is when the collector last read SEC's feed and daily indexes to the end, filings or none: about every five minutes. Over a quiet weekend meta.dataThrough stays at Friday's last filing while checkedAt keeps moving; one that stops moving is a stalled feed. It is in no ETag, so an unchanged page still answers 304, and the X-Checked-At header carries it on the 304 too.
  • meta.page.total is 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:

  1. Note the time, T0, before you start.
  2. Read /v1/insider-trades/changes?since=T0 to the end and keep its meta.cursor.
  3. Read the history with /v1/insider-trades for your symbols, with since as far back as you want, following meta.next.
  4. Write both into one table keyed on (accessionNumber, isDerivative, line): a filing added after T0 comes back from both reads, and line counts 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.