Markets
Functions
getData
getData(tickers: Union[str, List[str]], start_date: str | None = None, end_date: str | None = None, period: str | None = None, interval: str = '1d') -> pd.DataFrame
Retrieve OHLCV market data for one or more tickers via yfinance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tickers
|
str or list[str]
|
Ticker symbol or list of ticker symbols. |
required |
start_date
|
str
|
Start date in |
None
|
end_date
|
str
|
End date in |
None
|
period
|
str
|
Rolling lookback period. Cannot be used with |
None
|
interval
|
str
|
Bar interval. Default |
'1d'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame indexed by date with columns:
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If both |
Examples:
getTicker
Return a yfinance.Ticker object for a given symbol.
The Ticker object exposes a wide range of fundamental and market data
attributes, including info, history, dividends, splits,
financials, balance_sheet, cashflow, earnings,
options, option_chain, recommendations, and news.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ticker
|
str
|
Ticker symbol (e.g. |
required |
Returns:
| Type | Description |
|---|---|
Ticker
|
yfinance Ticker object. |
Examples: