Metadata-Version: 2.1
Name: tdameritrade-client
Version: 0.3.2
Summary: A client for the TDA API
Home-page: https://gitlab.com/tdameritrade-tools/tdameritrade-client
Author: Joe Castagneri
Author-email: jcastagneri@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: environs (>=4.1,<5.0)
Requires-Dist: pyopenssl (>=19.0,<20.0)
Requires-Dist: requests (>=2.21,<3.0)
Project-URL: Documentation, https://tdameritrade-client.readthedocs.io/en/latest/?#
Project-URL: Repository, https://gitlab.com/tdameritrade-tools/tdameritrade-client
Description-Content-Type: text/markdown

[![Pipeline Status](https://gitlab.com/tdameritrade-tools/tdameritrade-client/badges/master/pipeline.svg)](https://gitlab.com/tdameritrade-tools/tdameritrade-client/commits/master) [![Documentation Status](https://readthedocs.org/projects/tdameritrade-client/badge/?version=latest)](https://tdameritrade-client.readthedocs.io/en/latest/?badge=latest) [![Coverage Report](https://gitlab.com/tdameritrade-tools/tdameritrade-client/badges/master/coverage.svg)](https://gitlab.com/tdameritrade-tools/tdameritrade-client/commits/master) [![PyPI Version](https://badge.fury.io/py/tdameritrade-client.svg)](https://badge.fury.io/py/tdameritrade-client)

# TDAmeritrade Client

A tool that links to the TDA API to perform requests.

Read the [docs](https://tdameritrade-client.readthedocs.io/en/latest/?#).

## Installation:
Run `pip install tdameritrade-client` within a virtual environment

## Basic Usage:
To get started, use the following code snippet:

``` python
from tdameritrade_client.client import TDClient

td_client = TDClient(acct_number=<your account number>,
                     oauth_user_id=<the id registered to the TD app you would like to authenticate with>,
                     redirect_uri=<the redirect URI registered to the TD app>,
                     token_path=<optional path to an existing access token>)
td_client.run_auth()
acct_info = td_client.get_positions()
```

## Tests
This package uses poetry, which can be installed by running:
```
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
```
To run the tests, first install the package by cloning the repo and running `poetry install` from the root of the
repository. Then, run `poetry run pytest tests/` from the root directory of this repository.

