Possible Duplicate:
Where to download list of all common stocks traded on NYSE, NASDAQ and AMEX?

Is it possible to download a list of stocks that belong to a specific exchange (e.g. NASDAQ, AMEX, NYSE)? The tseries package has a function to download the price history of a stock, but how to get all the stocks of an exchange?

  • 2
    $\begingroup$ Related to: How can i see all available data series from quantmod package? and Downloading Yahoo stock prices in R $\endgroup$ Commented Aug 16, 2011 at 14:27
  • $\begingroup$ @Joshua I have seen the second link, it looks awesome, but it only works for NASDAQ, NYSE and AMEX. is there another function to downaload other exchanges? $\endgroup$
    – Dail
    Commented Aug 16, 2011 at 15:03
  • $\begingroup$ @Joshua is still TTR package broken in R-Cran? $\endgroup$
    – Dail
    Commented Aug 16, 2011 at 15:13
  • $\begingroup$ Unfortunately, TTR on CRAN is still broken. I don't know of a function to download symbols from any other exchanges. $\endgroup$ Commented Aug 16, 2011 at 15:23
  • $\begingroup$ JOshua i have seen i can use it for these three exchanges and i also can use TTR to get historical price from yahoo, right? $\endgroup$
    – Dail
    Commented Aug 16, 2011 at 16:05

1 Answer 1


I think you are confused about "markets". Of the three you listed, only NASDAQ is an exchange, the other two are information services. For the three major US exchanges, you go to: (NASDAQ, AMEX, NYSE):


Pick the one you are interested in and answer their silly robot barrier "puzzle" and download the csv file, in which the ticker symbol is the first column.

Edit: With TTR_0.20-3 from r-forge, the list appears more complete than with the prior version:

SYMs <- TTR::stockSymbols()
#Fetching AMEX symbols...
#Fetching NASDAQ symbols...
#Fetching NYSE symbols...

#   308   2820   3261 

Whereas the csv file from NASDAQ for NASDAQ had 2820 symbols. On the other hand the TTR authors may have eliminated some of the duplicates, warrants or outdated symbols.

  • 2
    $\begingroup$ TTR::stockSymbols does this for you. See the two links in my comment to the OP. $\endgroup$ Commented Aug 16, 2011 at 14:30
  • $\begingroup$ yes i think it too. Good! $\endgroup$
    – Dail
    Commented Aug 16, 2011 at 16:03
  • $\begingroup$ @Dwin: looks like you're using TTR_0.20-2. stockSymbols is broken in that version. I really need to push an update to CRAN. Also, it doesn't eliminate any symbols. $\endgroup$ Commented Aug 16, 2011 at 16:17
  • $\begingroup$ Yes. My system reported that as the current CRAN version. $\endgroup$
    – DWin
    Commented Aug 16, 2011 at 16:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.