Docs

Quickstart

From zero to data in seven steps. pip install finzdata, then pull pandas DataFrames ready for your backtest — or call the REST API directly.

Step 1

Get a key

Register at api.finzdata.com. The free tier needs no credit card and includes 1,000 calls per day.

Step 2

Install

Install the Python client and export your key as an environment variable.

pip install finzdata
export FINZDATA_API_KEY=fz_...

Step 3

yfinance-style usage

The client mirrors the yfinance interface: Ticker().history for one symbol, download for many.

import finzdata as yf

msft = yf.Ticker("MSFT")
df = msft.history(start="2020-01-01", auto_adjust=True)

both = yf.download(["MSFT", "AAPL"], start="2020-01-01")

Step 4

COT and fundamentals

Use the client object for the non-price datasets. Fundamentals accept as_of for point-in-time queries.

import finzdata as yf

client = yf.Client()

cot = client.cot(report="legacy_fo", market="WHEAT")
f = client.fundamentals(ticker="AAPL", concept="Revenues", as_of="2023-06-30")

Step 5

REST API

Authenticate with the X-API-Key header or the ?apikey= query parameter. Every endpoint returns JSON by default; add format=json|csv|parquet to change it.

curl -H "X-API-Key: fz_..." \
  "https://api.finzdata.com/v1/prices/daily?symbol=MSFT&start=2020-01-01"
/v1/cotCOT positioning rows
/v1/cot/marketsList of the 431 markets
/v1/prices/dailyDaily OHLCV bars
/v1/prices/minuteIntraday OHLCV bars. interval=1min|5min|1hour, adjust=none|all; end includes the whole day. File format and samples
/v1/actionsSplits and dividends
/v1/fundamentalsSEC XBRL company facts
/v1/datasetsDataset metadata and coverage
/v1/meYour plan and usage

Errors: 401 missing or bad key, 403 plan does not include this data, 429 daily call limit reached.

Step 6

Bulk downloads

For large pulls, submit a batch job with a JSON body, poll for completion, then download the zip. Links are valid for 7 days. Nightly full-history bundles are at GET /v1/bundles.

curl -X POST -H "X-API-Key: fz_..." \
  -H "Content-Type: application/json" \
  -d '{"dataset": "prices_daily", "symbols": ["MSFT"], "start": "2000-01-01", "format": "parquet"}' \
  https://api.finzdata.com/v1/batch

curl -H "X-API-Key: fz_..." \
  https://api.finzdata.com/v1/batch/JOB_ID
# -> {"status": "done", "download_url": "https://..."}

Step 7

Full API reference

Every parameter, response field, and error code is documented at api.finzdata.com/docs.