# Docs — Quickstart per la FinzData API

Source: https://finzdata.com/it/docs

Quickstart per la FinzData API: ottieni una chiave, pip install finzdata, utilizzo in stile yfinance, COT e fundamentals, endpoint REST e download bulk.

Documentazione

# Avvio rapido

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

Passo 1

## Ottieni una chiave

Registrati su [api.finzdata.com](https://api.finzdata.com/). Il free tier non richiede carta di credito e include 1,000 chiamate al giorno.

Passo 2

## Installa

Installa il client Python ed esporta la tua chiave come variabile d'ambiente.

```
pip install finzdata
export FINZDATA_API_KEY=fz_...
```

Passo 3

## Uso in stile yfinance

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")
```

Passo 4

## COT e fondamentali

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")
```

Passo 5

## API REST

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 | Righe di posizionamento COT |
| --- | --- |
| /v1/cot/markets | Elenco dei 431 mercati |
| /v1/prices/daily | Barre OHLCV giornaliere |
| /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. [Formato file e campioni](https://finzdata.com/samples) |
| /v1/actions | Split e dividendi |
| /v1/fundamentals | Fatti societari XBRL SEC |
| /v1/futures/bars | Barre futures per ogni contratto o continuo |
| /v1/gex/daily | Gamma dealer point-in-time (GEX) |
| /v1/options/eod | Catene opzioni end-of-day |
| /v1/ticks/{kind} | Scambi tick |
| /v1/index/bars | Barre indice |
| /v1/fx/bars | Barre FX |
| /v1/crypto/bars | Barre crypto |
| /v1/macro | Serie macro per ogni vintage, inclusi elettricità, energia e carburanti |
| /v1/pulse | Catalogo Global Macro Pulse |
| /v1/pulse/{name} | Transiti navali, chiamate portuali, voli e traffico, pedaggi e congestione |
| /v1/datasets | Metadati dei dataset e copertura |
| /v1/me | Il tuo piano e utilizzo |

### 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?;
```

Errori: 401 chiave mancante o non valida, 403 piano non include questi dati, 429 limite giornaliero di chiamate raggiunto.

Passo 6

## Download bulk

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://..."}
```

Passo 7

## Riferimento API completo

Ogni parametro, campo di risposta e codice di errore è documentato su [api.finzdata.com/docs](https://api.finzdata.com/docs).

## Ricerche correlate

- [dati storici azionari senza survivorship bias](https://finzdata.com/guides/survivorship-bias-free-stock-data)

- [dati storici azionari con ticker delistati](https://finzdata.com/guides/delisted-stocks-data)

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

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

- [api dati storici intraday](https://finzdata.com/intraday-data)

- [dati tick storici per azioni](https://finzdata.com/tick-data)

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

- [API gratuita dati azioni Python](https://finzdata.com/guides/free-stock-data-api-python)
🌐IngleseTedescoSpagnoloFranceseItalianoPortoghese日本語简体中文한국어PolaccoעבריתNorvegese
