Skip to main content

market data from finance APIs and other publicy available sources

Project description

StockHero

Downloads

Download market data from finance APIs and other sources

It's an open-source tool that uses publicly available APIs and other sources, and is intended for research and educational purposes only. If you find a bug, try fix it yourself first.

The library was crafted by a Large Language Model, no programmer was hurt during the process

New Features in 0.4.21

  • some bug fixes

New Features planned for the next release

  • fix more "features" (bugs)

The Ticker module

The Ticker module, gets the financial data from nasdaq.com, morningstar.com as a pandas.DataFrame

import StockHero as stock
nvda = stock.Ticker('NVDA') # e.g. NVIDIA Corp
#or
nvda = stock.Ticker('US67066G1040') # e.g. NVIDIA Corp

''' Morningstar API '''
nvda.morningstar.quote                  # Quote
nvda.morningstar.key_statistics         # Key Statistics (combination of the ones below)
nvda.morningstar.growth_rev             # Growth - Revenue %
nvda.morningstar.growth_op_inc          # Growth - Operating Income %
nvda.morningstar.growth_net_inc         # Growth - Net Income %
nvda.morningstar.growth_eps             # Growth - EPS %

''' NASDAQ API '''
nvda.nasdaq.summ                        # Summary
nvda.nasdaq.div_hist                    # Dividend History
nvda.nasdaq.hist_quotes_stock           # Historical Quotes for Stocks
nvda.nasdaq.hist_quotes_etf             # Historical Quotes for ETFs
nvda.nasdaq.hist_nocp                   # Historical Nasdaq Official Closing Price (NOCP)
nvda.nasdaq.fin_income_statement_y      # Financials - Income Statement - Yearly
nvda.nasdaq.fin_balance_sheet_y         # Financials - Balance Sheet    - Yearly
nvda.nasdaq.fin_cash_flow_y             # Financials - Cash Flow        - Yearly
nvda.nasdaq.fin_fin_ratios_y            # Financials - Financial Ratios - Yearly
nvda.nasdaq.fin_income_statement_q      # Financials - Income Statement - Quarterly
nvda.nasdaq.fin_balance_sheet_q         # Financials - Balance Sheet    - Quarterly
nvda.nasdaq.fin_cash_flow_q             # Financials - Cash Flow        - Quarterly
nvda.nasdaq.fin_fin_ratios_q            # Financials - Financial Ratios - Quarterly
nvda.nasdaq.earn_date_eps               # Earnings Date - Earnings Per Share
nvda.nasdaq.earn_date_surprise          # Earnings Date - Quarterly Earnings Surprise Amount
nvda.nasdaq.yearly_earn_forecast        # Earnings Date - Yearly Earnings Forecast 
nvda.nasdaq.quarterly_earn_forecast     # Earnings Date - Quarterly Earnings Forecast 
nvda.nasdaq.pe_peg_forecast             # Price/Earnings, PEG Ratios, Growth Rates Forecast

The StockExchange module

The StockExchange module, gets the financial data from the NASDAQ Stock Screener
Added CNN Fear and Greed Index

import StockHero as stock
t = stock.StockExchange('something') # e.g. Nasdaq

''' NASDAQ API '''
t.nasdaq                              # Nasdaq Stock Market

''' CNN API '''
t.cnn_fear_and_greed                  # CNN Fear and Greed Index
t.cnn_fear_and_greed_graph_data       # CNN Fear and Greed Graph API

Combining both modules

You can combine both modules, for example

import StockHero as stock
t = stock.StockExchange('something')
df = t.nasdaq
ticker = df.loc[df['Name'].str.contains('NVIDIA'), 'Symbol'].values[0]
n = stock.Ticker(ticker)
n.morningstar_quote

Legal Stuff

StockHero is distributed under the Apache Software License

Any feedback or suggestions, let me know

Or in the words of Peter Thiel:

We wanted flying cars, instead we got 140 characters


### Versions

0.4.21 Bug Fixes
...
0.0.1 First Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stockhero-0.4.21.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

stockhero-0.4.21-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file stockhero-0.4.21.tar.gz.

File metadata

  • Download URL: stockhero-0.4.21.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for stockhero-0.4.21.tar.gz
Algorithm Hash digest
SHA256 450bdd1c8cf8824b59809ec17d5cddd0ca4b2eb77ef5e2ee8796b7cd0ad0201c
MD5 cf035d8f55ed1da0b4a311586ef4ee50
BLAKE2b-256 11714f00363c4a73dd078fd4c8f517a7f90b32bcda686d97e0b6a4ae4737ae4a

See more details on using hashes here.

File details

Details for the file stockhero-0.4.21-py3-none-any.whl.

File metadata

  • Download URL: stockhero-0.4.21-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for stockhero-0.4.21-py3-none-any.whl
Algorithm Hash digest
SHA256 2463e0f59e22008a60fa07eed8f3bdeac421fb976dfdd0b42e36ab8ee16abefe
MD5 23c425a27c68739ae9787fae3bc14350
BLAKE2b-256 e0a1ec437fff726ae93641792e3f9867385336bca6ee83f71ef19e460b5f1940

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