The lib provides ticker symbols for yahoo and google finance.
Project description
pytickersymbols
pytickersymbols provides access to google and yahoo ticker symbols for all stocks of the following indices:
- AEX
- BEL 20
- CAC 40
- DAX
- DOW JONES
- FTSE 100
- IBEX 35
- MDAX
- NASDAQ 100
- OMX Helsinki 15
- OMX Helsinki 25
- OMX Stockholm 30
- S&P 100
- S&P 500
- SDAX
- SMI
- TECDAX
- MOEX
install
pip install pytickersymbols
quick start
Get all countries, indices and industries as follows:
from pytickersymbols import PyTickerSymbols
stock_data = PyTickerSymbols()
countries = stock_data.get_all_countries()
indices = stock_data.get_all_indices()
industries = stock_data.get_all_industries()
You can select all stocks of an index as follows:
from pytickersymbols import PyTickerSymbols
stock_data = PyTickerSymbols()
german_stocks = stock_data.get_stocks_by_index('DAX')
uk_stocks = stock_data.get_stocks_by_index('FTSE 100')
print(list(uk_stocks))
If you are only interested in ticker symbols, then you should have a look at the following lines:
from pytickersymbols import PyTickerSymbols
stock_data = PyTickerSymbols()
# the naming conversation is get_{index_name}_{exchange_city}_{yahoo or google}_tickers
dax_google = stock_data.get_dax_frankfurt_google_tickers()
dax_yahoo = stock_data.get_dax_frankfurt_yahoo_tickers()
sp100_yahoo = stock_data.get_sp_100_nyc_yahoo_tickers()
sp500_google = stock_data.get_sp_500_nyc_google_tickers()
dow_yahoo = stock_data.get_dow_jones_nyc_yahoo_tickers()
# there are too many combination. Here is a complete list of all getters
all_ticker_getter_names = list(filter(
lambda x: (
x.endswith('_google_tickers') or x.endswith('_yahoo_tickers')
),
dir(stock_data),
))
print(all_ticker_getter_names)
issue tracker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytickersymbols-1.8.64.tar.gz
(83.7 kB
view hashes)
Built Distribution
Close
Hashes for pytickersymbols-1.8.64-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 246432f578da18075fc847936bc15a664618ee515f9269e0e25a696a93264c4a |
|
MD5 | bf098cb9e66e2e764f9b0e638ab3d461 |
|
BLAKE2b-256 | ef49b194fa9cf510ae189e68ba2f241227abead99cc6fb902a19776b807dae9b |