the_inference_data

SDKs for financial data

For code that calls a data API directly rather than through an agent. To give a model the same data, use an MCP server.

edgartools

Python · by Dwight Gunning · MIT

Reads SEC EDGAR filings: 10-K and 8-K text, XBRL financials, Forms 3, 4 and 5, 13F and ADV.

pip install edgartools

Key: No key; the SEC asks for a name and email in the User-Agent.

github.com/dgunning/edgartools

sec-api

Python · official, by SEC-API.io · MIT

Client for sec-api.io: search and download 20M+ filings, insider trades, 13F holdings and bulk datasets.

pip install sec-api

Key: sec-api.io key.

github.com/SEC-API-io/sec-api-python

massive

Python · official, by Massive · MIT

The official client for the Massive (formerly Polygon.io) REST and WebSocket APIs.

pip install massive

Key: Massive API key.

Code written for polygon-api-client moves over with a rename.

github.com/massive-com/client-python

alpaca-py

Python · official, by Alpaca · Apache-2.0

The official SDK for Alpaca's trading and market data APIs.

pip install alpaca-py

Key: Alpaca API key and secret.

github.com/alpacahq/alpaca-py

finnhub-python

Python · official, by Finnhub · Apache-2.0

The official client for Finnhub's stock, fundamentals and alternative data API.

pip install finnhub-python

Key: Finnhub API key.

github.com/Finnhub-Stock-API/finnhub-python

yfinance

Python · by Ran Aroussi · Apache-2.0

Downloads prices and fundamentals from Yahoo Finance's public endpoints.

pip install yfinance

Key: No key.

Not affiliated with Yahoo. Its README says the data is for personal, research and educational use under Yahoo's terms, so it does not suit a product.

github.com/ranaroussi/yfinance