Getbhavcopy: Free NSE and BSE data downloader

Importing Getbhavcopy data to Amibroker

This tutorial was provided by Abhay Deshpande from Trading Analysis. They are the official vendors for Amibroker in India.

You can Download Amibroker or contact them on their site.

Importing the NSE and BSE EOD bhavcopy data downloaded by Getbhavcopy into Amibroker requires you to follow these setup steps for the first time only.

  • Creating Amibroker database for NSE or BSE data downloaded using Getbhavcopy
  • Creating a Getbhavcopy.format file
  • Add Getbhavcopy.format into Amibroker formats list.

Once this is setup then importing the data downloaded by Getbhavcopy is extremely convenient and simple.

Creating Amibroker database

While in this example I am showing you how to create a database, I recommend you create different Amibroker databases for NSE data and BSE data.

Start Amibroker and create a new database as follows


In the dialogue box that appears, browse to a folder you have created to store the database and click "Create" button.

Amibroker database location and the NSE and BSE data download directory of Getbhavcopy need not be the same folder. I recommend they be different folders.

Select "Load this database at startup" only if you want this database to open as default database when Amibroker starts. If you have created multiple databases for NSE and BSE the n we recommend you should take care to open the appropriate database before you import the data for the exchange (i.e. NSE or BSE) downloaded by Getbhavcopy.

After "Create" button is pressed, the options for 'Database Source' section get enabled.


Set'Data Source', 'Local data storage', 'Number of bars' and 'Base time Interval' exactly as show in the above image. Click OK.

So you have successfully created the database to import the EOD bhavcopy data downloaded using Getbhavcopy to Amibroker.

Now we need to create a format file for Getbhavcopy data files.

Creating Getbhavcopy.format file

Before the NSE and BSE data downloaded using Getbhavcopy can be imported into Amibroker, it is necessary for Amibroker to know the format of the data that is being imported into. For this you need to create the Getbhavcopy.Format file as mentioned here.

Create a new text file called 'GetBhavCopy.format' in \Amibroker\Formats directory using notepad. Paste the following code into it and save the file.

$FORMAT Ticker,Date_YMD,Open,High,Low,Close,Volume,OpenInt

Note: The value of $SKIPLINES in the file depends on the value of the 'Enable Output Header' check box in the Getbhavcopy options tab.

If 'Enable output header' is unchecked then $SKIPLINES should be 0, if it is checked then $SKIPLINES should be 1.

Add Getbhavcopy.format into Amibroker formats list

Open file import.TYPES from the same directory (\Amibroker\Formats directory) into Notepad and add following line at the end of the file.

GetBhavCopy format (*.txt)|*.txt|GetBhavCopy.format

Once this is done you are done with the setup part. Now you can start importing NSE and BSE EOD data downloaded using Getbhavcopy into Amibroker.

Importing the data

To import the NSE and BSE EOD data downloaded using Getbhavcopy into Amibroker 

  • Start Amibroker and select the 'Import ASCII' option from the 'File' menu.
  • Browse to the NSE or BSE data download directory you have setup in Getbhavcopy options tab (i.e. the location where Getbhavcopy downloads the EOD data)
  • Select 'File of Type' as Getbhavcopy Format (*.txt)
  • And finally, select the required data file and click OK. Amibroker will import the data.