sectors
Get Index Sectors. Sector weighting of an index.
Examples
from openbb import obb
obb.index.sectors(symbol='^TX60', provider='tmx')
Parameters
- standard
- tmx
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| symbol | str | Symbol to get data for. | False | |
| provider | Literal['tmx'] | The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: tmx. | None | True |
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| symbol | str | Symbol to get data for. | False | |
| provider | Literal['tmx'] | The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: tmx. | None | True |
| use_cache | bool | Whether to use a cached request. All Index data comes from a single JSON file that is updated daily. To bypass, set to False. If True, the data will be cached for 1 day. | True | True |
Returns
OBBject
results : List[IndexSectors]
Serializable results.
provider : Optional[Literal['tmx']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
Data
- standard
- tmx
| Name | Type | Description |
|---|---|---|
| sector | str | The sector name. |
| weight | float | The weight of the sector in the index. |
| Name | Type | Description |
|---|---|---|
| sector | str | The sector name. |
| weight | float | The weight of the sector in the index. |