Feb 13 2020

How to get RealTime stock price using yahoo finance – Stack Overflow, how to get stock quotes.

#How #to #get #stock #quotes

how to get stock quotes

Get via App Store Read this post in our app!

How to get RealTime stock price using yahoo finance

I have several requirement which are listed below.

  1. Get Real Time stock price without page refresh or ajax. (ie. yahoo finance, they get latest stock price without page refresh and ajax call)
  2. Get stock price from as much as stock market like BSE, NSC etc..

Right now using following code i am able to get stock price but either i have to refresh the page or call to ajax and in both case it take 20 to 30 seconds but in many finance site they can update price by each second without using ajax.

4 Answers

How to get stock quotes

well, in your approach, the stock price fetching is triggered by the client (the user’s browser). So there is no way to trigger it outside page refresh or AJAX.

However, your server could fetch those data, irrespective of users. Something like:

Backend and frontend servers can be the same server but with different processes.

check this web this may be what you want(Use it for realtime web application)

As far as google is concerned I am pretty sure that the API is deprecated and is not working anymore. you can probably use Yahoo finance api, They have api for csv downloads and via yql.

As far as realtime is conecrned, I suggest look at yahoo web services. Following is an example:,ITC.BO/quote?format=json If you do not provide format, it will return a XML.

How would you make it realtime without refreshing or Ajax?

You can create a pubsub model and make your application subscribe to your application, you will have to create this layer since the yahoo api is pull based and not push based. So you will need to pull stock quotes from yahoo and push them to your application. You can probably use JMS for java or sockets, whichever suits you.

How to get stock quotes

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: