Prerequisites
SECAPI_API_KEY,curl, andjq, or Node.js 18+.- An issuer ticker or CIK. This example uses
JPM.
1. List recent Form 4 disclosures
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.
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
nextCursorwhilehasMoreis true. A single page is not a complete history. - Deduplicate by accession plus transaction identity, not owner name alone.
- Code
Pdoes not establish discretionary conviction. Inspect ownership type, security title, footnotes, and the original filing.

