# Docs — Quickstart for the FinzData API

Source: https://finzdata.com/docs

Quickstart for the FinzData API: get a key, pip install finzdata, yfinance-style usage, COT and fundamentals, REST endpoints, and bulk downloads.

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](https://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/cot | COT positioning rows |
| --- | --- |
| /v1/cot/markets | List of the 431 markets |
| /v1/prices/daily | Daily OHLCV bars |
| /v1/prices/minute | Intraday 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](https://finzdata.com/samples) |
| /v1/actions | Splits and dividends |
| /v1/fundamentals | SEC XBRL company facts |
| /v1/futures/bars | Futures bars, every contract or continuous |
| /v1/gex/daily | Point-in-time dealer gamma (GEX) |
| /v1/options/eod | End-of-day options chains |
| /v1/ticks/{kind} | Tick trades |
| /v1/index/bars | Index bars |
| /v1/fx/bars | FX bars |
| /v1/crypto/bars | Crypto bars |
| /v1/macro | Macro series with every vintage, incl. electricity, energy and fuel |
| /v1/pulse | Global Macro Pulse catalog |
| /v1/pulse/{name} | Ship transits, port calls, flights, and toll and congestion traffic |
| /v1/datasets | Dataset metadata and coverage |
| /v1/me | Your plan and usage |

### Rust

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

```
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](https://api.finzdata.com/docs).

## Related searches

- [survivorship bias free historical stock data](https://finzdata.com/guides/survivorship-bias-free-stock-data)

- [historical stock data with delisted tickers](https://finzdata.com/guides/delisted-stocks-data)

- [historical OHLCV data api](https://finzdata.com/historical-stock-data)

- [1 minute intraday stock data](https://finzdata.com/guides/1-minute-intraday-stock-data)

- [historical intraday stock data api](https://finzdata.com/intraday-data)

- [historical tick data for stocks](https://finzdata.com/tick-data)

- [point in time fundamentals for backtesting](https://finzdata.com/guides/point-in-time-fundamentals-backtesting)

- [free stock data api python](https://finzdata.com/guides/free-stock-data-api-python)
🌐EnglishDeutschEspañolFrançaisItalianoPortuguês日本語简体中文한국어Polskiעברית
