Skip to main content

FinzData

finzdata

Python client for the FinzData market data API. It works like yfinance and adds the datasets yfinance doesn't have.

pip install finzdata

Get a free API key at https://api.finzdata.com/ and set FINZDATA_API_KEY.

import finzdata as yf

msft = yf.Ticker("MSFT")
daily = msft.history(start="2020-01-01")                  # daily bars, split and dividend adjusted
bars = msft.history(interval="5m", start="2026-10-01")    # 1m, 5m, 1h bars (Researcher+)
both = yf.download(["SPY", "QQQ"], period="max")

c = yf.Client()
gold = c.cot(report="legacy_fo", code="088691")            # CFTC Commitments of Traders (COMEX gold)
rev = c.fundamentals(ticker="AAPL", concept="Revenues", as_of="2025-06-30")   # SEC, point-in-time
val = c.valuation("AAPL", start="2025-01-01")   # daily point-in-time P/E, P/B, P/S, EV/EBITDA, yield
cpi = c.macro("CPIAUCSL", as_of="2022-06-30")             # US macro, as known on that date
regime = c.model("latest")                                # FinzData Quantitative Model (Researcher+)
hy = c.licensed("BAMLH0A0HYM2")                           # licensed third-party series (Researcher+)
liq = c.liquidity("FED_NET_LIQUIDITY")                   # Fed assets - TGA - reverse repo (Researcher+)
money = c.liquidity(["US_M2", "US_M3_ESTIMATE"], transform="yoy", wide=True)  # money supply growth
flows = c.tic(country="Japan", asset="treasuries")       # TIC foreign holdings and net purchases

Coverage

One API key reaches every FinzData dataset, from this client, the REST API or the MCP server (https://api.finzdata.com/mcp):

  • US stocks: 16,000+ NYSE and Nasdaq stocks since 2000, delisted included; 1-minute to daily bars; tick trades for 1,100+ stocks and ETFs
  • ETFs and indexes: 5,100+ ETFs and fund holdings; 123 indexes (SPX, NDX, RUT, VIX term structure, DXY)
  • Options: point-in-time options gamma (GEX) for single stocks, ETFs and the major indexes; end-of-day options chains
  • Futures and positioning: 139 futures markets with every contract since 2007; CFTC COT since 1986; 13F holdings
  • Crypto and FX: 512 crypto pairs (Bitcoin since 2013) and 79 FX pairs since 2010, 1-minute to daily
  • Fundamentals and events: SEC fundamentals as filed, daily valuation ratios, earnings dates, insider trades, short interest
  • Macro: 22,700+ series with every vintage kept, plus the FinzData Quantitative Model
  • Real economy (Global Macro Pulse): daily ship transits through 28 chokepoints, port calls for 2,000+ ports, flights by airport and airline, toll and congestion traffic, and electricity use and power demand by US state and for 87 countries

Use it with Backtrader, vectorbt and QuantStats

from finzdata.integrations import backtrader_feed, vbt_prices, qs_returns

# Backtrader (pip install "finzdata[backtrader]")
cerebro.adddata(backtrader_feed("SPY", "2015-01-01", "2024-12-31"))

# vectorbt (pip install "finzdata[vectorbt]")
close = vbt_prices(["SPY", "QQQ", "IWM"], "2015-01-01", "2024-12-31")

# vectorbt native data class: same as vbt.YFData, one-line swap
import finzdata.vbt as fvbt
data = fvbt.download(["SPY", "QQQ"], start="2015-01-01")          # daily OHLCV
bars = fvbt.download("AAPL", start="2026-10-01", interval="5min") # 1min, 5min, 30min, 1hour (stocks)
pf = vbt.Portfolio.from_holding(data.get("Close"))

# Backtesting.py (pip install "finzdata[backtesting]")
from finzdata.adapters import backtesting_frame
bt_data = backtesting_frame("AAPL", start="2015-01-01")       # Open/High/Low/Close/Volume, ready for Backtest(...)

# bt (pip install "finzdata[bt]")
from finzdata.adapters import bt_prices
prices = bt_prices(["spy", "agg"], start="2010-01-01")         # adjusted closes, one column per symbol

# Zipline-reloaded (pip install "finzdata[zipline]"); put this in ~/.zipline/extension.py, then: zipline ingest -b finzdata
import finzdata.zipline_bundle as zb
zb.register(symbols=["AAPL", "MSFT", "SPY"], start="2015-01-02")

# QuantStats (pip install "finzdata[quantstats]")
import quantstats as qs
qs.reports.html(qs_returns("SPY", "2015-01-01", "2024-12-31"), output="spy.html")

Every bar comes from FinzData's survivorship-free history, so delisted companies stay in your backtests.

Datasets

  • US equity bars, daily (incl. delisted names) and intraday 1-minute, 5-minute and hourly
  • Splits and dividends
  • CFTC Commitments of Traders, all reports, since 1986
  • SEC XBRL fundamentals, as reported and point-in-time
  • Daily valuation history (P/E, P/B, P/S, EV/EBITDA, market cap, dividend yield), point-in-time from SEC filings
  • US macro series with every vintage (FRED/ALFRED), plus a release calendar
  • FinzData Quantitative Model: macro regime labels, a nowcast and a market-stress probability
  • Licensed series: Moody's, University of Michigan, Case-Shiller, ICE BofA, Cboe (incl. the VIX futures curve)

Guides (13F, COT, macro vintages, intraday, delisted stocks): https://finzdata.com/guides · Free samples and the full file specification: https://finzdata.com/samples · Pricing: https://finzdata.com/shop · Data status: https://finzdata.com/status · API reference: https://api.finzdata.com/docs

Bulk downloads (Researcher and above): POST /v1/batch, then fetch the download_url. Full-history bundles and nightly updates: GET /v1/bundles.

Data is provided under the FinzData subscriber licence; redistribution is prohibited.

Metadata

Release files for finzdata 0.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finzdata 0.1.19
File Size Uploaded Provenance Actions
finzdata-0.1.19.tar.gz 139.4 kB Without provenance Details for finzdata-0.1.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for finzdata 0.1.19
File Interpreter ABI Platform Actions
finzdata-0.1.19-py3-none-any.whl Python 3 none any Details for finzdata-0.1.19-py3-none-any.whl

Total release size: 164.6 kB

Release files / finzdata-0.1.19.tar.gz

Download URL finzdata-0.1.19.tar.gz
Size 139.4 kB
Tags Source
SHA-256 checksum
How to use checksums
964eb3166d419091e5f2cc3dc038a3db36856b4332ee9cb5727273d581bfe5ee
BLAKE2b-256 checksum
How to use checksums
00b26897014759f267106f9fb115cb23904fe953e5524dcc2885d1e5b96ee6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / finzdata-0.1.19-py3-none-any.whl

Download URL finzdata-0.1.19-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06026a95f4bbe3f45a60c297a7a75985257610d565e7e38efe2af1a6ec5f269d
BLAKE2b-256 checksum
How to use checksums
36cf3b22ea31cbefb9d5611152f09f8633eb53a819b8df3df505686427af0d66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for finzdata 0.1.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page