Skip to main content

A client for the TDA API

Project description

pipeline status Documentation Statuscoverage report

TDAmeritrade Client

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

Read the docs.

Installation:

Run pip install tdameritrade-client within a virtual environment

Usage

The package has two uses as of now:

  1. Run the oauth flow against a developer app.
  2. 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


Download files

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

Source Distribution

tdameritrade-client-0.1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

tdameritrade_client-0.1.1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file tdameritrade-client-0.1.1.tar.gz.

File metadata

  • Download URL: tdameritrade-client-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 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

Hashes for tdameritrade-client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0e9749453ffe1ee4c73730cbd179a3b9814d6b903e646d527c7c64f8e423a456
MD5 7ac4ce44b08cab8c7f69622c73d33f31
BLAKE2b-256 2ae5b69103a1d807200352b8685b3bf9448b1b02bb015aa745369ba32e18ff41

See more details on using hashes here.

File details

Details for the file tdameritrade_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tdameritrade_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e70878d6396f0a5777e766c5796f3bf941aba6ddbd3f9ee375036cc92084f989
MD5 71bd40b444398bc0c549f20a44afb1a6
BLAKE2b-256 00c1a10bc9d4175ac57e1b271f6538320e85d875d8fc13dcd7e3ecfe0e3fb241

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page