Getbhavcopy: Free NSE and BSE data downloader

Blog

Importing bulk Getbhavcopy data into Metastock

Posted on February 6, 2009 at 12:31 AM

While most of you would be using Getbhavcopy as a daily stock market data downloader, it is a powerful historical stock data downloader too. There would be many users who would like to download bulk data i.e. about 3 to 6 months of historical stock data at one time and want to import it into your technical analysis software.


Downloading bulk data using Getbhavcopy is not a big deal because you can set the date range for which you want to download stock data and Getbhavcopy will download the data in one stretch i.e. without requiring your input.


But the issue arises when you need to import this data into your technical analysis software. Imagine importing daily EOD data for about 100 days into your technical analysis software. I have a tip for you where you can import the entire bulk of data into your technical analysis software in a single go.

I will try to explain using Metastock as the technical analysis software, but I believe the steps are vaild for any technical analysis software.

As an example lets consider you want to download data from 01-Jul-2008 to 15-Jan-2009.

Download the data

  • Start Getbhavcopy.
  • Uncheck the 'Enable output header' checkbox for the exchange (i.e NSE or BSE) for which you are downloading data. If you are downloading data for both exchanges then uncheck for both.
  • Save these Getbhavcopy Options.
  • Download the data using Getbhavcopy.

So now the data will be downloaded in the download directories.


Setup the data files for merge.

  • Create two directories C:\NSETEMP and C:\BSETEMP
  • Copy the files 2008-07-01-NSE-EQ.txt to 2009-01-15-NSE-EQ.txt from your NSE download directory to the C:\NSETEMP directory.
  • Copy the files 2008-07-01-BSE-EQ.txt to 2009-01-15-BSE-EQ.txt from your BSE download directory to the C:\BSETEMP directory.
  • Now in your C:\BSETEMP directory open the data file for the first day in your date range (i.e.2008-07-01-BSE-EQ.txt in our example) in Notepad and add the following line as the first line in that file and save it.


<ticker>, <date>, <open>, <high>, <low>, <close>, <vol>, <o/i>

Merge the files

  • Now start the command prompt. You can do so from Start >> Run, type cmd and press enter.
  • Change the directory to the C:\NSETEMP directory. Now you should be in the NSETEMP directory.
  • Enter command
copy *.txt NSE.txt

This copy command creates a single file with the data of all the txt files you copied in the C:\NSETEMP directory.

Similarly change to the BSETEMP directory and do the same to generate the BSE.txt file.

Now you can follow the instructions in the document 'Importing Getbhavcopy data into Metastock' to import the combined NSE.txt and BSE.txt file into Metastock, but make sure you set the proper date range while importing the data.

Categories: Tips and Tricks

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

You must be a member to comment on this page. Sign In or Register

41 Comments

Reply svishnugopal
01:51 AM on September 23, 2010 
Thanks a lot, very useful post
Reply UjjwalJ
08:54 PM on August 01, 2010 
Thanks Hemen for the bulk downloading tips - very effective and time consuming.
Reply Laks
11:55 AM on July 21, 2010 
Dear Hemen, I have downloaded NSE cash & futures historical data from Getbhavcopy and imported the data into Amnbroker as per the instructions on the website, To open the database I have clicked "File -- Open Databse -- Bhavcopy", but this didn't work. but I don't see any symbols/charts displayed. How can I open the database that I have imported?. Thanks. LAks
Reply amit negi
12:02 AM on March 13, 2010 
hi hemen , i joined your site 2days ago.its a gr8 site . i have many query. could you tell me in simple how to import data of nifty only i n metatrader4 and fibotrader.is there any option for viewing intraday nifty chart by direct feeding to above softwares.does any ms office application like excel is reuired for importing the nifty eod or intraday data.do u have any plan of launching your own trading platform for indian stock market.i am a novice trader in the market and little knowledge of computer hope u will understand.currently i am using odin diet but i could not unlock its technical features so iwant to shift to other technical charting software.could you provide remote help by application like teamviewer. with regards amit.
Reply nilesh
12:59 AM on January 05, 2010 
Dear Hemen,
To merge the files I started the command prompt. The directory comes as C:\Docoment and Settings To change the directory to C:\bsetemp I can,t backspace or delete the previous one. if i type after the name after the previous one then the error comes as " C:bsetemp is not recognized as an internal or external operable program or batch file."
Reply MANI
05:59 AM on November 05, 2009 
Nisha says...
Hi,
Earlier I had BSE downloaded data in CSV format. When I downloaded latest version, it is downloading data only in .txt format. How to download BSE data in CSV format?
Thanks


Hi, Nisha the solution of your problem is given
1. Open your .txt bhav copy file.
2. Click--File--Save as
3. Save as window shown
4. Rename the file name with " "
Example : 05.11.2009.txt -- it is text file
Rename this file when save as window as follows
"05.11.2009.csv" and click -- Save.
5. Now see your saved location, it shown your modified CSV file.
That's all. Good luck.

bye bye.

Mani.
Reply vicky
09:27 AM on October 22, 2009 
i m not able to download data of 13-10-2009 and 19-10-2009
Reply Man Mohan
09:10 AM on October 05, 2009 
how do I Importing bulk Getbhavcopy data into Metastock in case of opeeratin system using window 7
Reply Nisha
05:42 AM on September 02, 2009 
GetBhavCopy downloads ticker (Company Codes) information alongwith values. How do I get Company Names for these Company codes? Is there any site from where I can download it? As mentioned earlier, for some time, I was getting this information when GetBhavcopy was downloading the files in CSV file format and CSV file format had lot more information which is not there in .txt files
Thanks
Reply sudipta
03:18 PM on September 01, 2009 
Hi Hemen, I have downloaded Metastock and i have followed the instruction the way you have stated as to how to convert the data once I have downloaded the Bhavy Copy but under any circumstances i cannot open the chart data even after converting it in METASTOCK or AMIBROKER. Pls help, its urgent,
Thank you
Reply kawstov@gmail.com
11:18 AM on August 26, 2009 
dear praveen,
metastock is only a charting tool and doesnot give intra day or eod
data has to be supplied from outside where hemen came forward to give GETBHAVCOPY.
however hemen's tool itself downloads the data from exchange servers which only allow eod download. for intraday data u must hava a subscription and that s too costly in India. thats for approx. rs. 1Lac. however certain sites like trader ji do provide intraday with 5 min tick time but that has 2 problems:

1. it is downloadable on per day basis so u cannot opt for bulk download.
2. it is in CSV format.
Reply Hemen
11:02 AM on August 26, 2009 
Nisha says...
Hi,
Earlier I had BSE downloaded data in CSV format. When I downloaded latest version, it is downloading data only in .txt format. How to download BSE data in CSV format?
Thanks


Nisha, technically there is no difference between a CSV and a txt file. They both are one and the same. Follow the same process as you used to do earlier to import the CSV file with the TXT file and it will get imported without any issues.
Reply Nisha
06:39 AM on August 26, 2009 
Hi,
Earlier I had BSE downloaded data in CSV format. When I downloaded latest version, it is downloading data only in .txt format. How to download BSE data in CSV format?
Thanks
Reply Hemen
02:18 AM on August 26, 2009 
:-) Praveen I really don't know how to answer this one :-)
Reply Praveen
12:51 AM on August 26, 2009 
Dear Hemem,
I want use to MetaStock software for End of Day chart. Can u please give me Metastock Exe. for daily chart.(MetaStock software for Daily chart)
Regards
Reply Karanbir
10:49 AM on August 12, 2009 
Dear Hemem,
I am using Gannalytic charting software. I needs metastock format. How do I append the cmpilation of your matastock file.
Your insight will be helpful.
Regards
Reply ramesh
04:53 PM on July 12, 2009 
very good . thanks
Reply Hemen
01:46 PM on July 09, 2009 
@ bijoy and mk : I am not sure how this can be done in fibotrader.
Reply mk
07:10 AM on July 05, 2009 
how to import to fibotrader
Reply Reks
10:44 AM on June 29, 2009 
Hello Hemen
where can i get mcx or comex eod or realtime for gold silver crude and copper for 5 years weekly and daily for Technical Analysis as i am using metastock 9 right now hope you have solution

Getbhavcopy runs on

Redesign_234x60

Google Search


Follow me on Twitter