Skip to main content

The lib provides ticker symbols for yahoo and google finance.

Project description

Release Build PyPI - Downloads Coverage Status Codacy Badge

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

https://github.com/portfolioplus/pytickersymbols/issues

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.49.tar.gz (83.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytickersymbols-1.8.49-py3-none-any.whl (84.8 kB view details)

Uploaded Python 3

File details

Details for the file pytickersymbols-1.8.49.tar.gz.

File metadata

  • Download URL: pytickersymbols-1.8.49.tar.gz
  • Upload date:
  • Size: 83.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pytickersymbols-1.8.49.tar.gz
Algorithm Hash digest
SHA256 b31b858babcd9800b00f2384c0443498832306c7d2c8182cb85e9e84ababa9d2
MD5 83c1347c5d025e69c7620a81b71ebaac
BLAKE2b-256 49115525e7709523df1f59e81abe8addcca7b132c929291682a1c2b26515d732

See more details on using hashes here.

File details

Details for the file pytickersymbols-1.8.49-py3-none-any.whl.

File metadata

  • Download URL: pytickersymbols-1.8.49-py3-none-any.whl
  • Upload date:
  • Size: 84.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pytickersymbols-1.8.49-py3-none-any.whl
Algorithm Hash digest
SHA256 9cab48b3dcfe47a30c7c27bfc8cde2a3a8dab36f539f0e3b8540d387f0cd07c8
MD5 f1e9b003d123ce965b155cc7d812a30d
BLAKE2b-256 80d2d306b5a06facbd66c927bb70f80df912e89b9265af4acc7560efc6f39049

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page