A stock market API in Python is only as good as its client library, and the clients here range from a first-party SDK with seven GitHub stars to yfinance, an unofficial scraper with more than 25,000. We ranked 17 providers on their Python client, the data it reaches and what that reach costs.
Our own Python SDK is one of six official clients we maintain. It reaches US stocks and options; it reaches ETFs and mutual funds too; past that, nothing. The scorecards below show why that narrow reach ranks us eighth rather than first.
How did we rank the Python stock data clients?
Each provider was scored from 0 to 10 on six criteria: the SDK itself, how well it fits pandas, its documentation, the breadth of what it covers, its price and its licensing terms. Every criterion counts once, and a 0 on any of them means the provider ships no official client at all.
Pandas fit matters on its own line because a Python developer’s next step after the call is almost always a DataFrame, not a raw JSON blob.
Massive ranks first here with one client reaching five asset classes. We rank eighth, on a client that reaches four.
Which stock market API in Python ranks best?
| Rank | Provider | Score | Best for | Paid plans from |
|---|---|---|---|---|
| 1 | Massive | 8.6 | One Python client for every asset class | $23.20/mo |
| 2 | EODHD | 8.2 | Broad low-cost data across Python and beyond | $16.58/mo |
| 3 | Alpaca | 7.2 | Python algo trading with a brokerage | $99/mo |
| 4 | Twelve Data | 7.0 | Global multi-asset symbols in Python | $66/mo |
| 5 | ThetaData | 6.8 | Python options quants avoiding a Java terminal | $40/mo |
| 6 | Databento | 6.5 | Quant Python pipelines needing raw ticks | $199/mo |
| 7 | Finnhub | 6.4 | Alt-data (ESG, patents, filings) in Python | $49.99/mo |
| 8 | Market Data | 6.3 | US options and stocks in Python | $12/mo |
| 9 | Intrinio | 5.8 | SEC-sourced fundamentals in Python | $150/mo |
| 9 | Tiingo | 5.8 | Generous free EOD history in Python | $25/mo |
| 11 | Alpha Vantage | 5.6 | Free global-symbol scripting in Python | $41.58/mo |
| 12 | Nasdaq Data Link | 5.5 | Sharadar fundamentals via Python/SQL | $9/mo |
| 13 | Financial Modeling Prep | 5.1 | Free fundamentals and filings in Python | $22/mo |
| 14 | Tradier | 4.2 | Free real-time options in Python via a brokerage | $10/mo |
| 15 | Unusual Whales | 4.1 | Real-time options flow via a raw REST client | $42/mo |
| 16 | Yahoo Finance | 3.8 | Free hobbyist scripts, unofficial only | $9.95/mo |
| 17 | ORATS | 3.1 | Proprietary options Greeks, scripted via CLI | $99/mo |
The six highest-ranked Python clients, side by side:
| Feature | Massive | EODHD | Alpaca | Twelve Data | ThetaData | Databento |
|---|---|---|---|---|---|---|
| Official SDKs | Python, JS/TS, Go, Java/Kotlin 1 | Python, Node.js, R, PHP, C#, Java, MATLAB 2 | Python, JS, Go, C#, Java 3 | Python, Node.js, Go, Java, R, CLI 4 | Python only 5 | Python, Rust, C++ 6 |
| US options | Excellent, real-time OPRA (Advanced) 7 | Good, EOD-only add-on 8 | Good, indicative free; OPRA paid | No 4 | Excellent, full OPRA 9 | Excellent, OPRA + futures options 10 |
| Forex | Good, ~1,200 pairs (Currencies) 11 | Good, 1,100+ pairs 12 | Basic, rates only | Excellent, 1,300+ pairs 13 | No 14 | Basic, contradictory claims 15 |
| Crypto | Good, ~600 pairs (Currencies) | Good 12 | Good, real-time + historical | Excellent, 1,900+ pairs 13 | No 14 | No, roadmap only 16 |
| Futures | Good, real-time on Advanced ($199) 17 | No | No | No | No (Q4 2026 planned) 14 | Excellent, CME/ICE/Eurex/EEX 18 |
| Free tier | 5 calls/min, 2yr history, EOD only 19 | 20 calls/day, 1yr history 20 | Yes, IEX equities + indicative options 21 | 800 req/day, trial symbols only 22 | $0, EOD only, 1yr history 23 | No; $125 signup credit, 6mo 18 |
| Cheapest paid plan | $23.20/mo (Stocks Starter, annual) 19 | $16.58/mo (EOD, annual) 20 | $99/mo (Algo Trader Plus) 21 | $66/mo (Grow, annual) 22 | $40/mo (Options Value) 24 | $199/mo (CME Standard) 18 |
Sources for this table, checked 2026-09-26
- github.com/massive-com
- eodhd.com/financial-apis/quick-start-with-our-financial-data-apis
- github.com/alpacahq
- twelvedata.com/docs
- thetadata.net/docs/Python-Library/Getting-Started.html
- github.com/databento
- massive.com/pricing?product=options
- eodhd.com/lp/us-stock-options-api
- thetadata.net/options-data
- databento.com/options
- massive.com/currencies
- eodhd.com/lp/historical-eod-api
- twelvedata.com/
- thetadata.net/roadmap
- databento.com/
- databento.com/blog/series-b
- massive.com/futures
- databento.com/pricing
- massive.com/pricing
- eodhd.com/pricing
- alpaca.markets/data
- twelvedata.com/pricing
- thetadata.net/docs/Articles/Getting-Started/Subscriptions.html
- thetadata.net/pricing
Massive
8.6/10 The broadest Python reach here -- stocks, options, forex, crypto and futures from one official client-python SDK.
- An official Python SDK ×2
- 10/10
- Data frames ×1
- 7/10
- Python examples in the docs ×1.5
- 8/10
- What Python can reach ×1.5
- 10/10
- Cost ×1.5
- 7/10
- Official and permitted ×1
- 9/10
Strengths
- client-python: 1,512 GitHub stars, official first-party SDK
- Stocks, options, forex, crypto and futures through one client
- CSV/Parquet flat files for bulk history, plus a dedicated MCP server
Weaknesses
- Free tier is 5 calls/minute, end-of-day only
- Real-time data needs the $199/mo Advanced tier
- Trustpilot 2.3/5 (6 reviews, all one-star)
Massive’s client-python, 1,512 GitHub stars, is the one client on this list reaching stocks and options; forex and crypto; and futures too. Its free tier is five calls a minute, end-of-day only, and real-time data needs the $199-a-month Advanced plan.
EODHD
8.2/10 Seven official SDK languages including Python, broad multi-asset coverage, and a free tier -- the best-rounded Python offering here.
- An official Python SDK ×2
- 8/10
- Data frames ×1
- 6/10
- Python examples in the docs ×1.5
- 8/10
- What Python can reach ×1.5
- 9/10
- Cost ×1.5
- 9/10
- Official and permitted ×1
- 9/10
Strengths
- Official Python SDK among 7 languages (also Node.js, R, PHP, C#, Java, MATLAB)
- Stocks, forex, crypto, EOD options, and excellent fundamentals through one client
- Free tier: 20 calls/day, no credit card; cheapest paid step $16.58/mo (EOD, annual)
Weaknesses
- Options data is EOD-only through the API, no intraday or real-time
- Real-time websocket streaming needs the $99.99/mo ALL-IN-ONE plan
- Free tier is only 20 calls/day
EODHD ships an official Python SDK among seven languages, for $16.58 a month billed annually. One client reaches stocks and forex, and crypto and EOD options too. Its options stay end-of-day only through the API, at every price.
Alpaca
7.2/10 alpaca-py is a mature, 1,531-star official SDK, but its Python client reaches only US stocks, options and crypto.
- An official Python SDK ×2
- 10/10
- Data frames ×1
- 2/10
- Python examples in the docs ×1.5
- 8/10
- What Python can reach ×1.5
- 5/10
- Cost ×1.5
- 7/10
- Official and permitted ×1
- 9/10
Strengths
- alpaca-py: 1,531 GitHub stars, official first-party SDK
- Free IEX equities plus an indicative options feed on the $0 Basic plan
- Official MCP server (alpaca-mcp-server, 994 stars) for AI-agent trading
Weaknesses
- CSV/Parquet output not confirmed either way for the Market Data API
- No fundamentals, mutual funds, or international data through Python
- Real OPRA options and full-SIP data need the $99/mo Algo Trader Plus plan
Alpaca-py carries 1,531 GitHub stars, the most of any client here, and it’s free for real-time IEX equities and an indicative options feed. Its Python reach stops at stocks and options, with crypto added on; there’s no fundamentals and no international data.
Twelve Data
7.0/10 An official Python SDK reaches 190,000+ symbols across stocks, forex and crypto, but the free tier is trial symbols only and there is no options data.
- An official Python SDK ×2
- 8/10
- Data frames ×1
- 6/10
- Python examples in the docs ×1.5
- 8/10
- What Python can reach ×1.5
- 7/10
- Cost ×1.5
- 4/10
- Official and permitted ×1
- 9/10
Strengths
- Official Python SDK (named on both the docs page and homepage, alongside Go, Java, R)
- 190,000+ symbols across 250+ exchanges: stocks, forex, crypto, fundamentals
- WebSocket streaming and a documented MCP server
Weaknesses
- Free tier restricted to trial symbols only, not the full market
- No options data anywhere in the product
- Real, non-trial access starts at $66-79/month (Grow)
Twelve Data’s official Python SDK reaches over 190,000 symbols, across stocks and forex and crypto too, but there is no options data anywhere in the product. Real access starts at $66 a month billed annually.
ThetaData
6.8/10 A brand-new (May 2026) official Python library skips the local Java Terminal, but reaches only stocks, options and indices.
- An official Python SDK ×2
- 9/10
- Data frames ×1
- 5/10
- Python examples in the docs ×1.5
- 7/10
- What Python can reach ×1.5
- 5/10
- Cost ×1.5
- 6/10
- Official and permitted ×1
- 8/10
Strengths
- Official Python library (pip install thetadata), shipped 2026-05-05, connects via gRPC with no Terminal needed
- Up to 3rd-order Greeks (Vanna, Charm, Speed, Zomma, Color)
- Free $0/mo tier: EOD stocks and options, 1 year of history
Weaknesses
- The REST API and Excel add-in still require a locally-run Java Terminal
- No forex, crypto, or fundamentals data
- CSV support noted only from a 2022/2023 blog post, not re-verified this session
ThetaData shipped an official Python library on May 5, 2026, connecting by gRPC with no local Java Terminal required, the first of its clients to skip it. It reaches only stocks and options, with indices as the one extra.
Databento
6.5/10 First-party databento-python reaches tick-level stocks, options and futures, but nothing under $199/month.
- An official Python SDK ×2
- 9/10
- Data frames ×1
- 7/10
- Python examples in the docs ×1.5
- 7/10
- What Python can reach ×1.5
- 6/10
- Cost ×1.5
- 1/10
- Official and permitted ×1
- 9/10
Strengths
- databento-python: 302 stars, first-party, alongside Rust and C++ SDKs
- CSV, JSON and its own DBN binary format for bulk history
- Nanosecond-timestamped tick data across stocks, options and futures
Weaknesses
- No free tier; cheapest flat plan is $199/month (CME Standard)
- States plainly it does not calculate options Greeks or IV
- No fundamentals, crypto (roadmap only), or mutual fund data
Databento-python is first-party, alongside Rust and C++ SDKs, and reaches tick-level stocks and options, plus futures on top. Nothing here is free; the cheapest flat plan is $199 a month.
Is yfinance a real Python stock API?
No. yfinance is an unofficial client, 25,400 GitHub stars, that scrapes an API Yahoo Finance shut down in 2017. Yahoo’s terms bar automated collection and any commercial reuse, and the scraper is subject to undocumented rate limits and IP blocks.
How do you call a stock market API from Python?
Our own SDK installs with pip install marketdata-sdk-py. A quote and a chain look like this, copied from our SDK’s own README:
from marketdata import MarketDataClient
client = MarketDataClient()
# Get stock candles
df = client.stocks.candles("AAPL")
# Get options chain
chain = client.options.chain("AAPL")Our README lists four output formats: pandas or polars DataFrames, JSON, CSV or Python objects. Install the pandas extra with pip install "marketdata-sdk-py[pandas]" to get DataFrames. The client reads a MARKETDATA_TOKEN environment variable, or takes the token directly. A Python script calling that client counts as ordinary personal use as long as nothing is redistributed; one subscriber asked us in September 2026 whether that held even when his script sends the delayed data it retrieves into a cloud AI service for his own analysis, and we told him yes, because everyone is using AI these days and it’s no different from any other analysis tool.
When should you use a different Python client than ours?
Use another provider’s client for forex and crypto, for futures, or for any market outside the US, since our own client reaches none of them. sdk-py has only 7 GitHub stars against alpaca-py’s 1,531; Massive and EODHD both reach further in one client too.
Can a Python script on AWS Lambda call our API?
Because the exchanges classify our product as a controlled platform only while one customer device at a time reads the data. Serverless platforms send requests from rotating egress IPs, which breaks that promise, so we allow no IP allowlists or exemptions.
A paying customer asked us for an allowlist in July 2026, for a personal portfolio monitor on edge functions. We said no, and gave him the only alternative the exchanges allow: uncontrolled access with no IP limit, which means historical data only, with every intraday and real-time price switched off.
What did an adjusted-price mistake cost one of our API customers?
Usually because one source adjusts past prices for later splits and corporate actions and the other does not. Adjusted history changes whenever a new corporate action lands, so a value you fetched last month can come back different today.
That default cost us. In April 2026 an institution valuing donated stock told us our highs and lows disagreed with other quote sites, and it withheld a subscription payment for five weeks while we investigated. A donation is valued at the price that traded that day, so it needed unadjusted candles: two query parameters removed all five discrepancies it reported. The same review found a real bug that dropped the third decimal from some prices, and we fixed it.
Where can you get free stock data in Python?
Tiingo’s free tier gives 1,000 requests a day and 30-plus years of history, no card required, the most generous free start on this list. Ours gives 100 credits a day and a year of history. Alpaca’s free IEX equities are real-time; Tiingo’s and ours are not.
The ranking of financial data providers compares all 17 of these outside Python specifically, and our free stock API ranking goes deeper on the free tiers named above. Our API documentation lists every endpoint the SDK above wraps. The yfinance project’s own README states plainly that it is not affiliated with, endorsed by, or vetted by Yahoo Finance.
