Giter Site home page Giter Site logo

kellyling80 / pytickersymbols Goto Github PK

View Code? Open in Web Editor NEW

This project forked from portfolioplus/pytickersymbols

0.0 0.0 0.0 520 KB

Fundamental stock data and yahoo/google ticker symbols for several indices.

License: MIT License

Python 100.00%

pytickersymbols's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.