image

1. Introduction

There is an old adage on Wall Street regarding stock analysis: "Insiders might sell their shares for any number of reasons, but they buy them for only one: they think the price will rise."

This concept, often called "Skin in the game," is a cornerstone of fundamental analysis. When a CEO, CFO, or a major institutional "whale" accumulates shares, it is a signal that goes beyond technical charts. However, tracking this data manually is painful. The SEC’s EDGAR database is notoriously difficult to navigate, and parsing XML or HTML filings programmatically is a headache for even seasoned developers.

The solution lies in streaming this data via a normalized API. By using the Mboum Finance API, developers and analysts can bypass the raw document parsing and receive clean, JSON-formatted data regarding insider trades, institutional holdings, and real-time SEC filings.

Start building with your free key:
https://mboum.com/pages/api


2. The Insider and Holdings Endpoints

To effectively track "smart money," we need to look at two distinct types of data provided by Mboum: Insider Trades (individual executives) and Institutional Holdings (large funds).

According to the documentation, there are specific endpoints designed for this:

GET /v1/markets/insider-trades

This endpoint returns the latest trading activities from U.S. Congressmen, Senators, CEOs, Directors, and 10% owners. It allows you to filter by transaction value, ensuring you only see significant moves rather than small, routine stock compensations.

Documentation:
https://docs.mboum.com/#stocks-options-GETapi-v1-markets-insider-trades


GET /v2/markets/stock/institutional-holdings

This provides a breakdown of the major funds (like BlackRock or Vanguard) holding the stock, including whether they are increasing or decreasing their positions.

Documentation:
https://docs.mboum.com/#stocks-options-GETapi-v2-markets-stock-institutional-holdings


GET /v2/markets/stock/sec-filings

If you need the actual source documents (Form 4, 10-K, 10-Q), this endpoint provides direct links to the files.

Documentation:
https://docs.mboum.com/#stocks-options-GETapi-v2-markets-stock-sec-filings


For this guide, we will focus on extracting Insider Trades to catch real-time executive sentiment.


3. Python Example: Tracking Insiders

Let's write a Python script that monitors insider buying activity for a major company, such as Tesla (TSLA). We will use the requests library to fetch data where the transaction value exceeds $10,000, filtering out noise.

import requests
import json

# Define the endpoint
url = "https://api.mboum.com/v1/markets/insider-trades"

# Configure your parameters
# We want TSLA trades, specifically 'Buy' transactions
# showing significant conviction (min value 10k)
querystring = {
    "ticker": "TSLA",
    "type": "Buy", 
    "minValue": "10000",
    "page": "1"
}

# Add your authentication
headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}"
}

try:
    # Make the request
    response = requests.get(url, headers=headers, params=querystring)
    
    # Check for successful response
    if response.status_code == 200:
        data = response.json()
        
        # Pretty print the first transaction found
        if 'body' in data and len(data['body']) > 0:
            print(f"Found {len(data['body'])} insider transactions.\n")
            print("Latest Transaction Detail:")
            print(json.dumps(data['body'][0], indent=4))
        else:
            print("No insider trades found matching criteria.")
            
    else:
        print(f"Error: {response.status_code} - {response.text}")

except Exception as e:
    print(f"An error occurred: {str(e)}")

4. Understanding the Response

When you pull data from the insider-trades endpoint, the API returns a standardized JSON object. This removes the need to parse the complex Form 4 documents manually.

Here is a breakdown of the critical fields you will receive in the response, formatted for quick analysis:

  • Name: Joshua Gottheimer; The name of the person or entity performing the trade.

  • Job Title: US Congressman; The role of the insider (e.g., Director, CEO, 10% Owner).

  • Transaction Date: 01/24/24; The date the transaction actually occurred.

  • Symbol: LAD; The ticker symbol of the company traded.

  • Transaction Type: Sell; The action taken (Buy, Sell, or Transfer).

  • Value: 8,000; The total USD value of the transaction.

  • Note: Traded $1,001 to $15,000...; Contextual notes regarding the trade execution or filing details.

By iterating through this list, you can programmatically flag high-conviction buys.


5. Practical Use Cases

Access to this data opens up several strategies for fundamental analysts and algorithmic traders:

A. Insider Sentiment Scoring

You can create a "confidence score" for a stock. If the /v1/markets/insider-trades endpoint reports that the CEO, CFO, and a Director all purchased shares within the same 30-day window, this is a strong cluster signal that management believes the stock is undervalued.


B. Institutional Whale Watching

Using the GET /v2/markets/stock/institutional-holdings endpoint, you can track the "smart money." This endpoint returns data on activePositions, showing specifically which funds have Increased Positions versus Decreased Positions. A divergence between rising price and decreasing institutional holdings can be a warning sign of a retail trap.


C. Due Diligence Automation

Before adding a stock to a portfolio, a script can automatically hit GET /v2/markets/stock/sec-filings. If the API returns a recent 8-K (unscheduled material events) or a Form 4 indicating massive selling by the owner, your system can flag the asset for manual review before execution.


6. Final Thoughts

In the current market environment, relying solely on price action often ignores the fundamental reality of a company. Knowing whether the people running the company are betting on its success—or cashing out—provides a significant edge.

The Mboum API democratizes access to this high-level data, turning what used to be a manual, error-prone process into a few lines of code.

Get your API key and start tracking insiders:
https://mboum.com/pages/api

How to Track Options Flow & Block Trades Programmatically with Mboum API Jan 10, 2026

How to Track Options Flow & Block Trades...

Learn to monitor institutional Options Flow and large block trades programmatically using the Mboum API and Python. Detect whale activity, filter for high-premium sweeps, and analyze market sentiment in real-time.

How to Calculate IV Rank and Percentile Using Mboum API Jan 10, 2026

How to Calculate IV Rank and Percentile Using...

Learn how to programmatically determine options volatility with the Mboum API. This guide explains the difference between IV Rank and IV Percentile and provides a Python example for retrieving volatility...

How to Detect Unusual Options Activity with the Mboum API Jan 10, 2026

How to Detect Unusual Options Activity with the...

Learn to detect Unusual Options Activity (UOA) programmatically using the Mboum API. This guide covers filtering volume vs. open interest to identify institutional smart money flows using Python.

How to Retrieve an Options Chain Using the Mboum API (v2 vs v3) Jan 10, 2026

How to Retrieve an Options Chain Using the...

Learn to retrieve and analyze option chains programmatically using the Mboum API. This technical guide compares the v2 and v3 endpoints, provides a Python implementation for fetching contracts, and details...