skillfed

tastytrade

An unofficial, typed, asynchronous Python SDK for Tastytrade!

tastytrade v13.2.3 90.0K downloads/30d#13,625 on PyPI255
Permissive license MIT License Copyright (c) 2021 Graeme Holliday Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

Tastytrade is an unofficial, fully-typed asynchronous SDK for Tastytrade's trading API built on top of anyio, httpx2, pydantic, and pandas-market-calendars. It provides a high-level Python interface to authenticate, stream real-time market data via websockets, query account positions, and place orders—reducing boilerplate significantly compared to calling the API directly. The package uses Pydantic models to validate and type all JSON responses, includes utility functions for timezone handling and futures expiration dates, and exposes a paper trading API for testing strategies without real capital.

The SDK is designed for developers building trading algorithms in Python. It handles session management, websocket lifecycle, and data deserialization so you can focus on strategy logic. The streamer component connects to dxfeed (Tastytrade's data provider) and supports subscriptions to quotes, greeks, and other market events. Orders are constructed from typed leg objects and can be validated via dry-run before execution.

Use it for:

  • Build and backtest options trading strategies using real-time greeks and quotes streamed via websocket.
  • Automate portfolio monitoring by fetching current positions and account metrics asynchronously.
  • Place limit and market orders programmatically with full buying-power and fee calculations.
  • Stream live bid-ask quotes and market data for multiple symbols simultaneously.
  • Test trading logic safely using the paper API before deploying to live accounts.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

An asynchronous Python SDK for Tastytrade's trading API that lets you build trading algorithms with typed models, websocket streaming, and order management.

Yes, if you trade on Tastytrade and want to automate strategies in Python. The package is actively maintained, has no known vulnerabilities, installs easily, and is MIT-licensed. It requires Python 3.11+ and OAuth setup with Tastytrade's API. The main constraint is that it is unofficial and carries no warranty—verify compatibility with your use case before deploying to live trading.

Install

tastytrade on PyPI

pip

pip install tastytrade

uv

uv add tastytrade

poetry

poetry add tastytrade

Installing tastytrade

Before you install

Low friction install with a pure-Python wheel. The package is actively maintained with a release 7 days ago, 255 repository stars, and a recent commit history. Requires Python 3.11 or later.

License in practice

MIT License permits commercial and private use with minimal restrictions—you may use, modify, and distribute the code freely provided you include the original copyright notice and license text.

Quickstart

pip install tastytrade

from tastytrade import Session, Account

session = Session('client_secret', 'refresh_token')
account = (await Account.get(session))[0]
positions = await account.get_positions(session)

Requires Python 3.11+. OAuth credentials (client_secret and refresh_token) must be set up with Tastytrade's API beforehand.

Verify before relying

  • Whether httpx2 is a typo or a real dependency distinct from httpx, and what it provides.
  • Whether the 95%+ unit test coverage claim is current for version 13.2.3.
  • Performance characteristics under high-frequency streaming or large option chains.

Package facts

License MIT License Copyright (c) 2021 Graeme Holliday Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 4 — anyio, httpx2, pandas-market-calendars, pydantic
Maintenance actively maintained — 7 days since the last release
Last repo commit
First released
Downloads 89,987/month — #13,625 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tastytrade-13.2.3-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: AnyIOFramework :: AsyncIOFramework :: TrioIntended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

tastytrade api python sdkasync trading algorithm frameworkwebsocket market data streamingoptions trading python librarytastytrade order placementreal-time quote streamingdxfeed data provider client
async-tradingfinancial-apiwebsocket-streaming

More Python Modules packages