Skip to main content

A Python client and SDK for the Tastytrade API

Project description

Tastytrade API

The Tastytrade API, which my Python module relies on, is currently in beta and not yet publicly accessible. As a result, you may not be able to test the functionality of this module until the API becomes available for public use.

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.

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

tastytrade-api-0.8.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

tastytrade_api-0.8.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file tastytrade-api-0.8.0.tar.gz.

File metadata

  • Download URL: tastytrade-api-0.8.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for tastytrade-api-0.8.0.tar.gz
Algorithm Hash digest
SHA256 89aca6834af10e640eb1f4d6c0252713298298cedefb27e3f053fc41ca178733
MD5 424e6a4f7eef76b068b20343ec5c60cb
BLAKE2b-256 01803f549325b0ab6985702264e30f328f3348135e90191c876d94461390746f

See more details on using hashes here.

File details

Details for the file tastytrade_api-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tastytrade_api-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3b1865f2589608b09c1c0b48b55a912ff2220fe12a4768ee9b251f4196ea9a6
MD5 d57a7e289b431ee1874aeb50124b496f
BLAKE2b-256 0fa4892c13fdfd6d355b8d9839f0ed8e633f1c0707843aa1ce58589757167bb4

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