Link to home
Start Free TrialLog in
Avatar of George
GeorgeFlag for Canada

asked on

How would I get stock quotes from Google Finance onto C#?

Dear Experts,

From Google Finance, I need to get the stocks quotes onto C# (and other information like the Fast Stochastic Oscillator K and D  etc..)
so I can run additional analysis...

How do I do that?

Thank you in advance

George
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Avatar of George

ASKER

Thank you Eric,

This is very close of what I need.
In your comments at the end of the article, you mentioned:

" In a perfect world, Yahoo would offer a WebService but none is available for now!"

Do you know if that has changed? are they providing a web service now?

Thank you in advance

George
No it doesn't.

I also have some code for Google Finance (http://emoreau.com/Entries/Articles/2014/01/Using-JsonNet.aspx):
Public Function GetQuote(ByVal pSymbols As String) As JArray
    'Creates the request URL for Google Finance
    Dim strURL As String = String.Format("https://www.google.com/finance/info?q={0}", pSymbols)
    Dim strJsonData As String = RequestWebData(strURL)

    'string returned by Google
    'remove unwanted characters
    strJsonData = strJsonData.Replace("// ", "")

    'in fact, the string returned is an array
    'Dim array As JArray = JArray.Parse(strJsonData)

    Return JArray.Parse(strJsonData)
End Function

Open in new window

Avatar of George

ASKER

Thank you Eric,

I read that google finance API is depricated..., is the method of getting the data on the snipped above requires that API?

Thank you in advance

George
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of George

ASKER

Thank you Eric,

It looks very promising,

I will try the method this afternoon and will open another thread if I find any issue,

Merci

George