Download all stock symbol list of a market

FinanceStockGoogle Finance

Finance Problem Overview


I need to download in some way a list of all stock symbol of specified market.

I've found in this link ho can I do it someway.

It uses following link in order to retrieve stock list that statisfies some parameters:

https://www.google.com/finance?start=0&num=3000&q=%5B(exchange%20%3D%3D%20%22NASDAQ%22)%20%26%20(last_price%20%3E%200.1)%20%26%20(last_price%20%3C%201500)%5D&restype=company&noIL=1

I've modified the query removing contraints

https://www.google.com/finance?q=%5B%28exchange+%3D%3D+%22NASDAQ%22%29%5D

Now I have all stock list but in a web page that I must navigate.

Is there a way to obtain the full list in some standard format, like xml, json or whatever?

Finance Solutions


Solution 1 - Finance

Solution 2 - Finance

There does not seem to be a straight-forward way provided by Google or Yahoo finance portals to download the full list of tickers. One possible 'brute force' way to get it is to query their APIs for every possible combinations of letters and save only those that return valid results. As silly as it may seem there are people who actually do it (ie. check this: http://investexcel.net/all-yahoo-finance-stock-tickers/).

You can download lists of symbols from exchanges directly or 3rd party websites as suggested by @Eugene S and @Capn Sparrow, however if you intend to use it to fetch data from Google or Yahoo, you have to sometimes use prefixes or suffixes to make sure that you're getting the correct data. This is because some symbols may repeat between exchanges, so Google and Yahoo prepend or append exchange codes to the tickers in order to distinguish between them. Here's an example:

Company:  Vodafone
------------------
LSE symbol:    VOD
 in Google:    LON:VOD
 in Yahoo:     VOD.L
NASDAQ symbol: VOD
 in Google:    NASDAQ:VOD
 in Yahoo:     VOD

Solution 3 - Finance

You can download a list of symbols from here. You have an option to download the whole list directly into excel file. You will have to register though.

Solution 4 - Finance

This may be old, but... if you change the link in google stock list as below:

https://www.google.com/finance?q=%5B(exchange%20%3D%3D%20%22NASDAQ%22)%5D&restype=company&noIL=1&num=30000

  • note for the noIL=1&num=30000

It means, starting for row 1 to 30000. It shows all results in one page.

You may automate it using any language or just export the table to excel.

Hope it helps.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJepessenView Question on Stackoverflow
Solution 1 - FinanceCapn SparrowView Answer on Stackoverflow
Solution 2 - Financemac13kView Answer on Stackoverflow
Solution 3 - FinanceEugene SView Answer on Stackoverflow
Solution 4 - FinanceAlexandre AmorimView Answer on Stackoverflow