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.2.0.tar.gz (360.6 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.2.0-py3-none-any.whl (636.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stockfit_api-0.2.0.tar.gz
  • Upload date:
  • Size: 360.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 60370fd45a79796962f3036f48fc8a962ef1aeaa5cb59b3ab8b988611550033d
MD5 ea27fddcce208733f242006f6b818923
BLAKE2b-256 0f016c61cca8a30308d2f3f7fbfa0e576ecf55ea54d7012440c1c20c705c2f05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stockfit_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 636.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e31966bec6adb1a90251fae3a132fb2b8f1f25f8611dccb69ab2cfc7c5f43137
MD5 687739dc7f618af421882fecaf0feeea
BLAKE2b-256 6de9cb4b8c7ac7f9366a2eabcd497b7c50265022cb50ab71440482c66e46ec89

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