Skip to content

Python module to scrape financial data from moneycontrol

Notifications You must be signed in to change notification settings

shashank-556/Mfinance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moneycontrol Data Scraper

A python module that allows you to access the financial data of public Indian companies listed on the National Stock Exchange and the Bombay Stock Exchange from the popular website Moneycontrol in a pythonic way.
This is not an official Moneycontrol python library or api

Currently you can retrieve following data

  1. Small summary about the business of the company
  2. Basic data about the company like Share Price, Market Cap, PE etc.
  3. Latest share price
  4. Basic info about the peers of the company
  5. Financial ratios and per share data of the company
  6. Latest shareholding pattern

Quick Start

Clone this repo and write your own scripts in your local repo

comp

The comp is the main class of mc module. Data of any entity can be retrieved using this class.
The comp class accepts one argument. The symbol of the company, etf etc. The symbol of any entity can be found in its url on moneycontrol.


Symbol of Reliance Industries Ltd. is RI Symbol of Reliance Symbol of Asian Paints is AP31 Symbol of Asian Paints


import mcontrol as mc


#the comp module will return all the data about the company
#the comp module accepts the company symbol as argument

ril = mc.comp('RI')

# about the company
print(ril.about)

# a dictionary listing basic details like closing price, market cap, pe etc
print(ril.info)

# to get the latest price
print(ril.latestPrice)

# returns a list of dictionary containing info about the peers of the company
print(ril.peers())

# to get the peers result as pandas dataframe
print(ril.peers(dframe=True))
# or
print(ril.peers(True)) 

# returns a dictionary with basic per share data like eps, bvps and financial ratios
print(ril.pershare())

# returns a dictionary with latest shareholding data
print(ril.latestShareholding())

# url of the company on moneycontrol
print(ril.url)

Requirements

lxml
beautifulsoup4

About

Python module to scrape financial data from moneycontrol

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages