Complete list of all the scripts in BSE & NSE

#5
hi mtash2000,

I did some research on these things... so whatever i know let me tell u...


how do we get historical data for all those scripts?

Like price/volume on any day in the past?

Use the below link:
http://www.nseindia.com/marketinfo/equities/scripvol/histscrip.jsp?FromDate=from-date&ToDate=To-Date&check=new&data-type=PriceVolumeDeliverable&inputtext=NSE-SYMBOL&ser=return+document.scripform.series.options[document.scripform.series.selectedIndex].value&series=X

For example, for Infosys (INFOSYSTCH), it would be,
http://www.nseindia.com/marketinfo/equities/scripvol/histscrip.jsp?FromDate=01-01-2009&ToDate=31-01-2009&check=new&data-type=PriceVolumeDeliverable&inputtext=INFOSYSTCH&ser=return+document.scripform.series.options[document.scripform.series.selectedIndex].value&series=X

In the response, if the no. of records are more than 100, then you'll get a link at the bottom of the page having URL as below:

http://www.nseindia.com/content/equities/scripvol/datafiles/01-01-2009-TO-31-01-2009INFOSYSTCHXN.csv

So, what you can do is in excel you can directly open the above like. File -> Open and paste the above URL. Sometimes it will allow; if it doesn't allow, then open the 1st url and then open the 2nd from excel. Make sure both the links contain same from and to date.

That's it! Just pick one symbol from (http://nseindia.com/content/equities/EQUITY_L.csv) and you can get all info about all info from NSE.

For BSE, i've no idea. if anybody (including you) knows please let me know.
 
#8
Sir Mr. RohitOberoi6592
I appreciate,appreciate and appreciate your post so so so much
so nice of you so generous of you multibillion thanks
i had been looking for this for years i am not a internet programmer or a programmer
just hobbyist and ......
Sir you made my day
May God Bless You Trillion times
althou this post is not meant for me but it repiled what i was looking for
Please help us out with such problems in future too

I want to fill this page with thanks but dont want to be absurd i guess
so humbly i thank you for sharing your knowledge
 
#9
CSV File Link not Always Working Programmatically

GentleMen,

According to Upper Written Post Of brother rohitoberoi6592 I tried it progammatically
i am using c# 2005. if the dates are filled correctly First Webrequest works correctly always but when it comes to downloading csv file it sometimes succeds and sometimes it does not what might i be doing wrong and i only
want data for "EQ" series therefore i appended EQ for series.I dont have problem of ports or firewalls.i have switched off firewal to test it

private void Download_Data_button_Click(object sender , EventArgs e)
{

FromDate_prop = FromDate_prop.Trim () ;
ToDate_prop = ToDate_prop.Trim () ;
ScripCodeToGetDataFor_prop = ScripCodeToGetDataFor_prop.Trim () ;

string RequestStr_1 = string.Format (

@"http://www.nseindia.com/marketinfo/equities/scripvol/histscrip.jsp?FromDate={0}&ToDate={1}&check=new&data-type=PriceVolumeDeliverable&inputtext={2}&ser=return+document.scripform.series.options[document.scripform.series.selectedIndex].value&series=EQ"
, FromDate_prop
, ToDate_prop
, ScripCodeToGetDataFor_prop
) ;

string RequestStr_2 = string.Format (

@"http://www.nseindia.com/content/equities/scripvol/datafiles/{0}-TO-{1}{2}EQN.csv"
,FromDate_prop
,ToDate_prop
,ScripCodeToGetDataFor_prop

) ;

WebRequest Request_1 = WebRequest.Create( RequestStr_1 ) ;

Request_1.Proxy = WebRequest.DefaultWebProxy;

HttpWebResponse Response_1 = (HttpWebResponse)Request_1.GetResponse() ;

System.IO.Stream Stream_1 = Response_1.GetResponseStream() ;
System.Text.Encoding Encoding_Obj_1 = System.Text.Encoding.GetEncoding( "utf-8" ) ;
System.IO.StreamReader Reader_1 = new System.IO.StreamReader( Stream_1, Encoding_Obj_1 ) ;

string Str_1 = Reader_1.ReadToEnd();

// up to this place it is always working

#region two

WebRequest Request_2 = WebRequest.Create( RequestStr_2 ) ;

Request_2.Proxy = WebRequest.DefaultWebProxy;
// here it almost always gives error as 402 or 404 that Protocol error etc... but again sometimes it succeeds.i am confused
HttpWebResponse Response_2 = (HttpWebResponse)Request_2.GetResponse() ;

System.IO.Stream Stream_2 = Response_2.GetResponseStream() ;
System.Text.Encoding Encoding_Obj_2 = System.Text.Encoding.GetEncoding( "utf-8" ) ;
System.IO.StreamReader Reader_2 = new System.IO.StreamReader( Stream_2, Encoding_Obj_2 ) ;

string Str_2 = Reader_2.ReadToEnd();

Form fo1 = new Form () ;
fo1.Controls.Add ( new RichTextBox() ) ;
((RichTextBox )fo1.Controls[0]).Text = Str_2 ;
((RichTextBox )fo1.Controls[0]).Dock = DockStyle.Fill ;
((RichTextBox )fo1.Controls[0]).ScrollBars = RichTextBoxScrollBars.Both ;
fo1.Visible = true ;


#endregion

Response_1.Close () ;
Response_2.Close () ;
Reader_1.Dispose () ;
Reader_1.Close () ;
Reader_2.Dispose () ;
Reader_2.Close () ;
Stream_1.Close () ;
Stream_2.Close () ;


}

requesting a quick response Please

Thanking you
RIGHT_THEN
 

Similar threads