Skip to main content

filter_stocks

Filter stocks based on country, sector, industry, market cap and exclude exchanges.

Source Code: [link]

openbb.stocks.sia.filter_stocks(country: str = None, sector: str = None, industry: str = None, marketcap: str = "", exclude_exchanges: bool = True)

Parameters

NameTypeDescriptionDefaultOptional
countrystrSearch by country to find stocks matching the criteria.NoneTrue
sectorstrSearch by sector to find stocks matching the criteria.NoneTrue
industrystrSearch by industry to find stocks matching the criteria.NoneTrue
marketcapstrSelect stocks based on the market cap.True
exclude_exchangesboolWhen you wish to include different exchanges use this boolean.TrueTrue

Returns

TypeDescription
listList of filtered stocks