Insider Transactions API
Retrieve insider trading data from SEC Form 4 filings. Track executive purchases, sales, option exercises, and ownership changes for any ticker.
Endpoint
Section titled “Endpoint”GET /v2/insider-trading/{symbol}Authentication
Section titled “Authentication”The API supports multiple authentication methods:
| Method | Example |
|---|---|
| Bearer token (recommended) | Authorization: Bearer YOUR_API_KEY |
| X-API-Key header | X-API-Key: YOUR_API_KEY |
| Query parameter | ?apiKey=YOUR_API_KEY |
| Legacy query parameter | ?token=YOUR_API_KEY |
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock ticker symbol (e.g., AAPL, MSFT) |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | No | Start date (YYYY-MM-DD) |
endDate | string | No | End date (YYYY-MM-DD) |
limit | integer | No | Maximum number of results to return |
Request
Section titled “Request”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.insider_transactions.ticker("AAPL", date_from="2025-01-01", date_to="2025-06-30", as_dataframe=True)print(df)curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.finbrain.tech/v2/insider-trading/AAPL"import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get( "https://api.finbrain.tech/v2/insider-trading/AAPL", headers=headers, params={"limit": 10})data = response.json()
for t in data["data"]["transactions"]: print(f"{t['date']} - {t['insider']}: {t['transactionType']} " f"({t['shares']} shares @ ${t['pricePerShare']:.2f})")#include <iostream>#include <string>#include <curl/curl.h>#include <nlohmann/json.hpp>
using json = nlohmann::json;
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) { userp->append((char*)contents, size * nmemb); return size * nmemb;}
json get_insider_transactions(const std::string& symbol, const std::string& api_key) { CURL* curl = curl_easy_init(); std::string response;
if (curl) { std::string url = "https://api.finbrain.tech/v2/insider-trading/" + symbol;
struct curl_slist* headers = nullptr; std::string auth_header = "Authorization: Bearer " + api_key; headers = curl_slist_append(headers, auth_header.c_str());
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_perform(curl); curl_slist_free_all(headers); curl_easy_cleanup(curl); }
return json::parse(response);}
int main() { auto result = get_insider_transactions("AAPL", "YOUR_API_KEY");
for (auto& t : result["data"]["transactions"]) { std::cout << t["date"].get<std::string>() << " - " << t["insider"].get<std::string>() << ": " << t["transactionType"].get<std::string>() << " (" << t["shares"].get<int>() << " shares @ $" << t["pricePerShare"].get<double>() << ")" << std::endl; }
return 0;}use reqwest::blocking::Client;use serde::Deserialize;use std::error::Error;
#[derive(Debug, Deserialize)]struct Transaction { date: String, insider: String, relationship: String, #[serde(rename = "transactionType")] transaction_type: String, shares: i64, #[serde(rename = "pricePerShare")] price_per_share: f64, #[serde(rename = "totalValue")] total_value: i64, #[serde(rename = "sharesOwned")] shares_owned: i64, #[serde(rename = "filingUrl")] filing_url: String,}
#[derive(Debug, Deserialize)]struct InsiderData { symbol: String, name: String, transactions: Vec<Transaction>,}
#[derive(Debug, Deserialize)]struct InsiderResponse { success: bool, data: InsiderData,}
fn get_insider_transactions(symbol: &str, api_key: &str) -> Result<InsiderResponse, Box<dyn Error>> { let url = format!( "https://api.finbrain.tech/v2/insider-trading/{}", symbol );
let client = Client::new(); let response: InsiderResponse = client .get(&url) .bearer_auth(api_key) .send()? .json()?;
Ok(response)}
fn main() -> Result<(), Box<dyn Error>> { let result = get_insider_transactions("AAPL", "YOUR_API_KEY")?;
for t in &result.data.transactions { println!("{} - {}: {} ({} shares @ ${:.2})", t.date, t.insider, t.transaction_type, t.shares, t.price_per_share); }
Ok(())}const response = await fetch( "https://api.finbrain.tech/v2/insider-trading/AAPL", { headers: { "Authorization": "Bearer YOUR_API_KEY" } });const result = await response.json();
for (const t of result.data.transactions) { console.log(`${t.date} - ${t.insider}: ${t.transactionType} (${t.shares} shares @ $${t.pricePerShare})`);}Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”{ "success": true, "data": { "symbol": "AAPL", "name": "Apple Inc.", "transactions": [ { "date": "2025-11-07", "insider": "KONDO CHRIS", "relationship": "Principal Accounting Officer", "transactionType": "Sale", "shares": 3752, "pricePerShare": 271.23, "totalValue": 1017655, "sharesOwned": 15098, "filingUrl": "http://www.sec.gov/Archives/edgar/data/320193/000163198225000011/xslF345X05/wk-form4_1762990206.xml" } ] }, "meta": { "timestamp": "2026-01-19T15:06:21.699Z" }}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
data.symbol | string | Stock ticker symbol |
data.name | string | Company name |
data.transactions | array | Array of transaction objects |
meta.timestamp | string | Response timestamp (ISO 8601) |
Transaction Object Fields
Section titled “Transaction Object Fields”| Field | Type | Description |
|---|---|---|
date | string | Transaction date (YYYY-MM-DD) |
insider | string | Insider name |
relationship | string | Insider’s role/relationship |
transactionType | string | Type of transaction |
shares | integer | Number of shares |
pricePerShare | number | Transaction price per share |
totalValue | integer | Total transaction value in USD |
sharesOwned | integer | Total shares owned after transaction |
filingUrl | string | Link to SEC Form 4 filing |
Transaction Types
Section titled “Transaction Types”| Type | Description |
|---|---|
| Buy | Open market purchase |
| Sale | Open market sell |
| Option Exercise | Stock option conversion |
| Gift | Shares donated |
| Automatic | 10b5-1 plan execution |
Errors
Section titled “Errors”| Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid symbol |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Authenticated, but not authorized to access this resource |
| 404 | Not Found | Ticker not found |
| 429 | Too Many Requests | Rate limit exceeded — wait and retry |
| 500 | Internal Server Error | Server-side error |
Related
Section titled “Related”- Insider Transactions Dataset - Use cases and analysis examples
- House Trades - Congressional trading data
- Senate Trades - Senate trading data
- Ticker Predictions - Price predictions