← Dataset guides

Python 3.10+ · No additional packages · Updated October 9, 2026

Inspect historical stock bars with an authenticated data query

Preview OHLCV fields, export a bounded slice of historical stock data, and check its timestamps and coverage before analysis.

1. Check the source and sample

Open US Stocks & ETFs 1-Minute Bars to inspect its current availability, schema, documentation and sample assessment. Source: publisher dataset card. Declared license: MIT (supplier-declared; review upstream terms).

Expected fields: timestamp, ticker, open, high, low, close, volume.

Listing availability and source files can change. The commands fail visibly if the expected fields or access are unavailable.

2. Run a public sample check

Download the Python script and inspect the small sample without signing in.

curl -fsS --max-time 20 https://databazaar.io/examples/dataset-workflow.py -o dataset-workflow.py
python3 dataset-workflow.py stock-bars

The output says scope: sample_only. It reports sample rows and columns; it neither downloads nor certifies the full dataset.

3. Sign in and export real rows

Create an account, then create an API key. Store it in DATABAZAAR_API_KEY in your local environment. Keep credentials out of notebooks and shared files.

python3 dataset-workflow.py stock-bars --authenticated --limit 1000 --output stock-bars.csv

A CSV containing up to 1,000 returned bars and a JSON summary listing the tickers actually present. This is an unordered bounded slice, not a complete ticker history or a representative market sample. The sample and full file may use different formats.

This is an authenticated query. The script never buys data and refuses to overwrite an existing output file. HTTP 401 means account authentication is needed; other access errors require checking the current listing and permissions.

4. Use the output carefully

Inspect timestamps and repeated ticker/timestamp pairs, then check missing intervals before selecting a time window for analysis. The query deliberately avoids scanning an entire multi-gigabyte file just to demonstrate connectivity. Use the dataset manifest and explicit file selection when your task requires full files.

These are historical records, not a live price feed. The listing does not substantiate corporate-action adjustments, a complete ticker universe or a current end date. Do not infer coverage from “Present” in its title, or treat the first returned rows as a backtest. Review the publisher and upstream data-provider terms for your intended use.

How sample quality is assessed explains what the score can and cannot establish.