constituents
Get Index Constituents.
Examples
from openbb import obb
obb.index.constituents(symbol='dowjones', provider='fmp')
# Providers other than FMP will use the ticker symbol.
obb.index.constituents(symbol='BEP50P', provider='cboe')
Parameters
- standard
- cboe
- fmp
- tmx
symbol: str
Symbol to get data for.
symbol: Literal['BAT20P', 'BBE20P', 'BCH20P', 'BCHM30P', 'BDE40P', 'BDEM50P', 'BDES50P', 'BDK25P', 'BEP50P', 'BEPACP', 'BEPBUS', 'BEPCNC', 'BEPCONC', 'BEPCONS', 'BEPENGY', 'BEPFIN', 'BEPHLTH', 'BEPIND', 'BEPNEM', 'BEPTEC', 'BEPTEL', 'BEPUTL', 'BEPXUKP', 'BES35P', 'BEZ50P', 'BEZACP', 'BFI25P', 'BFR40P', 'BFRM20P', 'BIE20P', 'BIT40P', 'BNL25P', 'BNLM25P', 'BNO25G', 'BNORD40P', 'BPT20P', 'BSE30P', 'BUK100P', 'BUK250P', 'BUK350P', 'BUKAC', 'BUKBISP', 'BUKBUS', 'BUKCNC', 'BUKCONC', 'BUKCONS', 'BUKENGY', 'BUKFIN', 'BUKHI50P', 'BUKHLTH', 'BUKIND', 'BUKLO50P', 'BUKMINP', 'BUKNEM', 'BUKSC', 'BUKTEC', 'BUKTEL', 'BUKUTL']
Default: BUK100P
None
symbol: Literal['dowjones', 'sp500', 'nasdaq']
Default: dowjones
None
historical: bool
Default: False
Flag to retrieve historical removals and additions.
symbol: str
Symbol to get data for.
use_cache: bool
Default: True
Whether to use a cached request. Index data is from a single JSON file, updated each day after close. It is cached for one day. To bypass, set to False.
Returns
results: list[IndexConstituents]
Serializable results.
provider: Optional[Literal['cboe', 'fmp', 'tmx']]
Provider name.
warnings: Optional[list[Warning_]]
list of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- cboe
- fmp
- tmx
symbol: str
Symbol representing the entity requested in the data.
name: str
Name of the constituent company in the index.
symbol: str
Symbol representing the entity requested in the data.
name: str
Name of the constituent company in the index.
security_type: str
The type of security represented.
last_price: float
Last price for the symbol.
open: float
The open price.
high: float
The high price.
low: float
The low price.
close: float
The close price.
volume: int
The trading volume.
prev_close: float
The previous close price.
change: float
Change in price.
change_percent: float
Change in price as a normalized percentage.
tick: str
Whether the last sale was an up or down tick.
last_trade_time: datetime
Last trade timestamp for the symbol.
asset_type: str
Type of asset.
symbol: str
Symbol representing the entity requested in the data.
name: str
Name of the constituent company in the index.
sector: str
Sector classification for the constituent company in the index.
industry: str
Industry classification for the constituent company in the index.
headquarter: str
Location of the company's headquarters.
date_added: date | str
Date the constituent company was added to the index.
cik: str
Central Index Key (CIK) for the requested entity.
founded: date | str
When the company was founded.
removed_symbol: str
Symbol of the company removed from the index.
removed_name: str
Name of the company removed from the index.
reason: str
Reason for the removal from the index.
date: date | str
Date of the historical constituent data.
symbol: str
Symbol representing the entity requested in the data.
name: str
Name of the constituent company in the index.
market_value: float
The quoted market value of the asset.