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

PyPI

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.1.tar.gz (8.7 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.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file earningsfeed-0.1.1.tar.gz.

File metadata

  • Download URL: earningsfeed-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 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.1.tar.gz
Algorithm Hash digest
SHA256 aaed259e0a54ecdd6f5d66f5dbe7f8f06c628db7721e9bc963535911b0987403
MD5 68c61564f2f0e7f92fae20023f7deaae
BLAKE2b-256 eb5e867a2ab9cdfacb2144afcf60167f8cbd8fbb7cc31af358a0aced3cf83835

See more details on using hashes here.

Provenance

The following attestation bundles were made for earningsfeed-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: earningsfeed-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32e8a0a4314e8e6be407d868bcbfe80eb0d2521ac5ff5554fb077b0ada24a28c
MD5 93fb77d7bd76a5785c2dfafc134e3457
BLAKE2b-256 640d0629921c77155f5a202e1b36751717f581b564e7ac2a73ed39a657a8ead8

See more details on using hashes here.

Provenance

The following attestation bundles were made for earningsfeed-0.1.1-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