Data source: SEC EDGAR (Form 4)
Overview
Insider Trading wraps SEC EDGAR (Form 4), handling authentication, pagination, and rate limits for you. This tutorial covers all 3 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-insider-trading": {
"url": "https://context.gnist.ai/mcp/insider-trading/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (3)
get_insider_trades
Get recent insider buy/sell transactions for a public company. Parses SEC Form 4 filings to extract individual transactions by corporate insiders (officers, directors, 10%+ owners). Shows who traded, what they traded, how many shares, at what price, and their remaining holdings. Transaction codes: - P = Purchase (open market buy) - S = Sale (open market sell) - M = Exercise/conversion of derivative (e.g. stock option) - A = Grant/award - F = Tax withholding Examples: get_insider_trades("AAPL") → Recent Apple insider transactions get_insider_trades("TSLA", limit=10) → Last 10 Tesla Form 4 filings Returns: Company info and list of transactions sorted by date (newest first), each with owner details, shares, price, and post-transaction holdings.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker_or_cik | string | required | Ticker symbol (e.g. "AAPL", "TSLA") or numeric CIK (e.g. "320193"). |
limit | integer | optional | Maximum Form 4 filings to parse (default 20, max 50). Each filing may contain multiple transactions. (default: 20) |
curl -X POST "https://context.gnist.ai/mcp/insider-trading/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_insider_trades", "arguments": {"ticker_or_cik": "AAPL"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/insider-trading/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'ticker_or_cik': 'AAPL'},
'name': 'get_insider_trades'}},
)
print(resp.json())
get_insider_summary
Get aggregated insider trading activity for a company. Analyzes recent Form 4 filings and summarizes: - Net buying vs selling sentiment (are insiders buying or selling?) - Total shares bought and sold across all insiders - Per-insider breakdown: name, title, shares bought/sold, net position Useful for gauging insider confidence in a company's prospects. Heavy insider buying often signals management confidence; heavy selling may indicate concern (though selling for diversification or tax reasons is common). Examples: get_insider_summary("AAPL") → Apple insider buy/sell summary get_insider_summary("NVDA") → NVIDIA insider activity overview Returns: Overall buy/sell sentiment, total shares bought and sold, and per-insider summary with relationship and activity.
| Parameter | Type | Required | Description |
|---|---|---|---|
ticker_or_cik | string | required | Ticker symbol (e.g. "AAPL") or numeric CIK (e.g. "320193"). |
curl -X POST "https://context.gnist.ai/mcp/insider-trading/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_insider_summary", "arguments": {"ticker_or_cik": "AAPL"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/insider-trading/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'ticker_or_cik': 'AAPL'},
'name': 'get_insider_summary'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/insider-trading/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/insider-trading/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does Insider Trading provide?
Corporate insider buy/sell transactions — Form 4 filings parsed for officer, director, and 10%+ owner trades. It exposes 3 tools: get_insider_trades, get_insider_summary, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the Insider Trading API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.