A client for the TDA API
Project description
TDAmeritrade Client
A tool that links to the TDA API to perform requests.
Installation:
Run pip install tdameritrade-client
within a virtual environment
Usage
The package has two uses as of now:
- Run the oauth flow against a developer app.
- Use an access token to request account positions.
To get started, use the following code snippet:
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.
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
Built Distribution
File details
Details for the file tdameritrade-client-0.1.0.tar.gz
.
File metadata
- Download URL: tdameritrade-client-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.6.8 Linux/4.19.23-coreos-r1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69a4f3e15018979588bfd81e9af67ec0b08a8c295e7640065b2be8751ad1f6e |
|
MD5 | 7414294de24dce5c149845351d43c3e6 |
|
BLAKE2b-256 | 231fa758ef74c394847f64f997a7019c61df43c2662d6e581007783fc746bfcf |
File details
Details for the file tdameritrade_client-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: tdameritrade_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.11 CPython/3.6.8 Linux/4.19.23-coreos-r1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cfa2751723eb2fa31bac34e4fa8296c627ed52efc40f4b493442dc7c380e66 |
|
MD5 | 2569a256a4194ba8def11717df5f7aa5 |
|
BLAKE2b-256 | 3b07150e9b6a6da34432b9a7da93a6d0b0ddcfe46222ca4f0f00fb1fa9f428d2 |