Getting Started

Quickstart

Five minutes from install to real market data. Everything revolves around one class: Ticker.

1. Import and instantiate

Pass a ticker symbol — case doesn’t matter.

pythonstep1.py
from yahooquery import Ticker

aapl = Ticker('aapl')

2. Ask for data

Simple properties return immediately:

pythonstep2.py
aapl.summary_detail   # price, volume, market cap, dividend yield...
aapl.price            # current price snapshot
aapl.key_stats        # valuation and share statistics

3. Use methods for control

Methods take arguments — like the period and interval for historical prices:

pythonstep3.py
df = aapl.history(period='6mo', interval='1d')
df.tail()

The result is a pandas DataFrame indexed by symbol and date — plot it, resample it, or join it against your own data.

4. Batch with a list

pythonstep4.py
faang = Ticker(['fb', 'aapl', 'amzn', 'nflx', 'goog'])
faang.summary_detail

Every property and method works the same way — responses are keyed by symbol.

Where next? The Ticker class reference lists every module, or jump straight to historical data for OHLCV pulls.