MetaStock NSE Data downloader with VIX

murthymsr

Well-Known Member
Hey Everybody.

Have been reading up on this forum since the past few days as I just started learning technical analysis.

I'm an entrepreneur and software professional, so even though I'm a newbie at tech analysis,I can be of help here.

This is directed to the coder (xtalk) that made this app.

NSE is checking for the "Accept" and "Referer" header to block requests from your app.

I tested this in this manner using a http debugger

The url that your app tries to access is

http://www.nseindia.com/content/indices/ind_niftylist.csv

Now one can access that from a browser but your app gets sent a 403 forbidden response.

I wrote a few lines of code that are able to access this url successfully, so if you do the same, your app will work again :clap:

I would request you to implement the same into your app and give us guys an updated version ( I'm really looking forward to it..)


Codes in VB.net.. I would assume that if you are coding in c# you would find the equivalent


Code:
Sub getNSEData()
        Try

            objRequest = HttpWebRequest.Create("http://www.nseindia.com/content/indices/ind_niftylist.csv")


            With objRequest

                .UserAgent = "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10"
                .KeepAlive = False
                .Method = "GET"
                .AllowAutoRedirect = True
                '.Referer = "http://nseindia.com/marketinfo/companyinfo/companysearch.jsp?cons=HDFC&section=7"
                .CookieContainer = CC
                .Timeout = 60 * 1000
                .Headers.Add("Pragma", "no-cache")
                .Headers.Add("Cache-Control", "no-cache")


                .Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"


        

                .ServicePoint.Expect100Continue = False


            End With



           

            objResponse = objRequest.GetResponse()

           



            Dim sReader As New IO.StreamReader(objResponse.GetResponseStream)

            Dim HTML As String = sReader.ReadToEnd()


        Catch ex As Exception
           msgbox(ex.ToString())

        End Try

    End Sub
Please contact me in case you need help.. lets get this fixed :thumb:
Thanks to Novasoft for this piece of advice, which XTalk may look into.

XTalk is not visiting this forum regularly.
A link your post is made at XTalk's site at link as below.

http://xtalk.wordpress.com/2008/08/...e-bse-futures-eod-data-downloader/#comment-47

Wish Xtalk will respond soon.

Regards.
murthymsr
 
Guyz No use .. Application is best one but Programmer or developer not going top help in this as he not shown any presence from last few months .. Is any developer or coder who can update same program please help us ....
 
respected suganth kumar ji, thax for ur great help, please give us some more hand, is it possible that if we dont need future data series 1, series 2, series 3,. we need only bhavcopy and index data only. please update a separate dll as a patch, thax again. nifty46 (Dhiraj Sood)
 

Similar threads