Official Python SDK for the Earnings Feed API - SEC filings, insider transactions, and institutional holdings
Project description
Earnings Feed Python SDK
Official Python client for the Earnings Feed API — SEC filings, insider transactions, and institutional holdings.
Installation
pip install earningsfeed
Quick Start
from earningsfeed import EarningsFeed
client = EarningsFeed("your_api_key")
# Get recent 10-K and 10-Q filings
filings = client.filings.list(forms=["10-K", "10-Q"], limit=10)
for filing in filings.items:
print(f"{filing.form_type}: {filing.company_name} - {filing.title}")
# Get a company profile
apple = client.companies.get(320193)
print(f"{apple.name} ({apple.primary_ticker})")
Features
- Type hints — Full type annotations for IDE autocomplete
- Pydantic models — Validated response objects
- Pagination helpers —
.iter()methods for automatic pagination - Context manager — Use with
withstatement for automatic cleanup
Usage
SEC Filings
# List filings with filters
filings = client.filings.list(
ticker="AAPL",
forms=["10-K", "10-Q", "8-K"],
status="final",
limit=25,
)
# Iterate through all filings (auto-pagination)
for filing in client.filings.iter(ticker="AAPL", forms="8-K"):
print(filing.title)
# Get filing details with documents
detail = client.filings.get("0000320193-24-000123")
for doc in detail.documents:
print(f"{doc.doc_type}: {doc.filename}")
Insider Transactions
# Recent insider purchases
purchases = client.insider.list(
ticker="AAPL",
direction="buy",
codes=["P"], # Open market purchases
limit=50,
)
for txn in purchases.items:
print(f"{txn.person_name}: {txn.shares} shares @ ${txn.price_per_share}")
# Large sales across all companies
for txn in client.insider.iter(direction="sell", min_value=1_000_000):
print(f"{txn.company_name}: ${txn.transaction_value:,.0f}")
Institutional Holdings (13F)
# Who owns Apple?
holdings = client.institutional.list(
ticker="AAPL",
min_value=1_000_000_000, # $1B+ positions
)
for h in holdings.items:
print(f"{h.manager_name}: {h.shares:,} shares (${h.value:,})")
# Track a specific fund
for h in client.institutional.iter(manager_cik=1067983): # Berkshire
print(f"{h.issuer_name}: {h.shares:,} shares")
Companies
# Get company profile
company = client.companies.get(320193)
print(f"{company.name}")
print(f"Ticker: {company.primary_ticker}")
print(f"Industry: {company.sic_codes[0].description}")
# Search companies
results = client.companies.search(q="software", state="CA", limit=10)
for company in results.items:
print(f"{company.name} ({company.ticker})")
Error Handling
from earningsfeed import (
EarningsFeed,
AuthenticationError,
RateLimitError,
NotFoundError,
)
client = EarningsFeed("your_api_key")
try:
filing = client.filings.get("invalid-accession")
except NotFoundError:
print("Filing not found")
except RateLimitError as e:
print(f"Rate limited. Resets at: {e.reset_at}")
except AuthenticationError:
print("Invalid API key")
Context Manager
with EarningsFeed("your_api_key") as client:
filings = client.filings.list(limit=10)
# Connection automatically closed when exiting the block
API Reference
Full API documentation: earningsfeed.com/api/docs
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file earningsfeed-0.1.0.tar.gz.
File metadata
- Download URL: earningsfeed-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e02150b7925f5a0b9300cadf75386f3817e2ec350b269f866e004e5dc4f7d52
|
|
| MD5 |
e801b5d014a5e798c1e83b3267cb222b
|
|
| BLAKE2b-256 |
496c93d8768ca7f639a25a1f0f2b1aafbfe632f9cc7d791f479c6cac512d16e3
|
Provenance
The following attestation bundles were made for earningsfeed-0.1.0.tar.gz:
Publisher:
publish.yml on earningsfeed/earningsfeed-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
earningsfeed-0.1.0.tar.gz -
Subject digest:
5e02150b7925f5a0b9300cadf75386f3817e2ec350b269f866e004e5dc4f7d52 - Sigstore transparency entry: 763885502
- Sigstore integration time:
-
Permalink:
earningsfeed/earningsfeed-python@cd240815490f14959eec50a003f1e2c9fa72abb6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/earningsfeed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd240815490f14959eec50a003f1e2c9fa72abb6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file earningsfeed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: earningsfeed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eacc6c09ea74919cb84ac85ada60fff782f40559493da58cd28afd6de8438a11
|
|
| MD5 |
29167c7e50e2f97b13d9110f75a78fc9
|
|
| BLAKE2b-256 |
966433b41049d3b14726fcff85a823769fe6b5dd6494f3b4fb676015d5f54839
|
Provenance
The following attestation bundles were made for earningsfeed-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on earningsfeed/earningsfeed-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
earningsfeed-0.1.0-py3-none-any.whl -
Subject digest:
eacc6c09ea74919cb84ac85ada60fff782f40559493da58cd28afd6de8438a11 - Sigstore transparency entry: 763885506
- Sigstore integration time:
-
Permalink:
earningsfeed/earningsfeed-python@cd240815490f14959eec50a003f1e2c9fa72abb6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/earningsfeed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd240815490f14959eec50a003f1e2c9fa72abb6 -
Trigger Event:
release
-
Statement type: