Skip to main content

Tastytrade API Python SDK

The Tastytrade API, which my Python module relies on, is currently in beta.

A Python client for the Tastytrade API, providing convenient access to Tastytrade's REST API for trading, account management, and more.

Installation

Install the package using pip:

pip install tastytrade-api

USAGE

Here's an example of how to use the Tastytrade API client:

from tastytrade_api.authentication import TastytradeAuth

username = "your_username"
password = "your_password"

# Initialize the authentication object
auth = TastytradeAuth(username, password)

# Log in to the API
auth_data = auth.login()

if auth_data:
    print("Successfully logged in!")
else:
    print("Failed to log in.")

# Validate the session
is_valid = auth.validate_session()

if is_valid:
    print("Session is valid.")
else:
    print("Session is invalid or expired.")

# Destroy the session (log out)
if auth.destroy_session():
    print("Successfully logged out.")
else:
    print("Failed to log out.")

Development

To run tests, first install the required development packages:

pip install -r requirements-dev.txt

Then, execute the tests using unittest:

python -m unittest discover

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for tastytrade-api 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tastytrade-api 1.1.2
File Size Uploaded Provenance Actions
tastytrade-api-1.1.2.tar.gz 17.1 kB Without provenance Details for tastytrade-api-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tastytrade-api 1.1.2
File Interpreter ABI Platform Actions
tastytrade_api-1.1.2-py3-none-any.whl Python 3 none any Details for tastytrade_api-1.1.2-py3-none-any.whl

Total release size: 38.6 kB

Release files / tastytrade-api-1.1.2.tar.gz

Download URL tastytrade-api-1.1.2.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
156954a8f414d3634d74f26a3ac6f905dda42894c52c0699b3aeb909ae24b158
BLAKE2b-256 checksum
How to use checksums
031d13a0f804903375fe77d2fd04a0e0f551bc798e30193301aeaf1036026f31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / tastytrade_api-1.1.2-py3-none-any.whl

Download URL tastytrade_api-1.1.2-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba87977ea492793eee9c7b54b487c8a714e689173d9af71bfc19c071d7a15e10
BLAKE2b-256 checksum
How to use checksums
30c6074524ae68c7b57d0ab4a4d0bd217d5dd8109eb89921e821bde1dc844d30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for tastytrade-api 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page