victorsantoss / yahoo-finance-managed

Automatically exported from code.google.com/p/yahoo-finance-managed
0 stars 0 forks source link

Google Feed #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Have you already planned to use Google?
the architecture is similar to yahoo ...
for hist data: 
http://www.google.com/finance/historical?q=CSCO&output=csv
...

Angel

Original issue reported on code.google.com by i...@advancedcomputing.ch on 26 Mar 2012 at 10:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
for realtime:
http://finance.google.com/finance/info?client=ig&q=NASDAQ:GOOG

and you can use YQl to query google:
select * from google.igoogle.stock where stock='ibm';

Original comment by i...@advancedcomputing.ch on 26 Mar 2012 at 10:56

GoogleCodeExporter commented 9 years ago

Original comment by Maas...@gmail.com on 28 Mar 2012 at 7:42

GoogleCodeExporter commented 9 years ago
currency converter:
http://www.google.com/finance/converter?a=1&from=EUR&to=USD

Original comment by i...@advancedcomputing.ch on 2 Apr 2012 at 3:08

GoogleCodeExporter commented 9 years ago
to dig for charts:

        Public Shared Function GetExternalChartIntraday(ByVal Item As String, ChartSize As ChartSize) As System.Drawing.Bitmap

            If LibraryCommon.DebuggingModeExternal Then Console.WriteLine("GetExternalChart, " & Item)

            Dim bmp As Bitmap = New Bitmap(16, 16)

            If Item Is Nothing Then
                Return Nothing
                Exit Function
            End If

            'do id conversion
            Dim GoogleId As String = GetGoogleIdFromYahooId(Item)

            Dim strURL As String = ""

            Select Case ChartSize
                Case Google.ChartSize.Medium
                    strURL = "https://www.google.com/finance/chart?tlf=12&q=" & GoogleId & "&ebp=1"
                Case Google.ChartSize.Small
                    strURL = "http://www.google.com/finance/chart?q=" & GoogleId & "&cht=s"
            End Select

            Dim wc As WebClient = New WebClient()
            Try
                wc.DownloadFile(strURL, Item & ".png")
            Catch ex As Exception
                If eQuotesLib.LibraryCommon.DebuggingModeErrors Then Console.WriteLine("LibraryExternalGet, GetExternalChartIntraday: " & ex.Message)
                Return Nothing
                Exit Function
            End Try

            Dim objBitmap As Bitmap = New Bitmap(Item & ".png")

            Return objBitmap
        End Function

        Public Shared Function GetExternalChart(ByVal Item As String, Period As Period, Value As Integer) As System.Drawing.Bitmap

            If LibraryCommon.DebuggingModeExternal Then Console.WriteLine("GetExternalChart, " & Item)

            Dim bmp As Bitmap = New Bitmap(16, 16)

            If Item Is Nothing Then
                Return Nothing
                Exit Function
            End If

            'do id conversion
            Dim GoogleId As String = GetGoogleIdFromYahooId(Item)

            Dim pType As String = "d"

            Select Case Period
                Case Google.Period.Days
                    pType = "d"
                Case Google.Period.Month
                    pType = "M"
                Case Google.Period.Years
                    pType = "Y"

            End Select

            Dim wc As WebClient = New WebClient()

            Try
                wc.DownloadFile("http://www.google.com/finance/getchart?q=" & GoogleId & "&p=" & Value & pType, Item & ".gif")
            Catch ex As Exception
                If eQuotesLib.LibraryCommon.DebuggingModeErrors Then Console.WriteLine("LibraryExternalGet, GetExternalChart: " & ex.Message)
                Return Nothing
                Exit Function
            End Try

            Dim objBitmap As Bitmap = New Bitmap(Item & ".gif")

            Return objBitmap
        End Function

Original comment by i...@advancedcomputing.ch on 3 Apr 2012 at 2:33

GoogleCodeExporter commented 9 years ago
Thx

Original comment by Maas...@gmail.com on 3 Apr 2012 at 3:02

GoogleCodeExporter commented 9 years ago
I've implemnted some functions, and tests for some providers:
regards /// Angel

Original comment by i...@advancedcomputing.ch on 3 Apr 2012 at 3:30

Attachments:

GoogleCodeExporter commented 9 years ago
for ticker related news:
http://www.google.com/finance/company_news?q=AAPL&output=rss

Original comment by i...@advancedcomputing.ch on 4 Apr 2012 at 9:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
financial: http://www.google.com/finance?q=CSCO&fstype=ii#
related company: http://www.google.com/finance/related?q=csco#

Original comment by i...@advancedcomputing.ch on 4 Apr 2012 at 12:35