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

Uploaded Python 3

File details

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

File metadata

  • Download URL: stockfit_api-0.1.1.tar.gz
  • Upload date:
  • Size: 360.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.1.tar.gz
Algorithm Hash digest
SHA256 536b04cf20abf59d674ad6d340ac4077358518f3b7aaf69a1b0a90753aeeb04b
MD5 2a08ca6a34a12c2fd3d29e8300c9e3d6
BLAKE2b-256 801597050a1471795d0d0eccbc387714140ff0c5a3ea26aff7b1d4095eabfd85

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stockfit_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 640.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5aa51e8f56c7fd4f8e2870d122f2486fd455c6a56499b24da339dd7cda88002b
MD5 0b0e1ba37c56e71d474964dd9546f5c8
BLAKE2b-256 ad46db6946c64ad82bbda63cfea635a2d1cf0acee190d39717768149e018d6f6

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