mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-03 07:51:49 +00:00
* Began working on docs creator * Added fixes * More * More * Adding autogen_try.py for OpenBB API doc generation * OpenBB API docs gen try * Fixed * Added fixes * Added fixes * subs -> sub * Updated docs * Updated docs Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
990 B
Vendored
990 B
Vendored
To obtain charts, make sure to add chart=True as the last parameter
Get underlying data
etf.weights(name: str) -> Dict
Return sector weightings allocation of ETF. [Source: Yahoo Finance]
Parameters
----------
name: str
ETF name
Returns
----------
Dict
Dictionary with sector weightings allocation
Getting charts
etf.weights(name: str, raw: bool = False, min_pct_to_display: float = 5, export: str = '', external_axes: Optional[List[matplotlib.axes._axes.Axes]] = None, chart=True)
Display sector weightings allocation of ETF. [Source: Yahoo Finance]
Parameters
----------
name: str
ETF name
raw: bool
Display sector weighting allocation
min_pct_to_display: float
Minimum percentage to display sector
export: str
Type of format to export data
external_axes : Optional[List[plt.Axes]], optional
External axes (1 axis is expected in the list), by default None