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 edgartoolsKey: No key; the SEC asks for a name and email in the User-Agent.
github.com/dgunning/edgartoolssec-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-apiKey: sec-api.io key.
github.com/SEC-API-io/sec-api-pythonmassive
Python · official, by Massive · MIT
The official client for the Massive (formerly Polygon.io) REST and WebSocket APIs.
pip install massiveKey: Massive API key.
Code written for polygon-api-client moves over with a rename.
github.com/massive-com/client-pythonalpaca-py
Python · official, by Alpaca · Apache-2.0
The official SDK for Alpaca's trading and market data APIs.
pip install alpaca-pyKey: Alpaca API key and secret.
github.com/alpacahq/alpaca-pyfinnhub-python
Python · official, by Finnhub · Apache-2.0
The official client for Finnhub's stock, fundamentals and alternative data API.
pip install finnhub-pythonKey: Finnhub API key.
github.com/Finnhub-Stock-API/finnhub-pythonyfinance
Python · by Ran Aroussi · Apache-2.0
Downloads prices and fundamentals from Yahoo Finance's public endpoints.
pip install yfinanceKey: 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