cgoldberg / ystockquote

Fetch stock quote data from Yahoo Finance
534 stars 181 forks source link

Market Index, DJI, does not pull data. Can work with NASDAQ, S & P 500 with proper URL encoding #41

Open irsx02 opened 8 years ago

irsx02 commented 8 years ago

Has anyone been able to get ystockquote to report Market Indices? For example, I tried plugging in DJI (Dow Jones,) IXIC (NASDAQ,) and GSPC (S&P 500) and I'm getting back N/A for any of the data.

What I have discovered is that if I used %5E (URL Encoding for the ^ symbol) I can pull NASDAQ and S&P 500.

tickerSymbol = ['%5EIXIC', '%5EGSPC']

Those two will work and correctly return me the NASDAQ and S&P, but I can't find the code for Dow Jones Industrial Average. I tried %5EDJI , %5EDJIA but it is not working.

Anyone run into this issue?