Reputation: 11
That is pretty much it. I need a .sql file with all the stock symbols and company names matched up for an autocomplete function I'm writing. ANYONE?
Upvotes: 1
Views: 6152
Reputation: 880
I use the python package pytickersymbols. The package offers an offline collection of stocks with metadata like google and yahoo symbols.
from pytickersymbols import PyTickerSymbols
stock_data = PyTickerSymbols()
nasdaq_stocks = list(stock_data.get_stocks_by_index('NASDAQ 100'))
sp500_stocks = list(stock_data.get_stocks_by_index('S&P 500'))
sp100_stocks = list(stock_data.get_stocks_by_index('S&P 100'))
In the repository, you can also find a YAML file which is maybe useful for a SQL file creation.
Upvotes: 1
Reputation: 1096
http://www.nasdaq.com/screening/company-list.aspx. This page contains company list from NASDAQ, AMEX and NYSE. You can then read in CSV data and store it as sql.
Upvotes: 1
Reputation: 6541
Take a look at the Company Fundamentals API at http://www.mergent.com/servius - should be pretty easy to extract the list from there.
Upvotes: 0
Reputation: 60413
Well i dont know about a downloadable .sql file but there are numerous free and paid API's you could use to get the data for import into your db. Check out this similar questions for some options: Stock ticker symbol lookup API
I think i would go this route and maybe run a background process that does an update from the API every now and then so that you always have all the symbols up to date.
Upvotes: 2