# InsiderWhale AI - SEC Insider Trading & Whale Alerts (Form 4) (`automation_studio/insider-whale-tracker`) Actor

Real-time SEC EDGAR Form 4 insider trading scraper. Detects CEO/CFO cluster buys, open-market whale transactions, and dispatches instant webhook alerts.

- **URL**: https://apify.com/automation\_studio/insider-whale-tracker.md
- **Developed by:** [Automation Studio](https://apify.com/automation_studio) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 verified insider trade leads

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🏛️ InsiderWhale AI — SEC Insider Trading & Whale Alerts (Form 4)

> **Real-time SEC EDGAR insider trading scraper. Track C-suite open-market stock purchases, detect high-conviction "Cluster Buys", and dispatch instant Discord & Telegram webhook alerts.**

***

### 🚀 The Edge: Why Follow Insider "Smart Money"?

Corporate executives and board members know more about their company’s financial trajectory, product pipelines, and earnings health than any outside analyst.

When an executive sells stock, it might simply be for personal liquidity, taxes, or diversification. But **when a CEO, CFO, or Director buys stock on the open market with their own personal cash, there is only one reason: they believe the stock is undervalued and going up.**

Dozens of academic papers and quantitative hedge funds have proven that **insider open-market purchases (SEC Form 4 Code `P`) generate statistically significant forward alpha**, particularly when multiple executives buy in tandem (**"Cluster Buys"**).

**InsiderWhale AI** gives retail traders, hedge funds, fintech apps, and trading communities direct access to this raw institutional intelligence without paying thousands of dollars for Bloomberg terminals or enterprise feeds.

***

### ✨ Key Features

| Feature | Description |
| :--- | :--- |
| ⚡ **Official Real-Time SEC Stream** | Scrapes official SEC EDGAR Form 4 filings directly as they are accepted by the SEC. |
| 🏷️ **Transaction Code Classification** | Isolates pure **Open Market Purchases (`P`)** from routine stock awards (`A`), option exercises (`M`), and open sales (`S`). |
| 🔥 **"Cluster Buy" Detection** | Automatically flags tickers where **2 or more distinct corporate insiders** are buying shares in the same window. |
| 👑 **C-Suite & Executive Recognition** | Detects CEO, CFO, COO, President, and Board Director titles and separates them from general employees. |
| 💰 **Dollar Value Thresholds** | Filter out minor trades and focus strictly on **Whale Trades** (e.g. trades > $50k, $100k, or $1,000,000+). |
| 🎯 **Target Ticker Watchlist** | Monitor the entire stock market or supply a custom watchlist of tickers (e.g., `NVDA, TSLA, PLTR, AAPL`). |
| 🔔 **Discord & Telegram Webhooks** | Automatically broadcast real-time formatted alert cards directly to your Discord trading channels or Telegram groups. |
| 🛡️ **Zero Proxy Surcharges** | Powered by the official SEC EDGAR API—100% legal, reliable, and free of expensive residential proxy costs. |

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `filingCount` | `integer` | `50` | Number of recent Form 4 filings to scan from the live SEC EDGAR stream (10 to 200). |
| `transactionTypes` | `array` | `["P", "S"]` | Transaction codes to extract: `P` (Open Market Purchase), `S` (Open Market Sale), `A` (Grant/Award), `M` (Option Exercise), or `ALL`. |
| `minTransactionValueUsd` | `number` | `0` | Minimum trade value in USD (e.g. `50000` for $50k+ trades). |
| `onlyClusterBuys` | `boolean` | `false` | When enabled, only outputs companies with 2+ insiders buying in the batch. |
| `onlyCeoCfo` | `boolean` | `false` | When enabled, only outputs trades by CEOs, CFOs, or Presidents. |
| `tickerWatchlist` | `string` | `""` | Comma-separated list of tickers to monitor (e.g. `NVDA, TSLA, PLTR`). Leave empty to scan all US stocks. |
| `discordWebhookUrl` | `string` | `""` | Optional Discord Webhook URL for instant embed alert cards. |
| `telegramBotToken` | `string` | `""` | Optional Telegram Bot Token (from @BotFather) for mobile push alerts. |
| `telegramChatId` | `string` | `""` | Optional Telegram Chat / Channel ID. |

***

### 📤 Sample Output

Each output dataset record represents a verified, structured insider trade:

```json
{
  "companyName": "NVIDIA CORP",
  "ticker": "NVDA",
  "companyCik": "0001045810",
  "insiderName": "Huang Jen Hsun",
  "insiderTitle": "President and CEO",
  "isCeoCfo": true,
  "tradeType": "🛒 Open Market Purchase (Direct Buy)",
  "transactionCode": "P",
  "transactionDate": "2026-09-08",
  "securityTitle": "Common Stock",
  "shares": 25000,
  "pricePerShare": 115.50,
  "totalValueUsd": 2887500.00,
  "sharesOwnedFollowing": 78250000,
  "isClusterBuy": true,
  "clusterBuyCount": 3,
  "filingDate": "2026-09-09T18:15:00-04:00",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/1045810/000104581026000045/0001045810-26-000045-index.htm",
  "scrapedAt": "2026-09-10T00:30:00.000Z"
}
```

***

### 💼 High-ROI Use Cases

#### 1. Stock & Crypto Discord / Telegram Communities

Give your members exclusive real-time alerts whenever a Fortune 500 CEO buys millions of dollars of their own stock. Simply paste your channel's Discord webhook URL into the Actor input to automate 24/7 alerts.

#### 2. Swing Traders & Retail Investors

Screen for high-conviction cluster buys where the CEO, CFO, and a Board Member all purchase shares in the same week—a proven signal of impending corporate catalysts.

#### 3. FinTech Startups & Newsletter Authors

Build automated weekly newsletters ("Top 10 Insider Cluster Buys of the Week") or feed structured JSON directly into your proprietary investment dashboard.

#### 4. Quantitative Hedge Funds & Signal Generation

Feed clean, machine-readable XML trade data into your backtesting algorithms without building and maintaining brittle custom SEC crawlers.

***

### 💰 Pay-Per-Event (PPE) Pricing

This Actor operates on transparent Pay-Per-Event pricing. You only pay for what you extract:

- **Actor Start Event**: `$0.002` per run execution.
- **Verified Insider Trade Item**: `$0.004` per structured transaction record.

*Example*: Scanning 50 filings and extracting 20 high-conviction trades costs just **~$0.08**!

# Actor input Schema

## `filingCount` (type: `integer`):

Number of recent SEC Form 4 filings to scan from the live EDGAR Atom stream (10 to 200). 50 filings usually covers the last 1-2 hours of market activity.

## `transactionTypes` (type: `array`):

Select which insider transaction types to extract. 'P' (Open Market Purchases) is the primary high-conviction bullish signal.

## `minTransactionValueUsd` (type: `number`):

Filter out small fractional trades. Only output insider transactions with total dollar value (Shares × Price) greater than or equal to this threshold. Set to 50000 or 100000 for Whale trades.

## `onlyClusterBuys` (type: `boolean`):

When enabled, restricts output exclusively to companies where 2 or more distinct corporate insiders bought stock in the scanned batch.

## `onlyCeoCfo` (type: `boolean`):

When enabled, restricts output to transactions made by Chief Executive Officers (CEO), Chief Financial Officers (CFO), Presidents, or Board Chairmen.

## `tickerWatchlist` (type: `string`):

Optional comma-separated list of stock tickers to monitor (e.g. 'NVDA, TSLA, PLTR, AAPL'). Leave empty to monitor the entire stock market.

## `discordWebhookUrl` (type: `string`):

Optional Discord webhook URL. When provided, automatically dispatches rich color-coded embed alert cards for matching insider trades into your Discord server.

## `telegramBotToken` (type: `string`):

Optional Telegram Bot Token (from @BotFather) for instant mobile push alerts.

## `telegramChatId` (type: `string`):

Optional Telegram Chat / Channel ID to receive formatted insider trading alerts.

## Actor input object example

```json
{
  "filingCount": 50,
  "transactionTypes": [
    "P",
    "S"
  ],
  "minTransactionValueUsd": 0,
  "onlyClusterBuys": false,
  "onlyCeoCfo": false,
  "tickerWatchlist": "",
  "discordWebhookUrl": "",
  "telegramBotToken": "",
  "telegramChatId": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing parsed insider trades, executive titles, transaction codes, shares, and dollar values.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_studio/insider-whale-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("automation_studio/insider-whale-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call automation_studio/insider-whale-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_studio/insider-whale-tracker"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ReRoDBdtfXQFtPZdD/builds/R9rVOzizLqNjTJ3NT/openapi.json
