Skip to main content

Official Python SDK for the StockFit API: SEC EDGAR financials, filings, fund and ETF data, ownership, insider transactions, and earnings.

Project description

stockfit-api

Official Python SDK for the StockFit API: SEC EDGAR financials, filings, fund and ETF data, ownership, insider transactions, and earnings.

Fully typed, generated from the StockFit OpenAPI spec. Sync and async, built on httpx.

Install

pip install stockfit-api

Requires Python 3.9+.

Usage

from stockfit_api import AuthenticatedClient
from stockfit_api.api.company import company_details
from stockfit_api.api.financials import income_statement
from stockfit_api.models import IncomeStatementPeriod

client = AuthenticatedClient(base_url="https://api.stockfit.io/v1", token="fl_...")

profile = company_details.sync(client=client, symbol="AAPL")
print(profile.name)

income = income_statement.sync(client=client, symbol="AAPL", period=IncomeStatementPeriod.ANNUAL)
print(income)

Endpoint functions are grouped by area under stockfit_api.api.* (e.g. company, financials, etfmf, sec_filings, ownership, earnings, price). Query parameters are plain keyword arguments. Parameters with a fixed set of values (like period) are typed enums in stockfit_api.models (e.g. IncomeStatementPeriod.ANNUAL).

Async

Every endpoint also exposes an async variant:

profile = await company_details.asyncio(client=client, symbol="AAPL")

Authentication

Get an API token from your StockFit developer account. AuthenticatedClient sends it as a Bearer token automatically.

License

MIT, Copyright Second Dot LLC. Use of the StockFit API itself is governed by the StockFit terms of service and your subscription.

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

stockfit_api-0.1.0.tar.gz (111.8 kB view details)

Uploaded Source

Built Distribution

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

stockfit_api-0.1.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file stockfit_api-0.1.0.tar.gz.

File metadata

  • Download URL: stockfit_api-0.1.0.tar.gz
  • Upload date:
  • Size: 111.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for stockfit_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 80a73fdd6df3e2e01d1cef5b0089720401f854f89c9d05f0adc02475456fffdd
MD5 506994f08d20ec36163bec8cfce9498c
BLAKE2b-256 d9bcc8cc13c593c0ed30ccf68f30c7772782dd08664acfaf1374a9dc38968d43

See more details on using hashes here.

File details

Details for the file stockfit_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stockfit_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for stockfit_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c830d3a88f214f40106a579dc021154d595682645f4e22431da8dfa56ddcea08
MD5 2b60dbcdb8b94abd40930a07ea6e0d6f
BLAKE2b-256 f71ee6eb23cb3500ff5c7ce756a2988da6ffc0d1126d035af57ea6ee2599f39a

See more details on using hashes here.

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