Skip to main content
This workflow creates a source-linked queue of disclosed insider transactions for an investor-relations, compliance, or research analyst. It is not a buy/sell signal: an option exercise, tax withholding, gift, or planned sale can look like a directional transaction until the underlying filing is reviewed.

Prerequisites

  • SECAPI_API_KEY, curl, and jq, or Node.js 18+.
  • An issuer ticker or CIK. This example uses JPM.

1. List recent Form 4 disclosures

The expected result is a paginated list of normalized Form 4 records. Preserve owner name, relationship fields, transaction code and date, security title, shares, price/value when present, accession number, and provenance.

2. Build a purchase-review queue

transaction_code=P asks for the SEC code, not an inferred label. The script below writes evidence records for potential open-market/private purchases and keeps pagination visible for the next run.
Run node insider-queue.mjs. The expected result is a JSON queue containing only returned Form 4 fields plus pagination and request metadata; it does not label a purchase as bullish. Before interpreting a record, retrieve and review its Form 4 using the accession and filing URL.

Common errors and false positives

  • No records only describes the requested ticker, date range, and page; it is not proof of no insider activity.
  • Use the returned nextCursor while hasMore is true. A single page is not a complete history.
  • Deduplicate by accession plus transaction identity, not owner name alone.
  • Code P does not establish discretionary conviction. Inspect ownership type, security title, footnotes, and the original filing.

Production considerations

Use a durable ingestion key, overlapping backfill window, and scheduled retry because corrections can arrive later. Keep alerts descriptive and source-linked, route them to a reviewer, and prohibit automatic trading or compliance conclusions from the normalized feed.

Next action

Compare the issuer’s delayed institutional disclosure with 13F holdings, making the different source dates explicit.