I need how to log in Yahoo finance through VB.NET code to fetch the real time stock market data here I am posting some code through which I am download data from yahoo but this is not real time data only I will get real time data after log in to yahoo finance -
Imports System
-
Imports System.IO
-
Imports System.Net
-
Imports System.Text
-
-
Public Class Form1
-
-
-
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
-
-
Dim symbol As [String] = txtQuotes.Text
-
-
Dim request As HttpWebRequest
-
Dim response As HttpWebResponse = Nothing
-
Dim reader As StreamReader
-
-
Try
-
-
''request = WebRequest.Create("http://finance.yahoo.com/d/quotes.csv?s=Reliance.ns&f=sl1d1t1c1ohgv&e=.csv")
-
-
'request = WebRequest.Create("http://quote.yahoo.com/d/quotes.csv?s=Reliance.ns&f=sl1d1t1c1ohgv&e=.csv")
-
-
request = WebRequest.Create("http://finance.yahoo.com/d/quotes.csv?s=" & symbol & "&f=sl1d1t1c1ohgv&e=.csv")
-
request.Method = "POST"
-
' Get response
-
request.ContentType = "text/xml"
-
''request.Headers.Add("SOAPAction", "http://finance.yahoo.com/d/quotes.csv?s=Reliance.ns&f=sl1d1t1c1ohgv&e=.csv")
-
-
request.Headers.Add("SOAPAction", "http://finance.yahoo.com/d/quotes.csv?s=" & symbol & "&f=sl1d1t1c1ohgv&e=.csv")
-
-
'request.Headers.Add("SOAPAction", "http://quote.yahoo.com/d/quotes.csv?s=Reliance.ns&f=sl1d1t1c1ohgv&e=.csv")
-
response = DirectCast(request.GetResponse(), HttpWebResponse)
-
-
reader = New StreamReader(response.GetResponseStream())
-
txtOutput1.Text = (reader.ReadToEnd())
-
-
Finally
-
If Not response Is Nothing Then response.Close()
-
End Try
-
End Sub
-
-
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
-
Dim s As String() = txtOutput1.Text.Split(",")
-
Dim word As String
-
'Dim dv As DataGridViewRow
-
Dim dgvRow As New DataGridViewRow
-
For Each word In s
-
-
Dim dgvCell As DataGridViewCell
-
-
dgvCell = New DataGridViewTextBoxCell()
-
dgvCell.Value = word
-
-
dgvRow.Cells.Add(dgvCell)
-
'dg1.Columns.Add("Column Name", "Column Heading")
-
-
-
Next
-
dg1.Rows.Add(dgvRow)
-
-
End Sub
-
End Class
1 3229
Does your code actually log you into Yahoo for the real time data? As it stands, you're just reading (as you say), the static data - however, you're not actually doing anything with it.
Button1 does the connection and outputs the stream, Button3 looks to add data to a grid, but there is no connection between them.
I don't know if yahoo connects in the same way as gmail, but this may help (sorry, it's in C#, but easily ported over) http://www.all-the-johnsons.co.uk/csharp/email.html
PFJ
Sign in to post your reply or Sign up for a free account.
Similar topics
by: bryce21 |
last post by:
I'm trying to write a script that logs into Yahoo Fantasy Football.
Once logged in, I'll be able to grab stats and various other pieces of
info about our league. The problem I'm having deals with...
|
by: f |
last post by:
I am writing an app in which I need to get the stock quote from Yahoo.
Idealy, I will get a stream from Yahoo's web site and parse that as
string and display the information (price, PE, volumn...)....
|
by: dan roberts |
last post by:
Folks,
This is my first Python project so please bear with me. I need to
download data from Yahoo Finance in CSV format. The symbols are
provided in a text file, and the project details are...
|
by: joe_public34 |
last post by:
Hello all,
I'm trying to write a script to log into Yahoo! (mail, groups, etc),
but when I pass the full URL with all form elements via Python, I get
a resutling 400 - Bad Request page. When I...
|
by: Andrew |
last post by:
Hello, friends,
I am implementing web app security using asp.net 1.1, and I found the
following source code from Yahoo! Mail login page:
<form method="post"...
|
by: James |
last post by:
Is there a way to get a list of stock quotes from yahoo finance into you c#
application?
I looked on the yahoo finance page and cannot see a wsdl end point.
Can somebody please point me in the...
|
by: admin |
last post by:
biz.yahoo.com/prnews/070219/sfm012a.html?.v=1
Microsoft Corp. today released Microsoft® SQL Server 2005 SP2, an
update to its award-winning data management and analysis platform.
Customers can...
|
by: cmrodrig |
last post by:
For a long time, I've been looking for a solution to this error.
There are some reports to Yahoo support, but none could solve this problem.
It happens when we try to open Java charts on Yahoo...
|
by: =?Utf-8?B?Unlhbg==?= |
last post by:
Dear Sir/Madam,
When I try to login email account in Yahoo, the following message is
received in the next tab. Affterwards, the next tab ask me to re-enter the
login name and password, however,...
|
by: lucky che |
last post by:
i am new to curl .and i m trying to create create a script for my client to log into yahoo and click the confirmation link in emails.
but i am stuck witht he login process only
i made the code...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |