开发者

I need a sql db that has all the stock symbols on the US market. ANYONE?

That is pretty much it. I need a .sql file with all the stock sym开发者_如何学JAVAbols and company names matched up for an autocomplete function I'm writing. ANYONE?


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.


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.


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.


Take a look at the Company Fundamentals API at http://www.mergent.com/servius - should be pretty easy to extract the list from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜