tastytrade
An unofficial, typed, asynchronous Python SDK for Tastytrade!
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 tastytradeuv
uv add tastytradepoetry
poetry add tastytradeInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
fyers-apiv3Official Python client library for the Fyers…
permissive · top 15,000 on PyPI
python-binanceUnofficial Python wrapper for the Binance…
permissive · top 15,000 on PyPI
longbridgeLongbridge provides a Python SDK for accessing…
unclear · top 15,000 on PyPI
growwapiSDK for connecting to Groww's trading platform…
permissive · top 15,000 on PyPI
dhanhqPython client library for the Dhan trading API,…
permissive · top 15,000 on PyPI
tdxpyTdxPy provides a pure-Python interface to read…
permissive · top 15,000 on PyPI
massiveOfficial Python client for Massive's REST and…
permissive · top 15,000 on PyPI
tradingview-taRetrieves technical analysis indicators and…
permissive · top 15,000 on PyPI
polymarket-clientOfficial Python SDK for Polymarket that…
permissive · top 15,000 on PyPI
seeqPython SDK for interfacing with Seeq Server…
unclear · top 15,000 on PyPI