Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yahoo! Finance API DOW [closed]

Until now, I've been using the INDU ticker to follow the DOW with the Yahoo! API. For whatever reason you were unable to directly follow ^dji ^djia or any other reasonable combination. Up until yesterday, INDU was working fine. However now I receive no data when requesting indu.

What other ticker can I use with the Yahoo! finance API that will return the DJIA?

like image 496
Peter Kazazes Avatar asked Sep 26 '11 00:09

Peter Kazazes


People also ask

Is Yahoo Finance API down?

Yahoo Finance API is Discontinued.

Is Yahoo Finance API real-time?

Yahoo Finance provides real-time streaming quotes for many exchanges. Real-time data is available during an exchange's market hours, and in some cases during pre-market and post-market hours. However, not all markets will stream in real-time.

Why is the Dow Jones falling?

The Dow (INDU) plunged after a key inflation report missed estimates and showed a higher-than-anticipated increase in the price of consumer goods, closing down 880 points for the day, or 2.5%. The S&P 500 shed 2.7% and the Nasdaq dropped about 3%.


5 Answers

This index is not available under any other name.

However, this problem was just a temporary glitch, now resolved by Yahoo. Unfortunately, their financial data availability is very flaky lately. E.g. data available on the web page, but CSV downloads give "N/A" for all fields, etc. There were similar incidents in recent months, with stock prices for random stocks given wrong values, and more.

So, if you're building a new service around these Yahoo services, be aware that:

  1. These services are not reliable.
  2. You're breaking Yahoo ToS, so there's nothing you can do if they are broken / not working, you cannot even complain to Yahoo in good faith. According to Yahoo (post by Yahoo Developer Network Community Manager Robyn Tippins on Yahoo developer forums):

    The reason for the lack of documentation is that we don't have a Finance API. It appears some have reverse engineered an API that they use to pull Finance data, but they are breaking our Terms of Service (no redistribution of Finance data) in doing this so I would encourage you to avoid using these webservices.

like image 129
haimg Avatar answered Oct 05 '22 15:10

haimg


The formula for the DJIA isn't very complicated. If you are still able to pull quotes from individual stocks, you could use your code to pull the prices of the existing 30 components of the DJIA, add them up and divide by the current divisor. Of course, this has several disadvantages.

  1. You need to make 30 requests instead of one.
  2. You will have to adjust the divisor if there is a stock-split.
  3. You will have to change the the queries when the components change.

The components of the DJIA are

AA AXP BA BAC CAT CSCO CVX DD DIS GE HD
HPQ IBM INTC JNJ JPM KFT KO MCD MMM MRK 
MSFT PFE PG T TRV UTX VZ WMT XOM

The current divisor is 0.132129493. The divisor changes whenever there is a stock split in on of the components. The components of the DOW changed 48 times from 1896-2009.

like image 27
David Nehme Avatar answered Oct 05 '22 15:10

David Nehme


It seems like Yahoo Finance does not support the web service to query ^DJI or INDU.

Check out this discussion:

http://developer.yahoo.com/forum/General-Discussion-at-YDN/Dow-Jones-Industrial-Average-Quote-Error/1317052217631-f9173931-04fd-4519-b1b3-efb65d7ff8fa/1317065435082

like image 34
dapumptu Avatar answered Oct 05 '22 14:10

dapumptu


Assuming that your application does not need to be real time market data (to the second), you can use the RAW data that is provided to build the interactive graph on yahoo. This data is comma separated and updates about once every minute. The downside: it will include all the data from the trading day. The time given is in Unix time so a conversion would be needed. I tried this out for the ticker symbols you listed and the only one I was able to get data with was ^dji. Hopefully this is what you are looking for!

You can mess with the link and see what happens to the data. For example you can change the amount of days.

http://chartapi.finance.yahoo.com/instrument/1.0/%5Edji/chartdata;type=quote;range=1d/csv/

like image 24
Mberger Avatar answered Oct 05 '22 15:10

Mberger


I think Yahoo Finance All Currencies quote API Documentation will help you.

I found a Yahoo forum answer that says we cannot download CSV data for ^DJI.

Check also YQL console. This console will fetch values in JSON format.

like image 38
Prasanth Avatar answered Oct 05 '22 15:10

Prasanth