bsedata is a library for collecting real-time data from Bombay Stock Exchange (India). It can be used in various types of projects which require getting live quotes for a given stock or index or build large data sets for data analysis.

Tests (master branch)

Tests (dev branch)

Code coverage


Status of tests on master branch

Status of tests on dev branch

Code Coverage

Documentation Status


The data provided by APIs is only as correct as provided on


If you are facing any issue with the APIs then it may be beacuse there had been some format change recently in the way BSE reports its live quotes. Please upgrade to the latest version in order to avoid this issue. Report the issue at if it is not resolved even after upgrading the version.


  • Live quotes using stock codes traded in BSE

  • List of top losers

  • List of top gainers

  • Quotes for all the indices traded in BSE

  • Helper APIs to check whether a given stock code or index code is correct

  • List of all indices and stocks


  • Get details of an individual index

  • Complete unit test coverage

  • Daily OHLCV data

  • Historical EOD OHLCV data


  • BeautifulSoup 4

  • requests

  • lxml

  • A working internet connection 😉


You need to have a working internet connection while using this library. It will raise requests.exceptions.ConnectionError in case there is no internet connectivity. Hence please handle this scenario in your code.