Skip to main content

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 with statement 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earningsfeed-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

earningsfeed-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for earningsfeed-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e02150b7925f5a0b9300cadf75386f3817e2ec350b269f866e004e5dc4f7d52
MD5 e801b5d014a5e798c1e83b3267cb222b
BLAKE2b-256 496c93d8768ca7f639a25a1f0f2b1aafbfe632f9cc7d791f479c6cac512d16e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for earningsfeed-0.1.0.tar.gz:

Publisher: publish.yml on earningsfeed/earningsfeed-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for earningsfeed-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eacc6c09ea74919cb84ac85ada60fff782f40559493da58cd28afd6de8438a11
MD5 29167c7e50e2f97b13d9110f75a78fc9
BLAKE2b-256 966433b41049d3b14726fcff85a823769fe6b5dd6494f3b4fb676015d5f54839

See more details on using hashes here.

Provenance

The following attestation bundles were made for earningsfeed-0.1.0-py3-none-any.whl:

Publisher: publish.yml on earningsfeed/earningsfeed-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page