diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..4f18cf0 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: TDAAPI diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f9fe036 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: 'Report a bug ' +title: '' +labels: '' +assignees: '' + +--- + +## Please read the [bug submission guidelines](https://tda-api.readthedocs.io/en/latest/help.html) before submitting a bug. + +Not following guidelines may result in your bug being ignored and/or closed. + +**Description of Bug** + + +**Code to Reproduce** +Paste in the code that causes the bug to occur. + +IMPORTANT: Remember to anonymize your code. Be sure to replace API keys/Client IDs with placeholders. Also, never, ever share the contents of your token file. + +**Expected Behavior** + + +**Actual Behavior** + + +**Error/Exception Log, If Applicable** +See here to learn how to turn on debug logging: https://tda-api.readthedocs.io/en/latest/help.html diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/looking-for-help--.md b/.github/ISSUE_TEMPLATE/looking-for-help--.md new file mode 100644 index 0000000..3904fef --- /dev/null +++ b/.github/ISSUE_TEMPLATE/looking-for-help--.md @@ -0,0 +1,14 @@ +--- +name: 'Looking for Help? ' +about: 'Get help on our Discord server: https://discord.gg/M3vjtHj' +title: '' +labels: '' +assignees: '' + +--- + +Issues are not the place to ask for help. You can ask for help on our Discord server: + +https://discord.gg/M3vjtHj + +Issues filed asking for help will be ignored/closed. diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..f21957b --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,74 @@ +name: tests + +on: +- push +- pull_request + +jobs: + test: + strategy: + fail-fast: false + max-parallel: 3 + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + python: + - version: "3.8" + toxenv: py38 + - version: "3.9" + toxenv: py39 + - version: "3.10" + toxenv: py310 + - version: "3.11" + toxenv: py311 + - version: "3.12" + toxenv: py312 + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python.version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python.version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + pip install ".[dev]" + + - name: Test with tox ${{ matrix.python.toxenv }} + env: + TOXENV: ${{ matrix.python.toxenv }} + run: tox + + - name: Report coverage + if: matrix.python.version == '3.8' + run: | + coverage combine + coverage report + coverage xml + + - name: Upload coverage to Codecov + if: matrix.python.version == '3.8' + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + name: GitHub + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python.version }} + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[dev]" + - name: Build Docs + run: | + make -f Makefile.sphinx html diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..63a4e7b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,19 @@ +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/.empty b/docs/.empty new file mode 100644 index 0000000..e69de29 diff --git a/docs/_static/.empty b/docs/_static/.empty new file mode 100644 index 0000000..e69de29 diff --git a/docs/_static/attempted-unauth-access.png b/docs/_static/attempted-unauth-access.png new file mode 100644 index 0000000..64909f6 Binary files /dev/null and b/docs/_static/attempted-unauth-access.png differ diff --git a/docs/_static/discord-logo.png b/docs/_static/discord-logo.png new file mode 100644 index 0000000..e756933 Binary files /dev/null and b/docs/_static/discord-logo.png differ diff --git a/docs/_static/github-logo.png b/docs/_static/github-logo.png new file mode 100644 index 0000000..ea6ff54 Binary files /dev/null and b/docs/_static/github-logo.png differ diff --git a/docs/_static/patreon.png b/docs/_static/patreon.png new file mode 100644 index 0000000..9a8a85f Binary files /dev/null and b/docs/_static/patreon.png differ diff --git a/docs/_static/sp500.txt b/docs/_static/sp500.txt new file mode 100644 index 0000000..7945482 --- /dev/null +++ b/docs/_static/sp500.txt @@ -0,0 +1,504 @@ +A +AAL +AAP +AAPL +ABBV +ABC +ABMD +ABT +ACN +ADBE +ADI +ADM +ADP +ADS +ADSK +AEE +AEP +AES +AFL +AGN +AIG +AIV +AIZ +AJG +AKAM +ALB +ALGN +ALK +ALL +ALLE +ALXN +AMAT +AMCR +AMD +AME +AMGN +AMP +AMT +AMZN +ANET +ANSS +ANTM +AON +AOS +APA +APD +APH +APTV +ARE +ARNC +ATO +ATVI +AVB +AVGO +AVY +AWK +AXP +AZO +BA +BAC +BAX +BBY +BDX +BEN +BF.B +BIIB +BK +BKNG +BKR +BLK +BLL +BMY +BR +BRK.B +BSX +BWA +BXP +C +CAG +CAH +CAT +CB +CBRE +CCI +CCL +CDNS +CDW +CE +CERN +CF +CFG +CHD +CHRW +CHTR +CI +CINF +CL +CLX +CMA +CMCSA +CME +CMG +CMI +CMS +CNC +CNP +COF +COG +COO +COP +COST +COTY +CPB +CPRI +CPRT +CRM +CSCO +CSX +CTAS +CTL +CTSH +CTVA +CTXS +CVS +CVX +CXO +D +DAL +DD +DE +DFS +DG +DGX +DHI +DHR +DIS +DISCA +DISCK +DISH +DLR +DLTR +DOV +DOW +DRE +DRI +DTE +DUK +DVA +DVN +DXC +EA +EBAY +ECL +ED +EFX +EIX +EL +EMN +EMR +EOG +EQIX +EQR +ES +ESS +ETFC +ETN +ETR +EVRG +EW +EXC +EXPD +EXPE +EXR +F +FANG +FAST +FB +FBHS +FCX +FDX +FE +FFIV +FIS +FISV +FITB +FLIR +FLS +FLT +FMC +FOX +FOXA +FRC +FRT +FTI +FTNT +FTV +GD +GE +GILD +GIS +GL +GLW +GM +GOOG +GOOGL +GPC +GPN +GPS +GRMN +GS +GWW +HAL +HAS +HBAN +HBI +HCA +HD +HES +HFC +HIG +HII +HLT +HOG +HOLX +HON +HP +HPE +HPQ +HRB +HRL +HSIC +HST +HSY +HUM +IBM +ICE +IDXX +IEX +IFF +ILMN +INCY +INFO +INTC +INTU +IP +IPG +IPGP +IQV +IR +IRM +ISRG +IT +ITW +IVZ +J +JBHT +JCI +JKHY +JNJ +JNPR +JPM +JWN +K +KEY +KEYS +KHC +KIM +KLAC +KMB +KMI +KMX +KO +KR +KSS +KSU +L +LB +LDOS +LEG +LEN +LH +LHX +LIN +LKQ +LLY +LMT +LNC +LNT +LOW +LRCX +LUV +LVS +LW +LYB +LYV +M +MA +MAA +MAR +MAS +MCD +MCHP +MCK +MCO +MDLZ +MDT +MET +MGM +MHK +MKC +MKTX +MLM +MMC +MMM +MNST +MO +MOS +MPC +MRK +MRO +MS +MSCI +MSFT +MSI +MTB +MTD +MU +MXIM +MYL +NBL +NCLH +NDAQ +NEE +NEM +NFLX +NI +NKE +NLOK +NLSN +NOC +NOV +NOW +NRG +NSC +NTAP +NTRS +NUE +NVDA +NVR +NWL +NWS +NWSA +O +ODFL +OKE +OMC +ORCL +ORLY +OXY +PAYC +PAYX +PBCT +PCAR +PEAK +PEG +PEP +PFE +PFG +PG +PGR +PH +PHM +PKG +PKI +PLD +PM +PNC +PNR +PNW +PPG +PPL +PRGO +PRU +PSA +PSX +PVH +PWR +PXD +PYPL +QCOM +QRVO +RCL +RE +REG +REGN +RF +RHI +RJF +RL +RMD +ROK +ROL +ROP +ROST +RSG +RTN +SBAC +SBUX +SCHW +SEE +SHW +SIVB +SJM +SLB +SLG +SNA +SNPS +SO +SPG +SPGI +SRE +STE +STT +STX +STZ +SWK +SWKS +SYF +SYK +SYY +T +TAP +TDG +TEL +TFC +TFX +TGT +TIF +TJX +TMO +TMUS +TPR +TROW +TRV +TSCO +TSN +TT +TTWO +TWTR +TXN +TXT +UA +UAA +UAL +UDR +UHS +ULTA +UNH +UNM +UNP +UPS +URI +USB +UTX +V +VAR +VFC +VIAC +VLO +VMC +VNO +VRSK +VRSN +VRTX +VTR +VZ +WAB +WAT +WBA +WDC +WEC +WELL +WFC +WHR +WLTW +WM +WMB +WMT +WRB +WRK +WU +WY +WYNN +XEL +XLNX +XOM +XRAY +XRX +XYL +YUM +ZBH +ZBRA +ZION +ZTS diff --git a/docs/attempted-unauth-access.png b/docs/attempted-unauth-access.png new file mode 100644 index 0000000..64909f6 Binary files /dev/null and b/docs/attempted-unauth-access.png differ diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..72d9f6a --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,64 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('..')) + + +# -- Project information ----------------------------------------------------- + +project = 'schwab-py' +copyright = '2024, Alex Golec' +author = 'Alex Golec' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx_rtd_theme', +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + + +# Don't emit module names in autogenerated documentation. +add_module_names = True + +# Explicitly specify the master file because ReadTheDocs is running on Sphinx +# 1.8.5 +master_doc = 'index' + +autodoc_member_order = 'bysource' diff --git a/docs/discord-logo.png b/docs/discord-logo.png new file mode 100644 index 0000000..e756933 Binary files /dev/null and b/docs/discord-logo.png differ diff --git a/docs/github-logo.png b/docs/github-logo.png new file mode 100644 index 0000000..ea6ff54 Binary files /dev/null and b/docs/github-logo.png differ diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..cb3fde7 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,25 @@ +``schwab-py``: An Unofficial Charles Schwab API Client +====================================================== + +.. image:: _static/github-logo.png + :width: 40 + :target: https://github.com/alexgolec/tda-api + +.. image:: _static/patreon.png + :width: 110 + :target: https://www.patreon.com/TDAAPI + +.. image:: _static/discord-logo.png + :width: 50 + :target: https://discord.gg/M3vjtHj + + +This package is very much under construction. Please come back later. + + +**Disclaimer:** *schwab-py is an unofficial API wrapper. It is in no way +endorsed by or affiliated with Charles Schwab or any associated organization. +Make sure to read and understand the terms of service of the underlying API +before using this package. This authors accept no responsibility for any +damage that might stem from use of this package. See the LICENSE file for +more details.* diff --git a/docs/patreon.png b/docs/patreon.png new file mode 100644 index 0000000..9a8a85f Binary files /dev/null and b/docs/patreon.png differ diff --git a/docs/sp500.txt b/docs/sp500.txt new file mode 100644 index 0000000..7945482 --- /dev/null +++ b/docs/sp500.txt @@ -0,0 +1,504 @@ +A +AAL +AAP +AAPL +ABBV +ABC +ABMD +ABT +ACN +ADBE +ADI +ADM +ADP +ADS +ADSK +AEE +AEP +AES +AFL +AGN +AIG +AIV +AIZ +AJG +AKAM +ALB +ALGN +ALK +ALL +ALLE +ALXN +AMAT +AMCR +AMD +AME +AMGN +AMP +AMT +AMZN +ANET +ANSS +ANTM +AON +AOS +APA +APD +APH +APTV +ARE +ARNC +ATO +ATVI +AVB +AVGO +AVY +AWK +AXP +AZO +BA +BAC +BAX +BBY +BDX +BEN +BF.B +BIIB +BK +BKNG +BKR +BLK +BLL +BMY +BR +BRK.B +BSX +BWA +BXP +C +CAG +CAH +CAT +CB +CBRE +CCI +CCL +CDNS +CDW +CE +CERN +CF +CFG +CHD +CHRW +CHTR +CI +CINF +CL +CLX +CMA +CMCSA +CME +CMG +CMI +CMS +CNC +CNP +COF +COG +COO +COP +COST +COTY +CPB +CPRI +CPRT +CRM +CSCO +CSX +CTAS +CTL +CTSH +CTVA +CTXS +CVS +CVX +CXO +D +DAL +DD +DE +DFS +DG +DGX +DHI +DHR +DIS +DISCA +DISCK +DISH +DLR +DLTR +DOV +DOW +DRE +DRI +DTE +DUK +DVA +DVN +DXC +EA +EBAY +ECL +ED +EFX +EIX +EL +EMN +EMR +EOG +EQIX +EQR +ES +ESS +ETFC +ETN +ETR +EVRG +EW +EXC +EXPD +EXPE +EXR +F +FANG +FAST +FB +FBHS +FCX +FDX +FE +FFIV +FIS +FISV +FITB +FLIR +FLS +FLT +FMC +FOX +FOXA +FRC +FRT +FTI +FTNT +FTV +GD +GE +GILD +GIS +GL +GLW +GM +GOOG +GOOGL +GPC +GPN +GPS +GRMN +GS +GWW +HAL +HAS +HBAN +HBI +HCA +HD +HES +HFC +HIG +HII +HLT +HOG +HOLX +HON +HP +HPE +HPQ +HRB +HRL +HSIC +HST +HSY +HUM +IBM +ICE +IDXX +IEX +IFF +ILMN +INCY +INFO +INTC +INTU +IP +IPG +IPGP +IQV +IR +IRM +ISRG +IT +ITW +IVZ +J +JBHT +JCI +JKHY +JNJ +JNPR +JPM +JWN +K +KEY +KEYS +KHC +KIM +KLAC +KMB +KMI +KMX +KO +KR +KSS +KSU +L +LB +LDOS +LEG +LEN +LH +LHX +LIN +LKQ +LLY +LMT +LNC +LNT +LOW +LRCX +LUV +LVS +LW +LYB +LYV +M +MA +MAA +MAR +MAS +MCD +MCHP +MCK +MCO +MDLZ +MDT +MET +MGM +MHK +MKC +MKTX +MLM +MMC +MMM +MNST +MO +MOS +MPC +MRK +MRO +MS +MSCI +MSFT +MSI +MTB +MTD +MU +MXIM +MYL +NBL +NCLH +NDAQ +NEE +NEM +NFLX +NI +NKE +NLOK +NLSN +NOC +NOV +NOW +NRG +NSC +NTAP +NTRS +NUE +NVDA +NVR +NWL +NWS +NWSA +O +ODFL +OKE +OMC +ORCL +ORLY +OXY +PAYC +PAYX +PBCT +PCAR +PEAK +PEG +PEP +PFE +PFG +PG +PGR +PH +PHM +PKG +PKI +PLD +PM +PNC +PNR +PNW +PPG +PPL +PRGO +PRU +PSA +PSX +PVH +PWR +PXD +PYPL +QCOM +QRVO +RCL +RE +REG +REGN +RF +RHI +RJF +RL +RMD +ROK +ROL +ROP +ROST +RSG +RTN +SBAC +SBUX +SCHW +SEE +SHW +SIVB +SJM +SLB +SLG +SNA +SNPS +SO +SPG +SPGI +SRE +STE +STT +STX +STZ +SWK +SWKS +SYF +SYK +SYY +T +TAP +TDG +TEL +TFC +TFX +TGT +TIF +TJX +TMO +TMUS +TPR +TROW +TRV +TSCO +TSN +TT +TTWO +TWTR +TXN +TXT +UA +UAA +UAL +UDR +UHS +ULTA +UNH +UNM +UNP +UPS +URI +USB +UTX +V +VAR +VFC +VIAC +VLO +VMC +VNO +VRSK +VRSN +VRTX +VTR +VZ +WAB +WAT +WBA +WDC +WEC +WELL +WFC +WHR +WLTW +WM +WMB +WMT +WRB +WRK +WU +WY +WYNN +XEL +XLNX +XOM +XRAY +XRX +XYL +YUM +ZBH +ZBRA +ZION +ZTS