API Reference#
- class bsedata.bse.BSE(update_codes=False)#
Class which implements the functionality for Bombay Stock Exchange (BSE)
- getIndices(category)#
- Parameters:
category – A category of indices
- Returns:
A dictionary with details about the indices belonging to the given category
- getQuote(scripCode)#
- Parameters:
scripCode – A stock code
- Returns:
A dictionary which contain details about the stock
- Raises:
InvalidStockException – Raised for stocks which have been suspended or no longer trading on BSE
- getScripCodes()#
- Returns:
A dictionary with scrip codes as keys and company names as values
- topGainers()#
- Returns:
A sorted list of codes of top gainers
- topLosers()#
- Returns:
A sorted list of codes of top losers
- updateScripCodes()#
Download a fresh copy of the scrip code listing
- Returns:
None
- verifyScripCode(code)#
- Returns:
Company name if it is a valid stock code, else None
- exception bsedata.exceptions.InvalidStockException(status='Inactive stock')#
Exception raised for stocks which have been suspended or no longer trading on BSE.
- Parameters:
status – the status of the stock as mentioned on BSE website