Results 1 to 6 of 6

Thread: Yahoo Finance API

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Yahoo Finance API

    Hello,
    Could you please guide me on how to use the Yahoo Finance API through VB.NET, or is there any other code I can use to fetch today's stock price?
    Thanks
    Spirit
    Potential
    Ability

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: Yahoo Finance API

    All links I found are old and outdated, it seems the Yahoo Finance API is not active anymore:
    Important Update (2020)
    Yahoo Finance API is no longer available. The VBA code, explained in this blog, can no longer connect to Yahoo Finance API and is not working.
    Source:
    https://bsuite365.com/blog/excel/how...ata-excel-vba/

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Re: Yahoo Finance API

    Thanks for checking and your reply.

    All I need is share closing price for the day.

    I have find below another solution but vb.net return error for "GetWebResponse"

    ' Get the prices for this symbol.
    Private Function GetStockPrices(ByVal symbol As String) As _
    List(Of Single)
    ' Compose the URL.
    Dim url As String = _
    "http://www.google.com/finance/historical?output=csv&q=" _
    & symbol

    ' Get the result.
    ' Get the web response.
    Dim result As String = GetWebResponse(url)

    ' Get the historical prices.
    Dim lines() As String = result.Split( _
    New String() {vbCr, vbLf}, _
    StringSplitOptions.RemoveEmptyEntries)
    Dim prices As New List(Of Single)()

    ' Process the lines, skipping the header.
    For i As Integer = 1 To lines.Length - 1
    Dim line As String = lines(i)
    prices.Add(Single.Parse(line.Split(","c)(4)))
    Next i

    Return prices
    End Function

    https://stackoverflow.com/questions/...73378#78373378
    Spirit
    Potential
    Ability

  4. #4
    Frenzied Member
    Join Date
    Jul 2006
    Location
    MI
    Posts
    1,975

    Re: Yahoo Finance API

    I use Tiingo. It's very easy to use in VB.Net & the free plan has EOD pricing for every stock. You just have to sign up for an API code.

    https://www.tiingo.com/products/stock-api

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    9

    Re: Yahoo Finance API

    Quote Originally Posted by nbrege View Post
    I use Tiingo. It's very easy to use in VB.Net & the free plan has EOD pricing for every stock. You just have to sign up for an API code.

    https://www.tiingo.com/products/stock-api

    Thanks for the reply. Apologies for asking too much, I am new to VB.NET coding

    Just wondering if there is any code or project available where Tiingo has been used?

    Thanks
    Spirit
    Potential
    Ability

  6. #6
    Frenzied Member
    Join Date
    Jul 2006
    Location
    MI
    Posts
    1,975

    Re: Yahoo Finance API

    Quote Originally Posted by khawarqadri View Post
    Thanks for the reply. Apologies for asking too much, I am new to VB.NET coding

    Just wondering if there is any code or project available where Tiingo has been used?

    Thanks

    https://www.tiingo.com/documentation...x/integrations

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width