0

I am using a C# class to get the prices of a given stock from Google Finance. The communication between the class and the Web Service is working well.

I am using the following url: http://www.google.com/finance/historical?output=csv&q=BBAS3

The problem is that the returned prices are only from about 1 year ago. I need to get all the available prices records. If I search for stock ticker "BBAS3" in the Google webpage, it shows me a graph that goes until 2003.

As far I could find, there is no official documentation about the API. I found some more info in this site: Google's Undocumented Finance API

As it shows, I can use the following parameter: p - Period. (A number followed by a "d" or "Y", eg. Days or years. Ex: 40Y = 40 years.)

Then I tried (&p=5Y): http://www.google.com/finance/historical?output=csv&p=5Y&q=BBAS3

But the result was the same.

Does anyone knows another way to achieve what I need?

Mad River
  • 11
  • 5

1 Answers1

1

Google is changed Now. I've been playing around with the undocumented Google Finance API. It provides intra-day data for the past 10 days and day-granularity data going back for years. Handy!

There are lots of web pages that attempt to describe how this thing works. I've pulled together a bunch of data from them, as well as a few of my own observations. You can watch this thing in action by popping open FireBug while messing about on with the google finance chart. It will make AJAX requests to this API.

Here's an example URL to pull all historical data for GOOG at daily granularity: http://www.google.com/finance/getprices?q=GOOG&x=NASD&i=86400&p=40Y&f=d,c,v,k,o,h,l&df=cpct&auto=0&ei=Ef6XUYDfCqSTiAKEMg

Visit this Documentation

As You Search is Available at https://www.google.com/finance/getprices?q=BBAS3&x=BVMF

TarangP
  • 2,711
  • 5
  • 20
  • 41