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|15min|30min|1hour (every bar size on every look-back bundle), adjust=none|all; end includes the whole day. File format and samples
/v1/actionsSplits and dividends
/v1/fundamentalsSEC XBRL company facts
/v1/futures/barsFutures bars, every contract or continuous
/v1/gex/dailyPoint-in-time dealer gamma (GEX)
/v1/options/eodEnd-of-day options chains
/v1/ticks/{kind}Tick trades
/v1/index/barsIndex bars
/v1/fx/barsFX bars
/v1/crypto/barsCrypto bars
/v1/macroMacro series with every vintage, incl. electricity, energy and fuel
/v1/pulseGlobal Macro Pulse catalog
/v1/pulse/{name}Ship transits, port calls, flights, and toll and congestion traffic
/v1/datasetsDataset metadata and coverage
/v1/meYour plan and usage

Rust

The official Rust client covers the same endpoints, async or blocking: cargo add finzdata (crates.io, docs.rs).

let fz = finzdata::Client::new()?;                       // reads FINZDATA_API_KEY
let es  = fz.futures_bars("ES", None, true, None, Some("1min"), Some("2024-01-02"), None).await?;
let gex = fz.gex("SPX", Some("2020-01-01"), None).await?;
let eur = fz.fx_bars("EURUSD", Some("1hour"), Some("2025-01-01"), None).await?;

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.