# Table of Contents - [tastytrade 11.1.0 documentation](#tastytrade-11-1-0-documentation) - [tastytrade 11.1.0 documentation](#tastytrade-11-1-0-documentation) - [Tastytrade Python SDK — tastytrade 9.8 documentation](#tastytrade-python-sdk-tastytrade-9-8-documentation) - [Tastytrade Python SDK — tastytrade 9.10 documentation](#tastytrade-python-sdk-tastytrade-9-10-documentation) - [Tastytrade Python SDK — tastytrade 9.7 documentation](#tastytrade-python-sdk-tastytrade-9-7-documentation) - [Tastytrade Python SDK — tastytrade 10.0.0 documentation](#tastytrade-python-sdk-tastytrade-10-0-0-documentation) - [Tastytrade Python SDK — tastytrade 9.9 documentation](#tastytrade-python-sdk-tastytrade-9-9-documentation) - [tastytrade 11.0.0 documentation](#tastytrade-11-0-0-documentation) - [tastytrade 11.0.3 documentation](#tastytrade-11-0-3-documentation) - [Tastytrade Python SDK — tastytrade 9.6 documentation](#tastytrade-python-sdk-tastytrade-9-6-documentation) - [tastytrade 11.0.2 documentation](#tastytrade-11-0-2-documentation) - [tastytrade 11.0.4 documentation](#tastytrade-11-0-4-documentation) - [tastytrade 10.2.2 documentation](#tastytrade-10-2-2-documentation) - [tastytrade 10.2.0 documentation](#tastytrade-10-2-0-documentation) - [tastytrade 11.0.1 documentation](#tastytrade-11-0-1-documentation) - [tastytrade 10.1.0 documentation](#tastytrade-10-1-0-documentation) - [tastytrade 10.0.1 documentation](#tastytrade-10-0-1-documentation) - [tastytrade 11.0.5 documentation](#tastytrade-11-0-5-documentation) - [tastytrade 10.1.1 documentation](#tastytrade-10-1-1-documentation) - [tastytrade 10.3.0 documentation](#tastytrade-10-3-0-documentation) - [tastytrade 10.2.1 documentation](#tastytrade-10-2-1-documentation) - [tastytrade 10.2.3 documentation](#tastytrade-10-2-3-documentation) - [Sessions - tastytrade 11.1.0 documentation](#sessions-tastytrade-11-1-0-documentation) - [sync/async - tastytrade 11.1.0 documentation](#sync-async-tastytrade-11-1-0-documentation) - [Installation - tastytrade 11.1.0 documentation](#installation-tastytrade-11-1-0-documentation) - [Accounts - tastytrade 11.1.0 documentation](#accounts-tastytrade-11-1-0-documentation) - [Orders - tastytrade 11.1.0 documentation](#orders-tastytrade-11-1-0-documentation) - [Instruments - tastytrade 11.1.0 documentation](#instruments-tastytrade-11-1-0-documentation) - [Account Streamer - tastytrade 11.1.0 documentation](#account-streamer-tastytrade-11-1-0-documentation) - [Watchlists - tastytrade 11.1.0 documentation](#watchlists-tastytrade-11-1-0-documentation) - [Data Streamer - tastytrade 11.1.0 documentation](#data-streamer-tastytrade-11-1-0-documentation) - [Market Data - tastytrade 11.1.0 documentation](#market-data-tastytrade-11-1-0-documentation) - [Market Sessions - tastytrade 11.1.0 documentation](#market-sessions-tastytrade-11-1-0-documentation) - [Installation — tastytrade 9.10 documentation](#installation-tastytrade-9-10-documentation) - [Installation — tastytrade 10.0.0 documentation](#installation-tastytrade-10-0-0-documentation) - [Installation — tastytrade 9.9 documentation](#installation-tastytrade-9-9-documentation) - [tastytrade.search - tastytrade 11.1.0 documentation](#tastytrade-search-tastytrade-11-1-0-documentation) - [Installation — tastytrade 9.7 documentation](#installation-tastytrade-9-7-documentation) - [Installation - tastytrade 11.0.5 documentation](#installation-tastytrade-11-0-5-documentation) - [Sessions — tastytrade 9.10 documentation](#sessions-tastytrade-9-10-documentation) - [Installation — tastytrade 9.8 documentation](#installation-tastytrade-9-8-documentation) - [Sessions — tastytrade 9.9 documentation](#sessions-tastytrade-9-9-documentation) - [Sessions — tastytrade 9.6 documentation](#sessions-tastytrade-9-6-documentation) - [Sessions — tastytrade 9.7 documentation](#sessions-tastytrade-9-7-documentation) - [tastytrade.market_sessions - tastytrade 11.1.0 documentation](#tastytrade-market-sessions-tastytrade-11-1-0-documentation) - [Sessions — tastytrade 10.0.0 documentation](#sessions-tastytrade-10-0-0-documentation) - [Sessions — tastytrade 9.8 documentation](#sessions-tastytrade-9-8-documentation) - [tastytrade.account - tastytrade 11.1.0 documentation](#tastytrade-account-tastytrade-11-1-0-documentation) - [Installation — tastytrade 9.6 documentation](#installation-tastytrade-9-6-documentation) - [sync/async — tastytrade 9.9 documentation](#sync-async-tastytrade-9-9-documentation) - [sync/async — tastytrade 9.10 documentation](#sync-async-tastytrade-9-10-documentation) - [sync/async — tastytrade 10.0.0 documentation](#sync-async-tastytrade-10-0-0-documentation) - [sync/async - tastytrade 11.1.0 documentation](#sync-async-tastytrade-11-1-0-documentation) - [Python Module Index - tastytrade 11.1.0 documentation](#python-module-index-tastytrade-11-1-0-documentation) - [Account Streamer - tastytrade 11.1.0 documentation](#account-streamer-tastytrade-11-1-0-documentation) - [Instruments - tastytrade 11.1.0 documentation](#instruments-tastytrade-11-1-0-documentation) - [Installation - tastytrade 11.0.2 documentation](#installation-tastytrade-11-0-2-documentation) - [Installation - tastytrade 11.0.1 documentation](#installation-tastytrade-11-0-1-documentation) - [Installation - tastytrade 10.0.1 documentation](#installation-tastytrade-10-0-1-documentation) - [Installation - tastytrade 10.2.0 documentation](#installation-tastytrade-10-2-0-documentation) - [Installation - tastytrade 10.1.0 documentation](#installation-tastytrade-10-1-0-documentation) - [Installation - tastytrade 10.1.1 documentation](#installation-tastytrade-10-1-1-documentation) - [Installation - tastytrade 11.1.0 documentation](#installation-tastytrade-11-1-0-documentation) - [Sessions - tastytrade 11.1.0 documentation](#sessions-tastytrade-11-1-0-documentation) - [Installation - tastytrade 11.0.4 documentation](#installation-tastytrade-11-0-4-documentation) - [Installation - tastytrade 11.0.3 documentation](#installation-tastytrade-11-0-3-documentation) - [Installation - tastytrade 11.0.0 documentation](#installation-tastytrade-11-0-0-documentation) - [Sessions - tastytrade 11.0.5 documentation](#sessions-tastytrade-11-0-5-documentation) - [Installation - tastytrade 10.2.1 documentation](#installation-tastytrade-10-2-1-documentation) - [Installation - tastytrade 10.3.0 documentation](#installation-tastytrade-10-3-0-documentation) - [Installation - tastytrade 10.2.3 documentation](#installation-tastytrade-10-2-3-documentation) - [Installation - tastytrade 10.2.2 documentation](#installation-tastytrade-10-2-2-documentation) - [Sessions - tastytrade 11.0.3 documentation](#sessions-tastytrade-11-0-3-documentation) - [Sessions - tastytrade 11.0.4 documentation](#sessions-tastytrade-11-0-4-documentation) - [Sessions - tastytrade 11.0.1 documentation](#sessions-tastytrade-11-0-1-documentation) - [Sessions - tastytrade 11.0.2 documentation](#sessions-tastytrade-11-0-2-documentation) - [Market Data - tastytrade 11.1.0 documentation](#market-data-tastytrade-11-1-0-documentation) - [Sessions - tastytrade 10.3.0 documentation](#sessions-tastytrade-10-3-0-documentation) - [Sessions - tastytrade 10.2.1 documentation](#sessions-tastytrade-10-2-1-documentation) - [Sessions - tastytrade 11.0.0 documentation](#sessions-tastytrade-11-0-0-documentation) - [Data Streamer - tastytrade 11.1.0 documentation](#data-streamer-tastytrade-11-1-0-documentation) - [tastytrade 11.1.0 documentation](#tastytrade-11-1-0-documentation) - [Sessions - tastytrade 10.0.1 documentation](#sessions-tastytrade-10-0-1-documentation) - [Accounts - tastytrade 11.1.0 documentation](#accounts-tastytrade-11-1-0-documentation) - [tastytrade.market_data - tastytrade 11.1.0 documentation](#tastytrade-market-data-tastytrade-11-1-0-documentation) - [Sessions - tastytrade 10.2.3 documentation](#sessions-tastytrade-10-2-3-documentation) - [sync/async - tastytrade 11.0.0 documentation](#sync-async-tastytrade-11-0-0-documentation) - [sync/async - tastytrade 11.0.3 documentation](#sync-async-tastytrade-11-0-3-documentation) - [Orders - tastytrade 11.1.0 documentation](#orders-tastytrade-11-1-0-documentation) - [tastytrade.streamer - tastytrade 11.1.0 documentation](#tastytrade-streamer-tastytrade-11-1-0-documentation) - [Sessions - tastytrade 10.2.2 documentation](#sessions-tastytrade-10-2-2-documentation) - [sync/async - tastytrade 11.0.2 documentation](#sync-async-tastytrade-11-0-2-documentation) - [Watchlists - tastytrade 11.1.0 documentation](#watchlists-tastytrade-11-1-0-documentation) - [sync/async - tastytrade 11.0.1 documentation](#sync-async-tastytrade-11-0-1-documentation) - [sync/async - tastytrade 11.0.4 documentation](#sync-async-tastytrade-11-0-4-documentation) - [Market Sessions - tastytrade 11.1.0 documentation](#market-sessions-tastytrade-11-1-0-documentation) - [tastytrade.metrics - tastytrade 11.1.0 documentation](#tastytrade-metrics-tastytrade-11-1-0-documentation) - [Sessions - tastytrade 10.1.0 documentation](#sessions-tastytrade-10-1-0-documentation) - [Sessions - tastytrade 10.1.1 documentation](#sessions-tastytrade-10-1-1-documentation) - [sync/async - tastytrade 10.1.0 documentation](#sync-async-tastytrade-10-1-0-documentation) - [sync/async - tastytrade 11.0.5 documentation](#sync-async-tastytrade-11-0-5-documentation) - [sync/async - tastytrade 10.2.3 documentation](#sync-async-tastytrade-10-2-3-documentation) - [sync/async - tastytrade 10.3.0 documentation](#sync-async-tastytrade-10-3-0-documentation) - [sync/async - tastytrade 10.2.1 documentation](#sync-async-tastytrade-10-2-1-documentation) - [sync/async - tastytrade 10.2.0 documentation](#sync-async-tastytrade-10-2-0-documentation) - [sync/async - tastytrade 10.0.1 documentation](#sync-async-tastytrade-10-0-1-documentation) - [sync/async - tastytrade 10.2.2 documentation](#sync-async-tastytrade-10-2-2-documentation) - [sync/async - tastytrade 10.1.1 documentation](#sync-async-tastytrade-10-1-1-documentation) - [Sessions - tastytrade 10.2.0 documentation](#sessions-tastytrade-10-2-0-documentation) - [Accounts - tastytrade 11.0.1 documentation](#accounts-tastytrade-11-0-1-documentation) - [Accounts - tastytrade 11.0.4 documentation](#accounts-tastytrade-11-0-4-documentation) - [Accounts - tastytrade 11.0.2 documentation](#accounts-tastytrade-11-0-2-documentation) - [Index - tastytrade 11.1.0 documentation](#index-tastytrade-11-1-0-documentation) - [Accounts - tastytrade 11.0.3 documentation](#accounts-tastytrade-11-0-3-documentation) - [Accounts - tastytrade 11.0.5 documentation](#accounts-tastytrade-11-0-5-documentation) - [Accounts - tastytrade 10.3.0 documentation](#accounts-tastytrade-10-3-0-documentation) - [tastytrade.watchlists - tastytrade 11.1.0 documentation](#tastytrade-watchlists-tastytrade-11-1-0-documentation) - [tastytrade.session - tastytrade 11.1.0 documentation](#tastytrade-session-tastytrade-11-1-0-documentation) - [tastytrade.utils - tastytrade 11.1.0 documentation](#tastytrade-utils-tastytrade-11-1-0-documentation) --- # tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/latest/#tastytrade-python-sdk "Link to this heading") ======================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/latest/#indices-and-tables "Link to this heading") ================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/latest/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/latest/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/latest/search.html) Back to top --- # tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.1.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.1.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.1.0/search.html) Back to top --- # Tastytrade Python SDK — tastytrade 9.8 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.8/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v9.8/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v9.8/#tastytrade-python-sdk "Link to this heading") ====================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Do you use TradeStation? We’re building a [brand-new SDK](https://github.com/tastyware/tradestation) for TS users, with many of the same features! Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v9.8/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v9.8/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v9.8/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v9.8/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.8/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v9.8/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v9.8/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v9.8/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v9.8/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v9.8/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v9.8/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v9.8/orders.html#complex-orders) * [Notional market orders](https://tastyworks-api.readthedocs.io/en/v9.8/orders.html#notional-market-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v9.8/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.8/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.8/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v9.8/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.8/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v9.8/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.8/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.8/backtest.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.8/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.instruments) * [Metrics](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.8/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v9.8/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v9.8/#indices-and-tables "Link to this heading") ================================================================================================================ * [Index](https://tastyworks-api.readthedocs.io/en/v9.8/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v9.8/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v9.8/search.html) --- # Tastytrade Python SDK — tastytrade 9.10 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.10/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v9.10/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v9.10/#tastytrade-python-sdk "Link to this heading") ======================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Do you use TradeStation? We’re building a [brand-new SDK](https://github.com/tastyware/tradestation) for TS users, with many of the same features! Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v9.10/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v9.10/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v9.10/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v9.10/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.10/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v9.10/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v9.10/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v9.10/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v9.10/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v9.10/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v9.10/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v9.10/orders.html#complex-orders) * [Notional market orders](https://tastyworks-api.readthedocs.io/en/v9.10/orders.html#notional-market-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v9.10/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.10/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.10/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v9.10/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.10/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v9.10/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.10/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.10/backtest.html) * [Market Sessions](https://tastyworks-api.readthedocs.io/en/v9.10/market-sessions.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.10/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.instruments) * [Metrics](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.10/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v9.10/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v9.10/#indices-and-tables "Link to this heading") ================================================================================================================= * [Index](https://tastyworks-api.readthedocs.io/en/v9.10/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v9.10/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v9.10/search.html) --- # Tastytrade Python SDK — tastytrade 9.7 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.7/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v9.7/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v9.7/#tastytrade-python-sdk "Permalink to this heading") =========================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v9.7/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v9.7/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v9.7/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v9.7/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.7/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v9.7/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v9.7/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v9.7/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v9.7/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v9.7/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v9.7/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v9.7/orders.html#complex-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v9.7/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.7/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.7/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v9.7/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.7/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v9.7/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.7/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.7/backtest.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.7/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.instruments) * [Metrics](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.7/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v9.7/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v9.7/#indices-and-tables "Permalink to this heading") ===================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v9.7/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v9.7/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v9.7/search.html) --- # Tastytrade Python SDK — tastytrade 10.0.0 documentation * [](https://tastyworks-api.readthedocs.io/en/v10.0.0/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v10.0.0/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v10.0.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v10.0.0/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v10.0.0/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v10.0.0/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v10.0.0/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v10.0.0/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v10.0.0/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v10.0.0/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v10.0.0/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v10.0.0/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v10.0.0/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v10.0.0/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v10.0.0/orders.html#complex-orders) * [Notional market orders](https://tastyworks-api.readthedocs.io/en/v10.0.0/orders.html#notional-market-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v10.0.0/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v10.0.0/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v10.0.0/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v10.0.0/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v10.0.0/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v10.0.0/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v10.0.0/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v10.0.0/backtest.html) * [Market Sessions](https://tastyworks-api.readthedocs.io/en/v10.0.0/market-sessions.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v10.0.0/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.instruments) * [Market Sessions](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.market_sessions) * [Metrics](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v10.0.0/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v10.0.0/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v10.0.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.0.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.0.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.0.0/search.html) --- # Tastytrade Python SDK — tastytrade 9.9 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.9/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v9.9/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v9.9/#tastytrade-python-sdk "Link to this heading") ====================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Do you use TradeStation? We’re building a [brand-new SDK](https://github.com/tastyware/tradestation) for TS users, with many of the same features! Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v9.9/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v9.9/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v9.9/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v9.9/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.9/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v9.9/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v9.9/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v9.9/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v9.9/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v9.9/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v9.9/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v9.9/orders.html#complex-orders) * [Notional market orders](https://tastyworks-api.readthedocs.io/en/v9.9/orders.html#notional-market-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v9.9/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.9/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.9/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v9.9/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.9/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v9.9/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.9/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.9/backtest.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.9/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.instruments) * [Metrics](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.9/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v9.9/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v9.9/#indices-and-tables "Link to this heading") ================================================================================================================ * [Index](https://tastyworks-api.readthedocs.io/en/v9.9/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v9.9/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v9.9/search.html) --- # tastytrade 11.0.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.0/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.0/search.html) Back to top --- # tastytrade 11.0.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.3/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.3/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.3/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.3/search.html) Back to top --- # Tastytrade Python SDK — tastytrade 9.6 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.6/#) * Tastytrade Python SDK * [View page source](https://tastyworks-api.readthedocs.io/en/v9.6/_sources/index.rst.txt) * * * [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) Tastytrade Python SDK[](https://tastyworks-api.readthedocs.io/en/v9.6/#tastytrade-python-sdk "Permalink to this heading") =========================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Documentation: * [Installation](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html) * [Via pypi](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#via-pypi) * [From source](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#from-source) * [Windows](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#windows) * [Sessions](https://tastyworks-api.readthedocs.io/en/v9.6/sessions.html) * [Creating a session](https://tastyworks-api.readthedocs.io/en/v9.6/sessions.html#creating-a-session) * [sync/async](https://tastyworks-api.readthedocs.io/en/v9.6/sync-async.html) * [Accounts](https://tastyworks-api.readthedocs.io/en/v9.6/accounts.html) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.6/instruments.html) * [Initialization](https://tastyworks-api.readthedocs.io/en/v9.6/instruments.html#initialization) * [Options chains](https://tastyworks-api.readthedocs.io/en/v9.6/instruments.html#options-chains) * [Placing trades](https://tastyworks-api.readthedocs.io/en/v9.6/instruments.html#placing-trades) * [Orders](https://tastyworks-api.readthedocs.io/en/v9.6/orders.html) * [Placing an order](https://tastyworks-api.readthedocs.io/en/v9.6/orders.html#placing-an-order) * [Managing orders](https://tastyworks-api.readthedocs.io/en/v9.6/orders.html#managing-orders) * [Complex Orders](https://tastyworks-api.readthedocs.io/en/v9.6/orders.html#complex-orders) * [Account Streamer](https://tastyworks-api.readthedocs.io/en/v9.6/account-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.6/account-streamer.html#basic-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.6/account-streamer.html#retry-callback) * [Data Streamer](https://tastyworks-api.readthedocs.io/en/v9.6/data-streamer.html) * [Basic usage](https://tastyworks-api.readthedocs.io/en/v9.6/data-streamer.html#basic-usage) * [Advanced usage](https://tastyworks-api.readthedocs.io/en/v9.6/data-streamer.html#advanced-usage) * [Retry callback](https://tastyworks-api.readthedocs.io/en/v9.6/data-streamer.html#retry-callback) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.6/backtest.html) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.6/watchlists.html) SDK Reference: * [tastytrade](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html) * [Account](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.account) * [Backtesting](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.backtest) * [Instruments](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.instruments) * [Metrics](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.metrics) * [Order](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.order) * [Search](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.search) * [Session](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.session) * [Streamer](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.streamer) * [Utils](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.utils) * [Watchlists](https://tastyworks-api.readthedocs.io/en/v9.6/tastytrade.html#module-tastytrade.watchlists) * [tastytrade.dxfeed](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html) * [Event](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.event) * [Candle](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.candle) * [Greeks](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.greeks) * [Profile](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.profile) * [Quote](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.quote) * [Summary](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.summary) * [TimeAndSale](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [TheoPrice](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [Trade](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.trade) * [Underlying](https://tastyworks-api.readthedocs.io/en/v9.6/dxfeed.html#module-tastytrade.dxfeed.underlying) Indices and tables[](https://tastyworks-api.readthedocs.io/en/v9.6/#indices-and-tables "Permalink to this heading") ===================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v9.6/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v9.6/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v9.6/search.html) --- # tastytrade 11.0.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.2/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.2/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.2/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.2/search.html) Back to top --- # tastytrade 11.0.4 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.4/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.4/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.4/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.4/search.html) Back to top --- # tastytrade 10.2.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.2/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.2.2/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.2.2/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.2.2/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.2/#) --- # tastytrade 10.2.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.0/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.2.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.2.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.2.0/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.0/#) --- # tastytrade 11.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.1/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.1/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.1/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.1/search.html) Back to top --- # tastytrade 10.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.0/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.1.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.1.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.1.0/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.0/#) --- # tastytrade 10.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.0.1/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.0.1/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.0.1/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.0.1/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.0.1/#) --- # tastytrade 11.0.5 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.5/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v11.0.5/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v11.0.5/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v11.0.5/search.html) Back to top --- # tastytrade 10.1.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.1/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.1.1/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.1.1/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.1.1/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.1/#) --- # tastytrade 10.3.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.3.0/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.3.0/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.3.0/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.3.0/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.3.0/#) --- # tastytrade 10.2.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.1/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.2.1/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.2.1/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.2.1/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.1/#) --- # tastytrade 10.2.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.3/#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/#tastytrade-python-sdk "Link to this heading") ========================================================================================================================= A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/#indices-and-tables "Link to this heading") =================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/v10.2.3/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/v10.2.3/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/v10.2.3/search.html) [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.3/#) --- # Sessions - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/latest/sessions.html#sessions "Link to this heading") =========================================================================================================== Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/latest/sessions.html#creating-an-oauth-application "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/latest/sessions.html#generating-an-initial-refresh-token "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/latest/sessions.html#creating-a-session "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # sync/async - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/latest/sync-async.html#sync-async "Link to this heading") ================================================================================================================= After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # Installation - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/latest/installation.html#installation "Link to this heading") ======================================================================================================================= Via pypi[¶](https://tastyworks-api.readthedocs.io/en/latest/installation.html#via-pypi "Link to this heading") --------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/latest/installation.html#from-source "Link to this heading") --------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/latest/installation.html#windows "Link to this heading") ------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Accounts - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/latest/accounts.html#accounts "Link to this heading") =========================================================================================================== An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/latest/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/latest/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/latest/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Orders - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/orders.html#placing-an-order) [](https://github.com/tastyware/tastytrade/blob/master/docs/orders.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/orders.rst "View source of this page") Orders[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#orders "Link to this heading") ===================================================================================================== Placing an order[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#placing-an-order "Link to this heading") ------------------------------------------------------------------------------------------------------------------------- `from decimal import Decimal from tastytrade import Account from tastytrade.instruments import Equity from tastytrade.order import * account = Account.get(session, '5WX01234') symbol = Equity.get(session, 'USO') leg = symbol.build_leg(Decimal('5'), OrderAction.BUY_TO_OPEN) # buy to open 5 shares order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[leg], # you can have multiple legs in an order price=Decimal('-10') # limit price, $10/share debit for a total value of $50 ) response = account.place_order(session, order, dry_run=True) # a test order print(response)` `>>> PlacedOrderResponse(buying_power_effect=BuyingPowerEffect(change_in_margin_requirement=Decimal('125.0'), change_in_margin_requirement_effect=, change_in_buying_power=Decimal('125.004'), change_in_buying_power_effect=, current_buying_power=Decimal('1000.0'), current_buying_power_effect=, new_buying_power=Decimal('874.996'), new_buying_power_effect=, isolated_order_margin_requirement=Decimal('125.0'), isolated_order_margin_requirement_effect=, is_spread=False, impact=Decimal('125.004'), effect=), fee_calculation=FeeCalculation(regulatory_fees=Decimal('0.0'), regulatory_fees_effect=, clearing_fees=Decimal('0.004'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, total_fees=Decimal('0.004'), total_fees_effect=), order=PlacedOrder(account_number='5WV69754', time_in_force=, order_type=, size='5', underlying_symbol='USO', underlying_instrument_type=, status=, cancellable=True, editable=True, edited=False, updated_at=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='USO', action=, quantity=Decimal('5'), remaining_quantity=Decimal('5'), fills=[])], id=None, price=Decimal('50.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=None, cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=None, reject_reason=None, user_id=None, username=None, terminal_at=None, complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), complex_order=None, warnings=[Message(code='tif_next_valid_sesssion', message='Your order will begin working during next valid session.', preflight_id=None)], errors=None)` Notice the use of the `dry_run` parameter in the call to `place_order`. This is used to calculate the effects that an order would have on the account’s buying power and the fees that would be charged without actually placing the order. This is typically used to provide an order confirmation screen before sending the order. To send the order, pass `dry_run=False`, and the response will be populated with a `PlacedOrderResponse`, which contains information about the order and account. Also, rather than using an explicit credit/debit toggle like the Tastytrade platform, the SDK simply assumes negative numbers are debits and positive ones are credits. Managing orders[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#managing-orders "Link to this heading") ----------------------------------------------------------------------------------------------------------------------- Once we’ve placed an order, it’s often necessary to modify or cancel the order for a variety of reasons. Thankfully, this is easy and handled through the `Account` object: `previous_order.price = Decimal('-10.05') # let's pay more to get a fill! response = account.replace_order(session, previous_response.order.id, previous_order)` Cancelling an order is similar: `account.delete_order(session, placed_order.id)` Placed orders are assigned a status, like “Received”, “Cancelled”, or “Filled”. To watch for status changes in real time, you can use the [Account Streamer](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html) . To get current order status, you can just call `get_live_orders`. (The name is somewhat misleading! It returns not only live orders, but also cancelled and filled ones over the past 24 hours.) `orders = account.get_live_orders(session) print(orders)` `>>> [PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 559000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731648', price=Decimal('40.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 548000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 347000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 548000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=True, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 362000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731647', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 341000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 781000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 341000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 433000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731645', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 422000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 53, 203000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 422000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 844000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731381', price=Decimal('40.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 833000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 150000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 833000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=True, updated_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 183000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731380', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 145000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 5, 23, 46, 41, 647000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 145000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None)]` For less recent orders, we can get the full order history with `get_order_history`. Complex Orders[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#complex-orders "Link to this heading") --------------------------------------------------------------------------------------------------------------------- Tastytrade supports two kinds of complex orders, “OCO” and “OTOCO”, which are explained [here](https://support.tastyworks.com/support/solutions/articles/43000544221-bracket-orders) . To create an OTOCO order, you need an entry point order, a stop loss order, and a profit-taking order: `from decimal import Decimal from tastytrade.instruments import Equity from tastytrade.order import * symbol = Equity.get(session, 'AAPL') opening = symbol.build_leg(Decimal(1), OrderAction.BUY_TO_OPEN) # buy to open 1 share closing = symbol.build_leg(Decimal(1), OrderAction.SELL_TO_CLOSE) # sell to close 1 share otoco = NewComplexOrder( trigger_order=NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[opening], price=Decimal('-180') # open for $180 debit ), orders=[ NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.LIMIT, legs=[closing], price=Decimal('200') # take profits ), NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.STOP, legs=[closing], stop_trigger=Decimal('160') # stop loss ) ] ) resp = account.place_complex_order(session, otoco, dry_run=False)` An OCO order is similar, but has no trigger order. It’s used to add a profit-taking and a stop loss order to an existing position. Here’s an example, assuming the account already has an open position of 10 long shares of SPY: `symbol = Equity.get(session, 'SPY') closing = symbol.build_leg(Decimal(10), OrderAction.SELL_TO_CLOSE) # sell to close 10 shares oco = NewComplexOrder( orders=[ NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.LIMIT, legs=[closing], price=Decimal('4800'), # take profits price_effect=PriceEffect.CREDIT ), NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.STOP, legs=[closing], stop_trigger=Decimal('4000'), # stop loss price_effect=PriceEffect.CREDIT ) ] ) resp = account.place_complex_order(session, oco, dry_run=False)` Note that to cancel complex orders, you need to use the `delete_complex_order` function, NOT `delete_order`. Notional market orders[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#notional-market-orders "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------- Notional orders are slightly different from normal orders. Since the market will determine both the quantity and the price for you, you need to pass `value` instead of price, and pass `None` for the `quantity` parameter to `build_leg`. `symbol = Equity.get(session, 'AAPL') order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.NOTIONAL_MARKET, value=Decimal(-10), # $10 debit, this will result in fractional shares legs=[ symbol.build_leg(None, OrderAction.BUY_TO_OPEN), ] ) resp = account.place_order(session, order, dry_run=False)` Cryptocurrency market orders[¶](https://tastyworks-api.readthedocs.io/en/latest/orders.html#cryptocurrency-market-orders "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------- Cryptocurrency market orders should use the special `IOC` TIF: `order = NewOrder( time_in_force=OrderTimeInForce.IOC, order_type=OrderType.NOTIONAL_MARKET, value=-Decimal(100), # buy $100 of ETH legs=[ Leg( instrument_type=InstrumentType.CRYPTOCURRENCY, action=OrderAction.BUY_TO_OPEN, symbol="ETH/USD", ), ], )` Back to top --- # Instruments - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/instruments.html#initialization) [](https://github.com/tastyware/tastytrade/blob/master/docs/instruments.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/instruments.rst "View source of this page") Instruments[¶](https://tastyworks-api.readthedocs.io/en/latest/instruments.html#instruments "Link to this heading") ==================================================================================================================== In the Tastytrade API, an instrument is a tradeable object, such as a cryptocurrency, an option, an equity/ETF, futures, futures options, and warrants. The SDK makes it easy to fetch, trade, and perform various other operations for these instruments. Initialization[¶](https://tastyworks-api.readthedocs.io/en/latest/instruments.html#initialization "Link to this heading") -------------------------------------------------------------------------------------------------------------------------- Instruments follow a basic schema for initialization. To create an instrument(s), use the classmethods for the desired type of instrument: * `Cryptocurrency.get()` * `Equity.get()` * `Future.get()` * `Option.get()` * `FutureOption.get()` These functions take the session object as the first parameter, and the symbol (or list of symbols) as the second. Note that ETFs and indices are treated as equities for the purposes of the API. `from tastytrade.instruments import Equity, FutureOption equities = Equity.get(session, ['SPY', 'AAPL']) print(equities[0].is_etf, equities[0].description) future_option = FutureOption.get(session, './GCJ4 OG4G4 240223P1915') print(future_option.exchange)` `>>> (False, 'APPLE INC') >>> 'CME'` The different instruments have a host of properties that will be automatically populated with their associated values upon initialization. You can explore these properties in depth in the “SDK Reference” section. Options chains[¶](https://tastyworks-api.readthedocs.io/en/latest/instruments.html#options-chains "Link to this heading") -------------------------------------------------------------------------------------------------------------------------- The symbol structure for options and futures options is somewhat complex, so you can use `get_option_chain()` and `get_future_option_chain()` to get the instruments for a specific underlying as explained below. `from tastytrade.instruments import get_option_chain, get_future_option_chain from tastytrade.utils import get_tasty_monthly chain = get_option_chain(session, 'SPLG') exp = get_tasty_monthly() # 45 DTE expiration! print(chain[exp][0]) future_chain = get_future_option_chain(session, '/MCL') print(future_chain.keys()) # print all expirations` `>>> instrument_type= symbol='SPLG 240315C00024000' active=True strike_price=Decimal('24.0') root_symbol='SPLG' underlying_symbol='SPLG' expiration_date=datetime.date(2024, 3, 15) exercise_style='American' shares_per_contract=100 option_type= option_chain_type='Standard' expiration_type='Regular' settlement_type='PM' stops_trading_at=datetime.datetime(2024, 3, 15, 20, 0, tzinfo=datetime.timezone.utc) market_time_instrument_collection='Equity Option' days_to_expiration=38 expires_at=datetime.datetime(2024, 3, 15, 20, 0, tzinfo=datetime.timezone.utc) is_closing_only=False listed_market=None halted_at=None old_security_number=None streamer_symbol='.SPLG240315C24' >>> dict_keys([datetime.date(2024, 7, 17), datetime.date(2024, 6, 14), datetime.date(2024, 9, 17), datetime.date(2024, 11, 15), datetime.date(2024, 12, 16), datetime.date(2024, 2, 9), datetime.date(2024, 5, 16), datetime.date(2025, 1, 15), datetime.date(2024, 8, 15), datetime.date(2024, 2, 16), datetime.date(2024, 2, 14), datetime.date(2024, 10, 17), datetime.date(2024, 4, 17), datetime.date(2024, 3, 15)])` Alternatively, `NestedOptionChain` and `NestedFutureOptionChain` provide a structured way to fetch chain expirations and available strikes. `from tastytrade.instruments import NestedOptionChain chain = NestedOptionChain.get(session, 'SPY') print(chain.expirations[0].strikes[0])` `>>> Strike(strike_price=Decimal('437.0'), call='SPY 240417C00437000', put='SPY 240417P00437000', call_streamer_symbol='.SPY240417C437', put_streamer_symbol='.SPY240417P437')` Each expiration contains a list of these strikes, which have the associated put and call symbols that can then be used to fetch option objects via `Option.get_options()` or converted to dxfeed symbols for use with the streamer via `Option.occ_to_streamer_symbol()`. Placing trades[¶](https://tastyworks-api.readthedocs.io/en/latest/instruments.html#placing-trades "Link to this heading") -------------------------------------------------------------------------------------------------------------------------- Probably the most powerful tool available for instruments is the `build_leg()` function. This allows an instrument to be quickly converted into a tradeable ‘leg’, which by itself or together with other legs forms the basis for a trade. This makes placing new trades across a wide variety of instruments surprisingly simple: `from tastytrade.instruments import get_future_option_chain from tastytrade.order import * from datetime import date chain = get_future_option_chain(session, '/MCL') put = chain[date(2024, 3, 15)][286] call = chain[date(2024, 3, 15)][187] order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[ # two parameters: quantity and order action put.build_leg(Decimal(1), OrderAction.SELL_TO_OPEN), call.build_leg(Decimal(1), OrderAction.SELL_TO_OPEN) ], price=Decimal('1.25') # price is always per quantity, not total ) # assuming an initialized account account.place_order(session, order, dry_run=False)` That’s it! We just sold a micro crude oil futures strangle in a few lines of code. Note that price is per quantity, not the price for the entire order! So if the legs looked like this: `legs=[ put.build_leg(Decimal(2), OrderAction.SELL_TO_OPEN), call.build_leg(Decimal(2), OrderAction.SELL_TO_OPEN) ]` the price would still be `Decimal('1.25')`, and the total credit collected would be $2.50. This holds true for ratio spreads, so a 4:2 ratio spread should be priced as a 2:1 ratio spread. Back to top --- # Account Streamer - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html#basic-usage) [](https://github.com/tastyware/tastytrade/blob/master/docs/account-streamer.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/account-streamer.rst "View source of this page") Account Streamer[¶](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html#account-streamer "Link to this heading") =================================================================================================================================== Basic usage[¶](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html#basic-usage "Link to this heading") ------------------------------------------------------------------------------------------------------------------------- The account streamer is used to track account-level updates, such as order fills, watchlist updates and quote alerts. Typically, you’ll want a separate task running for the account streamer, which can then notify your application about important events. Here’s an example of setting up an account streamer to continuously wait for events and print them: `from tastytrade import Account, AlertStreamer, Watchlist async with AlertStreamer(session) as streamer: accounts = Account.get(session) # updates to balances, orders, and positions await streamer.subscribe_accounts(accounts) # changes in public watchlists await streamer.subscribe_public_watchlists() # quote alerts configured by the user await streamer.subscribe_quote_alerts() async for wl in streamer.listen(Watchlist): print(wl)` Probably the most important information the account streamer handles is order fills. We can listen just for orders like so: `from tastytrade.order import PlacedOrder async with AlertStreamer(session) as streamer: accounts = Account.get(session) await streamer.subscribe_accounts(accounts) async for order in streamer.listen(PlacedOrder): print(order)` Disconnect callback[¶](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html#disconnect-callback "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------------------- The disconnect callback can be used to run arbitrary code when the websocket connection has been disconnected. This is useful for notification purposes in your application when you need high availability. The callback function should look something like this: `async def disconnect_callback(streamer: AlertStreamer): print("Disconnected!")` The requirements are that the first parameter be the AlertStreamer instance, and the function should be asynchronous. This callback can then be used when creating the streamer: `async with AlertStreamer(session, disconnect_fn=disconnect_callback) as streamer: # ...` Retry callback[¶](https://tastyworks-api.readthedocs.io/en/latest/account-streamer.html#retry-callback "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------- The account streamer has a special “callback” function which can be used to execute arbitrary code whenever the websocket reconnects. This is useful for re-subscribing to whatever alerts you wanted to subscribe to initially (in fact, you can probably use the same function/code you use when initializing the connection). The callback function should look something like this: `async def reconnect_callback(streamer: AlertStreamer, arg1, arg2): await streamer.subscribe_quote_alerts()` The requirements are that the first parameter be the AlertStreamer instance, and the function should be asynchronous. Other than that, you have the flexibility to decide what arguments you want to use. This callback can then be used when creating the streamer: `async with AlertStreamer(session, reconnect_fn=reconnect_callback, reconnect_args=(arg1, arg2)) as streamer: # ...` The reconnection uses websockets’ exponential backoff algorithm, which can be configured through environment variables [here](https://websockets.readthedocs.io/en/14.1/reference/variables.html) . The difference between the disconnect and reconnect callbacks is that the disconnect will be called immediately when the connection is broken, whereas the reconnect callback will only be called once the connection is re-established. Back to top --- # Watchlists - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/watchlists.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/watchlists.rst "View source of this page") Watchlists[¶](https://tastyworks-api.readthedocs.io/en/latest/watchlists.html#watchlists "Link to this heading") ================================================================================================================= To use watchlists you’ll need a production session: `from tastytrade import Session session = Session(user, password)` Let’s fetch an existing watchlist: `from tastytrade import PrivateWatchlist watchlist = PrivateWatchlist.get(session, 'MyWatchlist') print(watchlist.watchlist_entries)` `>>> [{'symbol': 'AAPL', 'instrument-type': 'Equity'}, {'symbol': 'MSFT', 'instrument-type': 'Equity'}]` To add a symbol to the watchlist: `from tastytrade.instruments import InstrumentType watchlist.add_symbol('SPY', InstrumentType.EQUITY)` In this case, the symbol is present locally, but not remotely, so we need to update the remote list: `watchlist.update(session)` We can also create a new watchlist from scratch, then publish it to the Tastytrade server: `new_watchlist = PrivateWatchlist(name='NewWatchlist') new_watchlist.add_symbol('USO', InstrumentType.EQUITY) new_watchlist.upload(session)` You can also fetch public watchlists: `from tastytrade import PublicWatchlist public_watchlist = PublicWatchlist.get(session, "Tom's Watchlist") print(public_watchlist.watchlist_entries)` Back to top --- # Data Streamer - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#basic-usage) [](https://github.com/tastyware/tastytrade/blob/master/docs/data-streamer.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/data-streamer.rst "View source of this page") Data Streamer[¶](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#data-streamer "Link to this heading") ========================================================================================================================== Basic usage[¶](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#basic-usage "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- The streamer is a websocket connection to dxfeed (the Tastytrade data provider) that allows you to subscribe to real-time data for quotes, greeks, and more. You can create a streamer using an active production session: `from tastytrade import DXLinkStreamer streamer = await DXLinkStreamer(session)` Or, you can create a streamer using an asynchronous context manager: `from tastytrade import DXLinkStreamer async with DXLinkStreamer(session) as streamer: pass` Once you’ve created the streamer, you can subscribe/unsubscribe to events, like `Quote`: `from tastytrade.dxfeed import Quote subs_list = ['SPY'] # you can add more symbols here! async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Quote, subs_list) quotes = {} async for quote in streamer.listen(Quote): quotes[quote.event_symbol] = quote if len(quotes) >= len(subs_list): break print(quotes)` `>>> [{'SPY': Quote(event_symbol='SPY', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='Q', bid_price=411.58, bid_size=400.0, ask_time=0, ask_exchange_code='Q', ask_price=411.6, ask_size=1313.0), 'SPX': Quote(event_symbol='SPX', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='\x00', bid_price=4122.49, bid_size='NaN', ask_time=0, ask_exchange_code='\x00', ask_price=4123.65, ask_size='NaN')}]` Note that these are `asyncio` calls, so you’ll need to run this code asynchronously. Here’s an example: `import asyncio async def main(session): async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Quote, subs_list) quote = await streamer.get_event(Quote) print(quote) asyncio.run(main(session))` `>>> [Quote(event_symbol='SPY', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='Q', bid_price=411.58, bid_size=400.0, ask_time=0, ask_exchange_code='Q', ask_price=411.6, ask_size=1313.0), Quote(event_symbol='SPX', event_time=0, sequence=0, time_nanoPart=0, bid_time=0, bid_exchange_code='\x00', bid_price=4122.49, bid_size='NaN', ask_time=0, ask_exchange_code='\x00', ask_price=4123.65, ask_size='NaN')]` Alternatively, you can do testing in a Jupyter notebook, which allows you to make async calls directly, or run a python shell like this: python -m asyncio. We can also use the streamer to stream greeks for options symbols: `from tastytrade.dxfeed import Greeks from tastytrade.instruments import get_option_chain from tastytrade.utils import get_tasty_monthly chain = get_option_chain(session, 'SPLG') exp = get_tasty_monthly() # 45 DTE expiration! subs_list = [chain[exp][0].streamer_symbol] async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Greeks, subs_list) greeks = await streamer.get_event(Greeks) print(greeks)` `>>> [Greeks(event_symbol='.SPLG230616C23', event_time=0, event_flags=0, index=7235129486797176832, time=1684559855338, sequence=0, price=26.3380972233688, volatility=0.396983376650804, delta=0.999999999996191, gamma=4.81989763184255e-12, theta=-2.5212017514875e-12, rho=0.01834504287973133, vega=3.7003015672215e-12)]` Advanced usage[¶](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#advanced-usage "Link to this heading") ---------------------------------------------------------------------------------------------------------------------------- Since the streamer makes use of Python’s `asyncio` library, it’s not always straightforward to use; however, it’s very powerful. For example, we can use the streamer to create an option chain that will continuously update prices as new data arrives: ``import asyncio from datetime import date from dataclasses import dataclass from tastytrade import DXLinkStreamer from tastytrade.instruments import get_option_chain from tastytrade.dxfeed import Greeks, Quote from tastytrade.utils import today_in_new_york @dataclass class LivePrices: quotes: dict[str, Quote] greeks: dict[str, Greeks] streamer: DXLinkStreamer puts: list[Option] calls: list[Option] @classmethod async def create( cls, session: Session, symbol: str = 'SPY', expiration: date = today_in_new_york() ): chain = get_option_chain(session, symbol) options = [o for o in chain[expiration]] # the `streamer_symbol` property is the symbol used by the streamer streamer_symbols = [o.streamer_symbol for o in options] streamer = await DXLinkStreamer(session) # subscribe to quotes and greeks for all options on that date await streamer.subscribe(Quote, [symbol] + streamer_symbols) await streamer.subscribe(Greeks, streamer_symbols) puts = [o for o in options if o.option_type == OptionType.PUT] calls = [o for o in options if o.option_type == OptionType.CALL] self = cls({}, {}, streamer, puts, calls) t_listen_greeks = asyncio.create_task(self._update_greeks()) t_listen_quotes = asyncio.create_task(self._update_quotes()) asyncio.gather(t_listen_greeks, t_listen_quotes) # wait we have quotes and greeks for each option while len(self.greeks) != len(options) or len(self.quotes) != len(options): await asyncio.sleep(0.1) return self async def _update_greeks(self): async for e in self.streamer.listen(Greeks): self.greeks[e.event_symbol] = e async def _update_quotes(self): async for e in self.streamer.listen(Quote): self.quotes[e.event_symbol] = e`` Now, we can access the quotes and greeks at any time, and they’ll be up-to-date with the live prices from the streamer: `live_prices = await LivePrices.create(session, 'SPY', date(2023, 7, 21)) symbol = live_prices.calls[44].streamer_symbol print(live_prices.quotes[symbol], live_prices.greeks[symbol])` `>>> Quote(event_symbol='.SPY230721C387', event_time=0, sequence=0, time_nano_part=0, bid_time=1689365699000, bid_exchange_code='X', bid_price=62.01, bid_size=50.0, ask_time=1689365699000, ask_exchange_code='X', ask_price=62.83, ask_size=50.0) Greeks(event_symbol='.SPY230721C387', event_time=0, event_flags=0, index=7255910303911641088, time=1689398266363, sequence=0, price=62.6049270064687, volatility=0.536152815048564, delta=0.971506591907638, gamma=0.001814464566110275, theta=-0.1440768557397271, rho=0.0831882577866199, vega=0.0436861878838861)` Disconnect callback[¶](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#disconnect-callback "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------------- The disconnect callback can be used to run arbitrary code when the websocket connection has been disconnected. This is useful for notification purposes in your application when you need high availability. The callback function should look something like this: `async def disconnect_callback(streamer: DXLinkStreamer): print("Disconnected!")` The requirements are that the first parameter be the DXLinkStreamer instance, and the function should be asynchronous. This callback can then be used when creating the streamer: `async with DXLinkStreamer(session, disconnect_fn=disconnect_callback) as streamer: # ...` Retry callback[¶](https://tastyworks-api.readthedocs.io/en/latest/data-streamer.html#retry-callback "Link to this heading") ---------------------------------------------------------------------------------------------------------------------------- The data streamer has a special “callback” function which can be used to execute arbitrary code whenever the websocket reconnects. This is useful for re-subscribing to whatever events you wanted to subscribe to initially (in fact, you can probably use the same function/code you use when initializing the connection). The callback function should look something like this: `async def callback(streamer: DXLinkStreamer, arg1, arg2): await streamer.subscribe(Quote, ['SPY'])` The requirements are that the first parameter be the DXLinkStreamer instance, and the function should be asynchronous. Other than that, you have the flexibility to decide what arguments you want to use. This callback can then be used when creating the streamer: `async with DXLinkStreamer(session, reconnect_fn=callback, reconnect_args=(arg1, arg2)) as streamer: # ...` The reconnection uses websockets’ exponential backoff algorithm, which can be configured through environment variables [here](https://websockets.readthedocs.io/en/14.1/reference/variables.html) . Back to top --- # Market Data - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/market-data.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/market-data.rst "View source of this page") Market Data[¶](https://tastyworks-api.readthedocs.io/en/latest/market-data.html#market-data "Link to this heading") ==================================================================================================================== We’ve seen how the streamer can be used to get quotes continually throughout the day, which is very helpful. However, sometimes we just need to get data once, which makes setting up a streamer, subscribing to events, and listening for them more complex than need be. Fortunately, Tastytrade has endpoints that make fetching data for one-time use a breeze: `from tastytrade.market_data import get_market_data from tastytrade.order import InstrumentType data = get_market_data(session, "SPY", InstrumentType.EQUITY) print(data)` `>>> symbol='SPY' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 48, 84000, tzinfo=TzInfo(UTC)) bid_size=Decimal('2.0') ask_size=Decimal('4.0') mark=Decimal('549.96') close_price_type= prev_close=Decimal('550.64') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('550.0') beta=Decimal('1.009463163') bid=Decimal('549.9') close=Decimal('550.85') day_high_price=Decimal('553.55') day_low_price=Decimal('545.02') dividend_amount=Decimal('1.695528') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('606.41') last=Decimal('549.96') last_mkt=Decimal('550.85') low_limit_price=Decimal('496.16') mid=Decimal('549.95') open=Decimal('551.39') volume=Decimal('47417792.0') year_low_price=Decimal('481.8') year_high_price=Decimal('613.23')` You can also fetch data for multiple symbols at once: `from tastytrade.market_data import get_market_data_by_type data = get_market_data_by_type( session, indices=["SPX", "VIX"], cryptocurrencies=["ETH/USD", "BTC/USD"], equities=["SPLG", "SPY"], futures=["/MCLG6", "/MCLF6"], future_options=["./MCLM5MW2K5 250509C62.5", "./MCLM5MW2K5 250509P65.75"], options=["SPLG 250516C00048000", "SPLG 250516P00054000"], ) print(data)` `>>> [MarketData(symbol='SPLG 250516C00048000' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 5, 358000, tzinfo=TzInfo(UTC)) bid_size=Decimal('28.0') ask_size=Decimal('62.0') mark=Decimal('16.8') close_price_type= prev_close=Decimal('12.3') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 21) halt_start_time=-1 halt_end_time=-1 ask=Decimal('17.4') bid=Decimal('16.2') day_high_price=Decimal('12.99') day_low_price=Decimal('12.3') last=Decimal('12.3') last_mkt=Decimal('12.3') mid=Decimal('16.8') open=Decimal('12.99') volume=Decimal('4.0')), MarketData(symbol='BTC/USD' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 15, 630000, tzinfo=TzInfo(UTC)) bid_size=Decimal('0.222') mark=Decimal('94370.795') close_price_type= prev_close=Decimal('93797.555') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 27) halt_start_time=-1 halt_end_time=-1 ask=Decimal('94848.23') bid=Decimal('93893.36') day_high_price=Decimal('95581.855') day_low_price=Decimal('93476.925') last=Decimal('94388.57') last_mkt=Decimal('94370.8') mid=Decimal('94370.795') open=Decimal('93795.825') year_low_price=Decimal('49149.415') year_high_price=Decimal('109558.42')), MarketData(symbol='ETH/USD' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 40, 633000, tzinfo=TzInfo(UTC)) bid_size=Decimal('11.09900497') ask_size=Decimal('11.0') mark=Decimal('1786.455') close_price_type= prev_close=Decimal('1788.33') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 27) halt_start_time=-1 halt_end_time=-1 ask=Decimal('1795.59') bid=Decimal('1777.32') day_high_price=Decimal('1828.26') day_low_price=Decimal('1745.165') last=Decimal('1786.46') last_mkt=Decimal('1786.46') mid=Decimal('1786.455') open=Decimal('1788.345') year_low_price=Decimal('1384.31') year_high_price=Decimal('4109.98')), MarketData(symbol='VIX' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 20, 15, 1, 568000, tzinfo=TzInfo(UTC)) mark=Decimal('25.15') close_price_type= prev_close=Decimal('24.84') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 beta=Decimal('-6.538134414') day_high_price=Decimal('26.93') day_low_price=Decimal('24.7') last=Decimal('25.15') last_mkt=Decimal('25.15') open=Decimal('25.75') year_low_price=Decimal('10.62') year_high_price=Decimal('65.73')), MarketData(symbol='/MCLG6' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 40, 0, 903000, tzinfo=TzInfo(UTC)) mark=Decimal('59.44') close_price_type= prev_close=Decimal('59.87') prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 28) halt_start_time=-1 halt_end_time=-1 ask=Decimal('60.08') bid=Decimal('59.3') day_high_price=Decimal('60.3') day_low_price=Decimal('59.44') last=Decimal('59.44') last_mkt=Decimal('59.44') mid=Decimal('59.69') open=Decimal('60.3') volume=Decimal('5.0')), MarketData(symbol='/MCLF6' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 40, 0, 905000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('1.0') mark=Decimal('60.5') close_price_type= prev_close=Decimal('59.87') prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 28) halt_start_time=-1 halt_end_time=-1 ask=Decimal('62.18') bid=Decimal('57.0') day_high_price=Decimal('60.5') day_low_price=Decimal('59.9') last=Decimal('60.5') last_mkt=Decimal('60.5') mid=Decimal('59.59') open=Decimal('59.9') volume=Decimal('2.0')), MarketData(symbol='./MCLM5MW2K5 250509C62.5' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 2, 211000, tzinfo=TzInfo(UTC)) mark=Decimal('1.479701886') close_price_type= prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('2.19') bid=Decimal('0.91') mid=Decimal('1.55')), MarketData(symbol='SPX' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 20, 53, 27, 551000, tzinfo=TzInfo(UTC)) mark=Decimal('5509.565') close_price_type= prev_close=Decimal('5525.21') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('5576.76') beta=Decimal('1.0') bid=Decimal('5442.37') day_high_price=Decimal('5553.66') day_low_price=Decimal('5468.64') last=Decimal('5528.75') last_mkt=Decimal('5528.75') mid=Decimal('5509.565') open=Decimal('5529.22') year_low_price=Decimal('4835.04') year_high_price=Decimal('6147.43')), MarketData(symbol='SPLG 250516P00054000' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 31, 33, 779000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('11.0') mark=Decimal('0.075') close_price_type= prev_close=Decimal('0.1') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('0.1') bid=Decimal('0.05') close=Decimal('0.05') day_high_price=Decimal('0.1') day_low_price=Decimal('0.05') last=Decimal('0.05') last_mkt=Decimal('0.05') mid=Decimal('0.075') open=Decimal('0.1') volume=Decimal('2.0')), MarketData(symbol='SPY' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 48, 84000, tzinfo=TzInfo(UTC)) bid_size=Decimal('2.0') ask_size=Decimal('4.0') mark=Decimal('549.96') close_price_type= prev_close=Decimal('550.64') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('550.0') beta=Decimal('1.009463163') bid=Decimal('549.9') close=Decimal('550.85') day_high_price=Decimal('553.55') day_low_price=Decimal('545.02') dividend_amount=Decimal('1.695528') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('606.41') last=Decimal('549.96') last_mkt=Decimal('550.85') low_limit_price=Decimal('496.16') mid=Decimal('549.95') open=Decimal('551.39') volume=Decimal('47417792.0') year_low_price=Decimal('481.8') year_high_price=Decimal('613.23')), MarketData(symbol='SPLG' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 25, 333000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('1.0') mark=Decimal('64.73') close_price_type= prev_close=Decimal('64.74') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('64.75') beta=Decimal('1.008512722') bid=Decimal('64.68') close=Decimal('64.8') day_high_price=Decimal('65.1') day_low_price=Decimal('64.11') dividend_amount=Decimal('0.217412') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('71.34') last=Decimal('64.73') last_mkt=Decimal('64.8') low_limit_price=Decimal('58.37') mid=Decimal('64.715') open=Decimal('64.86') volume=Decimal('7159762.0') year_low_price=Decimal('56.6699') year_high_price=Decimal('72.14')), MarketData(symbol='./MCLM5MW2K5 250509P65.75' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 2, 58000, tzinfo=TzInfo(UTC)) mark=Decimal('4.26456101') close_price_type= prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('4.62') bid=Decimal('3.7') mid=Decimal('4.16'))]` Back to top --- # Market Sessions - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/market-sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/market-sessions.rst "View source of this page") Market Sessions[¶](https://tastyworks-api.readthedocs.io/en/latest/market-sessions.html#market-sessions "Link to this heading") ================================================================================================================================ A market time session object contains information about the current state of specific markets. It can be used to get the market opening and closing times and state. The dataclass represents the current session and any nested ‘next’ or ‘previous’ session info. The `get_market_sessions` function can be used to obtain information about the current session: `from tastytrade.market_sessions import ExchangeType, get_market_sessions get_market_sessions(session, exchanges=[ExchangeType.NYSE])` `>>> [MarketSession(close_at=None, close_at_ext=None, instrument_collection='Equity', open_at=None, start_at=None, next_session=MarketSessionSnapshot(close_at=datetime.datetime(2025, 2, 18, 21, 0, tzinfo=TzInfo(UTC)), close_at_ext=datetime.datetime(2025, 2, 19, 1, 0, tzinfo=TzInfo(UTC)), instrument_collection='Equity', open_at=datetime.datetime(2025, 2, 18, 14, 30, tzinfo=TzInfo(UTC)), session_date=datetime.date(2025, 2, 18), start_at=datetime.datetime(2025, 2, 18, 13, 15, tzinfo=TzInfo(UTC))), previous_session=MarketSessionSnapshot(close_at=datetime.datetime(2025, 2, 14, 21, 0, tzinfo=TzInfo(UTC)), close_at_ext=datetime.datetime(2025, 2, 15, 1, 0, tzinfo=TzInfo(UTC)), instrument_collection='Equity', open_at=datetime.datetime(2025, 2, 14, 14, 30, tzinfo=TzInfo(UTC)), session_date=datetime.date(2025, 2, 14), start_at=datetime.datetime(2025, 2, 14, 13, 15, tzinfo=TzInfo(UTC))), status=)]` The `get_market_holidays` function can be used to obtain information about markets half days and holidays: `from tastytrade.market_sessions import get_market_holidays calendar = Market.get_market_holidays(session) print(calendar.half_days) print(calendar.holidays)` `>>> [datetime.date(2015, 12, 24), datetime.date(2016, 11, 25), datetime.date(2017, 7, 3), datetime.date(2017, 11, 24), datetime.date(2018, 7, 3), datetime.date(2018, 11, 23), datetime.date(2018, 12, 24), datetime.date(2019, 7, 3), datetime.date(2019, 11, 29), datetime.date(2019, 12, 24), datetime.date(2020, 11, 27), datetime.date(2020, 12, 24), datetime.date(2021, 11, 26), datetime.date(2022, 11, 25), datetime.date(2023, 7, 3), datetime.date(2023, 11, 24), datetime.date(2024, 7, 3), datetime.date(2024, 11, 29), datetime.date(2024, 12, 24), datetime.date(2025, 7, 3), datetime.date(2025, 11, 28), datetime.date(2025, 12, 24), datetime.date(2026, 11, 27), datetime.date(2026, 12, 24), datetime.date(2027, 7, 2), datetime.date(2027, 11, 26), datetime.date(2027, 12, 23), datetime.date(2028, 7, 3), datetime.date(2028, 11, 24), datetime.date(2028, 12, 22), datetime.date(2029, 7, 3)] >>> [datetime.date(2015, 12, 25), datetime.date(2016, 1, 1), datetime.date(2016, 1, 18), datetime.date(2016, 2, 15), datetime.date(2016, 3, 25), datetime.date(2016, 5, 30), datetime.date(2016, 7, 4), datetime.date(2016, 9, 5), datetime.date(2016, 11, 24), datetime.date(2016, 12, 26), datetime.date(2017, 1, 2), datetime.date(2017, 1, 16), datetime.date(2017, 2, 20), datetime.date(2017, 4, 14), datetime.date(2017, 5, 29), datetime.date(2017, 7, 4), datetime.date(2017, 9, 4), datetime.date(2017, 11, 23), datetime.date(2017, 12, 25), datetime.date(2018, 1, 1), datetime.date(2018, 1, 15), datetime.date(2018, 2, 19), datetime.date(2018, 3, 30), datetime.date(2018, 5, 28), datetime.date(2018, 7, 4), datetime.date(2018, 9, 3), datetime.date(2018, 11, 22), datetime.date(2018, 12, 5), datetime.date(2018, 12, 25), datetime.date(2019, 1, 1), datetime.date(2019, 1, 21), datetime.date(2019, 2, 18), datetime.date(2019, 4, 19), datetime.date(2019, 5, 27), datetime.date(2019, 7, 4), datetime.date(2019, 9, 2), datetime.date(2019, 11, 28), datetime.date(2019, 12, 25), datetime.date(2020, 1, 1), datetime.date(2020, 1, 20), datetime.date(2020, 2, 17), datetime.date(2020, 4, 10), datetime.date(2020, 5, 25), datetime.date(2020, 7, 3), datetime.date(2020, 9, 7), datetime.date(2020, 11, 26), datetime.date(2020, 12, 25), datetime.date(2021, 1, 1), datetime.date(2021, 1, 18), datetime.date(2021, 2, 15), datetime.date(2021, 4, 2), datetime.date(2021, 5, 31), datetime.date(2021, 7, 5), datetime.date(2021, 9, 6), datetime.date(2021, 11, 25), datetime.date(2021, 12, 24), datetime.date(2022, 1, 17), datetime.date(2022, 2, 21), datetime.date(2022, 4, 15), datetime.date(2022, 5, 30), datetime.date(2022, 6, 20), datetime.date(2022, 7, 4), datetime.date(2022, 9, 5), datetime.date(2022, 11, 24), datetime.date(2022, 12, 26), datetime.date(2023, 1, 2), datetime.date(2023, 1, 16), datetime.date(2023, 2, 20), datetime.date(2023, 4, 7), datetime.date(2023, 5, 29), datetime.date(2023, 6, 19), datetime.date(2023, 7, 4), datetime.date(2023, 9, 4), datetime.date(2023, 11, 23), datetime.date(2023, 12, 25), datetime.date(2024, 1, 1), datetime.date(2024, 1, 15), datetime.date(2024, 2, 19), datetime.date(2024, 3, 29), datetime.date(2024, 5, 27), datetime.date(2024, 6, 19), datetime.date(2024, 7, 4), datetime.date(2024, 9, 2), datetime.date(2024, 11, 28), datetime.date(2024, 12, 25), datetime.date(2025, 1, 1), datetime.date(2025, 1, 9), datetime.date(2025, 1, 20), datetime.date(2025, 2, 17), datetime.date(2025, 4, 18), datetime.date(2025, 5, 26), datetime.date(2025, 6, 19), datetime.date(2025, 7, 4), datetime.date(2025, 9, 1), datetime.date(2025, 11, 27), datetime.date(2025, 12, 25), datetime.date(2026, 1, 1), datetime.date(2026, 1, 19), datetime.date(2026, 2, 16), datetime.date(2026, 4, 3), datetime.date(2026, 5, 25), datetime.date(2026, 6, 19), datetime.date(2026, 7, 3), datetime.date(2026, 9, 7), datetime.date(2026, 11, 26), datetime.date(2026, 12, 25), datetime.date(2027, 1, 1), datetime.date(2027, 1, 18), datetime.date(2027, 2, 15), datetime.date(2027, 3, 26), datetime.date(2027, 5, 31), datetime.date(2027, 6, 18), datetime.date(2027, 7, 5), datetime.date(2027, 9, 6), datetime.date(2027, 11, 25), datetime.date(2027, 12, 24), datetime.date(2028, 1, 17), datetime.date(2028, 2, 21), datetime.date(2028, 4, 14), datetime.date(2028, 5, 29), datetime.date(2028, 6, 19), datetime.date(2028, 7, 4), datetime.date(2028, 9, 4), datetime.date(2028, 11, 23), datetime.date(2028, 12, 25), datetime.date(2029, 1, 1), datetime.date(2029, 1, 15), datetime.date(2029, 2, 19), datetime.date(2029, 3, 30), datetime.date(2029, 5, 28), datetime.date(2029, 6, 19), datetime.date(2029, 7, 4), datetime.date(2029, 9, 3)]` I case you only want to extract the market status, this is one way to do it: `from tastytrade.market_sessions import ExchangeType, MarketStatus, get_market_sessions market_sessions = get_market_sessions(session, exchanges=[ExchangeType.NYSE, ExchangeType.CME]) print([ms.status != MarketStatus.CLOSED for ms in market_sessions])` `>>> [False, False]` Back to top --- # Installation — tastytrade 9.10 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.10/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v9.10/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#installation "Link to this heading") ====================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#via-pypi "Link to this heading") -------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#from-source "Link to this heading") -------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ make docs Windows[](https://tastyworks-api.readthedocs.io/en/v9.10/installation.html#windows "Link to this heading") ------------------------------------------------------------------------------------------------------------ If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # Installation — tastytrade 10.0.0 documentation * [](https://tastyworks-api.readthedocs.io/en/v10.0.0/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v10.0.0/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ make docs Windows[](https://tastyworks-api.readthedocs.io/en/v10.0.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # Installation — tastytrade 9.9 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.9/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v9.9/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#installation "Link to this heading") ===================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#via-pypi "Link to this heading") ------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#from-source "Link to this heading") ------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ make docs Windows[](https://tastyworks-api.readthedocs.io/en/v9.9/installation.html#windows "Link to this heading") ----------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # tastytrade.search - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/search.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/search.rst "View source of this page") tastytrade.search[¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#module-tastytrade.search "Link to this heading") ====================================================================================================================================== _pydantic model_ tastytrade.search.SymbolData(_\*_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[description](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData.description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass holding search results for an individual item. Show JSON schema `{ "title": "SymbolData", "description": "Dataclass holding search results for an individual item.", "type": "object", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "description": { "title": "Description", "type": "string" } }, "required": [ "symbol", "description" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData-fields "Permalink to this headline") * [`description (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData.description (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData.symbol (Python parameter)") _async_ tastytrade.search.a\_symbol\_search(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search.session "tastytrade.search.a_symbol_search.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search.symbol "tastytrade.search.a_symbol_search.symbol (Python parameter) — search phrase") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[SymbolData](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search "Link to this definition") Performs a symbol search using the Tastytrade API and returns a list of symbols that are similar to the given search phrase. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search.symbol "Permalink to this definition") search phrase tastytrade.search.symbol\_search(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search.session "tastytrade.search.symbol_search.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search.symbol "tastytrade.search.symbol_search.symbol (Python parameter) — search phrase") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[SymbolData](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.SymbolData "tastytrade.search.SymbolData (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search "Link to this definition") Performs a symbol search using the Tastytrade API and returns a list of symbols that are similar to the given search phrase. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search.symbol "Permalink to this definition") search phrase Back to top --- # Installation — tastytrade 9.7 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.7/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v9.7/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#installation "Permalink to this heading") ========================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#via-pypi "Permalink to this heading") ------------------------------------------------------------------------------------------------------------------ The easiest way to install tastytrade is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#from-source "Permalink to this heading") ------------------------------------------------------------------------------------------------------------------------ You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ source .venv/bin/activate $ cd docs $ uv pip install -r requirements.txt $ make html Windows[](https://tastyworks-api.readthedocs.io/en/v9.7/installation.html#windows "Permalink to this heading") ---------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you’ll need to either use Cygwin/WSL, or run the commands from the Makefile manually. Here’s an example for PowerShell: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # Installation - tastytrade 11.0.5 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.5/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Sessions — tastytrade 9.10 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.10/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v9.10/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v9.10/sessions.html#sessions "Link to this heading") ========================================================================================================== Creating a session[](https://tastyworks-api.readthedocs.io/en/v9.10/sessions.html#creating-a-session "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. --- # Installation — tastytrade 9.8 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.8/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v9.8/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#installation "Link to this heading") ===================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#via-pypi "Link to this heading") ------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#from-source "Link to this heading") ------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ make docs Windows[](https://tastyworks-api.readthedocs.io/en/v9.8/installation.html#windows "Link to this heading") ----------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # Sessions — tastytrade 9.9 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.9/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v9.9/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v9.9/sessions.html#sessions "Link to this heading") ========================================================================================================= Creating a session[](https://tastyworks-api.readthedocs.io/en/v9.9/sessions.html#creating-a-session "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. --- # Sessions — tastytrade 9.6 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.6/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v9.6/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v9.6/sessions.html#sessions "Permalink to this heading") ============================================================================================================== Creating a session[](https://tastyworks-api.readthedocs.io/en/v9.6/sessions.html#creating-a-session "Permalink to this heading") ---------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session: from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) --- # Sessions — tastytrade 9.7 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.7/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v9.7/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v9.7/sessions.html#sessions "Permalink to this heading") ============================================================================================================== Creating a session[](https://tastyworks-api.readthedocs.io/en/v9.7/sessions.html#creating-a-session "Permalink to this heading") ---------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session: from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) --- # tastytrade.market_sessions - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/market-sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/market-sessions.rst "View source of this page") tastytrade.market\_sessions[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#module-tastytrade.market_sessions "Link to this heading") ================================================================================================================================================================== _enum_ tastytrade.market\_sessions.ExchangeType(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "Link to this definition") Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") , [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") Contains the valid exchanges to get futures market sessions for. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: CME \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.CME "Link to this definition") CFE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.CFE "Link to this definition") NYSE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.NYSE "Link to this definition") SMALL \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.SMALL "Link to this definition") _pydantic model_ tastytrade.market\_sessions.MarketCalendar(_\*_, _[half\_days](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar.half_days (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)")\ \]_, _[holidays](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar.holidays (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)")\ \]_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about market holidays and shortened days. Show JSON schema `{ "title": "MarketCalendar", "description": "Dataclass containing information about market holidays and shortened days.", "type": "object", "properties": { "market-half-days": { "items": { "format": "date", "type": "string" }, "title": "Market-Half-Days", "type": "array" }, "market-holidays": { "items": { "format": "date", "type": "string" }, "title": "Market-Holidays", "type": "array" } }, "required": [ "market-half-days", "market-holidays" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar-fields "Permalink to this headline") * [`half_days (list[datetime.date])`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar.half_days (Python parameter)") * [`holidays (list[datetime.date])`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar.holidays (Python parameter)") _pydantic model_ tastytrade.market\_sessions.MarketSession(_\*_, _[close\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.close_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[close\_at\_ext](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.close_at_ext (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_collection](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.instrument_collection (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[open\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.open_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.start_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[next\_session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.next_session (Python parameter)") : [MarketSessionSnapshot](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[previous\_session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.previous_session (Python parameter)") : [MarketSessionSnapshot](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[state](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.state (Python parameter)") : [MarketStatus](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus "tastytrade.market_sessions.MarketStatus (Python enum) — Bases: str, Enum") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass representing the current, next, and previous sessions. Show JSON schema `{ "title": "MarketSession", "description": "Dataclass representing the current, next, and previous sessions.", "type": "object", "properties": { "close-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Close-At" }, "close-at-ext": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Close-At-Ext" }, "instrument-collection": { "title": "Instrument-Collection", "type": "string" }, "open-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Open-At" }, "start-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Start-At" }, "next-session": { "anyOf": [ { "$ref": "#/$defs/MarketSessionSnapshot" }, { "type": "null" } ], "default": null }, "previous-session": { "anyOf": [ { "$ref": "#/$defs/MarketSessionSnapshot" }, { "type": "null" } ], "default": null }, "state": { "$ref": "#/$defs/MarketStatus" } }, "$defs": { "MarketSessionSnapshot": { "description": "Dataclass containing information about the upcoming or previous market session.", "properties": { "close-at": { "format": "date-time", "title": "Close-At", "type": "string" }, "close-at-ext": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Close-At-Ext" }, "instrument-collection": { "title": "Instrument-Collection", "type": "string" }, "open-at": { "format": "date-time", "title": "Open-At", "type": "string" }, "session-date": { "format": "date", "title": "Session-Date", "type": "string" }, "start-at": { "format": "date-time", "title": "Start-At", "type": "string" } }, "required": [ "close-at", "instrument-collection", "open-at", "session-date", "start-at" ], "title": "MarketSessionSnapshot", "type": "object" }, "MarketStatus": { "description": "Contains the valid market status values.", "enum": [ "Open", "Closed", "Pre-market", "Extended" ], "title": "MarketStatus", "type": "string" } }, "required": [ "instrument-collection", "state" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession-fields "Permalink to this headline") * [`close_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.close_at (Python parameter)") * [`close_at_ext (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.close_at_ext (Python parameter)") * [`instrument_collection (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.instrument_collection (Python parameter)") * [`next_session (tastytrade.market_sessions.MarketSessionSnapshot | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.next_session (Python parameter)") * [`open_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.open_at (Python parameter)") * [`previous_session (tastytrade.market_sessions.MarketSessionSnapshot | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.previous_session (Python parameter)") * [`start_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession.start_at (Python parameter)") * `status (tastytrade.market_sessions.MarketStatus)` _pydantic model_ tastytrade.market\_sessions.MarketSessionSnapshot(_\*_, _[close\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.close_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[close\_at\_ext](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.close_at_ext (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_collection](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.instrument_collection (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[open\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.open_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[session\_date](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.session_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.start_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about the upcoming or previous market session. Show JSON schema `{ "title": "MarketSessionSnapshot", "description": "Dataclass containing information about the upcoming or previous market session.", "type": "object", "properties": { "close-at": { "format": "date-time", "title": "Close-At", "type": "string" }, "close-at-ext": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Close-At-Ext" }, "instrument-collection": { "title": "Instrument-Collection", "type": "string" }, "open-at": { "format": "date-time", "title": "Open-At", "type": "string" }, "session-date": { "format": "date", "title": "Session-Date", "type": "string" }, "start-at": { "format": "date-time", "title": "Start-At", "type": "string" } }, "required": [ "close-at", "instrument-collection", "open-at", "session-date", "start-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot-fields "Permalink to this headline") * [`close_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.close_at (Python parameter)") * [`close_at_ext (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.close_at_ext (Python parameter)") * [`instrument_collection (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.instrument_collection (Python parameter)") * [`open_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.open_at (Python parameter)") * [`session_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.session_date (Python parameter)") * [`start_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSessionSnapshot "tastytrade.market_sessions.MarketSessionSnapshot.start_at (Python parameter)") _enum_ tastytrade.market\_sessions.MarketStatus(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus "tastytrade.market_sessions.MarketStatus.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus "Link to this definition") Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") , [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") Contains the valid market status values. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: OPEN \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.OPEN "Link to this definition") CLOSED \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.CLOSED "Link to this definition") PRE\_MARKET \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.PRE_MARKET "Link to this definition") EXTENDED \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.EXTENDED "Link to this definition") _async_ tastytrade.market\_sessions.a\_get\_futures\_holidays(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays.session "tastytrade.market_sessions.a_get_futures_holidays.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[exchange](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays.exchange "tastytrade.market_sessions.a_get_futures_holidays.exchange (Python parameter) — exchange to fetch calendar for") : [ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum") _) → [MarketCalendar](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays "Link to this definition") Retrieves market calendar for half days and holidays for a futures exchange. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays.session "Permalink to this definition") active user session to use exchange: [ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays.exchange "Permalink to this definition") exchange to fetch calendar for _async_ tastytrade.market\_sessions.a\_get\_market\_holidays(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_holidays.session "tastytrade.market_sessions.a_get_market_holidays.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [MarketCalendar](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_holidays "Link to this definition") Retrieves market calendar for half days and holidays. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_holidays-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_holidays.session "Permalink to this definition") active user session to use _async_ tastytrade.market\_sessions.a\_get\_market\_sessions(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions.session "tastytrade.market_sessions.a_get_market_sessions.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[exchanges](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions.exchanges "tastytrade.market_sessions.a_get_market_sessions.exchanges (Python parameter) — the list of exchanges to get market sessions for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketSession](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions "Link to this definition") Retrieves a list of session timings for the given exchanges. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions.session "Permalink to this definition") active user session to use exchanges: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions.exchanges "Permalink to this definition") the list of exchanges to get market sessions for tastytrade.market\_sessions.get\_futures\_holidays(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays.session "tastytrade.market_sessions.get_futures_holidays.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[exchange](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays.exchange "tastytrade.market_sessions.get_futures_holidays.exchange (Python parameter) — exchange to fetch calendar for") : [ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum") _) → [MarketCalendar](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays "Link to this definition") Retrieves market calendar for half days and holidays for a futures exchange. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays.session "Permalink to this definition") active user session to use exchange: [ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays.exchange "Permalink to this definition") exchange to fetch calendar for tastytrade.market\_sessions.get\_market\_holidays(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_holidays.session "tastytrade.market_sessions.get_market_holidays.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [MarketCalendar](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketCalendar "tastytrade.market_sessions.MarketCalendar (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_holidays "Link to this definition") Retrieves market calendar for half days and holidays. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_holidays-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_holidays.session "Permalink to this definition") active user session to use tastytrade.market\_sessions.get\_market\_sessions(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions.session "tastytrade.market_sessions.get_market_sessions.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[exchanges](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions.exchanges "tastytrade.market_sessions.get_market_sessions.exchanges (Python parameter) — the list of exchanges to get market sessions for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketSession](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketSession "tastytrade.market_sessions.MarketSession (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions "Link to this definition") Retrieves a list of session timings for the given exchanges. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions.session "Permalink to this definition") active user session to use exchanges: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType "tastytrade.market_sessions.ExchangeType (Python enum) — Bases: str, Enum")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions.exchanges "Permalink to this definition") the list of exchanges to get market sessions for Back to top --- # Sessions — tastytrade 10.0.0 documentation * [](https://tastyworks-api.readthedocs.io/en/v10.0.0/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v10.0.0/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v10.0.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[](https://tastyworks-api.readthedocs.io/en/v10.0.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. --- # Sessions — tastytrade 9.8 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.8/index.html) * Sessions * [View page source](https://tastyworks-api.readthedocs.io/en/v9.8/_sources/sessions.rst.txt) * * * Sessions[](https://tastyworks-api.readthedocs.io/en/v9.8/sessions.html#sessions "Link to this heading") ========================================================================================================= Creating a session[](https://tastyworks-api.readthedocs.io/en/v9.8/sessions.html#creating-a-session "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: from tastytrade import Session session \= Session('username', 'password') A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. from tastytrade import Session session \= Session('username', 'password', is\_test\=True) You can make a session persistent by generating a remember token, which is valid for 24 hours: session \= Session('username', 'password', remember\_me\=True) remember\_token \= session.remember\_token \# remember token replaces the password for the next login new\_session \= Session('username', remember\_token\=remember\_token) Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. --- # tastytrade.account - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/account.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/account.rst "View source of this page") tastytrade.account[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#module-tastytrade.account "Link to this heading") ========================================================================================================================================= _pydantic model_ tastytrade.account.Account(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[opened\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.opened_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[nickname](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.nickname (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[account\_type\_name](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.account_type_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_closed (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[day\_trader\_status](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.day_trader_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_firm\_error](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_firm_error (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_firm\_proprietary](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_firm_proprietary (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_futures\_approved](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_futures_approved (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_test\_drive](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_test_drive (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[margin\_or\_cash](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.margin_or_cash (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_foreign](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_foreign (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[closed\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.closed_at (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[funding\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.funding_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[investment\_objective](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.investment_objective (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[liquidity\_needs](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.liquidity_needs (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[risk\_tolerance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.risk_tolerance (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[investment\_time\_horizon](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.investment_time_horizon (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures\_account\_purpose](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.futures_account_purpose (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[external\_fdid](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.external_fdid (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[suitable\_options\_level](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.suitable_options_level (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[submitting\_user\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.submitting_user_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass that represents a Tastytrade account object, containing methods for retrieving information about the account, placing orders, and retrieving past transactions. Show JSON schema `{ "title": "Account", "description": "Dataclass that represents a Tastytrade account object, containing\nmethods for retrieving information about the account, placing orders,\nand retrieving past transactions.", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "opened-at": { "format": "date-time", "title": "Opened-At", "type": "string" }, "nickname": { "title": "Nickname", "type": "string" }, "account-type-name": { "title": "Account-Type-Name", "type": "string" }, "is-closed": { "title": "Is-Closed", "type": "boolean" }, "day-trader-status": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ], "title": "Day-Trader-Status" }, "is-firm-error": { "title": "Is-Firm-Error", "type": "boolean" }, "is-firm-proprietary": { "title": "Is-Firm-Proprietary", "type": "boolean" }, "is-futures-approved": { "title": "Is-Futures-Approved", "type": "boolean" }, "is-test-drive": { "default": false, "title": "Is-Test-Drive", "type": "boolean" }, "margin-or-cash": { "title": "Margin-Or-Cash", "type": "string" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "created-at": { "format": "date-time", "title": "Created-At", "type": "string" }, "external-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "External-Id" }, "closed-at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Closed-At" }, "funding-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Funding-Date" }, "investment-objective": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Investment-Objective" }, "liquidity-needs": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Liquidity-Needs" }, "risk-tolerance": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Risk-Tolerance" }, "investment-time-horizon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Investment-Time-Horizon" }, "futures-account-purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Futures-Account-Purpose" }, "external-fdid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "External-Fdid" }, "suitable-options-level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Suitable-Options-Level" }, "submitting-user-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Submitting-User-Id" } }, "required": [ "account-number", "opened-at", "nickname", "account-type-name", "is-closed", "day-trader-status", "is-firm-error", "is-firm-proprietary", "is-futures-approved", "margin-or-cash", "is-foreign", "created-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.account_number (Python parameter)") * [`account_type_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.account_type_name (Python parameter)") * [`closed_at (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.closed_at (Python parameter)") * [`created_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.created_at (Python parameter)") * [`day_trader_status (str | bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.day_trader_status (Python parameter)") * [`external_fdid (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.external_fdid (Python parameter)") * [`external_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.external_id (Python parameter)") * [`funding_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.funding_date (Python parameter)") * [`futures_account_purpose (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.futures_account_purpose (Python parameter)") * [`investment_objective (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.investment_objective (Python parameter)") * [`investment_time_horizon (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.investment_time_horizon (Python parameter)") * [`is_closed (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_closed (Python parameter)") * [`is_firm_error (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_firm_error (Python parameter)") * [`is_firm_proprietary (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_firm_proprietary (Python parameter)") * [`is_foreign (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_foreign (Python parameter)") * [`is_futures_approved (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_futures_approved (Python parameter)") * [`is_test_drive (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.is_test_drive (Python parameter)") * [`liquidity_needs (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.liquidity_needs (Python parameter)") * [`margin_or_cash (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.margin_or_cash (Python parameter)") * [`nickname (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.nickname (Python parameter)") * [`opened_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.opened_at (Python parameter)") * [`risk_tolerance (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.risk_tolerance (Python parameter)") * [`submitting_user_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.submitting_user_id (Python parameter)") * [`suitable_options_level (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account.suitable_options_level (Python parameter)") _async_ a\_delete\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order.session "tastytrade.account.Account.a_delete_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order.order_id "tastytrade.account.Account.a_delete_complex_order.order_id (Python parameter) — the ID of the order to delete.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order "Link to this definition") Delete a complex order by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order.order_id "Permalink to this definition") the ID of the order to delete. _async_ a\_delete\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order.session "tastytrade.account.Account.a_delete_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order.order_id "tastytrade.account.Account.a_delete_order.order_id (Python parameter) — the ID of the order to delete.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order "Link to this definition") Delete an order by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order.order_id "Permalink to this definition") the ID of the order to delete. _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.session "tastytrade.account.Account.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _\*_, _[include\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.include_closed "tastytrade.account.Account.a_get.include_closed (Python parameter) — whether to include closed accounts in the results") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get "Link to this definition") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.session "tastytrade.account.Account.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.account_number "tastytrade.account.Account.a_get.account_number (Python parameter) — the account ID to get.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Gets all trading accounts associated with the Tastytrade user, or a specific one if given an account ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.session "Permalink to this definition") the session to use for the request. account\_number: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the account ID to get. include\_closed: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get.include_closed "Permalink to this definition") whether to include closed accounts in the results _async_ a\_get\_balance\_snapshots(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.session "tastytrade.account.Account.a_get_balance_snapshots.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.per_page "tastytrade.account.Account.a_get_balance_snapshots.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.page_offset "tastytrade.account.Account.a_get_balance_snapshots.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[currency](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.currency "tastytrade.account.Account.a_get_balance_snapshots.currency (Python parameter) — the currency to show balances in.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.end_date "tastytrade.account.Account.a_get_balance_snapshots.end_date (Python parameter) — the ending date of the range.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.start_date "tastytrade.account.Account.a_get_balance_snapshots.start_date (Python parameter) — the starting date of the range.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[snapshot\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.snapshot_date "tastytrade.account.Account.a_get_balance_snapshots.snapshot_date (Python parameter) — the date of the snapshot to get.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[time\_of\_day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.time_of_day "tastytrade.account.Account.a_get_balance_snapshots.time_of_day (Python parameter) — the time of day of the snapshots to get, either 'EOD' (End Of Day) or 'BOD' (Beginning Of Day).") : 'BOD' | 'EOD' \= `'EOD'`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[AccountBalanceSnapshot](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots "Link to this definition") Returns a list of balance snapshots. This list will just have a few snapshots if you don’t pass a start date; otherwise, it will be each day’s balances in the given range. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages currency: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.currency "Permalink to this definition") the currency to show balances in. start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.start_date "Permalink to this definition") the starting date of the range. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.end_date "Permalink to this definition") the ending date of the range. snapshot\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.snapshot_date "Permalink to this definition") the date of the snapshot to get. time\_of\_day: 'BOD' | 'EOD' \= `'EOD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots.time_of_day "Permalink to this definition") the time of day of the snapshots to get, either ‘EOD’ (End Of Day) or ‘BOD’ (Beginning Of Day). _async_ a\_get\_balances(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances.session "tastytrade.account.Account.a_get_balances.session (Python parameter) — the session to use for the request") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[currency](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances.currency "tastytrade.account.Account.a_get_balances.currency (Python parameter) — the currency to state balances in") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`_) → [AccountBalance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances "Link to this definition") Get the current balances of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances.session "Permalink to this definition") the session to use for the request currency: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances.currency "Permalink to this definition") the currency to state balances in _async_ a\_get\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order.session "tastytrade.account.Account.a_get_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order.order_id "tastytrade.account.Account.a_get_complex_order.order_id (Python parameter) — the ID of the order to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order "Link to this definition") Gets a complex order with the given ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order.order_id "Permalink to this definition") the ID of the order to fetch. _async_ a\_get\_complex\_order\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.session "tastytrade.account.Account.a_get_complex_order_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.per_page "tastytrade.account.Account.a_get_complex_order_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.page_offset "tastytrade.account.Account.a_get_complex_order_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history "Link to this definition") Get order history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages _async_ a\_get\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.session "tastytrade.account.Account.a_get_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.per_page "tastytrade.account.Account.a_get_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.page_offset "tastytrade.account.Account.a_get_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[sort](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.sort "tastytrade.account.Account.a_get_history.sort (Python parameter) — the order to sort results in, either 'Desc' or 'Asc'.") : 'Asc' | 'Desc' \= `'Desc'`_, _[type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.type "tastytrade.account.Account.a_get_history.type (Python parameter) — the type of transaction.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[types](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.types "tastytrade.account.Account.a_get_history.types (Python parameter) — a list of transaction types to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[sub\_types](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.sub_types "tastytrade.account.Account.a_get_history.sub_types (Python parameter) — an array of transaction subtypes to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.start_date "tastytrade.account.Account.a_get_history.start_date (Python parameter) — the start date of transactions to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.end_date "tastytrade.account.Account.a_get_history.end_date (Python parameter) — the end date of transactions to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.instrument_type "tastytrade.account.Account.a_get_history.instrument_type (Python parameter) — the type of instrument.") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.symbol "tastytrade.account.Account.a_get_history.symbol (Python parameter) — a single symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.underlying_symbol "tastytrade.account.Account.a_get_history.underlying_symbol (Python parameter) — the underlying symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[action](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.action "tastytrade.account.Account.a_get_history.action (Python parameter) — the action of the transaction: 'Sell to Open', 'Sell to Close', 'Buy to Open', 'Buy to Close', 'Sell' or 'Buy'.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[partition\_key](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.partition_key "tastytrade.account.Account.a_get_history.partition_key (Python parameter) — account partition key.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.futures_symbol "tastytrade.account.Account.a_get_history.futures_symbol (Python parameter) — the full TW Future Symbol, e.g.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.start_at "tastytrade.account.Account.a_get_history.start_at (Python parameter) — datetime start range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.end_at "tastytrade.account.Account.a_get_history.end_at (Python parameter) — datetime end range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Transaction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history "Link to this definition") Get transaction history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages sort: 'Asc' | 'Desc' \= `'Desc'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.sort "Permalink to this definition") the order to sort results in, either ‘Desc’ or ‘Asc’. type: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.type "Permalink to this definition") the type of transaction. types: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.types "Permalink to this definition") a list of transaction types to filter by. sub\_types: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.sub_types "Permalink to this definition") an array of transaction subtypes to filter by. start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.start_date "Permalink to this definition") the start date of transactions to query. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.end_date "Permalink to this definition") the end date of transactions to query. instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.instrument_type "Permalink to this definition") the type of instrument. symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.symbol "Permalink to this definition") a single symbol. underlying\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.underlying_symbol "Permalink to this definition") the underlying symbol. action: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.action "Permalink to this definition") the action of the transaction: ‘Sell to Open’, ‘Sell to Close’, ‘Buy to Open’, ‘Buy to Close’, ‘Sell’ or ‘Buy’. partition\_key: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.partition_key "Permalink to this definition") account partition key. futures\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.futures_symbol "Permalink to this definition") the full TW Future Symbol, e.g. /ESZ9, /NGZ19. start\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.start_at "Permalink to this definition") datetime start range for filtering transactions in full date-time. end\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history.end_at "Permalink to this definition") datetime end range for filtering transactions in full date-time. _async_ a\_get\_live\_complex\_orders(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_complex_orders.session "tastytrade.account.Account.a_get_live_complex_orders.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_complex_orders "Link to this definition") Get complex orders placed today for the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_complex_orders-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_complex_orders.session "Permalink to this definition") the session to use for the request. _async_ a\_get\_live\_orders(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_orders.session "tastytrade.account.Account.a_get_live_orders.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_orders "Link to this definition") Get orders placed today for the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_orders-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_orders.session "Permalink to this definition") the session to use for the request. _async_ a\_get\_margin\_requirements(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_margin_requirements.session "tastytrade.account.Account.a_get_margin_requirements.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [MarginReport](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_margin_requirements "Link to this definition") Get the margin report for the account, with total margin requirements as well as a breakdown per symbol/instrument. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_margin_requirements-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_margin_requirements.session "Permalink to this definition") the session to use for the request. _async_ a\_get\_net\_liquidating\_value\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.session "tastytrade.account.Account.a_get_net_liquidating_value_history.session (Python parameter) — the session to use for the request, can't be certification.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[time\_back](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.time_back "tastytrade.account.Account.a_get_net_liquidating_value_history.time_back (Python parameter) — the time period to get net liquidating value snapshots for.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_time](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.start_time "tastytrade.account.Account.a_get_net_liquidating_value_history.start_time (Python parameter) — the start point for the query.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[NetLiqOhlc](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history "Link to this definition") Returns a list of account net liquidating value snapshots over the specified time period. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.session "Permalink to this definition") the session to use for the request, can’t be certification. time\_back: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.time_back "Permalink to this definition") the time period to get net liquidating value snapshots for. This param is required if start\_time is not given. Possible values are: ‘1d’, ‘1m’, ‘3m’, ‘6m’, ‘1y’, ‘all’. start\_time: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history.start_time "Permalink to this definition") the start point for the query. This param is required is time-back is not given. If given, will take precedence over time-back. _async_ a\_get\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order.session "tastytrade.account.Account.a_get_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order.order_id "tastytrade.account.Account.a_get_order.order_id (Python parameter) — the ID of the order to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order "Link to this definition") Gets an order with the given ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order.order_id "Permalink to this definition") the ID of the order to fetch. _async_ a\_get\_order\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.session "tastytrade.account.Account.a_get_order_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.per_page "tastytrade.account.Account.a_get_order_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.page_offset "tastytrade.account.Account.a_get_order_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.start_date "tastytrade.account.Account.a_get_order_history.start_date (Python parameter) — the start date of orders to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.end_date "tastytrade.account.Account.a_get_order_history.end_date (Python parameter) — the end date of orders to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.underlying_symbol "tastytrade.account.Account.a_get_order_history.underlying_symbol (Python parameter) — underlying symbol to filter by.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[statuses](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.statuses "tastytrade.account.Account.a_get_order_history.statuses (Python parameter) — a list of statuses to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[OrderStatus](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus "tastytrade.order.OrderStatus (Python enum) — Bases: str, Enum")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.futures_symbol "tastytrade.account.Account.a_get_order_history.futures_symbol (Python parameter) — Tastytrade future symbol for futures and future options.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.underlying_instrument_type "tastytrade.account.Account.a_get_order_history.underlying_instrument_type (Python parameter) — the type of instrument to filter by") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[sort](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.sort "tastytrade.account.Account.a_get_order_history.sort (Python parameter) — the order to sort results in, either 'Desc' or 'Asc'.") : 'Asc' | 'Desc' | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.start_at "tastytrade.account.Account.a_get_order_history.start_at (Python parameter) — datetime start range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.end_at "tastytrade.account.Account.a_get_order_history.end_at (Python parameter) — datetime end range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history "Link to this definition") Get order history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.start_date "Permalink to this definition") the start date of orders to query. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.end_date "Permalink to this definition") the end date of orders to query. underlying\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.underlying_symbol "Permalink to this definition") underlying symbol to filter by. statuses: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[OrderStatus](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus "tastytrade.order.OrderStatus (Python enum) — Bases: str, Enum")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.statuses "Permalink to this definition") a list of statuses to filter by. futures\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.futures_symbol "Permalink to this definition") Tastytrade future symbol for futures and future options. underlying\_instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.underlying_instrument_type "Permalink to this definition") the type of instrument to filter by sort: 'Asc' | 'Desc' | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.sort "Permalink to this definition") the order to sort results in, either ‘Desc’ or ‘Asc’. start\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.start_at "Permalink to this definition") datetime start range for filtering transactions in full date-time. end\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history.end_at "Permalink to this definition") datetime end range for filtering transactions in full date-time. _async_ a\_get\_positions(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.session "tastytrade.account.Account.a_get_positions.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[underlying\_symbols](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.underlying_symbols "tastytrade.account.Account.a_get_positions.underlying_symbols (Python parameter) — an array of underlying symbols for positions.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.symbol "tastytrade.account.Account.a_get_positions.symbol (Python parameter) — a single symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.instrument_type "tastytrade.account.Account.a_get_positions.instrument_type (Python parameter) — the type of instrument.") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[include\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.include_closed "tastytrade.account.Account.a_get_positions.include_closed (Python parameter) — if closed positions should be included in the query.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_product\_code](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.underlying_product_code "tastytrade.account.Account.a_get_positions.underlying_product_code (Python parameter) — the underlying future's product code.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[partition\_keys](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.partition_keys "tastytrade.account.Account.a_get_positions.partition_keys (Python parameter) — account partition keys.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[net\_positions](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.net_positions "tastytrade.account.Account.a_get_positions.net_positions (Python parameter) — returns net positions grouped by instrument type and symbol.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[include\_marks](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.include_marks "tastytrade.account.Account.a_get_positions.include_marks (Python parameter) — include current quote mark (note: can decrease performance).") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[CurrentPosition](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions "Link to this definition") Get the current positions of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.session "Permalink to this definition") the session to use for the request. underlying\_symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.underlying_symbols "Permalink to this definition") an array of underlying symbols for positions. symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.symbol "Permalink to this definition") a single symbol. instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.instrument_type "Permalink to this definition") the type of instrument. include\_closed: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.include_closed "Permalink to this definition") if closed positions should be included in the query. underlying\_product\_code: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.underlying_product_code "Permalink to this definition") the underlying future’s product code. partition\_keys: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.partition_keys "Permalink to this definition") account partition keys. net\_positions: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.net_positions "Permalink to this definition") returns net positions grouped by instrument type and symbol. include\_marks: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions.include_marks "Permalink to this definition") include current quote mark (note: can decrease performance). _async_ a\_get\_total\_fees(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees.session "tastytrade.account.Account.a_get_total_fees.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees.day "tastytrade.account.Account.a_get_total_fees.day (Python parameter) — the date to get fees for.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [FeesInfo](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo "tastytrade.account.FeesInfo (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees "Link to this definition") Get the total fees for a given date. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees.session "Permalink to this definition") the session to use for the request. day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees.day "Permalink to this definition") the date to get fees for. _async_ a\_get\_trading\_status(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_trading_status.session "tastytrade.account.Account.a_get_trading_status.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [TradingStatus](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_trading_status "Link to this definition") Get the trading status of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_trading_status-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_trading_status.session "Permalink to this definition") the session to use for the request. _async_ a\_get\_transaction(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction.session "tastytrade.account.Account.a_get_transaction.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction.id "tastytrade.account.Account.a_get_transaction.id (Python parameter) — the ID of the transaction to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [Transaction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction "Link to this definition") Get a single transaction by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction.session "Permalink to this definition") the session to use for the request. id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction.id "Permalink to this definition") the ID of the transaction to fetch. _async_ a\_place\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.session "tastytrade.account.Account.a_place_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.order "tastytrade.account.Account.a_place_complex_order.order (Python parameter) — the order to place.") : [NewComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewComplexOrder "tastytrade.order.NewComplexOrder (Python model) — Bases: TastytradeData") _, _[dry\_run](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.dry_run "tastytrade.account.Account.a_place_complex_order.dry_run (Python parameter) — whether this is a test order or not.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`_) → [PlacedComplexOrderResponse](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrderResponse "tastytrade.order.PlacedComplexOrderResponse (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order "Link to this definition") Place the given order. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.session "Permalink to this definition") the session to use for the request. order: [NewComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewComplexOrder "tastytrade.order.NewComplexOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.order "Permalink to this definition") the order to place. dry\_run: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order.dry_run "Permalink to this definition") whether this is a test order or not. _async_ a\_place\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.session "tastytrade.account.Account.a_place_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.order "tastytrade.account.Account.a_place_order.order (Python parameter) — the order to place.") : [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") _, _[dry\_run](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.dry_run "tastytrade.account.Account.a_place_order.dry_run (Python parameter) — whether this is a test order or not.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`_) → [PlacedOrderResponse](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrderResponse "tastytrade.order.PlacedOrderResponse (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order "Link to this definition") Place the given order. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.session "Permalink to this definition") the session to use for the request. order: [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.order "Permalink to this definition") the order to place. dry\_run: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order.dry_run "Permalink to this definition") whether this is a test order or not. _async_ a\_replace\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.session "tastytrade.account.Account.a_replace_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[old\_order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.old_order_id "tastytrade.account.Account.a_replace_order.old_order_id (Python parameter) — the ID of the order to replace.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[new\_order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.new_order "tastytrade.account.Account.a_replace_order.new_order (Python parameter) — the new order to replace the old order with.") : [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") _) → [PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order "Link to this definition") Replace an order with a new order with different characteristics (but same legs). Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.session "Permalink to this definition") the session to use for the request. old\_order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.old_order_id "Permalink to this definition") the ID of the order to replace. new\_order: [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order.new_order "Permalink to this definition") the new order to replace the old order with. delete\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order.session "tastytrade.account.Account.delete_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order.order_id "tastytrade.account.Account.delete_complex_order.order_id (Python parameter) — the ID of the order to delete.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order "Link to this definition") Delete a complex order by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order.order_id "Permalink to this definition") the ID of the order to delete. delete\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order.session "tastytrade.account.Account.delete_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order.order_id "tastytrade.account.Account.delete_order.order_id (Python parameter) — the ID of the order to delete.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order "Link to this definition") Delete an order by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order.order_id "Permalink to this definition") the ID of the order to delete. _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.session "tastytrade.account.Account.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _\*_, _[include\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.include_closed "tastytrade.account.Account.get.include_closed (Python parameter) — whether to include closed accounts in the results") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get "Link to this definition") _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.session "tastytrade.account.Account.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.account_number "tastytrade.account.Account.get.account_number (Python parameter) — the account ID to get.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Gets all trading accounts associated with the Tastytrade user, or a specific one if given an account ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.session "Permalink to this definition") the session to use for the request. account\_number: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the account ID to get. include\_closed: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get.include_closed "Permalink to this definition") whether to include closed accounts in the results get\_balance\_snapshots(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.session "tastytrade.account.Account.get_balance_snapshots.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.per_page "tastytrade.account.Account.get_balance_snapshots.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.page_offset "tastytrade.account.Account.get_balance_snapshots.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[currency](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.currency "tastytrade.account.Account.get_balance_snapshots.currency (Python parameter) — the currency to show balances in.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.end_date "tastytrade.account.Account.get_balance_snapshots.end_date (Python parameter) — the ending date of the range.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.start_date "tastytrade.account.Account.get_balance_snapshots.start_date (Python parameter) — the starting date of the range.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[snapshot\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.snapshot_date "tastytrade.account.Account.get_balance_snapshots.snapshot_date (Python parameter) — the date of the snapshot to get.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[time\_of\_day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.time_of_day "tastytrade.account.Account.get_balance_snapshots.time_of_day (Python parameter) — the time of day of the snapshots to get, either 'EOD' (End Of Day) or 'BOD' (Beginning Of Day).") : 'BOD' | 'EOD' \= `'EOD'`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[AccountBalanceSnapshot](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots "Link to this definition") Returns a list of balance snapshots. This list will just have a few snapshots if you don’t pass a start date; otherwise, it will be each day’s balances in the given range. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages currency: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.currency "Permalink to this definition") the currency to show balances in. start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.start_date "Permalink to this definition") the starting date of the range. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.end_date "Permalink to this definition") the ending date of the range. snapshot\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.snapshot_date "Permalink to this definition") the date of the snapshot to get. time\_of\_day: 'BOD' | 'EOD' \= `'EOD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots.time_of_day "Permalink to this definition") the time of day of the snapshots to get, either ‘EOD’ (End Of Day) or ‘BOD’ (Beginning Of Day). get\_balances(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances.session "tastytrade.account.Account.get_balances.session (Python parameter) — the session to use for the request") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[currency](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances.currency "tastytrade.account.Account.get_balances.currency (Python parameter) — the currency to state balances in") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`_) → [AccountBalance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances "Link to this definition") Get the current balances of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances.session "Permalink to this definition") the session to use for the request currency: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'USD'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances.currency "Permalink to this definition") the currency to state balances in get\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order.session "tastytrade.account.Account.get_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order.order_id "tastytrade.account.Account.get_complex_order.order_id (Python parameter) — the ID of the order to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order "Link to this definition") Gets a complex order with the given ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order.order_id "Permalink to this definition") the ID of the order to fetch. get\_complex\_order\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.session "tastytrade.account.Account.get_complex_order_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.per_page "tastytrade.account.Account.get_complex_order_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.page_offset "tastytrade.account.Account.get_complex_order_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history "Link to this definition") Get order history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages get\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.session "tastytrade.account.Account.get_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.per_page "tastytrade.account.Account.get_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.page_offset "tastytrade.account.Account.get_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[sort](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.sort "tastytrade.account.Account.get_history.sort (Python parameter) — the order to sort results in, either 'Desc' or 'Asc'.") : 'Asc' | 'Desc' \= `'Desc'`_, _[type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.type "tastytrade.account.Account.get_history.type (Python parameter) — the type of transaction.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[types](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.types "tastytrade.account.Account.get_history.types (Python parameter) — a list of transaction types to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[sub\_types](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.sub_types "tastytrade.account.Account.get_history.sub_types (Python parameter) — an array of transaction subtypes to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.start_date "tastytrade.account.Account.get_history.start_date (Python parameter) — the start date of transactions to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.end_date "tastytrade.account.Account.get_history.end_date (Python parameter) — the end date of transactions to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.instrument_type "tastytrade.account.Account.get_history.instrument_type (Python parameter) — the type of instrument.") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.symbol "tastytrade.account.Account.get_history.symbol (Python parameter) — a single symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.underlying_symbol "tastytrade.account.Account.get_history.underlying_symbol (Python parameter) — the underlying symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[action](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.action "tastytrade.account.Account.get_history.action (Python parameter) — the action of the transaction: 'Sell to Open', 'Sell to Close', 'Buy to Open', 'Buy to Close', 'Sell' or 'Buy'.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[partition\_key](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.partition_key "tastytrade.account.Account.get_history.partition_key (Python parameter) — account partition key.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.futures_symbol "tastytrade.account.Account.get_history.futures_symbol (Python parameter) — the full TW Future Symbol, e.g.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.start_at "tastytrade.account.Account.get_history.start_at (Python parameter) — datetime start range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.end_at "tastytrade.account.Account.get_history.end_at (Python parameter) — datetime end range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Transaction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history "Link to this definition") Get transaction history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `250`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages sort: 'Asc' | 'Desc' \= `'Desc'`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.sort "Permalink to this definition") the order to sort results in, either ‘Desc’ or ‘Asc’. type: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.type "Permalink to this definition") the type of transaction. types: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.types "Permalink to this definition") a list of transaction types to filter by. sub\_types: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.sub_types "Permalink to this definition") an array of transaction subtypes to filter by. start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.start_date "Permalink to this definition") the start date of transactions to query. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.end_date "Permalink to this definition") the end date of transactions to query. instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.instrument_type "Permalink to this definition") the type of instrument. symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.symbol "Permalink to this definition") a single symbol. underlying\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.underlying_symbol "Permalink to this definition") the underlying symbol. action: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.action "Permalink to this definition") the action of the transaction: ‘Sell to Open’, ‘Sell to Close’, ‘Buy to Open’, ‘Buy to Close’, ‘Sell’ or ‘Buy’. partition\_key: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.partition_key "Permalink to this definition") account partition key. futures\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.futures_symbol "Permalink to this definition") the full TW Future Symbol, e.g. /ESZ9, /NGZ19. start\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.start_at "Permalink to this definition") datetime start range for filtering transactions in full date-time. end\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history.end_at "Permalink to this definition") datetime end range for filtering transactions in full date-time. get\_live\_complex\_orders(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_complex_orders.session "tastytrade.account.Account.get_live_complex_orders.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder "tastytrade.order.PlacedComplexOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_complex_orders "Link to this definition") Get complex orders placed today for the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_complex_orders-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_complex_orders.session "Permalink to this definition") the session to use for the request. get\_live\_orders(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_orders.session "tastytrade.account.Account.get_live_orders.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_orders "Link to this definition") Get orders placed today for the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_orders-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_orders.session "Permalink to this definition") the session to use for the request. get\_margin\_requirements(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_margin_requirements.session "tastytrade.account.Account.get_margin_requirements.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [MarginReport](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_margin_requirements "Link to this definition") Get the margin report for the account, with total margin requirements as well as a breakdown per symbol/instrument. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_margin_requirements-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_margin_requirements.session "Permalink to this definition") the session to use for the request. get\_net\_liquidating\_value\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.session "tastytrade.account.Account.get_net_liquidating_value_history.session (Python parameter) — the session to use for the request, can't be certification.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[time\_back](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.time_back "tastytrade.account.Account.get_net_liquidating_value_history.time_back (Python parameter) — the time period to get net liquidating value snapshots for.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_time](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.start_time "tastytrade.account.Account.get_net_liquidating_value_history.start_time (Python parameter) — the start point for the query.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[NetLiqOhlc](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history "Link to this definition") Returns a list of account net liquidating value snapshots over the specified time period. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.session "Permalink to this definition") the session to use for the request, can’t be certification. time\_back: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.time_back "Permalink to this definition") the time period to get net liquidating value snapshots for. This param is required if start\_time is not given. Possible values are: ‘1d’, ‘1m’, ‘3m’, ‘6m’, ‘1y’, ‘all’. start\_time: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history.start_time "Permalink to this definition") the start point for the query. This param is required is time-back is not given. If given, will take precedence over time-back. get\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order.session "tastytrade.account.Account.get_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order.order_id "tastytrade.account.Account.get_order.order_id (Python parameter) — the ID of the order to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order "Link to this definition") Gets an order with the given ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order.session "Permalink to this definition") the session to use for the request. order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order.order_id "Permalink to this definition") the ID of the order to fetch. get\_order\_history(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.session "tastytrade.account.Account.get_order_history.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[per\_page](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.per_page "tastytrade.account.Account.get_order_history.per_page (Python parameter) — the number of results to return per page.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`_, _[page\_offset](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.page_offset "tastytrade.account.Account.get_order_history.page_offset (Python parameter) — provide a specific page to get; if None, get all pages") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`_, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.start_date "tastytrade.account.Account.get_order_history.start_date (Python parameter) — the start date of orders to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.end_date "tastytrade.account.Account.get_order_history.end_date (Python parameter) — the end date of orders to query.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.underlying_symbol "tastytrade.account.Account.get_order_history.underlying_symbol (Python parameter) — underlying symbol to filter by.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[statuses](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.statuses "tastytrade.account.Account.get_order_history.statuses (Python parameter) — a list of statuses to filter by.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[OrderStatus](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus "tastytrade.order.OrderStatus (Python enum) — Bases: str, Enum")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.futures_symbol "tastytrade.account.Account.get_order_history.futures_symbol (Python parameter) — Tastytrade future symbol for futures and future options.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.underlying_instrument_type "tastytrade.account.Account.get_order_history.underlying_instrument_type (Python parameter) — the type of instrument to filter by") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[sort](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.sort "tastytrade.account.Account.get_order_history.sort (Python parameter) — the order to sort results in, either 'Desc' or 'Asc'.") : 'Asc' | 'Desc' | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[start\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.start_at "tastytrade.account.Account.get_order_history.start_at (Python parameter) — datetime start range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[end\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.end_at "tastytrade.account.Account.get_order_history.end_at (Python parameter) — datetime end range for filtering transactions in full date-time.") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history "Link to this definition") Get order history of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.session "Permalink to this definition") the session to use for the request. per\_page: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `50`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.per_page "Permalink to this definition") the number of results to return per page. page\_offset: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `0`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.page_offset "Permalink to this definition") provide a specific page to get; if None, get all pages start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.start_date "Permalink to this definition") the start date of orders to query. end\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.end_date "Permalink to this definition") the end date of orders to query. underlying\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.underlying_symbol "Permalink to this definition") underlying symbol to filter by. statuses: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[OrderStatus](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus "tastytrade.order.OrderStatus (Python enum) — Bases: str, Enum")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.statuses "Permalink to this definition") a list of statuses to filter by. futures\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.futures_symbol "Permalink to this definition") Tastytrade future symbol for futures and future options. underlying\_instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.underlying_instrument_type "Permalink to this definition") the type of instrument to filter by sort: 'Asc' | 'Desc' | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.sort "Permalink to this definition") the order to sort results in, either ‘Desc’ or ‘Asc’. start\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.start_at "Permalink to this definition") datetime start range for filtering transactions in full date-time. end\_at: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history.end_at "Permalink to this definition") datetime end range for filtering transactions in full date-time. get\_positions(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.session "tastytrade.account.Account.get_positions.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[underlying\_symbols](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.underlying_symbols "tastytrade.account.Account.get_positions.underlying_symbols (Python parameter) — an array of underlying symbols for positions.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.symbol "tastytrade.account.Account.get_positions.symbol (Python parameter) — a single symbol.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.instrument_type "tastytrade.account.Account.get_positions.instrument_type (Python parameter) — the type of instrument.") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[include\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.include_closed "tastytrade.account.Account.get_positions.include_closed (Python parameter) — if closed positions should be included in the query.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_product\_code](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.underlying_product_code "tastytrade.account.Account.get_positions.underlying_product_code (Python parameter) — the underlying future's product code.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[partition\_keys](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.partition_keys "tastytrade.account.Account.get_positions.partition_keys (Python parameter) — account partition keys.") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[net\_positions](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.net_positions "tastytrade.account.Account.get_positions.net_positions (Python parameter) — returns net positions grouped by instrument type and symbol.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[include\_marks](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.include_marks "tastytrade.account.Account.get_positions.include_marks (Python parameter) — include current quote mark (note: can decrease performance).") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[CurrentPosition](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions "Link to this definition") Get the current positions of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.session "Permalink to this definition") the session to use for the request. underlying\_symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.underlying_symbols "Permalink to this definition") an array of underlying symbols for positions. symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.symbol "Permalink to this definition") a single symbol. instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.instrument_type "Permalink to this definition") the type of instrument. include\_closed: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.include_closed "Permalink to this definition") if closed positions should be included in the query. underlying\_product\_code: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.underlying_product_code "Permalink to this definition") the underlying future’s product code. partition\_keys: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.partition_keys "Permalink to this definition") account partition keys. net\_positions: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.net_positions "Permalink to this definition") returns net positions grouped by instrument type and symbol. include\_marks: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions.include_marks "Permalink to this definition") include current quote mark (note: can decrease performance). get\_total\_fees(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees.session "tastytrade.account.Account.get_total_fees.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees.day "tastytrade.account.Account.get_total_fees.day (Python parameter) — the date to get fees for.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [FeesInfo](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo "tastytrade.account.FeesInfo (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees "Link to this definition") Get the total fees for a given date. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees.session "Permalink to this definition") the session to use for the request. day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees.day "Permalink to this definition") the date to get fees for. get\_trading\_status(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_trading_status.session "tastytrade.account.Account.get_trading_status.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [TradingStatus](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_trading_status "Link to this definition") Get the trading status of the account. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_trading_status-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_trading_status.session "Permalink to this definition") the session to use for the request. get\_transaction(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction.session "tastytrade.account.Account.get_transaction.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction.id "tastytrade.account.Account.get_transaction.id (Python parameter) — the ID of the transaction to fetch.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _) → [Transaction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction "Link to this definition") Get a single transaction by ID. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction.session "Permalink to this definition") the session to use for the request. id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction.id "Permalink to this definition") the ID of the transaction to fetch. place\_complex\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.session "tastytrade.account.Account.place_complex_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.order "tastytrade.account.Account.place_complex_order.order (Python parameter) — the order to place.") : [NewComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewComplexOrder "tastytrade.order.NewComplexOrder (Python model) — Bases: TastytradeData") _, _[dry\_run](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.dry_run "tastytrade.account.Account.place_complex_order.dry_run (Python parameter) — whether this is a test order or not.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`_) → [PlacedComplexOrderResponse](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrderResponse "tastytrade.order.PlacedComplexOrderResponse (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order "Link to this definition") Place the given order. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.session "Permalink to this definition") the session to use for the request. order: [NewComplexOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewComplexOrder "tastytrade.order.NewComplexOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.order "Permalink to this definition") the order to place. dry\_run: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order.dry_run "Permalink to this definition") whether this is a test order or not. place\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.session "tastytrade.account.Account.place_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.order "tastytrade.account.Account.place_order.order (Python parameter) — the order to place.") : [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") _, _[dry\_run](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.dry_run "tastytrade.account.Account.place_order.dry_run (Python parameter) — whether this is a test order or not.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`_) → [PlacedOrderResponse](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrderResponse "tastytrade.order.PlacedOrderResponse (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order "Link to this definition") Place the given order. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.session "Permalink to this definition") the session to use for the request. order: [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.order "Permalink to this definition") the order to place. dry\_run: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order.dry_run "Permalink to this definition") whether this is a test order or not. replace\_order(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.session "tastytrade.account.Account.replace_order.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[old\_order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.old_order_id "tastytrade.account.Account.replace_order.old_order_id (Python parameter) — the ID of the order to replace.") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[new\_order](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.new_order "tastytrade.account.Account.replace_order.new_order (Python parameter) — the new order to replace the old order with.") : [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") _) → [PlacedOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder "tastytrade.order.PlacedOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order "Link to this definition") Replace an order with a new order with different characteristics (but same legs). Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.session "Permalink to this definition") the session to use for the request. old\_order\_id: [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.old_order_id "Permalink to this definition") the ID of the order to replace. new\_order: [NewOrder](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder "tastytrade.order.NewOrder (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order.new_order "Permalink to this definition") the new order to replace the old order with. _pydantic model_ tastytrade.account.AccountBalance(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[cash\_balance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cash_balance (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_equity\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_equity_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_equity\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_equity_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_futures\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_futures_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_futures\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_futures_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_futures\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_futures_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_futures\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_futures_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_margineable\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_margineable_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_margineable\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_margineable_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[margin\_equity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.margin_equity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[equity\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.equity_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[derivative\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.derivative_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trading\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trading_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[futures\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[available\_trading\_funds](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.available_trading_funds (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[reg\_t\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.reg_t_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trading\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trading_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_equity\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_equity_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[net\_liquidating\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.net_liquidating_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[cash\_available\_to\_withdraw](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cash_available_to_withdraw (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trade\_excess](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trade_excess (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.pending_cash (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_cryptocurrency\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_cryptocurrency_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_cryptocurrency\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_cryptocurrency_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[cryptocurrency\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cryptocurrency_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[unsettled\_cryptocurrency\_fiat\_amount](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.unsettled_cryptocurrency_fiat_amount (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[closed\_loop\_available\_balance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.closed_loop_available_balance (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[equity\_offering\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.equity_offering_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_bond\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_bond_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[bond\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.bond_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[used\_derivative\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.used_derivative_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[snapshot\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.snapshot_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[reg\_t\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.reg_t_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[futures\_overnight\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_overnight_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[futures\_intraday\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_intraday_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_excess](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_excess (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_margin\_interest](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.pending_margin_interest (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[effective\_cryptocurrency\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.effective_cryptocurrency_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[apex\_starting\_day\_margin\_equity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.apex_starting_day_margin_equity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[buying\_power\_adjustment](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.buying_power_adjustment (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[time\_of\_day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.time_of_day (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing account balance information. Show JSON schema `{ "title": "AccountBalance", "description": "Dataclass containing account balance information.", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "cash-balance": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Cash-Balance" }, "long-equity-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Equity-Value" }, "short-equity-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Equity-Value" }, "long-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Derivative-Value" }, "short-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Derivative-Value" }, "long-futures-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Futures-Value" }, "short-futures-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Futures-Value" }, "long-futures-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Futures-Derivative-Value" }, "short-futures-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Futures-Derivative-Value" }, "long-margineable-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Margineable-Value" }, "short-margineable-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Margineable-Value" }, "margin-equity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Equity" }, "equity-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Equity-Buying-Power" }, "derivative-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Derivative-Buying-Power" }, "day-trading-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trading-Buying-Power" }, "futures-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Futures-Margin-Requirement" }, "available-trading-funds": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Available-Trading-Funds" }, "maintenance-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Requirement" }, "maintenance-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Call-Value" }, "reg-t-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Reg-T-Call-Value" }, "day-trading-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trading-Call-Value" }, "day-equity-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Equity-Call-Value" }, "net-liquidating-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Net-Liquidating-Value" }, "cash-available-to-withdraw": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Cash-Available-To-Withdraw" }, "day-trade-excess": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trade-Excess" }, "pending-cash": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash" }, "long-cryptocurrency-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Cryptocurrency-Value" }, "short-cryptocurrency-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Cryptocurrency-Value" }, "cryptocurrency-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Cryptocurrency-Margin-Requirement" }, "unsettled-cryptocurrency-fiat-amount": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Unsettled-Cryptocurrency-Fiat-Amount" }, "closed-loop-available-balance": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Closed-Loop-Available-Balance" }, "equity-offering-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Equity-Offering-Margin-Requirement" }, "long-bond-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Bond-Value" }, "bond-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Bond-Margin-Requirement" }, "used-derivative-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Used-Derivative-Buying-Power" }, "snapshot-date": { "format": "date", "title": "Snapshot-Date", "type": "string" }, "reg-t-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Reg-T-Margin-Requirement" }, "futures-overnight-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Futures-Overnight-Margin-Requirement" }, "futures-intraday-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Futures-Intraday-Margin-Requirement" }, "maintenance-excess": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Excess" }, "pending-margin-interest": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Margin-Interest" }, "effective-cryptocurrency-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Effective-Cryptocurrency-Buying-Power" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" }, "apex-starting-day-margin-equity": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Apex-Starting-Day-Margin-Equity" }, "buying-power-adjustment": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Buying-Power-Adjustment" }, "time-of-day": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Time-Of-Day" } }, "required": [ "account-number", "cash-balance", "long-equity-value", "short-equity-value", "long-derivative-value", "short-derivative-value", "long-futures-value", "short-futures-value", "long-futures-derivative-value", "short-futures-derivative-value", "long-margineable-value", "short-margineable-value", "margin-equity", "equity-buying-power", "derivative-buying-power", "day-trading-buying-power", "futures-margin-requirement", "available-trading-funds", "maintenance-requirement", "maintenance-call-value", "reg-t-call-value", "day-trading-call-value", "day-equity-call-value", "net-liquidating-value", "cash-available-to-withdraw", "day-trade-excess", "pending-cash", "long-cryptocurrency-value", "short-cryptocurrency-value", "cryptocurrency-margin-requirement", "unsettled-cryptocurrency-fiat-amount", "closed-loop-available-balance", "equity-offering-margin-requirement", "long-bond-value", "bond-margin-requirement", "used-derivative-buying-power", "snapshot-date", "reg-t-margin-requirement", "futures-overnight-margin-requirement", "futures-intraday-margin-requirement", "maintenance-excess", "pending-margin-interest", "effective-cryptocurrency-buying-power", "updated-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.account_number (Python parameter)") * [`apex_starting_day_margin_equity (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.apex_starting_day_margin_equity (Python parameter)") * [`available_trading_funds (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.available_trading_funds (Python parameter)") * [`bond_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.bond_margin_requirement (Python parameter)") * [`buying_power_adjustment (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.buying_power_adjustment (Python parameter)") * [`cash_available_to_withdraw (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cash_available_to_withdraw (Python parameter)") * [`cash_balance (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cash_balance (Python parameter)") * [`closed_loop_available_balance (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.closed_loop_available_balance (Python parameter)") * [`cryptocurrency_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.cryptocurrency_margin_requirement (Python parameter)") * [`day_equity_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_equity_call_value (Python parameter)") * [`day_trade_excess (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trade_excess (Python parameter)") * [`day_trading_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trading_buying_power (Python parameter)") * [`day_trading_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.day_trading_call_value (Python parameter)") * [`derivative_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.derivative_buying_power (Python parameter)") * [`effective_cryptocurrency_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.effective_cryptocurrency_buying_power (Python parameter)") * [`equity_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.equity_buying_power (Python parameter)") * [`equity_offering_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.equity_offering_margin_requirement (Python parameter)") * [`futures_intraday_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_intraday_margin_requirement (Python parameter)") * [`futures_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_margin_requirement (Python parameter)") * [`futures_overnight_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.futures_overnight_margin_requirement (Python parameter)") * [`long_bond_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_bond_value (Python parameter)") * [`long_cryptocurrency_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_cryptocurrency_value (Python parameter)") * [`long_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_derivative_value (Python parameter)") * [`long_equity_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_equity_value (Python parameter)") * [`long_futures_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_futures_derivative_value (Python parameter)") * [`long_futures_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_futures_value (Python parameter)") * [`long_margineable_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.long_margineable_value (Python parameter)") * [`maintenance_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_call_value (Python parameter)") * [`maintenance_excess (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_excess (Python parameter)") * [`maintenance_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.maintenance_requirement (Python parameter)") * [`margin_equity (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.margin_equity (Python parameter)") * [`net_liquidating_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.net_liquidating_value (Python parameter)") * [`pending_cash (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.pending_cash (Python parameter)") * [`pending_margin_interest (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.pending_margin_interest (Python parameter)") * [`reg_t_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.reg_t_call_value (Python parameter)") * [`reg_t_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.reg_t_margin_requirement (Python parameter)") * [`short_cryptocurrency_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_cryptocurrency_value (Python parameter)") * [`short_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_derivative_value (Python parameter)") * [`short_equity_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_equity_value (Python parameter)") * [`short_futures_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_futures_derivative_value (Python parameter)") * [`short_futures_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_futures_value (Python parameter)") * [`short_margineable_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.short_margineable_value (Python parameter)") * [`snapshot_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.snapshot_date (Python parameter)") * [`time_of_day (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.time_of_day (Python parameter)") * [`unsettled_cryptocurrency_fiat_amount (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.unsettled_cryptocurrency_fiat_amount (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.updated_at (Python parameter)") * [`used_derivative_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance "tastytrade.account.AccountBalance.used_derivative_buying_power (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalance-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.AccountBalanceSnapshot(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[cash\_balance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cash_balance (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_equity\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_equity_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_equity\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_equity_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_futures\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_futures_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_futures\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_futures_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_futures\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_futures_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_futures\_derivative\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_futures_derivative_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[long\_margineable\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_margineable_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[short\_margineable\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_margineable_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[margin\_equity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.margin_equity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[equity\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.equity_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[derivative\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.derivative_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trading\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trading_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[futures\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.futures_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[available\_trading\_funds](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.available_trading_funds (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.maintenance_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.maintenance_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[reg\_t\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.reg_t_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trading\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trading_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_equity\_call\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_equity_call_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[net\_liquidating\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.net_liquidating_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[cash\_available\_to\_withdraw](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cash_available_to_withdraw (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[day\_trade\_excess](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trade_excess (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.pending_cash (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[snapshot\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.snapshot_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[time\_of\_day](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.time_of_day (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[long\_cryptocurrency\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_cryptocurrency_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[short\_cryptocurrency\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_cryptocurrency_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[cryptocurrency\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cryptocurrency_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[unsettled\_cryptocurrency\_fiat\_amount](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.unsettled_cryptocurrency_fiat_amount (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[closed\_loop\_available\_balance](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.closed_loop_available_balance (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[equity\_offering\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.equity_offering_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[long\_bond\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_bond_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[bond\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.bond_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[used\_derivative\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.used_derivative_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing account balance for a moment in time (snapshot). Show JSON schema `{ "title": "AccountBalanceSnapshot", "description": "Dataclass containing account balance for a moment in time (snapshot).", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "cash-balance": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Cash-Balance" }, "long-equity-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Equity-Value" }, "short-equity-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Equity-Value" }, "long-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Derivative-Value" }, "short-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Derivative-Value" }, "long-futures-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Futures-Value" }, "short-futures-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Futures-Value" }, "long-futures-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Futures-Derivative-Value" }, "short-futures-derivative-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Futures-Derivative-Value" }, "long-margineable-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Long-Margineable-Value" }, "short-margineable-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Short-Margineable-Value" }, "margin-equity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Equity" }, "equity-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Equity-Buying-Power" }, "derivative-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Derivative-Buying-Power" }, "day-trading-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trading-Buying-Power" }, "futures-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Futures-Margin-Requirement" }, "available-trading-funds": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Available-Trading-Funds" }, "maintenance-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Requirement" }, "maintenance-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Call-Value" }, "reg-t-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Reg-T-Call-Value" }, "day-trading-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trading-Call-Value" }, "day-equity-call-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Equity-Call-Value" }, "net-liquidating-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Net-Liquidating-Value" }, "cash-available-to-withdraw": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Cash-Available-To-Withdraw" }, "day-trade-excess": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Day-Trade-Excess" }, "pending-cash": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash" }, "snapshot-date": { "format": "date", "title": "Snapshot-Date", "type": "string" }, "time-of-day": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Time-Of-Day" }, "long-cryptocurrency-value": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Long-Cryptocurrency-Value" }, "short-cryptocurrency-value": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Short-Cryptocurrency-Value" }, "cryptocurrency-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Cryptocurrency-Margin-Requirement" }, "unsettled-cryptocurrency-fiat-amount": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unsettled-Cryptocurrency-Fiat-Amount" }, "closed-loop-available-balance": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Closed-Loop-Available-Balance" }, "equity-offering-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Equity-Offering-Margin-Requirement" }, "long-bond-value": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Long-Bond-Value" }, "bond-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Bond-Margin-Requirement" }, "used-derivative-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Used-Derivative-Buying-Power" } }, "required": [ "account-number", "cash-balance", "long-equity-value", "short-equity-value", "long-derivative-value", "short-derivative-value", "long-futures-value", "short-futures-value", "long-futures-derivative-value", "short-futures-derivative-value", "long-margineable-value", "short-margineable-value", "margin-equity", "equity-buying-power", "derivative-buying-power", "day-trading-buying-power", "futures-margin-requirement", "available-trading-funds", "maintenance-requirement", "maintenance-call-value", "reg-t-call-value", "day-trading-call-value", "day-equity-call-value", "net-liquidating-value", "cash-available-to-withdraw", "day-trade-excess", "pending-cash", "snapshot-date" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.account_number (Python parameter)") * [`available_trading_funds (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.available_trading_funds (Python parameter)") * [`bond_margin_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.bond_margin_requirement (Python parameter)") * [`cash_available_to_withdraw (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cash_available_to_withdraw (Python parameter)") * [`cash_balance (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cash_balance (Python parameter)") * [`closed_loop_available_balance (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.closed_loop_available_balance (Python parameter)") * [`cryptocurrency_margin_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.cryptocurrency_margin_requirement (Python parameter)") * [`day_equity_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_equity_call_value (Python parameter)") * [`day_trade_excess (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trade_excess (Python parameter)") * [`day_trading_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trading_buying_power (Python parameter)") * [`day_trading_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.day_trading_call_value (Python parameter)") * [`derivative_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.derivative_buying_power (Python parameter)") * [`equity_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.equity_buying_power (Python parameter)") * [`equity_offering_margin_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.equity_offering_margin_requirement (Python parameter)") * [`futures_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.futures_margin_requirement (Python parameter)") * [`long_bond_value (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_bond_value (Python parameter)") * [`long_cryptocurrency_value (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_cryptocurrency_value (Python parameter)") * [`long_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_derivative_value (Python parameter)") * [`long_equity_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_equity_value (Python parameter)") * [`long_futures_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_futures_derivative_value (Python parameter)") * [`long_futures_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_futures_value (Python parameter)") * [`long_margineable_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.long_margineable_value (Python parameter)") * [`maintenance_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.maintenance_call_value (Python parameter)") * [`maintenance_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.maintenance_requirement (Python parameter)") * [`margin_equity (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.margin_equity (Python parameter)") * [`net_liquidating_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.net_liquidating_value (Python parameter)") * [`pending_cash (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.pending_cash (Python parameter)") * [`reg_t_call_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.reg_t_call_value (Python parameter)") * [`short_cryptocurrency_value (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_cryptocurrency_value (Python parameter)") * [`short_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_derivative_value (Python parameter)") * [`short_equity_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_equity_value (Python parameter)") * [`short_futures_derivative_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_futures_derivative_value (Python parameter)") * [`short_futures_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_futures_value (Python parameter)") * [`short_margineable_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.short_margineable_value (Python parameter)") * [`snapshot_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.snapshot_date (Python parameter)") * [`time_of_day (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.time_of_day (Python parameter)") * [`unsettled_cryptocurrency_fiat_amount (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.unsettled_cryptocurrency_fiat_amount (Python parameter)") * [`used_derivative_buying_power (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot "tastytrade.account.AccountBalanceSnapshot.used_derivative_buying_power (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.AccountBalanceSnapshot-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.CurrentPosition(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.underlying_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[quantity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.quantity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[quantity\_direction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.quantity_direction (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[close\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.close_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[average\_open\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_open_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[multiplier](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.multiplier (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[cost\_effect](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.cost_effect (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_suppressed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.is_suppressed (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_frozen](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.is_frozen (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[realized\_day\_gain](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_day_gain (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[realized\_today](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_today (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[mark](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.mark (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[mark\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.mark_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[restricted\_quantity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.restricted_quantity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[expires\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.expires_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[fixing\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.fixing_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[deliverable\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.deliverable_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[average\_yearly\_market\_close\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_yearly_market_close_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[average\_daily\_market\_close\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_daily_market_close_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[realized\_day\_gain\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_day_gain_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[realized\_today\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_today_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing imformation about an individual position in a portfolio. Show JSON schema ``{ "title": "CurrentPosition", "description": "Dataclass containing imformation about an individual position in a\nportfolio.", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" }, "underlying-symbol": { "title": "Underlying-Symbol", "type": "string" }, "quantity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Quantity" }, "quantity-direction": { "title": "Quantity-Direction", "type": "string" }, "close-price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Close-Price" }, "average-open-price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Average-Open-Price" }, "multiplier": { "title": "Multiplier", "type": "integer" }, "cost-effect": { "title": "Cost-Effect", "type": "string" }, "is-suppressed": { "title": "Is-Suppressed", "type": "boolean" }, "is-frozen": { "title": "Is-Frozen", "type": "boolean" }, "realized-day-gain": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Realized-Day-Gain" }, "realized-today": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Realized-Today" }, "created-at": { "format": "date-time", "title": "Created-At", "type": "string" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" }, "mark": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Mark" }, "mark-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Mark-Price" }, "restricted-quantity": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Restricted-Quantity" }, "expires-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Expires-At" }, "fixing-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Fixing-Price" }, "deliverable-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Deliverable-Type" }, "average-yearly-market-close-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Average-Yearly-Market-Close-Price" }, "average-daily-market-close-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Average-Daily-Market-Close-Price" }, "realized-day-gain-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Realized-Day-Gain-Date" }, "realized-today-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Realized-Today-Date" } }, "$defs": { "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" } }, "required": [ "account-number", "symbol", "instrument-type", "underlying-symbol", "quantity", "quantity-direction", "close-price", "average-open-price", "multiplier", "cost-effect", "is-suppressed", "is-frozen", "realized-day-gain", "realized-today", "created-at", "updated-at" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.account_number (Python parameter)") * [`average_daily_market_close_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_daily_market_close_price (Python parameter)") * [`average_open_price (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_open_price (Python parameter)") * [`average_yearly_market_close_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.average_yearly_market_close_price (Python parameter)") * [`close_price (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.close_price (Python parameter)") * [`cost_effect (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.cost_effect (Python parameter)") * [`created_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.created_at (Python parameter)") * [`deliverable_type (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.deliverable_type (Python parameter)") * [`expires_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.expires_at (Python parameter)") * [`fixing_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.fixing_price (Python parameter)") * [`instrument_type (tastytrade.order.InstrumentType)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.instrument_type (Python parameter)") * [`is_frozen (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.is_frozen (Python parameter)") * [`is_suppressed (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.is_suppressed (Python parameter)") * [`mark (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.mark (Python parameter)") * [`mark_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.mark_price (Python parameter)") * [`multiplier (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.multiplier (Python parameter)") * [`quantity (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.quantity (Python parameter)") * [`quantity_direction (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.quantity_direction (Python parameter)") * [`realized_day_gain (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_day_gain (Python parameter)") * [`realized_day_gain_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_day_gain_date (Python parameter)") * [`realized_today (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_today (Python parameter)") * [`realized_today_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.realized_today_date (Python parameter)") * [`restricted_quantity (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.restricted_quantity (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.symbol (Python parameter)") * [`underlying_symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.underlying_symbol (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition "tastytrade.account.CurrentPosition.updated_at (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.CurrentPosition-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.EmptyDict[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.EmptyDict "Link to this definition") Bases: `BaseModel` Show JSON schema `{ "title": "EmptyDict", "type": "object", "properties": {}, "additionalProperties": false }` _pydantic model_ tastytrade.account.FeesInfo(_\*_, _[total\_fees](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo "tastytrade.account.FeesInfo.total_fees (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Show JSON schema `{ "title": "FeesInfo", "type": "object", "properties": { "total-fees": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Total-Fees" } }, "required": [ "total-fees" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo-fields "Permalink to this headline") * [`total_fees (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo "tastytrade.account.FeesInfo.total_fees (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.FeesInfo-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.Lot(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[transaction\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.transaction_id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[quantity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.quantity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[quantity\_direction](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.quantity_direction (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[executed\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.executed_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[transaction\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.transaction_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about the lot of a position. Show JSON schema `{ "title": "Lot", "description": "Dataclass containing information about the lot of a position.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "transaction-id": { "title": "Transaction-Id", "type": "integer" }, "quantity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Quantity" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "quantity-direction": { "title": "Quantity-Direction", "type": "string" }, "executed-at": { "format": "date-time", "title": "Executed-At", "type": "string" }, "transaction-date": { "format": "date", "title": "Transaction-Date", "type": "string" } }, "required": [ "id", "transaction-id", "quantity", "price", "quantity-direction", "executed-at", "transaction-date" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot-fields "Permalink to this headline") * [`executed_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.executed_at (Python parameter)") * [`id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.id (Python parameter)") * [`price (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.price (Python parameter)") * [`quantity (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.quantity (Python parameter)") * [`quantity_direction (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.quantity_direction (Python parameter)") * [`transaction_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.transaction_date (Python parameter)") * [`transaction_id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot.transaction_id (Python parameter)") _pydantic model_ tastytrade.account.MarginReport(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[description](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[margin\_calculation\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_calculation_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[option\_level](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.option_level (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.maintenance_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[margin\_equity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_equity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[option\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.option_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[reg\_t\_margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.reg_t_margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[reg\_t\_option\_buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.reg_t_option_buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[maintenance\_excess](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.maintenance_excess (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[last\_state\_timestamp](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.last_state_timestamp (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[groups](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.groups (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarginReportEntry](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry (Python model) — Bases: TastytradeData")\ | [EmptyDict](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.EmptyDict "tastytrade.account.EmptyDict (Python model) — Bases: BaseModel")\ \]_, _[initial\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.initial_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing an overall portfolio margin report. Show JSON schema `{ "title": "MarginReport", "description": "Dataclass containing an overall portfolio margin report.", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "description": { "title": "Description", "type": "string" }, "margin-calculation-type": { "title": "Margin-Calculation-Type", "type": "string" }, "option-level": { "title": "Option-Level", "type": "string" }, "margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Requirement" }, "maintenance-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Requirement" }, "margin-equity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Equity" }, "option-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Option-Buying-Power" }, "reg-t-margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Reg-T-Margin-Requirement" }, "reg-t-option-buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Reg-T-Option-Buying-Power" }, "maintenance-excess": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Maintenance-Excess" }, "last-state-timestamp": { "title": "Last-State-Timestamp", "type": "integer" }, "groups": { "items": { "anyOf": [ { "$ref": "#/$defs/MarginReportEntry" }, { "$ref": "#/$defs/EmptyDict" } ] }, "title": "Groups", "type": "array" }, "initial-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Initial-Requirement" } }, "$defs": { "EmptyDict": { "additionalProperties": false, "properties": {}, "title": "EmptyDict", "type": "object" }, "MarginReportEntry": { "description": "Dataclass containing an individual entry (relating to a specific position)\nas part of the overall margin report.", "properties": { "description": { "title": "Description", "type": "string" }, "code": { "title": "Code", "type": "string" }, "buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Buying-Power" }, "margin-calculation-type": { "title": "Margin-Calculation-Type", "type": "string" }, "margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Requirement" }, "expected-price-range-up-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Price-Range-Up-Percent" }, "expected-price-range-down-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Price-Range-Down-Percent" }, "groups": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Groups" }, "initial-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Initial-Requirement" }, "maintenance-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Maintenance-Requirement" }, "point-of-no-return-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Point-Of-No-Return-Percent" }, "price-increase-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price-Increase-Percent" }, "price-decrease-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price-Decrease-Percent" }, "underlying-symbol": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Underlying-Symbol" }, "underlying-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Underlying-Type" } }, "required": [ "description", "code", "buying-power", "margin-calculation-type", "margin-requirement" ], "title": "MarginReportEntry", "type": "object" } }, "required": [ "account-number", "description", "margin-calculation-type", "option-level", "margin-requirement", "maintenance-requirement", "margin-equity", "option-buying-power", "reg-t-margin-requirement", "reg-t-option-buying-power", "maintenance-excess", "last-state-timestamp", "groups" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.account_number (Python parameter)") * [`description (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.description (Python parameter)") * [`groups (list[tastytrade.account.MarginReportEntry | tastytrade.account.EmptyDict])`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.groups (Python parameter)") * [`initial_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.initial_requirement (Python parameter)") * [`last_state_timestamp (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.last_state_timestamp (Python parameter)") * [`maintenance_excess (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.maintenance_excess (Python parameter)") * [`maintenance_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.maintenance_requirement (Python parameter)") * [`margin_calculation_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_calculation_type (Python parameter)") * [`margin_equity (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_equity (Python parameter)") * [`margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.margin_requirement (Python parameter)") * [`option_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.option_buying_power (Python parameter)") * [`option_level (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.option_level (Python parameter)") * [`reg_t_margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.reg_t_margin_requirement (Python parameter)") * [`reg_t_option_buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport "tastytrade.account.MarginReport.reg_t_option_buying_power (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReport-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.MarginReportEntry(_\*_, _[description](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[code](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.code (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[buying\_power](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.buying_power (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[margin\_calculation\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.margin_calculation_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[margin\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.margin_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[expected\_price\_range\_up\_percent](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.expected_price_range_up_percent (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[expected\_price\_range\_down\_percent](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.expected_price_range_down_percent (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[groups](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.groups (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]\] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[initial\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.initial_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[maintenance\_requirement](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.maintenance_requirement (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[point\_of\_no\_return\_percent](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.point_of_no_return_percent (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[price\_increase\_percent](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.price_increase_percent (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[price\_decrease\_percent](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.price_decrease_percent (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.underlying_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.underlying_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing an individual entry (relating to a specific position) as part of the overall margin report. Show JSON schema `{ "title": "MarginReportEntry", "description": "Dataclass containing an individual entry (relating to a specific position)\nas part of the overall margin report.", "type": "object", "properties": { "description": { "title": "Description", "type": "string" }, "code": { "title": "Code", "type": "string" }, "buying-power": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Buying-Power" }, "margin-calculation-type": { "title": "Margin-Calculation-Type", "type": "string" }, "margin-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Margin-Requirement" }, "expected-price-range-up-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Price-Range-Up-Percent" }, "expected-price-range-down-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Price-Range-Down-Percent" }, "groups": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Groups" }, "initial-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Initial-Requirement" }, "maintenance-requirement": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Maintenance-Requirement" }, "point-of-no-return-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Point-Of-No-Return-Percent" }, "price-increase-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price-Increase-Percent" }, "price-decrease-percent": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price-Decrease-Percent" }, "underlying-symbol": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Underlying-Symbol" }, "underlying-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Underlying-Type" } }, "required": [ "description", "code", "buying-power", "margin-calculation-type", "margin-requirement" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry-fields "Permalink to this headline") * [`buying_power (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.buying_power (Python parameter)") * [`code (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.code (Python parameter)") * [`description (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.description (Python parameter)") * [`expected_price_range_down_percent (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.expected_price_range_down_percent (Python parameter)") * [`expected_price_range_up_percent (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.expected_price_range_up_percent (Python parameter)") * [`groups (list[dict[str, Any]] | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.groups (Python parameter)") * [`initial_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.initial_requirement (Python parameter)") * [`maintenance_requirement (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.maintenance_requirement (Python parameter)") * [`margin_calculation_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.margin_calculation_type (Python parameter)") * [`margin_requirement (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.margin_requirement (Python parameter)") * [`point_of_no_return_percent (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.point_of_no_return_percent (Python parameter)") * [`price_decrease_percent (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.price_decrease_percent (Python parameter)") * [`price_increase_percent (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.price_increase_percent (Python parameter)") * [`underlying_symbol (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.underlying_symbol (Python parameter)") * [`underlying_type (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry "tastytrade.account.MarginReportEntry.underlying_type (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.MarginReportEntry-validators "Permalink to this headline") * `validate_price_effects` » `all fields` _pydantic model_ tastytrade.account.NetLiqOhlc(_\*_, _[open](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.open (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[high](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.high (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[low](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.low (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[close](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash\_open](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_open (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash\_high](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_high (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash\_low](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_low (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[pending\_cash\_close](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[total\_open](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_open (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[total\_high](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_high (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[total\_low](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_low (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[total\_close](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[time](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.time (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing historical net liquidation data in OHLC format (open, high, low, close), with a timestamp. Show JSON schema `{ "title": "NetLiqOhlc", "description": "Dataclass containing historical net liquidation data in OHLC format\n(open, high, low, close), with a timestamp.", "type": "object", "properties": { "open": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Open" }, "high": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "High" }, "low": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Low" }, "close": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Close" }, "pending-cash-open": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash-Open" }, "pending-cash-high": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash-High" }, "pending-cash-low": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash-Low" }, "pending-cash-close": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Pending-Cash-Close" }, "total-open": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Total-Open" }, "total-high": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Total-High" }, "total-low": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Total-Low" }, "total-close": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Total-Close" }, "time": { "title": "Time", "type": "string" } }, "required": [ "open", "high", "low", "close", "pending-cash-open", "pending-cash-high", "pending-cash-low", "pending-cash-close", "total-open", "total-high", "total-low", "total-close", "time" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc-fields "Permalink to this headline") * [`close (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.close (Python parameter)") * [`high (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.high (Python parameter)") * [`low (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.low (Python parameter)") * [`open (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.open (Python parameter)") * [`pending_cash_close (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_close (Python parameter)") * [`pending_cash_high (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_high (Python parameter)") * [`pending_cash_low (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_low (Python parameter)") * [`pending_cash_open (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.pending_cash_open (Python parameter)") * [`time (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.time (Python parameter)") * [`total_close (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_close (Python parameter)") * [`total_high (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_high (Python parameter)") * [`total_low (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_low (Python parameter)") * [`total_open (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.NetLiqOhlc "tastytrade.account.NetLiqOhlc.total_open (Python parameter)") _pydantic model_ tastytrade.account.TradingStatus(_\*_, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[equities\_margin\_calculation\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.equities_margin_calculation_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[fee\_schedule\_name](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.fee_schedule_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[futures\_margin\_rate\_multiplier](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.futures_margin_rate_multiplier (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[has\_intraday\_equities\_margin](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.has_intraday_equities_margin (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[is\_aggregated\_at\_clearing](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_aggregated_at_clearing (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_closed](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_closed (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_closing\_only](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_closing_only (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_cryptocurrency\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_cryptocurrency_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_frozen](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_frozen (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_full\_equity\_margin\_required](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_full_equity_margin_required (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_futures\_closing\_only](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_closing_only (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_futures\_intra\_day\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_intra_day_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_futures\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_in\_day\_trade\_equity\_maintenance\_call](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_in_day_trade_equity_maintenance_call (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_in\_margin\_call](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_in_margin_call (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_pattern\_day\_trader](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_pattern_day_trader (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_small\_notional\_futures\_intra\_day\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_small_notional_futures_intra_day_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_roll\_the\_day\_forward\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_roll_the_day_forward_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[are\_far\_otm\_net\_options\_restricted](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.are_far_otm_net_options_restricted (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[options\_level](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.options_level (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[short\_calls\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.short_calls_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[small\_notional\_futures\_margin\_rate\_multiplier](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.small_notional_futures_margin_rate_multiplier (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[is\_equity\_offering\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_equity_offering_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_equity\_offering\_closing\_only](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_equity_offering_closing_only (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[is\_portfolio\_margin\_enabled](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_portfolio_margin_enabled (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[is\_risk\_reducing\_only](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_risk_reducing_only (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_trade\_count](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.day_trade_count (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[autotrade\_account\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.autotrade_account_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[clearing\_account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.clearing_account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[clearing\_aggregation\_identifier](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.clearing_aggregation_identifier (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[is\_cryptocurrency\_closing\_only](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_cryptocurrency_closing_only (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[pdt\_reset\_on](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.pdt_reset_on (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[cmta\_override](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.cmta_override (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[enhanced\_fraud\_safeguards\_enabled\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.enhanced_fraud_safeguards_enabled_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about an account’s trading status, such as what types of trades are allowed (e.g. margin, crypto, futures) Show JSON schema `{ "title": "TradingStatus", "description": "Dataclass containing information about an account's trading status, such\nas what types of trades are allowed (e.g. margin, crypto, futures)", "type": "object", "properties": { "account-number": { "title": "Account-Number", "type": "string" }, "equities-margin-calculation-type": { "title": "Equities-Margin-Calculation-Type", "type": "string" }, "fee-schedule-name": { "title": "Fee-Schedule-Name", "type": "string" }, "futures-margin-rate-multiplier": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Futures-Margin-Rate-Multiplier" }, "has-intraday-equities-margin": { "title": "Has-Intraday-Equities-Margin", "type": "boolean" }, "id": { "title": "Id", "type": "integer" }, "is-aggregated-at-clearing": { "title": "Is-Aggregated-At-Clearing", "type": "boolean" }, "is-closed": { "title": "Is-Closed", "type": "boolean" }, "is-closing-only": { "title": "Is-Closing-Only", "type": "boolean" }, "is-cryptocurrency-enabled": { "title": "Is-Cryptocurrency-Enabled", "type": "boolean" }, "is-frozen": { "title": "Is-Frozen", "type": "boolean" }, "is-full-equity-margin-required": { "title": "Is-Full-Equity-Margin-Required", "type": "boolean" }, "is-futures-closing-only": { "title": "Is-Futures-Closing-Only", "type": "boolean" }, "is-futures-intra-day-enabled": { "title": "Is-Futures-Intra-Day-Enabled", "type": "boolean" }, "is-futures-enabled": { "title": "Is-Futures-Enabled", "type": "boolean" }, "is-in-day-trade-equity-maintenance-call": { "title": "Is-In-Day-Trade-Equity-Maintenance-Call", "type": "boolean" }, "is-in-margin-call": { "title": "Is-In-Margin-Call", "type": "boolean" }, "is-pattern-day-trader": { "title": "Is-Pattern-Day-Trader", "type": "boolean" }, "is-small-notional-futures-intra-day-enabled": { "title": "Is-Small-Notional-Futures-Intra-Day-Enabled", "type": "boolean" }, "is-roll-the-day-forward-enabled": { "title": "Is-Roll-The-Day-Forward-Enabled", "type": "boolean" }, "are-far-otm-net-options-restricted": { "title": "Are-Far-Otm-Net-Options-Restricted", "type": "boolean" }, "options-level": { "title": "Options-Level", "type": "string" }, "short-calls-enabled": { "title": "Short-Calls-Enabled", "type": "boolean" }, "small-notional-futures-margin-rate-multiplier": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Small-Notional-Futures-Margin-Rate-Multiplier" }, "is-equity-offering-enabled": { "title": "Is-Equity-Offering-Enabled", "type": "boolean" }, "is-equity-offering-closing-only": { "title": "Is-Equity-Offering-Closing-Only", "type": "boolean" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" }, "is-portfolio-margin-enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Is-Portfolio-Margin-Enabled" }, "is-risk-reducing-only": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Is-Risk-Reducing-Only" }, "day-trade-count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Day-Trade-Count" }, "autotrade-account-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Autotrade-Account-Type" }, "clearing-account-number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Clearing-Account-Number" }, "clearing-aggregation-identifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Clearing-Aggregation-Identifier" }, "is-cryptocurrency-closing-only": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Is-Cryptocurrency-Closing-Only" }, "pdt-reset-on": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Pdt-Reset-On" }, "cmta-override": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Cmta-Override" }, "enhanced-fraud-safeguards-enabled-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Enhanced-Fraud-Safeguards-Enabled-At" } }, "required": [ "account-number", "equities-margin-calculation-type", "fee-schedule-name", "futures-margin-rate-multiplier", "has-intraday-equities-margin", "id", "is-aggregated-at-clearing", "is-closed", "is-closing-only", "is-cryptocurrency-enabled", "is-frozen", "is-full-equity-margin-required", "is-futures-closing-only", "is-futures-intra-day-enabled", "is-futures-enabled", "is-in-day-trade-equity-maintenance-call", "is-in-margin-call", "is-pattern-day-trader", "is-small-notional-futures-intra-day-enabled", "is-roll-the-day-forward-enabled", "are-far-otm-net-options-restricted", "options-level", "short-calls-enabled", "small-notional-futures-margin-rate-multiplier", "is-equity-offering-enabled", "is-equity-offering-closing-only", "updated-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.account_number (Python parameter)") * [`are_far_otm_net_options_restricted (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.are_far_otm_net_options_restricted (Python parameter)") * [`autotrade_account_type (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.autotrade_account_type (Python parameter)") * [`clearing_account_number (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.clearing_account_number (Python parameter)") * [`clearing_aggregation_identifier (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.clearing_aggregation_identifier (Python parameter)") * [`cmta_override (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.cmta_override (Python parameter)") * [`day_trade_count (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.day_trade_count (Python parameter)") * [`enhanced_fraud_safeguards_enabled_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.enhanced_fraud_safeguards_enabled_at (Python parameter)") * [`equities_margin_calculation_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.equities_margin_calculation_type (Python parameter)") * [`fee_schedule_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.fee_schedule_name (Python parameter)") * [`futures_margin_rate_multiplier (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.futures_margin_rate_multiplier (Python parameter)") * [`has_intraday_equities_margin (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.has_intraday_equities_margin (Python parameter)") * [`id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.id (Python parameter)") * [`is_aggregated_at_clearing (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_aggregated_at_clearing (Python parameter)") * [`is_closed (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_closed (Python parameter)") * [`is_closing_only (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_closing_only (Python parameter)") * [`is_cryptocurrency_closing_only (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_cryptocurrency_closing_only (Python parameter)") * [`is_cryptocurrency_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_cryptocurrency_enabled (Python parameter)") * [`is_equity_offering_closing_only (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_equity_offering_closing_only (Python parameter)") * [`is_equity_offering_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_equity_offering_enabled (Python parameter)") * [`is_frozen (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_frozen (Python parameter)") * [`is_full_equity_margin_required (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_full_equity_margin_required (Python parameter)") * [`is_futures_closing_only (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_closing_only (Python parameter)") * [`is_futures_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_enabled (Python parameter)") * [`is_futures_intra_day_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_futures_intra_day_enabled (Python parameter)") * [`is_in_day_trade_equity_maintenance_call (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_in_day_trade_equity_maintenance_call (Python parameter)") * [`is_in_margin_call (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_in_margin_call (Python parameter)") * [`is_pattern_day_trader (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_pattern_day_trader (Python parameter)") * [`is_portfolio_margin_enabled (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_portfolio_margin_enabled (Python parameter)") * [`is_risk_reducing_only (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_risk_reducing_only (Python parameter)") * [`is_roll_the_day_forward_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_roll_the_day_forward_enabled (Python parameter)") * [`is_small_notional_futures_intra_day_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.is_small_notional_futures_intra_day_enabled (Python parameter)") * [`options_level (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.options_level (Python parameter)") * [`pdt_reset_on (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.pdt_reset_on (Python parameter)") * [`short_calls_enabled (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.short_calls_enabled (Python parameter)") * [`small_notional_futures_margin_rate_multiplier (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.small_notional_futures_margin_rate_multiplier (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.TradingStatus "tastytrade.account.TradingStatus.updated_at (Python parameter)") _pydantic model_ tastytrade.account.Transaction(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[transaction\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[transaction\_sub\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_sub_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[description](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[executed\_at](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.executed_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[transaction\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[net\_value](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.net_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[is\_estimated\_fee](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.is_estimated_fee (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[underlying\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.underlying_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[action](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.action (Python parameter)") : [OrderAction](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction "tastytrade.order.OrderAction (Python enum) — Bases: str, Enum") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[quantity](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.quantity (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[regulatory\_fees](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.regulatory_fees (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[clearing\_fees](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.clearing_fees (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[commission](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.commission (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[proprietary\_index\_option\_fees](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.proprietary_index_option_fees (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[ext\_exchange\_order\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_exchange_order_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[ext\_global\_order\_number](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_global_order_number (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[ext\_group\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_group_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[ext\_group\_fill\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_group_fill_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[ext\_exec\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_exec_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exec\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exec_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exchange](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exchange (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[order\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.order_id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exchange\_affiliation\_identifier](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exchange_affiliation_identifier (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[leg\_count](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.leg_count (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[destination\_venue](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.destination_venue (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[other\_charge](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.other_charge (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[other\_charge\_description](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.other_charge_description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[reverses\_id](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.reverses_id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[cost\_basis\_reconciliation\_date](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.cost_basis_reconciliation_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[lots](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.lots (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Lot](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Lot "tastytrade.account.Lot (Python model) — Bases: TastytradeData")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[agency\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.agency_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[principal\_price](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.principal_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about a past transaction. Show JSON schema ``{ "title": "Transaction", "description": "Dataclass containing information about a past transaction.", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "account-number": { "title": "Account-Number", "type": "string" }, "transaction-type": { "title": "Transaction-Type", "type": "string" }, "transaction-sub-type": { "title": "Transaction-Sub-Type", "type": "string" }, "description": { "title": "Description", "type": "string" }, "executed-at": { "format": "date-time", "title": "Executed-At", "type": "string" }, "transaction-date": { "format": "date", "title": "Transaction-Date", "type": "string" }, "value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Value" }, "net-value": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Net-Value" }, "is-estimated-fee": { "title": "Is-Estimated-Fee", "type": "boolean" }, "symbol": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Symbol" }, "instrument-type": { "anyOf": [ { "$ref": "#/$defs/InstrumentType" }, { "type": "null" } ], "default": null }, "underlying-symbol": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Underlying-Symbol" }, "action": { "anyOf": [ { "$ref": "#/$defs/OrderAction" }, { "type": "null" } ], "default": null }, "quantity": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Quantity" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price" }, "regulatory-fees": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Regulatory-Fees" }, "clearing-fees": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Clearing-Fees" }, "commission": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Commission" }, "proprietary-index-option-fees": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Proprietary-Index-Option-Fees" }, "ext-exchange-order-number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ext-Exchange-Order-Number" }, "ext-global-order-number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Ext-Global-Order-Number" }, "ext-group-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ext-Group-Id" }, "ext-group-fill-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ext-Group-Fill-Id" }, "ext-exec-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ext-Exec-Id" }, "exec-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Exec-Id" }, "exchange": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Exchange" }, "order-id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Order-Id" }, "exchange-affiliation-identifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Exchange-Affiliation-Identifier" }, "leg-count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Leg-Count" }, "destination-venue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Destination-Venue" }, "other-charge": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Other-Charge" }, "other-charge-description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Other-Charge-Description" }, "reverses-id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Reverses-Id" }, "cost-basis-reconciliation-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Cost-Basis-Reconciliation-Date" }, "lots": { "anyOf": [ { "items": { "$ref": "#/$defs/Lot" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Lots" }, "agency-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Agency-Price" }, "principal-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Principal-Price" } }, "$defs": { "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" }, "Lot": { "description": "Dataclass containing information about the lot of a position.", "properties": { "id": { "title": "Id", "type": "string" }, "transaction-id": { "title": "Transaction-Id", "type": "integer" }, "quantity": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Quantity" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "quantity-direction": { "title": "Quantity-Direction", "type": "string" }, "executed-at": { "format": "date-time", "title": "Executed-At", "type": "string" }, "transaction-date": { "format": "date", "title": "Transaction-Date", "type": "string" } }, "required": [ "id", "transaction-id", "quantity", "price", "quantity-direction", "executed-at", "transaction-date" ], "title": "Lot", "type": "object" }, "OrderAction": { "description": "This is an :class:`~enum.Enum` that contains the valid order actions.", "enum": [ "Buy to Open", "Buy to Close", "Sell to Open", "Sell to Close", "Buy", "Sell" ], "title": "OrderAction", "type": "string" } }, "required": [ "id", "account-number", "transaction-type", "transaction-sub-type", "description", "executed-at", "transaction-date", "value", "net-value", "is-estimated-fee" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.account_number (Python parameter)") * [`action (tastytrade.order.OrderAction | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.action (Python parameter)") * [`agency_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.agency_price (Python parameter)") * [`clearing_fees (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.clearing_fees (Python parameter)") * [`commission (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.commission (Python parameter)") * [`cost_basis_reconciliation_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.cost_basis_reconciliation_date (Python parameter)") * [`description (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.description (Python parameter)") * [`destination_venue (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.destination_venue (Python parameter)") * [`exchange (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exchange (Python parameter)") * [`exchange_affiliation_identifier (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exchange_affiliation_identifier (Python parameter)") * [`exec_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.exec_id (Python parameter)") * [`executed_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.executed_at (Python parameter)") * [`ext_exchange_order_number (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_exchange_order_number (Python parameter)") * [`ext_exec_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_exec_id (Python parameter)") * [`ext_global_order_number (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_global_order_number (Python parameter)") * [`ext_group_fill_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_group_fill_id (Python parameter)") * [`ext_group_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.ext_group_id (Python parameter)") * [`id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.id (Python parameter)") * [`instrument_type (tastytrade.order.InstrumentType | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.instrument_type (Python parameter)") * [`is_estimated_fee (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.is_estimated_fee (Python parameter)") * [`leg_count (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.leg_count (Python parameter)") * [`lots (list[tastytrade.account.Lot] | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.lots (Python parameter)") * [`net_value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.net_value (Python parameter)") * [`order_id (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.order_id (Python parameter)") * [`other_charge (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.other_charge (Python parameter)") * [`other_charge_description (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.other_charge_description (Python parameter)") * [`price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.price (Python parameter)") * [`principal_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.principal_price (Python parameter)") * [`proprietary_index_option_fees (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.proprietary_index_option_fees (Python parameter)") * [`quantity (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.quantity (Python parameter)") * [`regulatory_fees (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.regulatory_fees (Python parameter)") * [`reverses_id (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.reverses_id (Python parameter)") * [`symbol (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.symbol (Python parameter)") * [`transaction_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_date (Python parameter)") * [`transaction_sub_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_sub_type (Python parameter)") * [`transaction_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.transaction_type (Python parameter)") * [`underlying_symbol (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.underlying_symbol (Python parameter)") * [`value (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction "tastytrade.account.Transaction.value (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Transaction-validators "Permalink to this headline") * `validate_price_effects` » `all fields` Back to top --- # Installation — tastytrade 9.6 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.6/index.html) * Installation * [View page source](https://tastyworks-api.readthedocs.io/en/v9.6/_sources/installation.rst.txt) * * * Installation[](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#installation "Permalink to this heading") ========================================================================================================================== Via pypi[](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#via-pypi "Permalink to this heading") ------------------------------------------------------------------------------------------------------------------ The easiest way to install tastytrade is using pip: $ pip install tastytrade From source[](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#from-source "Permalink to this heading") ------------------------------------------------------------------------------------------------------------------------ You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install If you’re contributing, you’ll want to run tests on your changes locally: $ make lint $ make test If you want to build the documentation (usually not necessary): $ source .venv/bin/activate $ cd docs $ uv pip install -r requirements.txt $ make html Windows[](https://tastyworks-api.readthedocs.io/en/v9.6/installation.html#windows "Permalink to this heading") ---------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you’ll need to either use Cygwin/WSL, or run the commands from the Makefile manually. Here’s an example for PowerShell: $ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e . --- # sync/async — tastytrade 9.9 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.9/index.html) * sync/async * [View page source](https://tastyworks-api.readthedocs.io/en/v9.9/_sources/sync-async.rst.txt) * * * sync/async[](https://tastyworks-api.readthedocs.io/en/v9.9/sync-async.html#sync-async "Link to this heading") =============================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: from tastytrade Account, Session session \= Session(username, password) \# using sync implementation accounts \= Account.get\_accounts(session) The async implementation is similar: from tastytrade Account, Session session \= Session(username, password) \# using async implementation accounts \= await Account.a\_get\_accounts(session) That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! --- # sync/async — tastytrade 9.10 documentation * [](https://tastyworks-api.readthedocs.io/en/v9.10/index.html) * sync/async * [View page source](https://tastyworks-api.readthedocs.io/en/v9.10/_sources/sync-async.rst.txt) * * * sync/async[](https://tastyworks-api.readthedocs.io/en/v9.10/sync-async.html#sync-async "Link to this heading") ================================================================================================================ After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: from tastytrade Account, Session session \= Session(username, password) \# using sync implementation accounts \= Account.get\_accounts(session) The async implementation is similar: from tastytrade Account, Session session \= Session(username, password) \# using async implementation accounts \= await Account.a\_get\_accounts(session) That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! --- # sync/async — tastytrade 10.0.0 documentation * [](https://tastyworks-api.readthedocs.io/en/v10.0.0/index.html) * sync/async * [View page source](https://tastyworks-api.readthedocs.io/en/v10.0.0/_sources/sync-async.rst.txt) * * * sync/async[](https://tastyworks-api.readthedocs.io/en/v10.0.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: from tastytrade Account, Session session \= Session(username, password) \# using sync implementation accounts \= Account.get(session) The async implementation is similar: from tastytrade Account, Session session \= Session(username, password) \# using async implementation accounts \= await Account.a\_get(session) That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! --- # sync/async - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # Python Module Index - tastytrade 11.1.0 documentation Python Module Index =================== [**t**](https://tastyworks-api.readthedocs.io/en/latest/py-modindex.html#cap-t) | | | | | --- | --- | --- | | | | | | | **t** | | | ![-](https://tastyworks-api.readthedocs.io/en/latest/_static/minus.png) | `tastytrade` | | | | [`tastytrade.account`](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#module-tastytrade.account) | | | | [`tastytrade.dxfeed.candle`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.candle) | | | | [`tastytrade.dxfeed.event`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.event) | | | | [`tastytrade.dxfeed.greeks`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.greeks) | | | | [`tastytrade.dxfeed.profile`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.profile) | | | | [`tastytrade.dxfeed.quote`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.quote) | | | | [`tastytrade.dxfeed.summary`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.summary) | | | | [`tastytrade.dxfeed.theoprice`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.theoprice) | | | | [`tastytrade.dxfeed.timeandsale`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.timeandsale) | | | | [`tastytrade.dxfeed.trade`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.trade) | | | | [`tastytrade.dxfeed.underlying`](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.underlying) | | | | [`tastytrade.instruments`](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#module-tastytrade.instruments) | | | | [`tastytrade.market_data`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#module-tastytrade.market_data) | | | | [`tastytrade.market_sessions`](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#module-tastytrade.market_sessions) | | | | [`tastytrade.metrics`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#module-tastytrade.metrics) | | | | [`tastytrade.order`](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#module-tastytrade.order) | | | | [`tastytrade.search`](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#module-tastytrade.search) | | | | [`tastytrade.session`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#module-tastytrade.session) | | | | [`tastytrade.streamer`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#module-tastytrade.streamer) | | | | [`tastytrade.utils`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#module-tastytrade.utils) | | | | [`tastytrade.watchlists`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#module-tastytrade.watchlists) | | Back to top --- # Account Streamer - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html#basic-usage) [](https://github.com/tastyware/tastytrade/blob/master/docs/account-streamer.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/account-streamer.rst "View source of this page") Account Streamer[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html#account-streamer "Link to this heading") ==================================================================================================================================== Basic usage[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html#basic-usage "Link to this heading") -------------------------------------------------------------------------------------------------------------------------- The account streamer is used to track account-level updates, such as order fills, watchlist updates and quote alerts. Typically, you’ll want a separate task running for the account streamer, which can then notify your application about important events. Here’s an example of setting up an account streamer to continuously wait for events and print them: `from tastytrade import Account, AlertStreamer, Watchlist async with AlertStreamer(session) as streamer: accounts = Account.get(session) # updates to balances, orders, and positions await streamer.subscribe_accounts(accounts) # changes in public watchlists await streamer.subscribe_public_watchlists() # quote alerts configured by the user await streamer.subscribe_quote_alerts() async for wl in streamer.listen(Watchlist): print(wl)` Probably the most important information the account streamer handles is order fills. We can listen just for orders like so: `from tastytrade.order import PlacedOrder async with AlertStreamer(session) as streamer: accounts = Account.get(session) await streamer.subscribe_accounts(accounts) async for order in streamer.listen(PlacedOrder): print(order)` Disconnect callback[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html#disconnect-callback "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------ The disconnect callback can be used to run arbitrary code when the websocket connection has been disconnected. This is useful for notification purposes in your application when you need high availability. The callback function should look something like this: `async def disconnect_callback(streamer: AlertStreamer): print("Disconnected!")` The requirements are that the first parameter be the AlertStreamer instance, and the function should be asynchronous. This callback can then be used when creating the streamer: `async with AlertStreamer(session, disconnect_fn=disconnect_callback) as streamer: # ...` Retry callback[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html#retry-callback "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- The account streamer has a special “callback” function which can be used to execute arbitrary code whenever the websocket reconnects. This is useful for re-subscribing to whatever alerts you wanted to subscribe to initially (in fact, you can probably use the same function/code you use when initializing the connection). The callback function should look something like this: `async def reconnect_callback(streamer: AlertStreamer, arg1, arg2): await streamer.subscribe_quote_alerts()` The requirements are that the first parameter be the AlertStreamer instance, and the function should be asynchronous. Other than that, you have the flexibility to decide what arguments you want to use. This callback can then be used when creating the streamer: `async with AlertStreamer(session, reconnect_fn=reconnect_callback, reconnect_args=(arg1, arg2)) as streamer: # ...` The reconnection uses websockets’ exponential backoff algorithm, which can be configured through environment variables [here](https://websockets.readthedocs.io/en/14.1/reference/variables.html) . The difference between the disconnect and reconnect callbacks is that the disconnect will be called immediately when the connection is broken, whereas the reconnect callback will only be called once the connection is re-established. Back to top --- # Instruments - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/instruments.html#initialization) [](https://github.com/tastyware/tastytrade/blob/master/docs/instruments.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/instruments.rst "View source of this page") Instruments[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/instruments.html#instruments "Link to this heading") ===================================================================================================================== In the Tastytrade API, an instrument is a tradeable object, such as a cryptocurrency, an option, an equity/ETF, futures, futures options, and warrants. The SDK makes it easy to fetch, trade, and perform various other operations for these instruments. Initialization[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/instruments.html#initialization "Link to this heading") --------------------------------------------------------------------------------------------------------------------------- Instruments follow a basic schema for initialization. To create an instrument(s), use the classmethods for the desired type of instrument: * `Cryptocurrency.get()` * `Equity.get()` * `Future.get()` * `Option.get()` * `FutureOption.get()` These functions take the session object as the first parameter, and the symbol (or list of symbols) as the second. Note that ETFs and indices are treated as equities for the purposes of the API. `from tastytrade.instruments import Equity, FutureOption equities = Equity.get(session, ['SPY', 'AAPL']) print(equities[0].is_etf, equities[0].description) future_option = FutureOption.get(session, './GCJ4 OG4G4 240223P1915') print(future_option.exchange)` `>>> (False, 'APPLE INC') >>> 'CME'` The different instruments have a host of properties that will be automatically populated with their associated values upon initialization. You can explore these properties in depth in the “SDK Reference” section. Options chains[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/instruments.html#options-chains "Link to this heading") --------------------------------------------------------------------------------------------------------------------------- The symbol structure for options and futures options is somewhat complex, so you can use `get_option_chain()` and `get_future_option_chain()` to get the instruments for a specific underlying as explained below. `from tastytrade.instruments import get_option_chain, get_future_option_chain from tastytrade.utils import get_tasty_monthly chain = get_option_chain(session, 'SPLG') exp = get_tasty_monthly() # 45 DTE expiration! print(chain[exp][0]) future_chain = get_future_option_chain(session, '/MCL') print(future_chain.keys()) # print all expirations` `>>> instrument_type= symbol='SPLG 240315C00024000' active=True strike_price=Decimal('24.0') root_symbol='SPLG' underlying_symbol='SPLG' expiration_date=datetime.date(2024, 3, 15) exercise_style='American' shares_per_contract=100 option_type= option_chain_type='Standard' expiration_type='Regular' settlement_type='PM' stops_trading_at=datetime.datetime(2024, 3, 15, 20, 0, tzinfo=datetime.timezone.utc) market_time_instrument_collection='Equity Option' days_to_expiration=38 expires_at=datetime.datetime(2024, 3, 15, 20, 0, tzinfo=datetime.timezone.utc) is_closing_only=False listed_market=None halted_at=None old_security_number=None streamer_symbol='.SPLG240315C24' >>> dict_keys([datetime.date(2024, 7, 17), datetime.date(2024, 6, 14), datetime.date(2024, 9, 17), datetime.date(2024, 11, 15), datetime.date(2024, 12, 16), datetime.date(2024, 2, 9), datetime.date(2024, 5, 16), datetime.date(2025, 1, 15), datetime.date(2024, 8, 15), datetime.date(2024, 2, 16), datetime.date(2024, 2, 14), datetime.date(2024, 10, 17), datetime.date(2024, 4, 17), datetime.date(2024, 3, 15)])` Alternatively, `NestedOptionChain` and `NestedFutureOptionChain` provide a structured way to fetch chain expirations and available strikes. `from tastytrade.instruments import NestedOptionChain chain = NestedOptionChain.get(session, 'SPY') print(chain.expirations[0].strikes[0])` `>>> Strike(strike_price=Decimal('437.0'), call='SPY 240417C00437000', put='SPY 240417P00437000', call_streamer_symbol='.SPY240417C437', put_streamer_symbol='.SPY240417P437')` Each expiration contains a list of these strikes, which have the associated put and call symbols that can then be used to fetch option objects via `Option.get_options()` or converted to dxfeed symbols for use with the streamer via `Option.occ_to_streamer_symbol()`. Placing trades[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/instruments.html#placing-trades "Link to this heading") --------------------------------------------------------------------------------------------------------------------------- Probably the most powerful tool available for instruments is the `build_leg()` function. This allows an instrument to be quickly converted into a tradeable ‘leg’, which by itself or together with other legs forms the basis for a trade. This makes placing new trades across a wide variety of instruments surprisingly simple: `from tastytrade.instruments import get_future_option_chain from tastytrade.order import * from datetime import date chain = get_future_option_chain(session, '/MCL') put = chain[date(2024, 3, 15)][286] call = chain[date(2024, 3, 15)][187] order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[ # two parameters: quantity and order action put.build_leg(Decimal(1), OrderAction.SELL_TO_OPEN), call.build_leg(Decimal(1), OrderAction.SELL_TO_OPEN) ], price=Decimal('1.25') # price is always per quantity, not total ) # assuming an initialized account account.place_order(session, order, dry_run=False)` That’s it! We just sold a micro crude oil futures strangle in a few lines of code. Note that price is per quantity, not the price for the entire order! So if the legs looked like this: `legs=[ put.build_leg(Decimal(2), OrderAction.SELL_TO_OPEN), call.build_leg(Decimal(2), OrderAction.SELL_TO_OPEN) ]` the price would still be `Decimal('1.25')`, and the total credit collected would be $2.50. This holds true for ratio spreads, so a 4:2 ratio spread should be priced as a 2:1 ratio spread. Back to top --- # Installation - tastytrade 11.0.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.2/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Installation - tastytrade 11.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.1/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Installation - tastytrade 10.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.0.1/installation.html#) --- # Installation - tastytrade 10.2.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.0/installation.html#) --- # Installation - tastytrade 10.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.0/installation.html#) --- # Installation - tastytrade 10.1.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.1/installation.html#) --- # Installation - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Sessions - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Installation - tastytrade 11.0.4 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.4/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Installation - tastytrade 11.0.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.3/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Installation - tastytrade 11.0.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.0/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/installation.rst "View source of this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` Back to top --- # Sessions - tastytrade 11.0.5 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.5/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Installation - tastytrade 10.2.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.1/installation.html#) --- # Installation - tastytrade 10.3.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.3.0/installation.html#) --- # Installation - tastytrade 10.2.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.3/installation.html#) --- # Installation - tastytrade 10.2.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#via-pypi) [](https://github.com/tastyware/tastytrade/blob/master/docs/installation.rst "Edit this page") Installation[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#installation "Link to this heading") ======================================================================================================================== Via pypi[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#via-pypi "Link to this heading") ---------------------------------------------------------------------------------------------------------------- The easiest way to install the SDK is using pip: `$ pip install tastytrade` From source[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#from-source "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- You can also install from source. Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed beforehand. `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ make install` If you’re contributing, you’ll want to run tests on your changes locally: `$ make lint $ make test` If you want to build the documentation (usually not necessary): `$ make docs` Windows[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#windows "Link to this heading") -------------------------------------------------------------------------------------------------------------- If you want to install from source on Windows, you can’t use the Makefile, so just run the commands individually. For example: `$ git clone https://github.com/tastyware/tastytrade.git $ cd tastytrade $ uv sync $ uv pip install -e .` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.2/installation.html#) --- # Sessions - tastytrade 11.0.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.3/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. The other option (which is actually the only option for sandbox accounts) is to run this helper code: `from tastytrade.oauth import login login(is_test=True)` This will open up a web interface in your browser where you’ll be prompted to paste your client ID and client secret. These credentials will then be used to connect your application to Tastytrade. After following the steps in your browser, you should see your new refresh token in the browser and in the console. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Sessions - tastytrade 11.0.4 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.4/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Sessions - tastytrade 11.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.1/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. The other option (which is actually the only option for sandbox accounts) is to run this helper code: `from tastytrade.oauth import login login(is_test=True)` This will open up a web interface in your browser where you’ll be prompted to paste your client ID and client secret. These credentials will then be used to connect your application to Tastytrade. After following the steps in your browser, you should see your new refresh token in the browser and in the console. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Sessions - tastytrade 11.0.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.2/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. The other option (which is actually the only option for sandbox accounts) is to run this helper code: `from tastytrade.oauth import login login(is_test=True)` This will open up a web interface in your browser where you’ll be prompted to paste your client ID and client secret. These credentials will then be used to connect your application to Tastytrade. After following the steps in your browser, you should see your new refresh token in the browser and in the console. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Market Data - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/market-data.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/market-data.rst "View source of this page") Market Data[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/market-data.html#market-data "Link to this heading") ===================================================================================================================== We’ve seen how the streamer can be used to get quotes continually throughout the day, which is very helpful. However, sometimes we just need to get data once, which makes setting up a streamer, subscribing to events, and listening for them more complex than need be. Fortunately, Tastytrade has endpoints that make fetching data for one-time use a breeze: `from tastytrade.market_data import get_market_data from tastytrade.order import InstrumentType data = get_market_data(session, "SPY", InstrumentType.EQUITY) print(data)` `>>> symbol='SPY' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 48, 84000, tzinfo=TzInfo(UTC)) bid_size=Decimal('2.0') ask_size=Decimal('4.0') mark=Decimal('549.96') close_price_type= prev_close=Decimal('550.64') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('550.0') beta=Decimal('1.009463163') bid=Decimal('549.9') close=Decimal('550.85') day_high_price=Decimal('553.55') day_low_price=Decimal('545.02') dividend_amount=Decimal('1.695528') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('606.41') last=Decimal('549.96') last_mkt=Decimal('550.85') low_limit_price=Decimal('496.16') mid=Decimal('549.95') open=Decimal('551.39') volume=Decimal('47417792.0') year_low_price=Decimal('481.8') year_high_price=Decimal('613.23')` You can also fetch data for multiple symbols at once: `from tastytrade.market_data import get_market_data_by_type data = get_market_data_by_type( session, indices=["SPX", "VIX"], cryptocurrencies=["ETH/USD", "BTC/USD"], equities=["SPLG", "SPY"], futures=["/MCLG6", "/MCLF6"], future_options=["./MCLM5MW2K5 250509C62.5", "./MCLM5MW2K5 250509P65.75"], options=["SPLG 250516C00048000", "SPLG 250516P00054000"], ) print(data)` `>>> [MarketData(symbol='SPLG 250516C00048000' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 5, 358000, tzinfo=TzInfo(UTC)) bid_size=Decimal('28.0') ask_size=Decimal('62.0') mark=Decimal('16.8') close_price_type= prev_close=Decimal('12.3') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 21) halt_start_time=-1 halt_end_time=-1 ask=Decimal('17.4') bid=Decimal('16.2') day_high_price=Decimal('12.99') day_low_price=Decimal('12.3') last=Decimal('12.3') last_mkt=Decimal('12.3') mid=Decimal('16.8') open=Decimal('12.99') volume=Decimal('4.0')), MarketData(symbol='BTC/USD' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 15, 630000, tzinfo=TzInfo(UTC)) bid_size=Decimal('0.222') mark=Decimal('94370.795') close_price_type= prev_close=Decimal('93797.555') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 27) halt_start_time=-1 halt_end_time=-1 ask=Decimal('94848.23') bid=Decimal('93893.36') day_high_price=Decimal('95581.855') day_low_price=Decimal('93476.925') last=Decimal('94388.57') last_mkt=Decimal('94370.8') mid=Decimal('94370.795') open=Decimal('93795.825') year_low_price=Decimal('49149.415') year_high_price=Decimal('109558.42')), MarketData(symbol='ETH/USD' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 40, 633000, tzinfo=TzInfo(UTC)) bid_size=Decimal('11.09900497') ask_size=Decimal('11.0') mark=Decimal('1786.455') close_price_type= prev_close=Decimal('1788.33') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 27) halt_start_time=-1 halt_end_time=-1 ask=Decimal('1795.59') bid=Decimal('1777.32') day_high_price=Decimal('1828.26') day_low_price=Decimal('1745.165') last=Decimal('1786.46') last_mkt=Decimal('1786.46') mid=Decimal('1786.455') open=Decimal('1788.345') year_low_price=Decimal('1384.31') year_high_price=Decimal('4109.98')), MarketData(symbol='VIX' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 20, 15, 1, 568000, tzinfo=TzInfo(UTC)) mark=Decimal('25.15') close_price_type= prev_close=Decimal('24.84') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 beta=Decimal('-6.538134414') day_high_price=Decimal('26.93') day_low_price=Decimal('24.7') last=Decimal('25.15') last_mkt=Decimal('25.15') open=Decimal('25.75') year_low_price=Decimal('10.62') year_high_price=Decimal('65.73')), MarketData(symbol='/MCLG6' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 40, 0, 903000, tzinfo=TzInfo(UTC)) mark=Decimal('59.44') close_price_type= prev_close=Decimal('59.87') prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 28) halt_start_time=-1 halt_end_time=-1 ask=Decimal('60.08') bid=Decimal('59.3') day_high_price=Decimal('60.3') day_low_price=Decimal('59.44') last=Decimal('59.44') last_mkt=Decimal('59.44') mid=Decimal('59.69') open=Decimal('60.3') volume=Decimal('5.0')), MarketData(symbol='/MCLF6' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 40, 0, 905000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('1.0') mark=Decimal('60.5') close_price_type= prev_close=Decimal('59.87') prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 28) halt_start_time=-1 halt_end_time=-1 ask=Decimal('62.18') bid=Decimal('57.0') day_high_price=Decimal('60.5') day_low_price=Decimal('59.9') last=Decimal('60.5') last_mkt=Decimal('60.5') mid=Decimal('59.59') open=Decimal('59.9') volume=Decimal('2.0')), MarketData(symbol='./MCLM5MW2K5 250509C62.5' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 2, 211000, tzinfo=TzInfo(UTC)) mark=Decimal('1.479701886') close_price_type= prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('2.19') bid=Decimal('0.91') mid=Decimal('1.55')), MarketData(symbol='SPX' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 20, 53, 27, 551000, tzinfo=TzInfo(UTC)) mark=Decimal('5509.565') close_price_type= prev_close=Decimal('5525.21') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('5576.76') beta=Decimal('1.0') bid=Decimal('5442.37') day_high_price=Decimal('5553.66') day_low_price=Decimal('5468.64') last=Decimal('5528.75') last_mkt=Decimal('5528.75') mid=Decimal('5509.565') open=Decimal('5529.22') year_low_price=Decimal('4835.04') year_high_price=Decimal('6147.43')), MarketData(symbol='SPLG 250516P00054000' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 31, 33, 779000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('11.0') mark=Decimal('0.075') close_price_type= prev_close=Decimal('0.1') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('0.1') bid=Decimal('0.05') close=Decimal('0.05') day_high_price=Decimal('0.1') day_low_price=Decimal('0.05') last=Decimal('0.05') last_mkt=Decimal('0.05') mid=Decimal('0.075') open=Decimal('0.1') volume=Decimal('2.0')), MarketData(symbol='SPY' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 48, 84000, tzinfo=TzInfo(UTC)) bid_size=Decimal('2.0') ask_size=Decimal('4.0') mark=Decimal('549.96') close_price_type= prev_close=Decimal('550.64') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('550.0') beta=Decimal('1.009463163') bid=Decimal('549.9') close=Decimal('550.85') day_high_price=Decimal('553.55') day_low_price=Decimal('545.02') dividend_amount=Decimal('1.695528') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('606.41') last=Decimal('549.96') last_mkt=Decimal('550.85') low_limit_price=Decimal('496.16') mid=Decimal('549.95') open=Decimal('551.39') volume=Decimal('47417792.0') year_low_price=Decimal('481.8') year_high_price=Decimal('613.23')), MarketData(symbol='SPLG' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 46, 25, 333000, tzinfo=TzInfo(UTC)) bid_size=Decimal('1.0') ask_size=Decimal('1.0') mark=Decimal('64.73') close_price_type= prev_close=Decimal('64.74') prev_close_price_type= summary_date=datetime.date(2025, 4, 28) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('64.75') beta=Decimal('1.008512722') bid=Decimal('64.68') close=Decimal('64.8') day_high_price=Decimal('65.1') day_low_price=Decimal('64.11') dividend_amount=Decimal('0.217412') dividend_frequency=Decimal('4.0') high_limit_price=Decimal('71.34') last=Decimal('64.73') last_mkt=Decimal('64.8') low_limit_price=Decimal('58.37') mid=Decimal('64.715') open=Decimal('64.86') volume=Decimal('7159762.0') year_low_price=Decimal('56.6699') year_high_price=Decimal('72.14')), MarketData(symbol='./MCLM5MW2K5 250509P65.75' instrument_type= updated_at=datetime.datetime(2025, 4, 28, 21, 30, 2, 58000, tzinfo=TzInfo(UTC)) mark=Decimal('4.26456101') close_price_type= prev_close_price_type= summary_date=datetime.date(2025, 4, 29) prev_close_date=datetime.date(2025, 4, 25) halt_start_time=-1 halt_end_time=-1 ask=Decimal('4.62') bid=Decimal('3.7') mid=Decimal('4.16'))]` Back to top --- # Sessions - tastytrade 10.3.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.3.0/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. OAuth sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/sessions.html#oauth-sessions "Link to this heading") ------------------------------------------------------------------------------------------------------------------------ Tastytrade has recently added support for OAuth logins, which allow you to connect an application for the purposes of managing trades on your behalf. Apart from allowing you to connect to 3rd-party apps (or build your own), you can also build a private OAuth application, which provides better security compared to username/password authentication since you don’t have to expose your login information. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . You’ll need to check all the scopes and save the client ID and client secret. Then, run this code: `from tastytrade.oauth import login login()` This will open up a web interface in your browser where you’ll be prompted to paste your client ID and client secret. These credentials will then be used to connect your application to Tastytrade. After following the steps in your browser, you should see your refresh token in the browser and in the console, which you should save. At this point, OAuth is now setup correctly! Doing the above once is sufficient for **indefinite usage** of `OAuthSession` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate like so: `from tastytrade import OAuthSession session = OAuthSession('my-client-secret', 'my-refresh-token')` These session objects can be used almost anywhere you can use a normal session: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `OAuthSession.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` [Back to top](https://tastyworks-api.readthedocs.io/en/v10.3.0/sessions.html#) --- # Sessions - tastytrade 10.2.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.1/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.1/sessions.html#) --- # Sessions - tastytrade 11.0.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.0.0/sessions.html#creating-an-oauth-application) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sessions.rst "View source of this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating an OAuth application[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/sessions.html#creating-an-oauth-application "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------ A session object is required to authenticate your requests to the Tastytrade API. Tastytrade uses OAuth logins, which allow you to connect applications (third-party or private) to your trading account to use the API. To get started, create a new OAuth application [here](https://my.tastytrade.com/app.html#/manage/api-access/oauth-applications) . Check all the scopes you plan to use, add http://localhost:8000 as a valid callback, and create the application. **Save the client secret**, you’ll need it later! Generating an initial refresh token[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/sessions.html#generating-an-initial-refresh-token "Link to this heading") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to generate an initial refresh token, you have two options. The easiest way is to simply generate one from Tastytrade’s website: go to OAuth Applications > Manage > Create Grant to get a new refresh token, **which you should also save**. The other option (which is actually the only option for sandbox accounts) is to run this helper code: `from tastytrade.oauth import login login(is_test=True)` This will open up a web interface in your browser where you’ll be prompted to paste your client ID and client secret. These credentials will then be used to connect your application to Tastytrade. After following the steps in your browser, you should see your new refresh token in the browser and in the console. At this point, OAuth is now setup correctly! Doing these steps once is sufficient for **indefinite usage** of `Session` for authentication to the API, since refresh tokens never expire. From now on you can simply authenticate with your client secret and refresh token. Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- `from tastytrade import Session session = Session('client_secret', 'refresh_token')` These session objects can be used to make API requests: `from tastytrade import Account accounts = Account.get(session)` Note that OAuth sessions make API requests using a special session token, which has a duration of only 15 minutes. However, since the refresh tokens last forever, you can call `Session.refresh()` to refresh the session token whenever needed. The session object will keep track of session expiration time for you to make it easier to know when to refresh: `from tastytrade.utils import now_in_new_york if now_in_new_york() > session.session_expiration: session.refresh() print(Account.get(session))` A sandbox account for testing can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session in the same way: `from tastytrade import Session session = Session('client_secret', 'refresh_token', is_test=True)` Back to top --- # Data Streamer - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#basic-usage) [](https://github.com/tastyware/tastytrade/blob/master/docs/data-streamer.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/data-streamer.rst "View source of this page") Data Streamer[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#data-streamer "Link to this heading") =========================================================================================================================== Basic usage[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#basic-usage "Link to this heading") ----------------------------------------------------------------------------------------------------------------------- The streamer is a websocket connection to dxfeed (the Tastytrade data provider) that allows you to subscribe to real-time data for quotes, greeks, and more. You can create a streamer using an active production session: `from tastytrade import DXLinkStreamer streamer = await DXLinkStreamer(session)` Or, you can create a streamer using an asynchronous context manager: `from tastytrade import DXLinkStreamer async with DXLinkStreamer(session) as streamer: pass` Once you’ve created the streamer, you can subscribe/unsubscribe to events, like `Quote`: `from tastytrade.dxfeed import Quote subs_list = ['SPY'] # you can add more symbols here! async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Quote, subs_list) quotes = {} async for quote in streamer.listen(Quote): quotes[quote.event_symbol] = quote if len(quotes) >= len(subs_list): break print(quotes)` `>>> [{'SPY': Quote(event_symbol='SPY', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='Q', bid_price=411.58, bid_size=400.0, ask_time=0, ask_exchange_code='Q', ask_price=411.6, ask_size=1313.0), 'SPX': Quote(event_symbol='SPX', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='\x00', bid_price=4122.49, bid_size='NaN', ask_time=0, ask_exchange_code='\x00', ask_price=4123.65, ask_size='NaN')}]` Note that these are `asyncio` calls, so you’ll need to run this code asynchronously. Here’s an example: `import asyncio async def main(session): async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Quote, subs_list) quote = await streamer.get_event(Quote) print(quote) asyncio.run(main(session))` `>>> [Quote(event_symbol='SPY', event_time=0, sequence=0, time_nano_part=0, bid_time=0, bid_exchange_code='Q', bid_price=411.58, bid_size=400.0, ask_time=0, ask_exchange_code='Q', ask_price=411.6, ask_size=1313.0), Quote(event_symbol='SPX', event_time=0, sequence=0, time_nanoPart=0, bid_time=0, bid_exchange_code='\x00', bid_price=4122.49, bid_size='NaN', ask_time=0, ask_exchange_code='\x00', ask_price=4123.65, ask_size='NaN')]` Alternatively, you can do testing in a Jupyter notebook, which allows you to make async calls directly, or run a python shell like this: python -m asyncio. We can also use the streamer to stream greeks for options symbols: `from tastytrade.dxfeed import Greeks from tastytrade.instruments import get_option_chain from tastytrade.utils import get_tasty_monthly chain = get_option_chain(session, 'SPLG') exp = get_tasty_monthly() # 45 DTE expiration! subs_list = [chain[exp][0].streamer_symbol] async with DXLinkStreamer(session) as streamer: await streamer.subscribe(Greeks, subs_list) greeks = await streamer.get_event(Greeks) print(greeks)` `>>> [Greeks(event_symbol='.SPLG230616C23', event_time=0, event_flags=0, index=7235129486797176832, time=1684559855338, sequence=0, price=26.3380972233688, volatility=0.396983376650804, delta=0.999999999996191, gamma=4.81989763184255e-12, theta=-2.5212017514875e-12, rho=0.01834504287973133, vega=3.7003015672215e-12)]` Advanced usage[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#advanced-usage "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------- Since the streamer makes use of Python’s `asyncio` library, it’s not always straightforward to use; however, it’s very powerful. For example, we can use the streamer to create an option chain that will continuously update prices as new data arrives: ``import asyncio from datetime import date from dataclasses import dataclass from tastytrade import DXLinkStreamer from tastytrade.instruments import get_option_chain from tastytrade.dxfeed import Greeks, Quote from tastytrade.utils import today_in_new_york @dataclass class LivePrices: quotes: dict[str, Quote] greeks: dict[str, Greeks] streamer: DXLinkStreamer puts: list[Option] calls: list[Option] @classmethod async def create( cls, session: Session, symbol: str = 'SPY', expiration: date = today_in_new_york() ): chain = get_option_chain(session, symbol) options = [o for o in chain[expiration]] # the `streamer_symbol` property is the symbol used by the streamer streamer_symbols = [o.streamer_symbol for o in options] streamer = await DXLinkStreamer(session) # subscribe to quotes and greeks for all options on that date await streamer.subscribe(Quote, [symbol] + streamer_symbols) await streamer.subscribe(Greeks, streamer_symbols) puts = [o for o in options if o.option_type == OptionType.PUT] calls = [o for o in options if o.option_type == OptionType.CALL] self = cls({}, {}, streamer, puts, calls) t_listen_greeks = asyncio.create_task(self._update_greeks()) t_listen_quotes = asyncio.create_task(self._update_quotes()) asyncio.gather(t_listen_greeks, t_listen_quotes) # wait we have quotes and greeks for each option while len(self.greeks) != len(options) or len(self.quotes) != len(options): await asyncio.sleep(0.1) return self async def _update_greeks(self): async for e in self.streamer.listen(Greeks): self.greeks[e.event_symbol] = e async def _update_quotes(self): async for e in self.streamer.listen(Quote): self.quotes[e.event_symbol] = e`` Now, we can access the quotes and greeks at any time, and they’ll be up-to-date with the live prices from the streamer: `live_prices = await LivePrices.create(session, 'SPY', date(2023, 7, 21)) symbol = live_prices.calls[44].streamer_symbol print(live_prices.quotes[symbol], live_prices.greeks[symbol])` `>>> Quote(event_symbol='.SPY230721C387', event_time=0, sequence=0, time_nano_part=0, bid_time=1689365699000, bid_exchange_code='X', bid_price=62.01, bid_size=50.0, ask_time=1689365699000, ask_exchange_code='X', ask_price=62.83, ask_size=50.0) Greeks(event_symbol='.SPY230721C387', event_time=0, event_flags=0, index=7255910303911641088, time=1689398266363, sequence=0, price=62.6049270064687, volatility=0.536152815048564, delta=0.971506591907638, gamma=0.001814464566110275, theta=-0.1440768557397271, rho=0.0831882577866199, vega=0.0436861878838861)` Disconnect callback[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#disconnect-callback "Link to this heading") --------------------------------------------------------------------------------------------------------------------------------------- The disconnect callback can be used to run arbitrary code when the websocket connection has been disconnected. This is useful for notification purposes in your application when you need high availability. The callback function should look something like this: `async def disconnect_callback(streamer: DXLinkStreamer): print("Disconnected!")` The requirements are that the first parameter be the DXLinkStreamer instance, and the function should be asynchronous. This callback can then be used when creating the streamer: `async with DXLinkStreamer(session, disconnect_fn=disconnect_callback) as streamer: # ...` Retry callback[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/data-streamer.html#retry-callback "Link to this heading") ----------------------------------------------------------------------------------------------------------------------------- The data streamer has a special “callback” function which can be used to execute arbitrary code whenever the websocket reconnects. This is useful for re-subscribing to whatever events you wanted to subscribe to initially (in fact, you can probably use the same function/code you use when initializing the connection). The callback function should look something like this: `async def callback(streamer: DXLinkStreamer, arg1, arg2): await streamer.subscribe(Quote, ['SPY'])` The requirements are that the first parameter be the DXLinkStreamer instance, and the function should be asynchronous. Other than that, you have the flexibility to decide what arguments you want to use. This callback can then be used when creating the streamer: `async with DXLinkStreamer(session, reconnect_fn=callback, reconnect_args=(arg1, arg2)) as streamer: # ...` The reconnection uses websockets’ exponential backoff algorithm, which can be configured through environment variables [here](https://websockets.readthedocs.io/en/14.1/reference/variables.html) . Back to top --- # tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest#) [](https://github.com/tastyware/tastytrade/blob/master/docs/index.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/index.rst "View source of this page") [![Documentation Status](https://readthedocs.org/projects/tastyworks-api/badge/?version=latest)](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest) [![PyPI Package](https://img.shields.io/pypi/v/tastytrade)](https://pypi.org/project/tastytrade) [![PyPI Downloads](https://static.pepy.tech/badge/tastytrade)](https://pepy.tech/project/tastytrade) [![Release](https://img.shields.io/github/v/release/tastyware/tastytrade?label=release%20notes)](https://github.com/tastyware/tastytrade/releases) Tastytrade Python SDK[¶](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest#tastytrade-python-sdk "Link to this heading") ===================================================================================================================================== A simple, reverse-engineered, sync/async SDK for Tastytrade built on their (now mostly public) API. This will allow you to create trading algorithms for whatever strategies you may have quickly and painlessly in Python. Tip Want to see the SDK in action? Check out [tastytrade-cli](https://github.com/tastyware/tastytrade-cli) , a CLI for Tastytrade that showcases many of the SDK’s features. Note Want to build an advanced trading system? Check out [streaQ](https://github.com/tastyware/streaq) , an async job queuing library for Python that’s perfect for complex applications! Indices and tables[¶](https://tastyworks-api.readthedocs.io/en/latest/?badge=latest#indices-and-tables "Link to this heading") =============================================================================================================================== * [Index](https://tastyworks-api.readthedocs.io/en/latest/genindex.html) * [Module Index](https://tastyworks-api.readthedocs.io/en/latest/py-modindex.html) * [Search Page](https://tastyworks-api.readthedocs.io/en/latest/search.html) Back to top --- # Sessions - tastytrade 10.0.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.0.1/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.0.1/sessions.html#) --- # Accounts - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.1.0/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.1.0/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # tastytrade.market_data - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/market-data.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/market-data.rst "View source of this page") tastytrade.market\_data[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#module-tastytrade.market_data "Link to this heading") ====================================================================================================================================================== _enum_ tastytrade.market\_data.ClosePriceType(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType "tastytrade.market_data.ClosePriceType.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType "Link to this definition") Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") , [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") Contains possible statuses for close prices. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: FINAL \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.FINAL "Link to this definition") INDICATIVE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.INDICATIVE "Link to this definition") PRELIMINARY \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.PRELIMINARY "Link to this definition") REGULAR \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.REGULAR "Link to this definition") UNKNOWN \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.UNKNOWN "Link to this definition") _enum_ tastytrade.market\_data.ExchangeType(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType "tastytrade.market_data.ExchangeType.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType "Link to this definition") Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") , [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") Contains the valid exchanges to fetch data for. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: CME \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CME "Link to this definition") CFE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CFE "Link to this definition") NYSE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.NYSE "Link to this definition") SMALL \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.SMALL "Link to this definition") CBOE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CBOE "Link to this definition") BOND \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.BOND "Link to this definition") CRYPTO \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CRYPTO "Link to this definition") EQUITY\_OFFERING \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.EQUITY_OFFERING "Link to this definition") UNKNOWN \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.UNKNOWN "Link to this definition") _pydantic model_ tastytrade.market\_data.Instrument(_\*_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _, _[instrument\_key](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.instrument_key (Python parameter)") : [InstrumentKey](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "tastytrade.market_data.InstrumentKey (Python model) — Bases: TastytradeData") _, _[underlying\_instrument](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.underlying_instrument (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[root\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.root_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[exchange](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.exchange (Python parameter)") : [ExchangeType](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType "tastytrade.market_data.ExchangeType (Python enum) — Bases: str, Enum") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about an instrument. Show JSON schema ``{ "title": "Instrument", "description": "Dataclass containing information about an instrument.", "type": "object", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" }, "instrument-key": { "$ref": "#/$defs/InstrumentKey" }, "underlying-instrument": { "title": "Underlying-Instrument", "type": "string" }, "root-symbol": { "title": "Root-Symbol", "type": "string" }, "exchange": { "$ref": "#/$defs/ExchangeType" } }, "$defs": { "ExchangeType": { "description": "Contains the valid exchanges to fetch data for.", "enum": [ "CME", "CFE", "Equity", "Smalls", "CBOED", "Bond", "Cryptocurrency", "Equity Offering", "Unknown" ], "title": "ExchangeType", "type": "string" }, "InstrumentKey": { "description": "Dataclass containing an instrument key.", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" } }, "required": [ "symbol", "instrument-type" ], "title": "InstrumentKey", "type": "object" }, "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" } }, "required": [ "symbol", "instrument-type", "instrument-key", "underlying-instrument", "root-symbol", "exchange" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument-fields "Permalink to this headline") * [`exchange (tastytrade.market_data.ExchangeType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.exchange (Python parameter)") * [`instrument_key (tastytrade.market_data.InstrumentKey)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.instrument_key (Python parameter)") * [`instrument_type (tastytrade.order.InstrumentType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.instrument_type (Python parameter)") * [`root_symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.root_symbol (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.symbol (Python parameter)") * [`underlying_instrument (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument.underlying_instrument (Python parameter)") _pydantic model_ tastytrade.market\_data.InstrumentKey(_\*_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "tastytrade.market_data.InstrumentKey.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "tastytrade.market_data.InstrumentKey.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing an instrument key. Show JSON schema ``{ "title": "InstrumentKey", "description": "Dataclass containing an instrument key.", "type": "object", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" } }, "$defs": { "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" } }, "required": [ "symbol", "instrument-type" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey-fields "Permalink to this headline") * [`instrument_type (tastytrade.order.InstrumentType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "tastytrade.market_data.InstrumentKey.instrument_type (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.InstrumentKey "tastytrade.market_data.InstrumentKey.symbol (Python parameter)") _pydantic model_ tastytrade.market\_data.MarketData(_\*_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[bid\_size](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.bid_size (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[ask\_size](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.ask_size (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[mark](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.mark (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[close\_price\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.close_price_type (Python parameter)") : [ClosePriceType](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType "tastytrade.market_data.ClosePriceType (Python enum) — Bases: str, Enum") _, _[summary\_date](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.summary_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[prev\_close\_date](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[prev\_close\_price\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close_price_type (Python parameter)") : [ClosePriceType](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType "tastytrade.market_data.ClosePriceType (Python enum) — Bases: str, Enum") _, _[halt\_start\_time](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.halt_start_time (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[halt\_end\_time](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.halt_end_time (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[ask](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.ask (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[beta](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.beta (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[bid](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.bid (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[close](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_open](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_open (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_high](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_high (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_low](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_low (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_close](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_high\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_high_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[day\_low\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_low_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_amount](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.dividend_amount (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_frequency](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.dividend_frequency (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[high\_limit\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.high_limit_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[instrument](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.instrument (Python parameter)") : [Instrument](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.Instrument "tastytrade.market_data.Instrument (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[last](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[last\_mkt](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_mkt (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[last\_ext](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_ext (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[last\_trade\_time](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_trade_time (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[low\_limit\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.low_limit_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[mid](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.mid (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[open](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.open (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[prev\_close](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[prev\_day\_close](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_day_close (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[trading\_halted](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.trading_halted (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[trading\_halted\_reason](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.trading_halted_reason (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[volume](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.volume (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[year\_low\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.year_low_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[year\_high\_price](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.year_high_price (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[open\_interest](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.open_interest (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing life market data for a symbol. Show JSON schema ``{ "title": "MarketData", "description": "Dataclass containing life market data for a symbol.", "type": "object", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" }, "bid-size": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Bid-Size" }, "ask-size": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Ask-Size" }, "mark": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Mark" }, "close-price-type": { "$ref": "#/$defs/ClosePriceType" }, "summary-date": { "format": "date", "title": "Summary-Date", "type": "string" }, "prev-close-date": { "format": "date", "title": "Prev-Close-Date", "type": "string" }, "prev-close-price-type": { "$ref": "#/$defs/ClosePriceType" }, "halt-start-time": { "title": "Halt-Start-Time", "type": "integer" }, "halt-end-time": { "title": "Halt-End-Time", "type": "integer" }, "ask": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ask" }, "beta": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Beta" }, "bid": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Bid" }, "close": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Close" }, "day-open": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-Open" }, "day-high": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-High" }, "day-low": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-Low" }, "day-close": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-Close" }, "day-high-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-High-Price" }, "day-low-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Day-Low-Price" }, "dividend-amount": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Amount" }, "dividend-frequency": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Frequency" }, "high-limit-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "High-Limit-Price" }, "instrument": { "anyOf": [ { "$ref": "#/$defs/Instrument" }, { "type": "null" } ], "default": null }, "last": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Last" }, "last-mkt": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Last-Mkt" }, "last-ext": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Last-Ext" }, "last-trade-time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Last-Trade-Time" }, "low-limit-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Low-Limit-Price" }, "mid": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Mid" }, "open": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Open" }, "prev-close": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prev-Close" }, "prev-day-close": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prev-Day-Close" }, "trading-halted": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Trading-Halted" }, "trading-halted-reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Trading-Halted-Reason" }, "volume": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Volume" }, "year-low-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Year-Low-Price" }, "year-high-price": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Year-High-Price" }, "open-interest": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Open-Interest" } }, "$defs": { "ClosePriceType": { "description": "Contains possible statuses for close prices.", "enum": [ "Final", "Indicative", "Preliminary", "Regular", "Unknown" ], "title": "ClosePriceType", "type": "string" }, "ExchangeType": { "description": "Contains the valid exchanges to fetch data for.", "enum": [ "CME", "CFE", "Equity", "Smalls", "CBOED", "Bond", "Cryptocurrency", "Equity Offering", "Unknown" ], "title": "ExchangeType", "type": "string" }, "Instrument": { "description": "Dataclass containing information about an instrument.", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" }, "instrument-key": { "$ref": "#/$defs/InstrumentKey" }, "underlying-instrument": { "title": "Underlying-Instrument", "type": "string" }, "root-symbol": { "title": "Root-Symbol", "type": "string" }, "exchange": { "$ref": "#/$defs/ExchangeType" } }, "required": [ "symbol", "instrument-type", "instrument-key", "underlying-instrument", "root-symbol", "exchange" ], "title": "Instrument", "type": "object" }, "InstrumentKey": { "description": "Dataclass containing an instrument key.", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" } }, "required": [ "symbol", "instrument-type" ], "title": "InstrumentKey", "type": "object" }, "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" } }, "required": [ "symbol", "instrument-type", "updated-at", "bid-size", "ask-size", "mark", "close-price-type", "summary-date", "prev-close-date", "prev-close-price-type", "halt-start-time", "halt-end-time" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData-fields "Permalink to this headline") * [`ask (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.ask (Python parameter)") * [`ask_size (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.ask_size (Python parameter)") * [`beta (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.beta (Python parameter)") * [`bid (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.bid (Python parameter)") * [`bid_size (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.bid_size (Python parameter)") * [`close (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.close (Python parameter)") * [`close_price_type (tastytrade.market_data.ClosePriceType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.close_price_type (Python parameter)") * [`day_close (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_close (Python parameter)") * [`day_high (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_high (Python parameter)") * [`day_high_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_high_price (Python parameter)") * [`day_low (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_low (Python parameter)") * [`day_low_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_low_price (Python parameter)") * [`day_open (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.day_open (Python parameter)") * [`dividend_amount (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.dividend_amount (Python parameter)") * [`dividend_frequency (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.dividend_frequency (Python parameter)") * [`halt_end_time (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.halt_end_time (Python parameter)") * [`halt_start_time (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.halt_start_time (Python parameter)") * [`high_limit_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.high_limit_price (Python parameter)") * [`instrument (tastytrade.market_data.Instrument | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.instrument (Python parameter)") * [`instrument_type (tastytrade.order.InstrumentType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.instrument_type (Python parameter)") * [`last (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last (Python parameter)") * [`last_ext (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_ext (Python parameter)") * [`last_mkt (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_mkt (Python parameter)") * [`last_trade_time (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.last_trade_time (Python parameter)") * [`low_limit_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.low_limit_price (Python parameter)") * [`mark (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.mark (Python parameter)") * [`mid (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.mid (Python parameter)") * [`open (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.open (Python parameter)") * [`open_interest (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.open_interest (Python parameter)") * [`prev_close (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close (Python parameter)") * [`prev_close_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close_date (Python parameter)") * [`prev_close_price_type (tastytrade.market_data.ClosePriceType)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_close_price_type (Python parameter)") * [`prev_day_close (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.prev_day_close (Python parameter)") * [`summary_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.summary_date (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.symbol (Python parameter)") * [`trading_halted (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.trading_halted (Python parameter)") * [`trading_halted_reason (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.trading_halted_reason (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.updated_at (Python parameter)") * [`volume (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.volume (Python parameter)") * [`year_high_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.year_high_price (Python parameter)") * [`year_low_price (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData.year_low_price (Python parameter)") _async_ tastytrade.market\_data.a\_get\_market\_data(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.session "tastytrade.market_data.a_get_market_data.session (Python parameter) — active session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.symbol "tastytrade.market_data.a_get_market_data.symbol (Python parameter) — symbol to get data for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.instrument_type "tastytrade.market_data.a_get_market_data.instrument_type (Python parameter) — type of instrument for the symbol") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _) → [MarketData](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data "Link to this definition") Get market data for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.session "Permalink to this definition") active session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.symbol "Permalink to this definition") symbol to get data for instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data.instrument_type "Permalink to this definition") type of instrument for the symbol _async_ tastytrade.market\_data.a\_get\_market\_data\_by\_type(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.session "tastytrade.market_data.a_get_market_data_by_type.session (Python parameter) — active session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[cryptocurrencies](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.cryptocurrencies "tastytrade.market_data.a_get_market_data_by_type.cryptocurrencies (Python parameter) — list of cryptocurrencies to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[equities](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.equities "tastytrade.market_data.a_get_market_data_by_type.equities (Python parameter) — list of equities to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.futures "tastytrade.market_data.a_get_market_data_by_type.futures (Python parameter) — list of futures to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[future\_options](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.future_options "tastytrade.market_data.a_get_market_data_by_type.future_options (Python parameter) — list of future options to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[indices](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.indices "tastytrade.market_data.a_get_market_data_by_type.indices (Python parameter) — list of indices to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[options](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.options "tastytrade.market_data.a_get_market_data_by_type.options (Python parameter) — list of options to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketData](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type "Link to this definition") Get market data for the given symbols grouped by instrument type. Combined limit across all types is 100. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.session "Permalink to this definition") active session to use cryptocurrencies: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.cryptocurrencies "Permalink to this definition") list of cryptocurrencies to fetch equities: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.equities "Permalink to this definition") list of equities to fetch futures: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.futures "Permalink to this definition") list of futures to fetch future\_options: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.future_options "Permalink to this definition") list of future options to fetch indices: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.indices "Permalink to this definition") list of indices to fetch options: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type.options "Permalink to this definition") list of options to fetch tastytrade.market\_data.get\_market\_data(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.session "tastytrade.market_data.get_market_data.session (Python parameter) — active session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.symbol "tastytrade.market_data.get_market_data.symbol (Python parameter) — symbol to get data for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.instrument_type "tastytrade.market_data.get_market_data.instrument_type (Python parameter) — type of instrument for the symbol") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _) → [MarketData](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data "Link to this definition") Get market data for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.session "Permalink to this definition") active session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.symbol "Permalink to this definition") symbol to get data for instrument\_type: [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data.instrument_type "Permalink to this definition") type of instrument for the symbol tastytrade.market\_data.get\_market\_data\_by\_type(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.session "tastytrade.market_data.get_market_data_by_type.session (Python parameter) — active session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[cryptocurrencies](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.cryptocurrencies "tastytrade.market_data.get_market_data_by_type.cryptocurrencies (Python parameter) — list of cryptocurrencies to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[equities](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.equities "tastytrade.market_data.get_market_data_by_type.equities (Python parameter) — list of equities to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[futures](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.futures "tastytrade.market_data.get_market_data_by_type.futures (Python parameter) — list of futures to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[future\_options](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.future_options "tastytrade.market_data.get_market_data_by_type.future_options (Python parameter) — list of future options to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[indices](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.indices "tastytrade.market_data.get_market_data_by_type.indices (Python parameter) — list of indices to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[options](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.options "tastytrade.market_data.get_market_data_by_type.options (Python parameter) — list of options to fetch") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketData](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.MarketData "tastytrade.market_data.MarketData (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type "Link to this definition") Get market data for the given symbols grouped by instrument type. Combined limit across all types is 100. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.session "Permalink to this definition") active session to use cryptocurrencies: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.cryptocurrencies "Permalink to this definition") list of cryptocurrencies to fetch equities: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.equities "Permalink to this definition") list of equities to fetch futures: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.futures "Permalink to this definition") list of futures to fetch future\_options: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.future_options "Permalink to this definition") list of future options to fetch indices: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.indices "Permalink to this definition") list of indices to fetch options: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type.options "Permalink to this definition") list of options to fetch Back to top --- # Sessions - tastytrade 10.2.3 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.3/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.3/sessions.html#) --- # sync/async - tastytrade 11.0.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # sync/async - tastytrade 11.0.3 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # Orders - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#placing-an-order) [](https://github.com/tastyware/tastytrade/blob/master/docs/orders.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/orders.rst "View source of this page") Orders[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#orders "Link to this heading") ====================================================================================================== Placing an order[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#placing-an-order "Link to this heading") -------------------------------------------------------------------------------------------------------------------------- `from decimal import Decimal from tastytrade import Account from tastytrade.instruments import Equity from tastytrade.order import * account = Account.get(session, '5WX01234') symbol = Equity.get(session, 'USO') leg = symbol.build_leg(Decimal('5'), OrderAction.BUY_TO_OPEN) # buy to open 5 shares order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[leg], # you can have multiple legs in an order price=Decimal('-10') # limit price, $10/share debit for a total value of $50 ) response = account.place_order(session, order, dry_run=True) # a test order print(response)` `>>> PlacedOrderResponse(buying_power_effect=BuyingPowerEffect(change_in_margin_requirement=Decimal('125.0'), change_in_margin_requirement_effect=, change_in_buying_power=Decimal('125.004'), change_in_buying_power_effect=, current_buying_power=Decimal('1000.0'), current_buying_power_effect=, new_buying_power=Decimal('874.996'), new_buying_power_effect=, isolated_order_margin_requirement=Decimal('125.0'), isolated_order_margin_requirement_effect=, is_spread=False, impact=Decimal('125.004'), effect=), fee_calculation=FeeCalculation(regulatory_fees=Decimal('0.0'), regulatory_fees_effect=, clearing_fees=Decimal('0.004'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, total_fees=Decimal('0.004'), total_fees_effect=), order=PlacedOrder(account_number='5WV69754', time_in_force=, order_type=, size='5', underlying_symbol='USO', underlying_instrument_type=, status=, cancellable=True, editable=True, edited=False, updated_at=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='USO', action=, quantity=Decimal('5'), remaining_quantity=Decimal('5'), fills=[])], id=None, price=Decimal('50.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=None, cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=None, reject_reason=None, user_id=None, username=None, terminal_at=None, complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), complex_order=None, warnings=[Message(code='tif_next_valid_sesssion', message='Your order will begin working during next valid session.', preflight_id=None)], errors=None)` Notice the use of the `dry_run` parameter in the call to `place_order`. This is used to calculate the effects that an order would have on the account’s buying power and the fees that would be charged without actually placing the order. This is typically used to provide an order confirmation screen before sending the order. To send the order, pass `dry_run=False`, and the response will be populated with a `PlacedOrderResponse`, which contains information about the order and account. Also, rather than using an explicit credit/debit toggle like the Tastytrade platform, the SDK simply assumes negative numbers are debits and positive ones are credits. Managing orders[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#managing-orders "Link to this heading") ------------------------------------------------------------------------------------------------------------------------ Once we’ve placed an order, it’s often necessary to modify or cancel the order for a variety of reasons. Thankfully, this is easy and handled through the `Account` object: `previous_order.price = Decimal('-10.05') # let's pay more to get a fill! response = account.replace_order(session, previous_response.order.id, previous_order)` Cancelling an order is similar: `account.delete_order(session, placed_order.id)` Placed orders are assigned a status, like “Received”, “Cancelled”, or “Filled”. To watch for status changes in real time, you can use the [Account Streamer](https://tastyworks-api.readthedocs.io/en/v11.1.0/account-streamer.html) . To get current order status, you can just call `get_live_orders`. (The name is somewhat misleading! It returns not only live orders, but also cancelled and filled ones over the past 24 hours.) `orders = account.get_live_orders(session) print(orders)` `>>> [PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 559000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731648', price=Decimal('40.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 548000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 347000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 56, 548000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=True, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 362000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731647', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 341000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 781000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 55, 341000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 433000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731645', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 422000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 6, 0, 2, 53, 203000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 6, 0, 2, 54, 422000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=False, updated_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 844000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731381', price=Decimal('40.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 833000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 150000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 5, 23, 46, 44, 833000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None), PlacedOrder(account_number='5WX01234', time_in_force=, order_type=, underlying_symbol='SPY', underlying_instrument_type=, status=, cancellable=False, editable=False, edited=True, updated_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 183000, tzinfo=datetime.timezone.utc), legs=[Leg(instrument_type=, symbol='SPY', action=, quantity=Decimal('1'), remaining_quantity=Decimal('1'), fills=[])], size='1', id='306731380', price=Decimal('42.0'), price_effect=, gtc_date=None, value=None, value_effect=None, stop_trigger=None, contingent_status=None, confirmation_status=None, cancelled_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 145000, tzinfo=datetime.timezone.utc), cancel_user_id=None, cancel_username=None, replacing_order_id=None, replaces_order_id=None, in_flight_at=None, live_at=None, received_at=datetime.datetime(2024, 2, 5, 23, 46, 41, 647000, tzinfo=datetime.timezone.utc), reject_reason=None, user_id=None, username=None, terminal_at=datetime.datetime(2024, 2, 5, 23, 46, 43, 145000, tzinfo=datetime.timezone.utc), complex_order_id=None, complex_order_tag=None, preflight_id=None, order_rule=None)]` For less recent orders, we can get the full order history with `get_order_history`. Complex Orders[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#complex-orders "Link to this heading") ---------------------------------------------------------------------------------------------------------------------- Tastytrade supports two kinds of complex orders, “OCO” and “OTOCO”, which are explained [here](https://support.tastyworks.com/support/solutions/articles/43000544221-bracket-orders) . To create an OTOCO order, you need an entry point order, a stop loss order, and a profit-taking order: `from decimal import Decimal from tastytrade.instruments import Equity from tastytrade.order import * symbol = Equity.get(session, 'AAPL') opening = symbol.build_leg(Decimal(1), OrderAction.BUY_TO_OPEN) # buy to open 1 share closing = symbol.build_leg(Decimal(1), OrderAction.SELL_TO_CLOSE) # sell to close 1 share otoco = NewComplexOrder( trigger_order=NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.LIMIT, legs=[opening], price=Decimal('-180') # open for $180 debit ), orders=[ NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.LIMIT, legs=[closing], price=Decimal('200') # take profits ), NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.STOP, legs=[closing], stop_trigger=Decimal('160') # stop loss ) ] ) resp = account.place_complex_order(session, otoco, dry_run=False)` An OCO order is similar, but has no trigger order. It’s used to add a profit-taking and a stop loss order to an existing position. Here’s an example, assuming the account already has an open position of 10 long shares of SPY: `symbol = Equity.get(session, 'SPY') closing = symbol.build_leg(Decimal(10), OrderAction.SELL_TO_CLOSE) # sell to close 10 shares oco = NewComplexOrder( orders=[ NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.LIMIT, legs=[closing], price=Decimal('4800'), # take profits price_effect=PriceEffect.CREDIT ), NewOrder( time_in_force=OrderTimeInForce.GTC, order_type=OrderType.STOP, legs=[closing], stop_trigger=Decimal('4000'), # stop loss price_effect=PriceEffect.CREDIT ) ] ) resp = account.place_complex_order(session, oco, dry_run=False)` Note that to cancel complex orders, you need to use the `delete_complex_order` function, NOT `delete_order`. Notional market orders[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#notional-market-orders "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------------- Notional orders are slightly different from normal orders. Since the market will determine both the quantity and the price for you, you need to pass `value` instead of price, and pass `None` for the `quantity` parameter to `build_leg`. `symbol = Equity.get(session, 'AAPL') order = NewOrder( time_in_force=OrderTimeInForce.DAY, order_type=OrderType.NOTIONAL_MARKET, value=Decimal(-10), # $10 debit, this will result in fractional shares legs=[ symbol.build_leg(None, OrderAction.BUY_TO_OPEN), ] ) resp = account.place_order(session, order, dry_run=False)` Cryptocurrency market orders[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/orders.html#cryptocurrency-market-orders "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------------------------- Cryptocurrency market orders should use the special `IOC` TIF: `order = NewOrder( time_in_force=OrderTimeInForce.IOC, order_type=OrderType.NOTIONAL_MARKET, value=-Decimal(100), # buy $100 of ETH legs=[ Leg( instrument_type=InstrumentType.CRYPTOCURRENCY, action=OrderAction.BUY_TO_OPEN, symbol="ETH/USD", ), ], )` Back to top --- # tastytrade.streamer - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/streamer.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/streamer.rst "View source of this page") tastytrade.streamer[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#module-tastytrade.streamer "Link to this heading") ============================================================================================================================================ _class_ tastytrade.streamer.AlertStreamer(_session: ~tastytrade.session.Session, disconnect\_args: tuple\[~typing.Any, ...\] \= (), disconnect\_fn: ~typing.Callable\[\[...\], ~collections.abc.Coroutine\[~typing.Any, ~typing.Any, None\]\] \= , reconnect\_args: tuple\[~typing.Any, ...\] \= (), reconnect\_fn: ~typing.Callable\[\[...\], ~collections.abc.Coroutine\[~typing.Any, ~typing.Any, None\]\] \= _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer "Link to this definition") Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.14)") Used to subscribe to account-level updates (balances, orders, positions), public watchlist updates, quote alerts, and user-level messages. It should always be initialized as an async context manager, or by awaiting it, since the object cannot be fully instantiated without async. Example usage: `from tastytrade import Account, AlertStreamer from tastytrade.order import PlacedOrder async with AlertStreamer(session) as streamer: accounts = Account.get_accounts(session) # updates to balances, orders, and positions await streamer.subscribe_accounts(accounts) # changes in public watchlists await streamer.subscribe_public_watchlists() # quote alerts configured by the user await streamer.subscribe_quote_alerts() async for order in streamer.listen(PlacedOrder): print(order)` Or: `streamer = await AlertStreamer(session)` base\_url : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.base_url "Link to this definition") The base url for the streamer websocket _async_ close() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.close "Link to this definition") Closes the websocket connection and cancels the pending tasks. disconnect\_args[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.disconnect_args "Link to this definition") Variable number of arguments to pass to the reconnect function disconnect\_fn[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.disconnect_fn "Link to this definition") An async function to be called upon disconnection. The first argument must be of type AlertStreamer and will be a reference to the streamer object. _async_ listen(_[alert\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.listen.alert_class "tastytrade.streamer.AlertStreamer.listen.alert_class (Python parameter) — the type of alert to listen for, should be of AlertType") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\]_) → [AsyncIterator](https://docs.python.org/3/library/collections.abc.html#collections.abc.AsyncIterator "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.listen "Link to this definition") Iterate over non-heartbeat messages received from the streamer, mapping them to their appropriate data class and yielding them. This is designed to be friendly for type checking; the return type will be the same class you pass in. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.listen-parameters "Permalink to this headline") alert\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.listen.alert_class "Permalink to this definition") the type of alert to listen for, should be of [`AlertType`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertType "tastytrade.streamer.AlertType (Python data) — List of all possible types to stream with the alert streamer") proxy[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.proxy "Link to this definition") The proxy URL, if any, associated with the session reconnect\_args[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.reconnect_args "Link to this definition") Variable number of arguments to pass to the reconnect function reconnect\_fn[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.reconnect_fn "Link to this definition") An async function to be called upon reconnection. The first argument must be of type AlertStreamer and will be a reference to the streamer object. request\_id[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.request_id "Link to this definition") Counter used to track the request ID for the streamer _async_ subscribe\_accounts(_[accounts](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_accounts.accounts "tastytrade.streamer.AlertStreamer.subscribe_accounts.accounts (Python parameter) — list of Account to subscribe to updates for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Account](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account (Python model) — Bases: TastytradeData")\ \]_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_accounts "Link to this definition") Subscribes to account-level updates (balances, orders, positions). Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_accounts-parameters "Permalink to this headline") accounts: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Account](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account "tastytrade.account.Account (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_accounts.accounts "Permalink to this definition") list of `Account` to subscribe to updates for _async_ subscribe\_public\_watchlists() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_public_watchlists "Link to this definition") Subscribes to public watchlist updates. _async_ subscribe\_quote\_alerts() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_quote_alerts "Link to this definition") Subscribes to quote alerts (which are configured at a user level). token : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.token "Link to this definition") The active session used to initiate the streamer or make requests tastytrade.streamer.AlertType : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "(in Python v3.14)") \= `tastytrade.account.AccountBalance | tastytrade.streamer.ExternalTransaction | tastytrade.order.PlacedComplexOrder | tastytrade.order.PlacedOrder | tastytrade.account.CurrentPosition | tastytrade.streamer.QuoteAlert | tastytrade.account.TradingStatus | tastytrade.streamer.UnderlyingYearGainSummary | tastytrade.watchlists.Watchlist`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertType "Link to this definition") List of all possible types to stream with the alert streamer _class_ tastytrade.streamer.DXLinkStreamer(_session: ~tastytrade.session.Session, disconnect\_args: tuple\[~typing.Any, ...\] \= (), disconnect\_fn: ~typing.Callable\[\[...\], ~collections.abc.Coroutine\[~typing.Any, ~typing.Any, None\]\] \= , reconnect\_args: tuple\[~typing.Any, ...\] \= (), reconnect\_fn: ~typing.Callable\[\[...\], ~collections.abc.Coroutine\[~typing.Any, ~typing.Any, None\]\] \= , ssl\_context: ~ssl.SSLContext \= _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer "Link to this definition") Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.14)") A [`DXLinkStreamer`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer "tastytrade.streamer.DXLinkStreamer (Python class) — Bases: object") object is used to fetch quotes or greeks for a given symbol or list of symbols. It should always be initialized as an async context manager, or by awaiting it, since the object cannot be fully instantiated without async. Example usage: `from tastytrade import DXLinkStreamer from tastytrade.dxfeed import Quote # must be a production session async with DXLinkStreamer(session) as streamer: subs = ['SPY'] # list of quotes to subscribe to await streamer.subscribe(Quote, subs) quote = await streamer.get_event(Quote) print(quote)` Or: `streamer = await DXLinkStreamer(session)` _async_ close() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.close "Link to this definition") Closes the websocket connection and cancels the heartbeat task. disconnect\_args[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.disconnect_args "Link to this definition") Variable number of arguments to pass to the disconnect function disconnect\_fn[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.disconnect_fn "Link to this definition") An async function to be called upon disconnection. The first argument must be of type DXLinkStreamer and will be a reference to the streamer object. _async_ get\_event(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event.event_class "tastytrade.streamer.DXLinkStreamer.get_event.event_class (Python parameter) — the type of alert to listen for, should be of EventType") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\]_) → U[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event "Link to this definition") Using the existing subscription, pulls an event of the given type and returns it. This is designed to be friendly for type checking; the return type will be the same class you pass in. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event.event_class "Permalink to this definition") the type of alert to listen for, should be of [`EventType`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType "tastytrade.streamer.EventType (Python data) — List of all possible types to stream with the data streamer") get\_event\_nowait(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event_nowait.event_class "tastytrade.streamer.DXLinkStreamer.get_event_nowait.event_class (Python parameter) — the type of alert to listen for, should be of EventType") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\]_) → U | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event_nowait "Link to this definition") Using the existing subscriptions, pulls an event of the given type and returns it. If the queue is empty None is returned. This is designed to be friendly for type checking; the return type will be the same class you pass in. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event_nowait-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event_nowait.event_class "Permalink to this definition") the type of alert to listen for, should be of [`EventType`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType "tastytrade.streamer.EventType (Python data) — List of all possible types to stream with the data streamer") _async_ listen(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.listen.event_class "tastytrade.streamer.DXLinkStreamer.listen.event_class (Python parameter) — the type of alert to listen for, should be of EventType") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\]_) → [AsyncIterator](https://docs.python.org/3/library/collections.abc.html#collections.abc.AsyncIterator "(in Python v3.14)") \[U\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.listen "Link to this definition") Using the existing subscriptions, pulls events of the given type and yield returns them. Never exits unless there’s an error or the channel is closed. This is designed to be friendly for type checking; the return type will be the same class you pass in. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.listen-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[U\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.listen.event_class "Permalink to this definition") the type of alert to listen for, should be of [`EventType`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType "tastytrade.streamer.EventType (Python data) — List of all possible types to stream with the data streamer") proxy[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.proxy "Link to this definition") The proxy URL, if any, associated with the session reconnect\_args[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.reconnect_args "Link to this definition") Variable number of arguments to pass to the reconnect function reconnect\_fn[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.reconnect_fn "Link to this definition") An async function to be called upon reconnection. The first argument must be of type DXLinkStreamer and will be a reference to the streamer object. _async_ subscribe(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.event_class "tastytrade.streamer.DXLinkStreamer.subscribe.event_class (Python parameter) — type of subscription to add, should be of EventType") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \]_, _[symbols](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.symbols "tastytrade.streamer.DXLinkStreamer.subscribe.symbols (Python parameter) — list of symbols to subscribe for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_, _[refresh\_interval](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.refresh_interval "tastytrade.streamer.DXLinkStreamer.subscribe.refresh_interval (Python parameter) — Time in seconds between fetching new events from dxfeed for this event type. You can try a higher value if processing quote updates quickly is not a high priority.") : [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.14)") \= `0.1`_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe "Link to this definition") Subscribes to quotes for given list of symbols. Used for recurring data feeds. For candles, use [`subscribe_candle()`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle "tastytrade.streamer.DXLinkStreamer.subscribe_candle (Python method) — Subscribes to candle data for the given list of symbols.") instead. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.event_class "Permalink to this definition") type of subscription to add, should be of [`EventType`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType "tastytrade.streamer.EventType (Python data) — List of all possible types to stream with the data streamer") symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.symbols "Permalink to this definition") list of symbols to subscribe for refresh\_interval: [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.14)") \= `0.1`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe.refresh_interval "Permalink to this definition") Time in seconds between fetching new events from dxfeed for this event type. You can try a higher value if processing quote updates quickly is not a high priority. Once refresh\_interval is set for this event type and channel is opened, it cannot be changed later. _async_ subscribe\_candle(_[symbols](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.symbols "tastytrade.streamer.DXLinkStreamer.subscribe_candle.symbols (Python parameter) — list of symbols to get data for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_, _[interval](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.interval "tastytrade.streamer.DXLinkStreamer.subscribe_candle.interval (Python parameter) — the width of each candle in time, e.g.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[start\_time](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.start_time "tastytrade.streamer.DXLinkStreamer.subscribe_candle.start_time (Python parameter) — starting time for the data range") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[extended\_trading\_hours](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.extended_trading_hours "tastytrade.streamer.DXLinkStreamer.subscribe_candle.extended_trading_hours (Python parameter) — whether to include extended trading") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[refresh\_interval](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.refresh_interval "tastytrade.streamer.DXLinkStreamer.subscribe_candle.refresh_interval (Python parameter) — Time in seconds between fetching new events from dxfeed for this event type. You can try a higher value if processing quote updates quickly is not a high priority.") : [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.14)") \= `0.1`_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle "Link to this definition") Subscribes to candle data for the given list of symbols. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle-parameters "Permalink to this headline") symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.symbols "Permalink to this definition") list of symbols to get data for interval: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.interval "Permalink to this definition") the width of each candle in time, e.g. ’15s’, ‘5m’, ‘1h’, ‘3d’, ‘1w’, ‘1mo’ start\_time: [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.start_time "Permalink to this definition") starting time for the data range extended\_trading\_hours: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.extended_trading_hours "Permalink to this definition") whether to include extended trading refresh\_interval: [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.14)") \= `0.1`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle.refresh_interval "Permalink to this definition") Time in seconds between fetching new events from dxfeed for this event type. You can try a higher value if processing quote updates quickly is not a high priority. Once refresh\_interval is set for this event type and channel is opened, it cannot be changed later. _async_ unsubscribe(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe.event_class "tastytrade.streamer.DXLinkStreamer.unsubscribe.event_class (Python parameter) — type of subscription to remove") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \]_, _[symbols](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe.symbols "tastytrade.streamer.DXLinkStreamer.unsubscribe.symbols (Python parameter) — list of symbols to unsubscribe from") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe "Link to this definition") Removes existing subscription for given list of symbols. For candles, use [`unsubscribe_candle()`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle "tastytrade.streamer.DXLinkStreamer.unsubscribe_candle (Python method) — Removes existing subscription for a candle.") instead. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe.event_class "Permalink to this definition") type of subscription to remove symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe.symbols "Permalink to this definition") list of symbols to unsubscribe from _async_ unsubscribe\_all(_[event\_class](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_all.event_class "tastytrade.streamer.DXLinkStreamer.unsubscribe_all.event_class (Python parameter) — type of event to unsubscribe from.") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \]_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_all "Link to this definition") Unsubscribes to all events of the given event type. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_all-parameters "Permalink to this headline") event\_class: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[[Candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle "tastytrade.dxfeed.candle.Candle (Python model) — Bases: IndexedEvent")\ | [Greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks "tastytrade.dxfeed.greeks.Greeks (Python model) — Bases: IndexedEvent")\ | [Profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile "tastytrade.dxfeed.profile.Profile (Python model) — Bases: Event")\ | [Quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote "tastytrade.dxfeed.quote.Quote (Python model) — Bases: Event")\ | [Summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary "tastytrade.dxfeed.summary.Summary (Python model) — Bases: Event")\ | [TheoPrice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice "tastytrade.dxfeed.theoprice.TheoPrice (Python model) — Bases: IndexedEvent")\ | [TimeAndSale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale "tastytrade.dxfeed.timeandsale.TimeAndSale (Python model) — Bases: IndexedEvent")\ | [Trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade "tastytrade.dxfeed.trade.Trade (Python model) — Bases: Event")\ | [Underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying "tastytrade.dxfeed.underlying.Underlying (Python model) — Bases: IndexedEvent")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_all.event_class "Permalink to this definition") type of event to unsubscribe from. _async_ unsubscribe\_candle(_[ticker](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.ticker "tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.ticker (Python parameter) — symbol to unsubscribe from") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[interval](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.interval "tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.interval (Python parameter) — candle width to unsubscribe from") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[extended\_trading\_hours](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.extended_trading_hours "tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.extended_trading_hours (Python parameter) — whether candle to unsubscribe from contains extended trading hours") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle "Link to this definition") Removes existing subscription for a candle. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle-parameters "Permalink to this headline") ticker: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.ticker "Permalink to this definition") symbol to unsubscribe from interval: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.interval "Permalink to this definition") candle width to unsubscribe from extended\_trading\_hours: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle.extended_trading_hours "Permalink to this definition") whether candle to unsubscribe from contains extended trading hours tastytrade.streamer.EventType : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "(in Python v3.14)") \= `tastytrade.dxfeed.candle.Candle | tastytrade.dxfeed.greeks.Greeks | tastytrade.dxfeed.profile.Profile | tastytrade.dxfeed.quote.Quote | tastytrade.dxfeed.summary.Summary | tastytrade.dxfeed.theoprice.TheoPrice | tastytrade.dxfeed.timeandsale.TimeAndSale | tastytrade.dxfeed.trade.Trade | tastytrade.dxfeed.underlying.Underlying`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType "Link to this definition") List of all possible types to stream with the data streamer _pydantic model_ tastytrade.streamer.ExternalTransaction(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[amount](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.amount (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[bank\_account\_type](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.bank_account_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[banking\_date](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.banking_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[direction](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.direction (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[disbursement\_type](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.disbursement_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[ext\_transfer\_id](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.ext_transfer_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[funds\_available\_date](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.funds_available_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[is\_cancelable](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.is_cancelable (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_clearing\_accepted](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.is_clearing_accepted (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[state](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.state (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[transfer\_method](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.transfer_method (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information on an external transaction (eg money movement). Show JSON schema `{ "title": "ExternalTransaction", "description": "Dataclass containing information on an external transaction (eg money movement).", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "account-number": { "title": "Account-Number", "type": "string" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Amount" }, "bank-account-type": { "title": "Bank-Account-Type", "type": "string" }, "banking-date": { "format": "date", "title": "Banking-Date", "type": "string" }, "created-at": { "format": "date-time", "title": "Created-At", "type": "string" }, "direction": { "title": "Direction", "type": "string" }, "disbursement-type": { "title": "Disbursement-Type", "type": "string" }, "ext-transfer-id": { "title": "Ext-Transfer-Id", "type": "string" }, "funds-available-date": { "format": "date", "title": "Funds-Available-Date", "type": "string" }, "is-cancelable": { "title": "Is-Cancelable", "type": "boolean" }, "is-clearing-accepted": { "title": "Is-Clearing-Accepted", "type": "boolean" }, "state": { "title": "State", "type": "string" }, "transfer-method": { "title": "Transfer-Method", "type": "string" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" } }, "required": [ "id", "account-number", "amount", "bank-account-type", "banking-date", "created-at", "direction", "disbursement-type", "ext-transfer-id", "funds-available-date", "is-cancelable", "is-clearing-accepted", "state", "transfer-method", "updated-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.account_number (Python parameter)") * [`amount (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.amount (Python parameter)") * [`bank_account_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.bank_account_type (Python parameter)") * [`banking_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.banking_date (Python parameter)") * [`created_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.created_at (Python parameter)") * [`direction (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.direction (Python parameter)") * [`disbursement_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.disbursement_type (Python parameter)") * [`ext_transfer_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.ext_transfer_id (Python parameter)") * [`funds_available_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.funds_available_date (Python parameter)") * [`id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.id (Python parameter)") * [`is_cancelable (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.is_cancelable (Python parameter)") * [`is_clearing_accepted (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.is_clearing_accepted (Python parameter)") * [`state (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.state (Python parameter)") * [`transfer_method (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.transfer_method (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.ExternalTransaction "tastytrade.streamer.ExternalTransaction.updated_at (Python parameter)") _pydantic model_ tastytrade.streamer.QuoteAlert(_\*_, _[user\_external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.user_external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[alert\_external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.alert_external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[expires\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.expires_at (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[completed\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.completed_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[triggered\_at](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.triggered_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[field](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.field (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[operator](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.operator (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[threshold](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.threshold (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[threshold\_numeric](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.threshold_numeric (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[dx\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.dx_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass that contains information about a quote alert Show JSON schema `{ "title": "QuoteAlert", "description": "Dataclass that contains information about a quote alert", "type": "object", "properties": { "user-external-id": { "title": "User-External-Id", "type": "string" }, "symbol": { "title": "Symbol", "type": "string" }, "alert-external-id": { "title": "Alert-External-Id", "type": "string" }, "expires-at": { "title": "Expires-At", "type": "integer" }, "completed-at": { "format": "date-time", "title": "Completed-At", "type": "string" }, "created-at": { "format": "date-time", "title": "Created-At", "type": "string" }, "triggered-at": { "format": "date-time", "title": "Triggered-At", "type": "string" }, "field": { "title": "Field", "type": "string" }, "operator": { "title": "Operator", "type": "string" }, "threshold": { "title": "Threshold", "type": "string" }, "threshold-numeric": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Threshold-Numeric" }, "dx-symbol": { "title": "Dx-Symbol", "type": "string" } }, "required": [ "user-external-id", "symbol", "alert-external-id", "expires-at", "completed-at", "created-at", "triggered-at", "field", "operator", "threshold", "threshold-numeric", "dx-symbol" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert-fields "Permalink to this headline") * [`alert_external_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.alert_external_id (Python parameter)") * [`completed_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.completed_at (Python parameter)") * [`created_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.created_at (Python parameter)") * [`dx_symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.dx_symbol (Python parameter)") * [`expires_at (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.expires_at (Python parameter)") * [`field (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.field (Python parameter)") * [`operator (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.operator (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.symbol (Python parameter)") * [`threshold (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.threshold (Python parameter)") * [`threshold_numeric (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.threshold_numeric (Python parameter)") * [`triggered_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.triggered_at (Python parameter)") * [`user_external_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.QuoteAlert "tastytrade.streamer.QuoteAlert.user_external_id (Python parameter)") _enum_ tastytrade.streamer.SubscriptionType(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType "tastytrade.streamer.SubscriptionType.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType "Link to this definition") Bases: [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") , [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") This is an [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") that contains the subscription types for the alert streamer. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: ACCOUNT \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.ACCOUNT "Link to this definition") HEARTBEAT \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.HEARTBEAT "Link to this definition") PUBLIC\_WATCHLISTS \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.PUBLIC_WATCHLISTS "Link to this definition") QUOTE\_ALERTS \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.QUOTE_ALERTS "Link to this definition") _pydantic model_ tastytrade.streamer.UnderlyingYearGainSummary(_\*_, _[year](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.year (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[account\_number](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.account_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _, _[fees](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.fees (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[commissions](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.commissions (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[yearly\_realized\_gain](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.yearly_realized_gain (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[realized\_lot\_gain](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.realized_lot_gain (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass that contains information about the yearly gain or loss for an underlying Show JSON schema ``{ "title": "UnderlyingYearGainSummary", "description": "Dataclass that contains information about the yearly gain\nor loss for an underlying", "type": "object", "properties": { "year": { "title": "Year", "type": "integer" }, "account-number": { "title": "Account-Number", "type": "string" }, "symbol": { "title": "Symbol", "type": "string" }, "instrument-type": { "$ref": "#/$defs/InstrumentType" }, "fees": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Fees" }, "commissions": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Commissions" }, "yearly-realized-gain": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Yearly-Realized-Gain" }, "realized-lot-gain": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Realized-Lot-Gain" } }, "$defs": { "InstrumentType": { "description": "This is an :class:`~enum.Enum` that contains the valid types of instruments\nand their representation in the API.", "enum": [ "Bond", "Cryptocurrency", "Currency Pair", "Equity", "Equity Offering", "Equity Option", "Fixed Income Security", "Future", "Future Option", "Index", "Liquidity Pool", "Unknown", "Warrant" ], "title": "InstrumentType", "type": "string" } }, "required": [ "year", "account-number", "symbol", "instrument-type", "fees", "commissions", "yearly-realized-gain", "realized-lot-gain" ] }`` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary-fields "Permalink to this headline") * [`account_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.account_number (Python parameter)") * [`commissions (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.commissions (Python parameter)") * [`fees (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.fees (Python parameter)") * [`instrument_type (tastytrade.order.InstrumentType)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.instrument_type (Python parameter)") * [`realized_lot_gain (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.realized_lot_gain (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.symbol (Python parameter)") * [`year (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.year (Python parameter)") * [`yearly_realized_gain (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary "tastytrade.streamer.UnderlyingYearGainSummary.yearly_realized_gain (Python parameter)") Validators:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.UnderlyingYearGainSummary-validators "Permalink to this headline") * `validate_price_effects` » `all fields` Back to top --- # Sessions - tastytrade 10.2.2 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.2/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.2/sessions.html#) --- # sync/async - tastytrade 11.0.2 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # Watchlists - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/watchlists.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/watchlists.rst "View source of this page") Watchlists[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/watchlists.html#watchlists "Link to this heading") ================================================================================================================== To use watchlists you’ll need a production session: `from tastytrade import Session session = Session(user, password)` Let’s fetch an existing watchlist: `from tastytrade import PrivateWatchlist watchlist = PrivateWatchlist.get(session, 'MyWatchlist') print(watchlist.watchlist_entries)` `>>> [{'symbol': 'AAPL', 'instrument-type': 'Equity'}, {'symbol': 'MSFT', 'instrument-type': 'Equity'}]` To add a symbol to the watchlist: `from tastytrade.instruments import InstrumentType watchlist.add_symbol('SPY', InstrumentType.EQUITY)` In this case, the symbol is present locally, but not remotely, so we need to update the remote list: `watchlist.update(session)` We can also create a new watchlist from scratch, then publish it to the Tastytrade server: `new_watchlist = PrivateWatchlist(name='NewWatchlist') new_watchlist.add_symbol('USO', InstrumentType.EQUITY) new_watchlist.upload(session)` You can also fetch public watchlists: `from tastytrade import PublicWatchlist public_watchlist = PublicWatchlist.get(session, "Tom's Watchlist") print(public_watchlist.watchlist_entries)` Back to top --- # sync/async - tastytrade 11.0.1 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # sync/async - tastytrade 11.0.4 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # Market Sessions - tastytrade 11.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/market-sessions.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/market-sessions.rst "View source of this page") Market Sessions[¶](https://tastyworks-api.readthedocs.io/en/v11.1.0/market-sessions.html#market-sessions "Link to this heading") ================================================================================================================================= A market time session object contains information about the current state of specific markets. It can be used to get the market opening and closing times and state. The dataclass represents the current session and any nested ‘next’ or ‘previous’ session info. The `get_market_sessions` function can be used to obtain information about the current session: `from tastytrade.market_sessions import ExchangeType, get_market_sessions get_market_sessions(session, exchanges=[ExchangeType.NYSE])` `>>> [MarketSession(close_at=None, close_at_ext=None, instrument_collection='Equity', open_at=None, start_at=None, next_session=MarketSessionSnapshot(close_at=datetime.datetime(2025, 2, 18, 21, 0, tzinfo=TzInfo(UTC)), close_at_ext=datetime.datetime(2025, 2, 19, 1, 0, tzinfo=TzInfo(UTC)), instrument_collection='Equity', open_at=datetime.datetime(2025, 2, 18, 14, 30, tzinfo=TzInfo(UTC)), session_date=datetime.date(2025, 2, 18), start_at=datetime.datetime(2025, 2, 18, 13, 15, tzinfo=TzInfo(UTC))), previous_session=MarketSessionSnapshot(close_at=datetime.datetime(2025, 2, 14, 21, 0, tzinfo=TzInfo(UTC)), close_at_ext=datetime.datetime(2025, 2, 15, 1, 0, tzinfo=TzInfo(UTC)), instrument_collection='Equity', open_at=datetime.datetime(2025, 2, 14, 14, 30, tzinfo=TzInfo(UTC)), session_date=datetime.date(2025, 2, 14), start_at=datetime.datetime(2025, 2, 14, 13, 15, tzinfo=TzInfo(UTC))), status=)]` The `get_market_holidays` function can be used to obtain information about markets half days and holidays: `from tastytrade.market_sessions import get_market_holidays calendar = Market.get_market_holidays(session) print(calendar.half_days) print(calendar.holidays)` `>>> [datetime.date(2015, 12, 24), datetime.date(2016, 11, 25), datetime.date(2017, 7, 3), datetime.date(2017, 11, 24), datetime.date(2018, 7, 3), datetime.date(2018, 11, 23), datetime.date(2018, 12, 24), datetime.date(2019, 7, 3), datetime.date(2019, 11, 29), datetime.date(2019, 12, 24), datetime.date(2020, 11, 27), datetime.date(2020, 12, 24), datetime.date(2021, 11, 26), datetime.date(2022, 11, 25), datetime.date(2023, 7, 3), datetime.date(2023, 11, 24), datetime.date(2024, 7, 3), datetime.date(2024, 11, 29), datetime.date(2024, 12, 24), datetime.date(2025, 7, 3), datetime.date(2025, 11, 28), datetime.date(2025, 12, 24), datetime.date(2026, 11, 27), datetime.date(2026, 12, 24), datetime.date(2027, 7, 2), datetime.date(2027, 11, 26), datetime.date(2027, 12, 23), datetime.date(2028, 7, 3), datetime.date(2028, 11, 24), datetime.date(2028, 12, 22), datetime.date(2029, 7, 3)] >>> [datetime.date(2015, 12, 25), datetime.date(2016, 1, 1), datetime.date(2016, 1, 18), datetime.date(2016, 2, 15), datetime.date(2016, 3, 25), datetime.date(2016, 5, 30), datetime.date(2016, 7, 4), datetime.date(2016, 9, 5), datetime.date(2016, 11, 24), datetime.date(2016, 12, 26), datetime.date(2017, 1, 2), datetime.date(2017, 1, 16), datetime.date(2017, 2, 20), datetime.date(2017, 4, 14), datetime.date(2017, 5, 29), datetime.date(2017, 7, 4), datetime.date(2017, 9, 4), datetime.date(2017, 11, 23), datetime.date(2017, 12, 25), datetime.date(2018, 1, 1), datetime.date(2018, 1, 15), datetime.date(2018, 2, 19), datetime.date(2018, 3, 30), datetime.date(2018, 5, 28), datetime.date(2018, 7, 4), datetime.date(2018, 9, 3), datetime.date(2018, 11, 22), datetime.date(2018, 12, 5), datetime.date(2018, 12, 25), datetime.date(2019, 1, 1), datetime.date(2019, 1, 21), datetime.date(2019, 2, 18), datetime.date(2019, 4, 19), datetime.date(2019, 5, 27), datetime.date(2019, 7, 4), datetime.date(2019, 9, 2), datetime.date(2019, 11, 28), datetime.date(2019, 12, 25), datetime.date(2020, 1, 1), datetime.date(2020, 1, 20), datetime.date(2020, 2, 17), datetime.date(2020, 4, 10), datetime.date(2020, 5, 25), datetime.date(2020, 7, 3), datetime.date(2020, 9, 7), datetime.date(2020, 11, 26), datetime.date(2020, 12, 25), datetime.date(2021, 1, 1), datetime.date(2021, 1, 18), datetime.date(2021, 2, 15), datetime.date(2021, 4, 2), datetime.date(2021, 5, 31), datetime.date(2021, 7, 5), datetime.date(2021, 9, 6), datetime.date(2021, 11, 25), datetime.date(2021, 12, 24), datetime.date(2022, 1, 17), datetime.date(2022, 2, 21), datetime.date(2022, 4, 15), datetime.date(2022, 5, 30), datetime.date(2022, 6, 20), datetime.date(2022, 7, 4), datetime.date(2022, 9, 5), datetime.date(2022, 11, 24), datetime.date(2022, 12, 26), datetime.date(2023, 1, 2), datetime.date(2023, 1, 16), datetime.date(2023, 2, 20), datetime.date(2023, 4, 7), datetime.date(2023, 5, 29), datetime.date(2023, 6, 19), datetime.date(2023, 7, 4), datetime.date(2023, 9, 4), datetime.date(2023, 11, 23), datetime.date(2023, 12, 25), datetime.date(2024, 1, 1), datetime.date(2024, 1, 15), datetime.date(2024, 2, 19), datetime.date(2024, 3, 29), datetime.date(2024, 5, 27), datetime.date(2024, 6, 19), datetime.date(2024, 7, 4), datetime.date(2024, 9, 2), datetime.date(2024, 11, 28), datetime.date(2024, 12, 25), datetime.date(2025, 1, 1), datetime.date(2025, 1, 9), datetime.date(2025, 1, 20), datetime.date(2025, 2, 17), datetime.date(2025, 4, 18), datetime.date(2025, 5, 26), datetime.date(2025, 6, 19), datetime.date(2025, 7, 4), datetime.date(2025, 9, 1), datetime.date(2025, 11, 27), datetime.date(2025, 12, 25), datetime.date(2026, 1, 1), datetime.date(2026, 1, 19), datetime.date(2026, 2, 16), datetime.date(2026, 4, 3), datetime.date(2026, 5, 25), datetime.date(2026, 6, 19), datetime.date(2026, 7, 3), datetime.date(2026, 9, 7), datetime.date(2026, 11, 26), datetime.date(2026, 12, 25), datetime.date(2027, 1, 1), datetime.date(2027, 1, 18), datetime.date(2027, 2, 15), datetime.date(2027, 3, 26), datetime.date(2027, 5, 31), datetime.date(2027, 6, 18), datetime.date(2027, 7, 5), datetime.date(2027, 9, 6), datetime.date(2027, 11, 25), datetime.date(2027, 12, 24), datetime.date(2028, 1, 17), datetime.date(2028, 2, 21), datetime.date(2028, 4, 14), datetime.date(2028, 5, 29), datetime.date(2028, 6, 19), datetime.date(2028, 7, 4), datetime.date(2028, 9, 4), datetime.date(2028, 11, 23), datetime.date(2028, 12, 25), datetime.date(2029, 1, 1), datetime.date(2029, 1, 15), datetime.date(2029, 2, 19), datetime.date(2029, 3, 30), datetime.date(2029, 5, 28), datetime.date(2029, 6, 19), datetime.date(2029, 7, 4), datetime.date(2029, 9, 3)]` I case you only want to extract the market status, this is one way to do it: `from tastytrade.market_sessions import ExchangeType, MarketStatus, get_market_sessions market_sessions = get_market_sessions(session, exchanges=[ExchangeType.NYSE, ExchangeType.CME]) print([ms.status != MarketStatus.CLOSED for ms in market_sessions])` `>>> [False, False]` Back to top --- # tastytrade.metrics - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/metrics.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/metrics.rst "View source of this page") tastytrade.metrics[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#module-tastytrade.metrics "Link to this heading") ========================================================================================================================================= _pydantic model_ tastytrade.metrics.DividendInfo(_\*_, _[occurred\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo.occurred_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[amount](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo.amount (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass representing dividend information for a given symbol. Show JSON schema `{ "title": "DividendInfo", "description": "Dataclass representing dividend information for a given symbol.", "type": "object", "properties": { "occurred-date": { "format": "date", "title": "Occurred-Date", "type": "string" }, "amount": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Amount" } }, "required": [ "occurred-date", "amount" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo-fields "Permalink to this headline") * [`amount (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo.amount (Python parameter)") * [`occurred_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo.occurred_date (Python parameter)") _pydantic model_ tastytrade.metrics.EarningsInfo(_\*_, _[occurred\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo.occurred_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[eps](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo.eps (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass representing earnings information for a given symbol. Show JSON schema `{ "title": "EarningsInfo", "description": "Dataclass representing earnings information for a given symbol.", "type": "object", "properties": { "occurred-date": { "format": "date", "title": "Occurred-Date", "type": "string" }, "eps": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Eps" } }, "required": [ "occurred-date", "eps" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo-fields "Permalink to this headline") * [`eps (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo.eps (Python parameter)") * [`occurred_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo.occurred_date (Python parameter)") _pydantic model_ tastytrade.metrics.EarningsReport(_\*_, _[estimated](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.estimated (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[late\_flag](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.late_flag (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[visible](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.visible (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[actual\_eps](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.actual_eps (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[consensus\_estimate](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.consensus_estimate (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[expected\_report\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.expected_report_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[quarter\_end\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.quarter_end_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[time\_of\_day](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.time_of_day (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information about a recent earnings report, or the expected date of the next one. Show JSON schema `{ "title": "EarningsReport", "description": "Dataclass containing information about a recent earnings report, or the\nexpected date of the next one.", "type": "object", "properties": { "estimated": { "title": "Estimated", "type": "boolean" }, "late-flag": { "title": "Late-Flag", "type": "integer" }, "visible": { "title": "Visible", "type": "boolean" }, "actual-eps": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Actual-Eps" }, "consensus-estimate": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Consensus-Estimate" }, "expected-report-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Report-Date" }, "quarter-end-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Quarter-End-Date" }, "time-of-day": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Time-Of-Day" }, "updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updated-At" } }, "required": [ "estimated", "late-flag", "visible" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport-fields "Permalink to this headline") * [`actual_eps (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.actual_eps (Python parameter)") * [`consensus_estimate (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.consensus_estimate (Python parameter)") * [`estimated (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.estimated (Python parameter)") * [`expected_report_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.expected_report_date (Python parameter)") * [`late_flag (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.late_flag (Python parameter)") * [`quarter_end_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.quarter_end_date (Python parameter)") * [`time_of_day (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.time_of_day (Python parameter)") * [`updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.updated_at (Python parameter)") * [`visible (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport.visible (Python parameter)") _pydantic model_ tastytrade.metrics.Liquidity(_\*_, _[sum](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.sum (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[count](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.count (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[started\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.started_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass representing liquidity information for a given symbol. Show JSON schema `{ "title": "Liquidity", "description": "Dataclass representing liquidity information for a given symbol.", "type": "object", "properties": { "sum": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Sum" }, "count": { "title": "Count", "type": "integer" }, "started-at": { "format": "date-time", "title": "Started-At", "type": "string" }, "updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updated-At" } }, "required": [ "sum", "count", "started-at" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity-fields "Permalink to this headline") * [`count (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.count (Python parameter)") * [`started_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.started_at (Python parameter)") * [`sum (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.sum (Python parameter)") * [`updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity.updated_at (Python parameter)") _pydantic model_ tastytrade.metrics.MarketMetricInfo(_\*_, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[implied\_volatility\_index](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_index\_5\_day\_change](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_5_day_change (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_index\_rank](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_rank (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[tos\_implied\_volatility\_index\_rank](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tos_implied_volatility_index_rank (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[tw\_implied\_volatility\_index\_rank](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tw_implied_volatility_index_rank (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[tos\_implied\_volatility\_index\_rank\_updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tos_implied_volatility_index_rank_updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_index\_rank\_source](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_rank_source (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_percentile](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_percentile (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[liquidity\_rating](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_rating (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[option\_expiration\_implied\_volatilities](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.option_expiration_implied_volatilities (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[OptionExpirationImpliedVolatility](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility (Python model) — Bases: TastytradeData")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[beta](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.beta (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[corr\_spy\_3month](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.corr_spy_3month (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[market\_cap](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.market_cap (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") _, _[earnings](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.earnings (Python parameter)") : [EarningsReport](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsReport "tastytrade.metrics.EarningsReport (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[price\_earnings\_ratio](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.price_earnings_ratio (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[earnings\_per\_share](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.earnings_per_share (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_rate\_per\_share](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_rate_per_share (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[implied\_volatility\_30\_day](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_30_day (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[historical\_volatility\_30\_day](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_30_day (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[historical\_volatility\_60\_day](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_60_day (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[historical\_volatility\_90\_day](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_90_day (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[iv\_hv\_30\_day\_difference](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.iv_hv_30_day_difference (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[beta\_updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.beta_updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_ex\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_ex_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_next\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_next_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_pay\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_pay_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_updated\_at](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_updated_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[liquidity\_value](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_value (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[liquidity\_rank](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_rank (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[liquidity\_running\_state](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_running_state (Python parameter)") : [Liquidity](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.Liquidity "tastytrade.metrics.Liquidity (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[dividend\_yield](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_yield (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[listed\_market](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.listed_market (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[lendability](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.lendability (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[borrow\_rate](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.borrow_rate (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass representing market metrics for a given symbol. Contains lots of useful information, like IV rank, IV percentile and beta. Show JSON schema `{ "title": "MarketMetricInfo", "description": "Dataclass representing market metrics for a given symbol.\n\nContains lots of useful information, like IV rank, IV percentile and beta.", "type": "object", "properties": { "symbol": { "title": "Symbol", "type": "string" }, "implied-volatility-index": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Index" }, "implied-volatility-index-5-day-change": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Index-5-Day-Change" }, "implied-volatility-index-rank": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Index-Rank" }, "tos-implied-volatility-index-rank": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tos-Implied-Volatility-Index-Rank" }, "tw-implied-volatility-index-rank": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tw-Implied-Volatility-Index-Rank" }, "tos-implied-volatility-index-rank-updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Tos-Implied-Volatility-Index-Rank-Updated-At" }, "implied-volatility-index-rank-source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Index-Rank-Source" }, "implied-volatility-percentile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Percentile" }, "implied-volatility-updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-Updated-At" }, "liquidity-rating": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Liquidity-Rating" }, "updated-at": { "format": "date-time", "title": "Updated-At", "type": "string" }, "option-expiration-implied-volatilities": { "anyOf": [ { "items": { "$ref": "#/$defs/OptionExpirationImpliedVolatility" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Option-Expiration-Implied-Volatilities" }, "beta": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Beta" }, "corr-spy-3month": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Corr-Spy-3Month" }, "market-cap": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Market-Cap" }, "earnings": { "anyOf": [ { "$ref": "#/$defs/EarningsReport" }, { "type": "null" } ], "default": null }, "price-earnings-ratio": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Price-Earnings-Ratio" }, "earnings-per-share": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Earnings-Per-Share" }, "dividend-rate-per-share": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Rate-Per-Share" }, "implied-volatility-30-day": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility-30-Day" }, "historical-volatility-30-day": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Historical-Volatility-30-Day" }, "historical-volatility-60-day": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Historical-Volatility-60-Day" }, "historical-volatility-90-day": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Historical-Volatility-90-Day" }, "iv-hv-30-day-difference": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Iv-Hv-30-Day-Difference" }, "beta-updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Beta-Updated-At" }, "created-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Created-At" }, "dividend-ex-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Ex-Date" }, "dividend-next-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Next-Date" }, "dividend-pay-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Pay-Date" }, "dividend-updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Updated-At" }, "liquidity-value": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Liquidity-Value" }, "liquidity-rank": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Liquidity-Rank" }, "liquidity-running-state": { "anyOf": [ { "$ref": "#/$defs/Liquidity" }, { "type": "null" } ], "default": null }, "dividend-yield": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividend-Yield" }, "listed-market": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Listed-Market" }, "lendability": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Lendability" }, "borrow-rate": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Borrow-Rate" } }, "$defs": { "EarningsReport": { "description": "Dataclass containing information about a recent earnings report, or the\nexpected date of the next one.", "properties": { "estimated": { "title": "Estimated", "type": "boolean" }, "late-flag": { "title": "Late-Flag", "type": "integer" }, "visible": { "title": "Visible", "type": "boolean" }, "actual-eps": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Actual-Eps" }, "consensus-estimate": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Consensus-Estimate" }, "expected-report-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Expected-Report-Date" }, "quarter-end-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Quarter-End-Date" }, "time-of-day": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Time-Of-Day" }, "updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updated-At" } }, "required": [ "estimated", "late-flag", "visible" ], "title": "EarningsReport", "type": "object" }, "Liquidity": { "description": "Dataclass representing liquidity information for a given symbol.", "properties": { "sum": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Sum" }, "count": { "title": "Count", "type": "integer" }, "started-at": { "format": "date-time", "title": "Started-At", "type": "string" }, "updated-at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Updated-At" } }, "required": [ "sum", "count", "started-at" ], "title": "Liquidity", "type": "object" }, "OptionExpirationImpliedVolatility": { "description": "Dataclass containing implied volatility information for a given symbol\nand expiration date.", "properties": { "expiration-date": { "format": "date", "title": "Expiration-Date", "type": "string" }, "settlement-type": { "title": "Settlement-Type", "type": "string" }, "option-chain-type": { "title": "Option-Chain-Type", "type": "string" }, "implied-volatility": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility" } }, "required": [ "expiration-date", "settlement-type", "option-chain-type" ], "title": "OptionExpirationImpliedVolatility", "type": "object" } }, "required": [ "symbol", "updated-at", "market-cap" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo-fields "Permalink to this headline") * [`beta (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.beta (Python parameter)") * [`beta_updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.beta_updated_at (Python parameter)") * [`borrow_rate (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.borrow_rate (Python parameter)") * [`corr_spy_3month (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.corr_spy_3month (Python parameter)") * [`created_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.created_at (Python parameter)") * [`dividend_ex_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_ex_date (Python parameter)") * [`dividend_next_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_next_date (Python parameter)") * [`dividend_pay_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_pay_date (Python parameter)") * [`dividend_rate_per_share (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_rate_per_share (Python parameter)") * [`dividend_updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_updated_at (Python parameter)") * [`dividend_yield (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.dividend_yield (Python parameter)") * [`earnings (tastytrade.metrics.EarningsReport | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.earnings (Python parameter)") * [`earnings_per_share (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.earnings_per_share (Python parameter)") * [`historical_volatility_30_day (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_30_day (Python parameter)") * [`historical_volatility_60_day (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_60_day (Python parameter)") * [`historical_volatility_90_day (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.historical_volatility_90_day (Python parameter)") * [`implied_volatility_30_day (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_30_day (Python parameter)") * [`implied_volatility_index (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index (Python parameter)") * [`implied_volatility_index_5_day_change (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_5_day_change (Python parameter)") * [`implied_volatility_index_rank (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_rank (Python parameter)") * [`implied_volatility_index_rank_source (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_index_rank_source (Python parameter)") * [`implied_volatility_percentile (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_percentile (Python parameter)") * [`implied_volatility_updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.implied_volatility_updated_at (Python parameter)") * [`iv_hv_30_day_difference (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.iv_hv_30_day_difference (Python parameter)") * [`lendability (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.lendability (Python parameter)") * [`liquidity_rank (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_rank (Python parameter)") * [`liquidity_rating (int | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_rating (Python parameter)") * [`liquidity_running_state (tastytrade.metrics.Liquidity | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_running_state (Python parameter)") * [`liquidity_value (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.liquidity_value (Python parameter)") * [`listed_market (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.listed_market (Python parameter)") * [`market_cap (decimal.Decimal)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.market_cap (Python parameter)") * [`option_expiration_implied_volatilities (list[tastytrade.metrics.OptionExpirationImpliedVolatility] | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.option_expiration_implied_volatilities (Python parameter)") * [`price_earnings_ratio (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.price_earnings_ratio (Python parameter)") * [`symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.symbol (Python parameter)") * [`tos_implied_volatility_index_rank (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tos_implied_volatility_index_rank (Python parameter)") * [`tos_implied_volatility_index_rank_updated_at (datetime.datetime | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tos_implied_volatility_index_rank_updated_at (Python parameter)") * [`tw_implied_volatility_index_rank (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.tw_implied_volatility_index_rank (Python parameter)") * [`updated_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo.updated_at (Python parameter)") _pydantic model_ tastytrade.metrics.OptionExpirationImpliedVolatility(_\*_, _[expiration\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.expiration_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[settlement\_type](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.settlement_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[option\_chain\_type](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.option_chain_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[implied\_volatility](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.implied_volatility (Python parameter)") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing implied volatility information for a given symbol and expiration date. Show JSON schema `{ "title": "OptionExpirationImpliedVolatility", "description": "Dataclass containing implied volatility information for a given symbol\nand expiration date.", "type": "object", "properties": { "expiration-date": { "format": "date", "title": "Expiration-Date", "type": "string" }, "settlement-type": { "title": "Settlement-Type", "type": "string" }, "option-chain-type": { "title": "Option-Chain-Type", "type": "string" }, "implied-volatility": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Implied-Volatility" } }, "required": [ "expiration-date", "settlement-type", "option-chain-type" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility-fields "Permalink to this headline") * [`expiration_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.expiration_date (Python parameter)") * [`implied_volatility (decimal.Decimal | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.implied_volatility (Python parameter)") * [`option_chain_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.option_chain_type (Python parameter)") * [`settlement_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.OptionExpirationImpliedVolatility "tastytrade.metrics.OptionExpirationImpliedVolatility.settlement_type (Python parameter)") _async_ tastytrade.metrics.a\_get\_dividends(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends.session "tastytrade.metrics.a_get_dividends.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends.symbol "tastytrade.metrics.a_get_dividends.symbol (Python parameter) — symbol to retrieve dividend information for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[DividendInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends "Link to this definition") Retrieves dividend information for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends.symbol "Permalink to this definition") symbol to retrieve dividend information for _async_ tastytrade.metrics.a\_get\_earnings(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.session "tastytrade.metrics.a_get_earnings.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.symbol "tastytrade.metrics.a_get_earnings.symbol (Python parameter) — symbol to retrieve earnings information for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.start_date "tastytrade.metrics.a_get_earnings.start_date (Python parameter) — limits earnings to those on or after the given date") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[EarningsInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings "Link to this definition") Retrieves earnings information for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.symbol "Permalink to this definition") symbol to retrieve earnings information for start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings.start_date "Permalink to this definition") limits earnings to those on or after the given date _async_ tastytrade.metrics.a\_get\_market\_metrics(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics.session "tastytrade.metrics.a_get_market_metrics.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbols](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics.symbols "tastytrade.metrics.a_get_market_metrics.symbols (Python parameter) — list of symbols to retrieve metrics for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketMetricInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics "Link to this definition") Retrieves market metrics for the given symbols. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics.session "Permalink to this definition") active user session to use symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics.symbols "Permalink to this definition") list of symbols to retrieve metrics for _async_ tastytrade.metrics.a\_get\_risk\_free\_rate(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_risk_free_rate.session "tastytrade.metrics.a_get_risk_free_rate.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_risk_free_rate "Link to this definition") Retrieves the current risk-free rate. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_risk_free_rate-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_risk_free_rate.session "Permalink to this definition") active user session to use tastytrade.metrics.get\_dividends(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends.session "tastytrade.metrics.get_dividends.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends.symbol "tastytrade.metrics.get_dividends.symbol (Python parameter) — symbol to retrieve dividend information for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[DividendInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.DividendInfo "tastytrade.metrics.DividendInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends "Link to this definition") Retrieves dividend information for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends.symbol "Permalink to this definition") symbol to retrieve dividend information for tastytrade.metrics.get\_earnings(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.session "tastytrade.metrics.get_earnings.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.symbol "tastytrade.metrics.get_earnings.symbol (Python parameter) — symbol to retrieve earnings information for") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[start\_date](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.start_date "tastytrade.metrics.get_earnings.start_date (Python parameter) — limits earnings to those on or after the given date") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[EarningsInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.EarningsInfo "tastytrade.metrics.EarningsInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings "Link to this definition") Retrieves earnings information for the given symbol. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.session "Permalink to this definition") active user session to use symbol: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.symbol "Permalink to this definition") symbol to retrieve earnings information for start\_date: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings.start_date "Permalink to this definition") limits earnings to those on or after the given date tastytrade.metrics.get\_market\_metrics(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics.session "tastytrade.metrics.get_market_metrics.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[symbols](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics.symbols "tastytrade.metrics.get_market_metrics.symbols (Python parameter) — list of symbols to retrieve metrics for") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[MarketMetricInfo](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.MarketMetricInfo "tastytrade.metrics.MarketMetricInfo (Python model) — Bases: TastytradeData")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics "Link to this definition") Retrieves market metrics for the given symbols. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics.session "Permalink to this definition") active user session to use symbols: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics.symbols "Permalink to this definition") list of symbols to retrieve metrics for tastytrade.metrics.get\_risk\_free\_rate(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_risk_free_rate.session "tastytrade.metrics.get_risk_free_rate.session (Python parameter) — active user session to use") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_risk_free_rate "Link to this definition") Retrieves the current risk-free rate. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_risk_free_rate-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_risk_free_rate.session "Permalink to this definition") active user session to use Back to top --- # Sessions - tastytrade 10.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.0/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.0/sessions.html#) --- # Sessions - tastytrade 10.1.1 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.1.1/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.1/sessions.html#) --- # sync/async - tastytrade 10.1.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.1.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.0/sync-async.html#) --- # sync/async - tastytrade 11.0.5 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/sync-async.rst "View source of this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! Back to top --- # sync/async - tastytrade 10.2.3 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.2.3/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.3/sync-async.html#) --- # sync/async - tastytrade 10.3.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.3.0/sync-async.html#) --- # sync/async - tastytrade 10.2.1 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.2.1/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.1/sync-async.html#) --- # sync/async - tastytrade 10.2.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.0/sync-async.html#) --- # sync/async - tastytrade 10.0.1 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.0.1/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.0.1/sync-async.html#) --- # sync/async - tastytrade 10.2.2 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.2.2/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.2/sync-async.html#) --- # sync/async - tastytrade 10.1.1 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/sync-async.rst "Edit this page") sync/async[¶](https://tastyworks-api.readthedocs.io/en/v10.1.1/sync-async.html#sync-async "Link to this heading") ================================================================================================================== After creating a session (which is always initialized synchronously), the rest of the API endpoints implemented in the SDK have both sync and async implementations as of version 9.0. Let’s see how this looks: `from tastytrade Account, Session session = Session(username, password) # using sync implementation accounts = Account.get(session)` The async implementation is similar: `from tastytrade Account, Session session = Session(username, password) # using async implementation accounts = await Account.a_get(session)` That’s it! All sync methods have a parallel async method that starts with a\_. Note Please note that two modules, tastytrade.backtest and tastytrade.streamer, only have async implementations. But for everything else, you can use what you’d like! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.1.1/sync-async.html#) --- # Sessions - tastytrade 10.2.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/v10.2.0/sessions.html#creating-a-session) [](https://github.com/tastyware/tastytrade/blob/master/docs/sessions.rst "Edit this page") Sessions[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/sessions.html#sessions "Link to this heading") ============================================================================================================ Creating a session[¶](https://tastyworks-api.readthedocs.io/en/v10.2.0/sessions.html#creating-a-session "Link to this heading") -------------------------------------------------------------------------------------------------------------------------------- A session object is required to authenticate your requests to the Tastytrade API. To create a production (real) session using your normal login: `from tastytrade import Session session = Session('username', 'password')` A certification (test) account can be created [here](https://developer.tastytrade.com/sandbox/) , then used to create a session. `from tastytrade import Session session = Session('username', 'password', is_test=True)` You can make a session persistent by generating a remember token, which is valid for 24 hours: `session = Session('username', 'password', remember_me=True) remember_token = session.remember_token # remember token replaces the password for the next login new_session = Session('username', remember_token=remember_token)` Note If you used a certification (test) account to create the session associated with the remember\_token, you must set is\_test=True when creating subsequent sessions. [Back to top](https://tastyworks-api.readthedocs.io/en/v10.2.0/sessions.html#) --- # Accounts - tastytrade 11.0.1 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.0.1/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.0.1/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.0.1/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.0.1/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Accounts - tastytrade 11.0.4 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.0.4/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.0.4/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.0.4/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.0.4/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Accounts - tastytrade 11.0.2 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.0.2/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.0.2/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.0.2/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.0.2/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Index - tastytrade 11.1.0 documentation Index ===== [**A**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#A) | [**B**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#B) | [**C**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#C) | [**D**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#D) | [**E**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#E) | [**F**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#F) | [**G**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#G) | [**H**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#H) | [**I**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#I) | [**J**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#J) | [**L**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#L) | [**M**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#M) | [**N**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#N) | [**O**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#O) | [**P**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#P) | [**Q**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#Q) | [**R**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#R) | [**S**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#S) | [**T**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#T) | [**U**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#U) | [**V**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#V) | [**W**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#W) | [**Z**](https://tastyworks-api.readthedocs.io/en/latest/genindex.html#Z) A - | | | | --- | --- | | * [a\_delete\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_complex_order)

* [a\_delete\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_delete_order)

* [a\_get() (tastytrade.account.Account class method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get)
* [(tastytrade.instruments.Cryptocurrency class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Cryptocurrency.a_get)

* [(tastytrade.instruments.Equity class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Equity.a_get)

* [(tastytrade.instruments.Future class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Future.a_get)

* [(tastytrade.instruments.FutureOption class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureOption.a_get)

* [(tastytrade.instruments.FutureOptionProduct class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureOptionProduct.a_get)

* [(tastytrade.instruments.FutureProduct class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureProduct.a_get)

* [(tastytrade.instruments.NestedFutureOptionChain class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.NestedFutureOptionChain.a_get)

* [(tastytrade.instruments.NestedOptionChain class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.NestedOptionChain.a_get)

* [(tastytrade.instruments.Option class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Option.a_get)

* [(tastytrade.instruments.Warrant class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Warrant.a_get)

* [(tastytrade.watchlists.PairsWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get)

* [(tastytrade.watchlists.PrivateWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get)

* [(tastytrade.watchlists.PublicWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get)

* [a\_get\_active\_equities() (tastytrade.instruments.Equity class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Equity.a_get_active_equities)

* [a\_get\_balance\_snapshots() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balance_snapshots)

* [a\_get\_balances() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_balances)

* [a\_get\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order)

* [a\_get\_complex\_order\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_complex_order_history)

* [a\_get\_customer() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_get_customer)

* [a\_get\_dividends() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_dividends)

* [a\_get\_earnings() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_earnings)

* [a\_get\_future\_option\_chain() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.a_get_future_option_chain)

* [a\_get\_futures\_holidays() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_futures_holidays)

* [a\_get\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_history)

* [a\_get\_live\_complex\_orders() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_complex_orders)

* [a\_get\_live\_orders() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_live_orders)

* [a\_get\_margin\_requirements() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_margin_requirements)

* [a\_get\_market\_data() (in module tastytrade.market\_data)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data)

* [a\_get\_market\_data\_by\_type() (in module tastytrade.market\_data)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.a_get_market_data_by_type)

* [a\_get\_market\_holidays() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_holidays)

* [a\_get\_market\_metrics() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_market_metrics) | * [a\_get\_market\_sessions() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.a_get_market_sessions)

* [a\_get\_net\_liquidating\_value\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_net_liquidating_value_history)

* [a\_get\_option\_chain() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.a_get_option_chain)

* [a\_get\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order)

* [a\_get\_order\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_order_history)

* [a\_get\_positions() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_positions)

* [a\_get\_quantity\_decimal\_precisions() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.a_get_quantity_decimal_precisions)

* [a\_get\_risk\_free\_rate() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.a_get_risk_free_rate)

* [a\_get\_total\_fees() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_total_fees)

* [a\_get\_trading\_status() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_trading_status)

* [a\_get\_transaction() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_get_transaction)

* [a\_paginate() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate)

* [a\_place\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_complex_order)

* [a\_place\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_place_order)

* [a\_refresh() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_refresh)

* [a\_remove() (tastytrade.watchlists.PrivateWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove)

* [a\_replace\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.a_replace_order)

* [a\_symbol\_search() (in module tastytrade.search)](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.a_symbol_search)

* [a\_update() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_update)

* [a\_upload() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_upload)

* [a\_validate() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_validate)

* [ACCOUNT (tastytrade.streamer.SubscriptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.ACCOUNT)

* [add\_symbol() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.add_symbol)

* [aggressor\_side (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.aggressor_side)

* [AlertStreamer (class in tastytrade.streamer)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer)

* [AlertType (in module tastytrade.streamer)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertType)

* [APR (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.APR)

* [ask\_exchange\_code (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.ask_exchange_code)

* [ask\_price (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.ask_price)
* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.ask_price)

* [ask\_size (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.ask_size)

* [ask\_time (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.ask_time)

* [ask\_volume (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.ask_volume)

* [async\_client (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.async_client)

* [AUG (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.AUG) | B - | | | | --- | --- | | * [back\_volatility (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.back_volatility)

* [base\_url (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.base_url)

* [beta (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.beta)

* [bid\_exchange\_code (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.bid_exchange_code)

* [bid\_price (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.bid_price)
* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.bid_price)

* [bid\_size (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.bid_size)

* [bid\_time (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.bid_time) | * [bid\_volume (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.bid_volume)

* [BOND (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.BOND)
* [(tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.BOND)

* [build\_leg() (tastytrade.order.TradeableTastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.TradeableTastytradeData.build_leg)

* [BUY (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.BUY)

* [BUY\_TO\_CLOSE (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.BUY_TO_CLOSE)

* [BUY\_TO\_OPEN (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.BUY_TO_OPEN)

* [buyer (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.buyer) | C - | | | | --- | --- | | * [CALL (tastytrade.instruments.OptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.OptionType.CALL)

* [call\_volume (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.call_volume)

* [CANCEL\_REQUESTED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.CANCEL_REQUESTED)

* [CANCELLED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.CANCELLED)

* [capitalize() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.capitalize)

* [casefold() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.casefold)

* [CBOE (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CBOE)

* [center() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.center)

* [CFE (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CFE)
* [(tastytrade.market\_sessions.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.CFE)

* [change (tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.change)

* [close (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.close) | * [close() (tastytrade.streamer.AlertStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.close)
* [(tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.close)

* [CLOSED (tastytrade.market\_sessions.MarketStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.CLOSED)

* [CME (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CME)
* [(tastytrade.market\_sessions.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.CME)

* [CONTINGENT (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.CONTINGENT)

* [copy() (tastytrade.utils.TastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy)

* [count (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.count)

* [count() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.count)

* [CREDIT (tastytrade.utils.PriceEffect attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.CREDIT)

* [CRYPTO (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.CRYPTO)

* [CRYPTOCURRENCY (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.CRYPTOCURRENCY)

* [CURRENCY\_PAIR (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.CURRENCY_PAIR) | D - | | | | --- | --- | | * [DAY (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.DAY)

* [day\_close\_price (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_close_price)

* [day\_close\_price\_type (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_close_price_type)

* [day\_high\_price (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_high_price)

* [day\_id (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_id)
* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.day_id)

* [day\_low\_price (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_low_price)

* [day\_open\_price (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.day_open_price)

* [day\_turnover (tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.day_turnover)

* [day\_volume (tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.day_volume)

* [DEBIT (tastytrade.utils.PriceEffect attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.DEBIT)

* [DEC (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.DEC) | * [delete\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_complex_order)

* [delete\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.delete_order)

* [delta (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.delta)
* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.delta)

* [description (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.description)

* [deserialize() (tastytrade.session.Session class method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.deserialize)

* [disconnect\_args (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.disconnect_args)
* [(tastytrade.streamer.DXLinkStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.disconnect_args)

* [disconnect\_fn (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.disconnect_fn)
* [(tastytrade.streamer.DXLinkStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.disconnect_fn)

* [dividend (tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.dividend)

* [dividend\_frequency (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.dividend_frequency)

* [DXLinkStreamer (class in tastytrade.streamer)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer) | E - | | | | --- | --- | | * [earnings\_per\_share (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.earnings_per_share)

* [encode() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.encode)

* [endswith() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.endswith)

* [EQUITY (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.EQUITY)

* [EQUITY\_OFFERING (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.EQUITY_OFFERING)
* [(tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.EQUITY_OFFERING)

* [EQUITY\_OPTION (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.EQUITY_OPTION)

* [event\_flags (tastytrade.dxfeed.event.IndexedEvent attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.event_flags)

* [event\_symbol (tastytrade.dxfeed.event.Event attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.Event.event_symbol)

* [event\_time (tastytrade.dxfeed.event.Event attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.Event.event_time)

* [EventType (in module tastytrade.streamer)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.EventType)

* [ex\_dividend\_amount (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.ex_dividend_amount) | * [ex\_dividend\_day\_id (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.ex_dividend_day_id)

* [exchange\_code (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.exchange_code)
* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.exchange_code)

* [exchange\_sale\_conditions (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.exchange_sale_conditions)

* [expandtabs() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.expandtabs)

* [EXPIRED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.EXPIRED)

* [EXT (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.EXT)

* [EXTENDED (tastytrade.market\_sessions.MarketStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.EXTENDED)

* [extended\_trading\_hours (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.extended_trading_hours)
* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.extended_trading_hours)

* [external\_identifier (tastytrade.order.NewOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder.external_identifier)
* [(tastytrade.order.PlacedOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder.external_identifier) | F - | | | | --- | --- | | * [FEB (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.FEB)

* [FILLED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.FILLED)

* [FINAL (tastytrade.market\_data.ClosePriceType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.FINAL)

* [find() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.find)

* [FIXED\_INCOME (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.FIXED_INCOME)

* [format() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format) | * [format\_map() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format_map)

* [free\_float (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.free_float)

* [from\_stream() (tastytrade.dxfeed.event.Event class method)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.Event.from_stream)

* [front\_volatility (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.front_volatility)

* [FUTURE (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.FUTURE)

* [FUTURE\_OPTION (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.FUTURE_OPTION) | G - | | | | --- | --- | | * [gamma (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.gamma)
* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.gamma)

* [get() (tastytrade.account.Account class method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get)
* [(tastytrade.instruments.Cryptocurrency class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Cryptocurrency.get)

* [(tastytrade.instruments.Equity class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Equity.get)

* [(tastytrade.instruments.Future class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Future.get)

* [(tastytrade.instruments.FutureOption class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureOption.get)

* [(tastytrade.instruments.FutureOptionProduct class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureOptionProduct.get)

* [(tastytrade.instruments.FutureProduct class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureProduct.get)

* [(tastytrade.instruments.NestedFutureOptionChain class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.NestedFutureOptionChain.get)

* [(tastytrade.instruments.NestedOptionChain class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.NestedOptionChain.get)

* [(tastytrade.instruments.Option class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Option.get)

* [(tastytrade.instruments.Warrant class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Warrant.get)

* [(tastytrade.watchlists.PairsWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get)

* [(tastytrade.watchlists.PrivateWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get)

* [(tastytrade.watchlists.PublicWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get)

* [get\_active\_equities() (tastytrade.instruments.Equity class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Equity.get_active_equities)

* [get\_balance\_snapshots() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balance_snapshots)

* [get\_balances() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_balances)

* [get\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order)

* [get\_complex\_order\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_complex_order_history)

* [get\_customer() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.get_customer)

* [get\_dividends() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_dividends)

* [get\_earnings() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_earnings)

* [get\_event() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event)

* [get\_event\_nowait() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.get_event_nowait)

* [get\_future\_fx\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_fx_monthly)

* [get\_future\_grain\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_grain_monthly)

* [get\_future\_index\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_index_monthly) | * [get\_future\_metal\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_metal_monthly)

* [get\_future\_oil\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_oil_monthly)

* [get\_future\_option\_chain() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.get_future_option_chain)

* [get\_future\_treasury\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_treasury_monthly)

* [get\_futures\_holidays() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_futures_holidays)

* [get\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_history)

* [get\_live\_complex\_orders() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_complex_orders)

* [get\_live\_orders() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_live_orders)

* [get\_margin\_requirements() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_margin_requirements)

* [get\_market\_data() (in module tastytrade.market\_data)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data)

* [get\_market\_data\_by\_type() (in module tastytrade.market\_data)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.get_market_data_by_type)

* [get\_market\_holidays() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_holidays)

* [get\_market\_metrics() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_market_metrics)

* [get\_market\_sessions() (in module tastytrade.market\_sessions)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.get_market_sessions)

* [get\_net\_liquidating\_value\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_net_liquidating_value_history)

* [get\_option\_chain() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.get_option_chain)

* [get\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order)

* [get\_order\_history() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_order_history)

* [get\_positions() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_positions)

* [get\_quantity\_decimal\_precisions() (in module tastytrade.instruments)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.get_quantity_decimal_precisions)

* [get\_risk\_free\_rate() (in module tastytrade.metrics)](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#tastytrade.metrics.get_risk_free_rate)

* [get\_sign() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_sign)

* [get\_tasty\_monthly() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_tasty_monthly)

* [get\_third\_friday() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_third_friday)

* [get\_total\_fees() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_total_fees)

* [get\_trading\_status() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_trading_status)

* [get\_transaction() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.get_transaction)

* [GTC (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.GTC)

* [GTC\_EXT (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.GTC_EXT)

* [GTD (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.GTD) | H - | | | | --- | --- | | * [halt\_end\_time (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.halt_end_time)

* [halt\_start\_time (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.halt_start_time)

* [HEARTBEAT (tastytrade.streamer.SubscriptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.HEARTBEAT) | * [high (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.high)

* [high\_52\_week\_price (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.high_52_week_price)

* [high\_limit\_price (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.high_limit_price) | I - | | | | --- | --- | | * [id (tastytrade.order.PlacedComplexOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedComplexOrder.id)
* [(tastytrade.order.PlacedOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.PlacedOrder.id)

* [imp\_volatility (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.imp_volatility)

* [IN\_FLIGHT (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.IN_FLIGHT)

* [index (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.index)
* [(tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.index)

* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.index)

* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.index)

* [(tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.index)

* [INDEX (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.INDEX)

* [index() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.index)

* [INDICATIVE (tastytrade.market\_data.ClosePriceType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.INDICATIVE)

* [interest (tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.interest)

* [IOC (tastytrade.order.OrderTimeInForce attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderTimeInForce.IOC) | * [is\_market\_open\_now() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_now)

* [is\_market\_open\_on() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_on)

* [is\_test (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.is_test)

* [isalnum() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isalnum)

* [isalpha() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isalpha)

* [isascii() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isascii)

* [isdecimal() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isdecimal)

* [isdigit() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isdigit)

* [isidentifier() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isidentifier)

* [islower() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.islower)

* [isnumeric() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isnumeric)

* [isprintable() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isprintable)

* [isspace() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isspace)

* [istitle() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.istitle)

* [isupper() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isupper) | J - | | | | --- | --- | | * [JAN (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.JAN)

* [join() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.join) | * [JUL (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.JUL)

* [JUN (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.JUN) | L - | | | | --- | --- | | * [LIMIT (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.LIMIT)

* [LIQUIDITY\_POOL (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.LIQUIDITY_POOL)

* [listen() (tastytrade.streamer.AlertStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.listen)
* [(tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.listen)

* [LIVE (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.LIVE) | * [ljust() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.ljust)

* [low (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.low)

* [low\_52\_week\_price (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.low_52_week_price)

* [low\_limit\_price (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.low_limit_price)

* [lower() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.lower)

* [lstrip() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.lstrip) | M - * [maketrans() (tastytrade.utils.PriceEffect static method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.maketrans) * [MAR (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.MAR) * [MARKET (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.MARKET) * [MARKETABLE\_LIMIT (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.MARKETABLE_LIMIT) * [MAY (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.MAY) * [model\_construct() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_construct) * [model\_copy() (tastytrade.utils.TastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_copy) * [model\_dump() (tastytrade.utils.TastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump) * [model\_dump\_json() (tastytrade.utils.TastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json) * [model\_extra (tastytrade.utils.TastytradeData property)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_extra) * [model\_fields\_set (tastytrade.utils.TastytradeData property)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_fields_set) * [model\_json\_schema() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema) * [model\_parametrized\_name() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_parametrized_name) * [model\_post\_init() (tastytrade.utils.TastytradeData method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_post_init) * [model\_rebuild() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild) * [model\_validate() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate) * [model\_validate\_json() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json) * [model\_validate\_strings() (tastytrade.utils.TastytradeData class method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings) * module * [tastytrade.account](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#module-tastytrade.account) * [tastytrade.dxfeed.candle](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.candle) * [tastytrade.dxfeed.event](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.event) * [tastytrade.dxfeed.greeks](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.greeks) * [tastytrade.dxfeed.profile](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.profile) * [tastytrade.dxfeed.quote](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.quote) * [tastytrade.dxfeed.summary](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.summary) * [tastytrade.dxfeed.theoprice](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.theoprice) * [tastytrade.dxfeed.timeandsale](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.timeandsale) * [tastytrade.dxfeed.trade](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.trade) * [tastytrade.dxfeed.underlying](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.underlying) * [tastytrade.instruments](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#module-tastytrade.instruments) * [tastytrade.market\_data](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#module-tastytrade.market_data) * [tastytrade.market\_sessions](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#module-tastytrade.market_sessions) * [tastytrade.metrics](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#module-tastytrade.metrics) * [tastytrade.order](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#module-tastytrade.order) * [tastytrade.search](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#module-tastytrade.search) * [tastytrade.session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#module-tastytrade.session) * [tastytrade.streamer](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#module-tastytrade.streamer) * [tastytrade.utils](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#module-tastytrade.utils) * [tastytrade.watchlists](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#module-tastytrade.watchlists) N - | | | | --- | --- | | * [NONE (tastytrade.utils.PriceEffect attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.NONE)

* [NOTIONAL\_MARKET (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.NOTIONAL_MARKET)

* [NOV (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.NOV) | * [now\_in\_new\_york() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.now_in_new_york)

* [NYSE (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.NYSE)
* [(tastytrade.market\_sessions.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.NYSE) | O - | | | | --- | --- | | * [occ\_to\_streamer\_symbol() (tastytrade.instruments.Option class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Option.occ_to_streamer_symbol)

* [OCO (tastytrade.order.ComplexOrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.ComplexOrderType.OCO)

* [OCT (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.OCT)

* [open (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.open) | * [OPEN (tastytrade.market\_sessions.MarketStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.OPEN)

* [open\_interest (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.open_interest)
* [(tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.open_interest)

* [option\_volume (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.option_volume)

* [OTOCO (tastytrade.order.ComplexOrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.ComplexOrderType.OTOCO) | P - | | | | --- | --- | | * [paginate() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate)

* [PARTIALLY\_REMOVED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.PARTIALLY_REMOVED)

* [partition() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.partition)

* [pending (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.pending)

* [place\_complex\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_complex_order)

* [place\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.place_order)

* [PRE\_MARKET (tastytrade.market\_sessions.MarketStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.MarketStatus.PRE_MARKET)

* [PRELIMINARY (tastytrade.market\_data.ClosePriceType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.PRELIMINARY)

* [prev\_day\_close\_price (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.prev_day_close_price)

* [prev\_day\_close\_price\_type (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.prev_day_close_price_type)

* [prev\_day\_id (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.prev_day_id)

* [prev\_day\_volume (tastytrade.dxfeed.summary.Summary attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.summary.Summary.prev_day_volume) | * [price (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.price)
* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.price)

* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.price)

* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.price)

* [(tastytrade.order.NewOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder.price)

* [provider\_secret (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.provider_secret)

* [proxy (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.proxy)
* [(tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.proxy)

* [(tastytrade.streamer.DXLinkStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.proxy)

* [PUBLIC\_WATCHLISTS (tastytrade.streamer.SubscriptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.PUBLIC_WATCHLISTS)

* [PUT (tastytrade.instruments.OptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.OptionType.PUT)

* [put\_call\_ratio (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.put_call_ratio)

* [put\_volume (tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.put_volume) | Q - * [QUOTE\_ALERTS (tastytrade.streamer.SubscriptionType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.SubscriptionType.QUOTE_ALERTS) R - | | | | --- | --- | | * [RECEIVED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.RECEIVED)

* [reconnect\_args (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.reconnect_args)
* [(tastytrade.streamer.DXLinkStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.reconnect_args)

* [reconnect\_fn (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.reconnect_fn)
* [(tastytrade.streamer.DXLinkStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.reconnect_fn)

* [refresh() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.refresh)

* [refresh\_token (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.refresh_token)

* [REGULAR (tastytrade.market\_data.ClosePriceType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.REGULAR)

* [REJECTED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.REJECTED)

* [remove (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.remove)

* [remove() (tastytrade.watchlists.PrivateWatchlist class method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove)

* [remove\_symbol() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove_symbol)

* [REMOVED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.REMOVED) | * [removeprefix() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removeprefix)

* [removesuffix() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removesuffix)

* [replace() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.replace)

* [replace\_order() (tastytrade.account.Account method)](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#tastytrade.account.Account.replace_order)

* [REPLACE\_REQUESTED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.REPLACE_REQUESTED)

* [request\_id (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.request_id)

* [rfind() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rfind)

* [rho (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.rho)

* [rindex() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rindex)

* [rjust() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rjust)

* [ROUTED (tastytrade.order.OrderStatus attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderStatus.ROUTED)

* [rpartition() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rpartition)

* [rsplit() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rsplit)

* [rstrip() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rstrip) | S - | | | | --- | --- | | * [SELL (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.SELL)

* [SELL\_TO\_CLOSE (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.SELL_TO_CLOSE)

* [SELL\_TO\_OPEN (tastytrade.order.OrderAction attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderAction.SELL_TO_OPEN)

* [seller (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.seller)

* [SEP (tastytrade.instruments.FutureMonthCode attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.FutureMonthCode.SEP)

* [sequence (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.sequence)
* [(tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.sequence)

* [(tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.sequence)

* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.sequence)

* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.sequence)

* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.sequence)

* [(tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.sequence)

* [serialize() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.serialize)

* [Session (class in tastytrade.session)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session)

* [set\_sign\_for() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for)

* [shares (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.shares)

* [short\_sale\_restriction (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.short_sale_restriction)

* [size (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.size)
* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.size)

* [SMALL (tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.SMALL)
* [(tastytrade.market\_sessions.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#tastytrade.market_sessions.ExchangeType.SMALL)

* [snapshot\_begin (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.snapshot_begin) | * [snapshot\_end (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.snapshot_end)

* [snapshot\_mode (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.snapshot_mode)

* [snapshot\_snip (tastytrade.dxfeed.event.IndexedEvent property)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.event.IndexedEvent.snapshot_snip)

* [split() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.split)

* [splitlines() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.splitlines)

* [spread\_leg (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.spread_leg)

* [startswith() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.startswith)

* [status\_reason (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.status_reason)

* [STOP (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.STOP)

* [STOP\_LIMIT (tastytrade.order.OrderType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.OrderType.STOP_LIMIT)

* [stop\_trigger (tastytrade.order.NewOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder.stop_trigger)

* [streamer\_expiration (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.streamer_expiration)

* [streamer\_symbol\_to\_occ() (tastytrade.instruments.Option class method)](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#tastytrade.instruments.Option.streamer_symbol_to_occ)

* [strict\_position\_effect\_validation (tastytrade.order.AdvancedInstructions attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.AdvancedInstructions.strict_position_effect_validation)

* [strip() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.strip)

* [subscribe() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe)

* [subscribe\_accounts() (tastytrade.streamer.AlertStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_accounts)

* [subscribe\_candle() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.subscribe_candle)

* [subscribe\_public\_watchlists() (tastytrade.streamer.AlertStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_public_watchlists)

* [subscribe\_quote\_alerts() (tastytrade.streamer.AlertStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.subscribe_quote_alerts)

* [swapcase() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.swapcase)

* [symbol\_search() (in module tastytrade.search)](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#tastytrade.search.symbol_search)

* [sync\_client (tastytrade.session.Session attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.sync_client) | T - | | | | --- | --- | | * tastytrade.account
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/account.html#module-tastytrade.account)

* tastytrade.dxfeed.candle
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.candle)

* tastytrade.dxfeed.event
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.event)

* tastytrade.dxfeed.greeks
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.greeks)

* tastytrade.dxfeed.profile
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.profile)

* tastytrade.dxfeed.quote
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.quote)

* tastytrade.dxfeed.summary
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.summary)

* tastytrade.dxfeed.theoprice
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.theoprice)

* tastytrade.dxfeed.timeandsale
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.timeandsale)

* tastytrade.dxfeed.trade
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.trade)

* tastytrade.dxfeed.underlying
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#module-tastytrade.dxfeed.underlying)

* tastytrade.instruments
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/instruments.html#module-tastytrade.instruments)

* tastytrade.market\_data
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#module-tastytrade.market_data)

* tastytrade.market\_sessions
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/market-sessions.html#module-tastytrade.market_sessions)

* tastytrade.metrics
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/metrics.html#module-tastytrade.metrics) | * tastytrade.order
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#module-tastytrade.order)

* tastytrade.search
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/search.html#module-tastytrade.search)

* tastytrade.session
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#module-tastytrade.session)

* tastytrade.streamer
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#module-tastytrade.streamer)

* tastytrade.utils
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#module-tastytrade.utils)

* tastytrade.watchlists
* [module](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#module-tastytrade.watchlists)

* [TastytradeError](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeError)

* [theta (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.theta)

* [tick\_direction (tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.tick_direction)

* [time (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.time)
* [(tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.time)

* [(tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.time)

* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.time)

* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.time)

* [(tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.time)

* [time\_nano\_part (tastytrade.dxfeed.quote.Quote attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.quote.Quote.time_nano_part)
* [(tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.time_nano_part)

* [(tastytrade.dxfeed.trade.Trade attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.trade.Trade.time_nano_part)

* [title() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.title)

* [today\_in\_new\_york() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.today_in_new_york)

* [token (tastytrade.streamer.AlertStreamer attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.AlertStreamer.token)

* [trade\_through\_exempt (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.trade_through_exempt)

* [trading\_status (tastytrade.dxfeed.profile.Profile attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.profile.Profile.trading_status)

* [translate() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.translate)

* [type (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.type) | U - | | | | --- | --- | | * [underlying\_price (tastytrade.dxfeed.theoprice.TheoPrice attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.theoprice.TheoPrice.underlying_price)

* [UNKNOWN (tastytrade.market\_data.ClosePriceType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ClosePriceType.UNKNOWN)
* [(tastytrade.market\_data.ExchangeType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/market-data.html#tastytrade.market_data.ExchangeType.UNKNOWN)

* [(tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.UNKNOWN)

* [unsubscribe() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe) | * [unsubscribe\_all() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_all)

* [unsubscribe\_candle() (tastytrade.streamer.DXLinkStreamer method)](https://tastyworks-api.readthedocs.io/en/latest/api/streamer.html#tastytrade.streamer.DXLinkStreamer.unsubscribe_candle)

* [update() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.update)

* [upload() (tastytrade.watchlists.PrivateWatchlist method)](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.upload)

* [upper() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.upper) | V - | | | | --- | --- | | * [valid\_tick (tastytrade.dxfeed.timeandsale.TimeAndSale attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.timeandsale.TimeAndSale.valid_tick)

* [validate() (tastytrade.session.Session method)](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.validate)

* [validate\_and\_parse() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_and_parse)

* [validate\_response() (in module tastytrade.utils)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_response)

* [value (tastytrade.order.NewOrder attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.NewOrder.value) | * [vega (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.vega)

* [volatility (tastytrade.dxfeed.greeks.Greeks attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.greeks.Greeks.volatility)
* [(tastytrade.dxfeed.underlying.Underlying attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.underlying.Underlying.volatility)

* [volume (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.volume)

* [vwap (tastytrade.dxfeed.candle.Candle attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/dxfeed.html#tastytrade.dxfeed.candle.Candle.vwap) | W - | | | | --- | --- | | * [WARRANT (tastytrade.order.InstrumentType attribute)](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType.WARRANT) | * [with\_traceback() (tastytrade.utils.TastytradeError method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeError.with_traceback) | Z - * [zfill() (tastytrade.utils.PriceEffect method)](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.zfill) Back to top --- # Accounts - tastytrade 11.0.3 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.0.3/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.0.3/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.0.3/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.0.3/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Accounts - tastytrade 11.0.5 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/accounts.rst "View source of this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v11.0.5/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v11.0.5/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v11.0.5/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v11.0.5/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! Back to top --- # Accounts - tastytrade 10.3.0 documentation [](https://github.com/tastyware/tastytrade/blob/master/docs/accounts.rst "Edit this page") Accounts[¶](https://tastyworks-api.readthedocs.io/en/v10.3.0/accounts.html#accounts "Link to this heading") ============================================================================================================ An account object contains information about a specific Tastytrade account. It can be used to place trades, monitor profit/loss, and analyze positions. The easiest way to get an account is to grab all accounts associated with a specific session: `from tastytrade import Account accounts = Account.get(session)` You can also get a specific account by its unique ID: `account = Account.get(session, '5WX01234')` The `get_balances` function can be used to obtain information about the current buying power and cash balance: `balance = account.get_balances(session) print(balance)` `>>> AccountBalance(account_number='5WX01234', cash_balance=Decimal('87.055'), long_equity_value=Decimal('4046.05'), short_equity_value=Decimal('0.0'), long_derivative_value=Decimal('0.0'), short_derivative_value=Decimal('0.0'), long_futures_value=Decimal('0.0'), short_futures_value=Decimal('0.0'), long_futures_derivative_value=Decimal('0.0'), short_futures_derivative_value=Decimal('0.0'), long_margineable_value=Decimal('0.0'), short_margineable_value=Decimal('0.0'), margin_equity=Decimal('4133.105'), equity_buying_power=Decimal('87.055'), derivative_buying_power=Decimal('87.055'), day_trading_buying_power=Decimal('0.0'), futures_margin_requirement=Decimal('0.0'), available_trading_funds=Decimal('0.0'), maintenance_requirement=Decimal('4048.85'), maintenance_call_value=Decimal('0.0'), reg_t_call_value=Decimal('0.0'), day_trading_call_value=Decimal('0.0'), day_equity_call_value=Decimal('0.0'), net_liquidating_value=Decimal('4133.105'), cash_available_to_withdraw=Decimal('87.06'), day_trade_excess=Decimal('87.06'), pending_cash=Decimal('0.0'), pending_cash_effect=, long_cryptocurrency_value=Decimal('0.0'), short_cryptocurrency_value=Decimal('0.0'), cryptocurrency_margin_requirement=Decimal('0.0'), unsettled_cryptocurrency_fiat_amount=Decimal('0.0'), unsettled_cryptocurrency_fiat_effect=, closed_loop_available_balance=Decimal('87.06'), equity_offering_margin_requirement=Decimal('0.0'), long_bond_value=Decimal('0.0'), bond_margin_requirement=Decimal('0.0'), snapshot_date=datetime.date(2023, 11, 28), reg_t_margin_requirement=Decimal('4048.85'), futures_overnight_margin_requirement=Decimal('0.0'), futures_intraday_margin_requirement=Decimal('0.0'), maintenance_excess=Decimal('87.055'), pending_margin_interest=Decimal('0.0'), effective_cryptocurrency_buying_power=Decimal('87.055'), updated_at=datetime.datetime(2023, 11, 28, 20, 54, 33, 556000, tzinfo=datetime.timezone.utc), apex_starting_day_margin_equity=None, buying_power_adjustment=None, buying_power_adjustment_effect=None, time_of_day=None)` To obtain information about current positions: `positions = account.get_positions(session) print(positions[0])` `>>> CurrentPosition(account_number='5WX01234', symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', quantity=Decimal('10'), quantity_direction='Long', close_price=Decimal('361.34'), average_open_price=Decimal('339.63'), multiplier=1, cost_effect='Credit', is_suppressed=False, is_frozen=False, realized_day_gain=Decimal('18.5'), realized_today=Decimal('279.15'), created_at=datetime.datetime(2023, 3, 31, 14, 35, 40, 138000, tzinfo=datetime.timezone.utc), updated_at=datetime.datetime(2023, 8, 10, 15, 42, 7, 482000, tzinfo=datetime.timezone.utc), mark=None, mark_price=None, restricted_quantity=Decimal('0'), expires_at=None, fixing_price=None, deliverable_type=None, average_yearly_market_close_price=Decimal('339.63'), average_daily_market_close_price=Decimal('361.34'), realized_day_gain_effect=, realized_day_gain_date=datetime.date(2023, 8, 10), realized_today_effect=, realized_today_date=datetime.date(2023, 8, 10))` To fetch a list of past transactions: `history = account.get_history(session, start_date=date(2024, 1, 1)) print(history[-1])` `>>> Transaction(id=280070508, account_number='5WX01234', transaction_type='Trade', transaction_sub_type='Sell to Close', description='Sold 10 BRK/B @ 384.04', executed_at=datetime.datetime(2024, 1, 26, 15, 51, 53, 685000, tzinfo=datetime.timezone.utc), transaction_date=datetime.date(2024, 1, 26), value=Decimal('3840.4'), value_effect=, net_value=Decimal('3840.35'), net_value_effect=, is_estimated_fee=True, symbol='BRK/B', instrument_type=, underlying_symbol='BRK/B', action='Sell to Close', quantity=Decimal('10.0'), price=Decimal('384.04'), regulatory_fees=Decimal('0.042'), regulatory_fees_effect=, clearing_fees=Decimal('0.008'), clearing_fees_effect=, commission=Decimal('0.0'), commission_effect=, proprietary_index_option_fees=Decimal('0.0'), proprietary_index_option_fees_effect=, ext_exchange_order_number='12271026815307', ext_global_order_number=2857, ext_group_id='0', ext_group_fill_id='0', ext_exec_id='0', exec_id='123_40126000126350300000', exchange='JNS', order_id=305250635, exchange_affiliation_identifier='', leg_count=1, destination_venue='JANE_STREET_EQUITIES_A', other_charge=None, other_charge_effect=None, other_charge_description=None, reverses_id=None, cost_basis_reconciliation_date=None, lots=None, agency_price=None, principal_price=None)` We can also view portfolio P/L over time (and even plot it!): `import matplotlib.pyplot as plt nl = account.get_net_liquidating_value_history(session, time_back='1m') # past 1 month plt.plot([n.time for n in nl], [n.close for n in nl]) plt.show()` [![P/L graph](https://tastyworks-api.readthedocs.io/en/v10.3.0/_images/netliq.png)](https://tastyworks-api.readthedocs.io/en/v10.3.0/_images/netliq.png) Accounts are needed to place, replace, and delete orders. See more in [Orders](https://tastyworks-api.readthedocs.io/en/v10.3.0/orders.html) . There are many more things you can do with an `Account` object–check out the SDK Reference section! [Back to top](https://tastyworks-api.readthedocs.io/en/v10.3.0/accounts.html#) --- # tastytrade.watchlists - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/watchlists.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/watchlists.rst "View source of this page") tastytrade.watchlists[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#module-tastytrade.watchlists "Link to this heading") ================================================================================================================================================== _pydantic model_ tastytrade.watchlists.Pair(_\*_, _[left\_action](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_action (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[left\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[left\_quantity](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_quantity (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[right\_action](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_action (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[right\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[right\_quantity](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_quantity (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass that represents a specific pair in a pairs watchlist. Show JSON schema `{ "title": "Pair", "description": "Dataclass that represents a specific pair in a pairs watchlist.", "type": "object", "properties": { "left-action": { "title": "Left-Action", "type": "string" }, "left-symbol": { "title": "Left-Symbol", "type": "string" }, "left-quantity": { "title": "Left-Quantity", "type": "integer" }, "right-action": { "title": "Right-Action", "type": "string" }, "right-symbol": { "title": "Right-Symbol", "type": "string" }, "right-quantity": { "title": "Right-Quantity", "type": "integer" } }, "required": [ "left-action", "left-symbol", "left-quantity", "right-action", "right-symbol", "right-quantity" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair-fields "Permalink to this headline") * [`left_action (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_action (Python parameter)") * [`left_quantity (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_quantity (Python parameter)") * [`left_symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.left_symbol (Python parameter)") * [`right_action (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_action (Python parameter)") * [`right_quantity (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_quantity (Python parameter)") * [`right_symbol (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair.right_symbol (Python parameter)") _pydantic model_ tastytrade.watchlists.PairsWatchlist(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[order\_index](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.order_index (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[pairs\_equations](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.pairs_equations (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Pair](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Pair "tastytrade.watchlists.Pair (Python model) — Bases: TastytradeData")\ \]_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass that represents a pairs watchlist object. Show JSON schema `{ "title": "PairsWatchlist", "description": "Dataclass that represents a pairs watchlist object.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "order-index": { "title": "Order-Index", "type": "integer" }, "pairs-equations": { "items": { "$ref": "#/$defs/Pair" }, "title": "Pairs-Equations", "type": "array" } }, "$defs": { "Pair": { "description": "Dataclass that represents a specific pair in a pairs watchlist.", "properties": { "left-action": { "title": "Left-Action", "type": "string" }, "left-symbol": { "title": "Left-Symbol", "type": "string" }, "left-quantity": { "title": "Left-Quantity", "type": "integer" }, "right-action": { "title": "Right-Action", "type": "string" }, "right-symbol": { "title": "Right-Symbol", "type": "string" }, "right-quantity": { "title": "Right-Quantity", "type": "integer" } }, "required": [ "left-action", "left-symbol", "left-quantity", "right-action", "right-symbol", "right-quantity" ], "title": "Pair", "type": "object" } }, "required": [ "name", "order-index", "pairs-equations" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist-fields "Permalink to this headline") * [`name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.name (Python parameter)") * [`order_index (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.order_index (Python parameter)") * [`pairs_equations (list[tastytrade.watchlists.Pair])`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist "tastytrade.watchlists.PairsWatchlist.pairs_equations (Python parameter)") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get.session "tastytrade.watchlists.PairsWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get "Link to this definition") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get.session "tastytrade.watchlists.PairsWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get.name "tastytrade.watchlists.PairsWatchlist.a_get.name (Python parameter) — the name of the pairs watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches a list of all Tastytrade public pairs watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.a_get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the pairs watchlist to fetch. _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get.session "tastytrade.watchlists.PairsWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get "Link to this definition") _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get.session "tastytrade.watchlists.PairsWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get.name "tastytrade.watchlists.PairsWatchlist.get.name (Python parameter) — the name of the pairs watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches a list of all Tastytrade public pairs watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PairsWatchlist.get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the pairs watchlist to fetch. _pydantic model_ tastytrade.watchlists.PrivateWatchlist(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist "tastytrade.watchlists.PrivateWatchlist.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[watchlist\_entries](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist "tastytrade.watchlists.PrivateWatchlist.watchlist_entries (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]\] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[group\_name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist "tastytrade.watchlists.PrivateWatchlist.group_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'default'`_, _[order\_index](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist "tastytrade.watchlists.PrivateWatchlist.order_index (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `9999`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist "Link to this definition") Bases: [`Watchlist`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist (Python model) — Bases: TastytradeData") Dataclass that contains a private watchlist object, with functions to update, publish, modify and remove watchlists. Show JSON schema `{ "title": "PrivateWatchlist", "description": "Dataclass that contains a private watchlist object, with functions to\nupdate, publish, modify and remove watchlists.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist-fields "Permalink to this headline") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get.session "tastytrade.watchlists.PrivateWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get "Link to this definition") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get.session "tastytrade.watchlists.PrivateWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get.name "tastytrade.watchlists.PrivateWatchlist.a_get.name (Python parameter) — the name of the watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches the user’s private watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the watchlist to fetch. _async classmethod_ a\_remove(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove.session "tastytrade.watchlists.PrivateWatchlist.a_remove.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove.name "tastytrade.watchlists.PrivateWatchlist.a_remove.name (Python parameter) — the name of the watchlist to delete.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove "Link to this definition") Deletes the named private watchlist. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_remove.name "Permalink to this definition") the name of the watchlist to delete. _async_ a\_update(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_update.session "tastytrade.watchlists.PrivateWatchlist.a_update.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_update "Link to this definition") Updates the existing private remote watchlist. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_update-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_update.session "Permalink to this definition") the session to use for the request. _async_ a\_upload(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_upload.session "tastytrade.watchlists.PrivateWatchlist.a_upload.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_upload "Link to this definition") Creates a private remote watchlist identical to this local one. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_upload-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.a_upload.session "Permalink to this definition") the session to use for the request. add\_symbol(_[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.add_symbol "tastytrade.watchlists.PrivateWatchlist.add_symbol.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.add_symbol "tastytrade.watchlists.PrivateWatchlist.add_symbol.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.add_symbol "Link to this definition") Adds a symbol to the watchlist. _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get.session "tastytrade.watchlists.PrivateWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get "Link to this definition") _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get.session "tastytrade.watchlists.PrivateWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get.name "tastytrade.watchlists.PrivateWatchlist.get.name (Python parameter) — the name of the watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches the user’s private watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the watchlist to fetch. _classmethod_ remove(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove.session "tastytrade.watchlists.PrivateWatchlist.remove.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove.name "tastytrade.watchlists.PrivateWatchlist.remove.name (Python parameter) — the name of the watchlist to delete.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove "Link to this definition") Deletes the named private watchlist. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove.name "Permalink to this definition") the name of the watchlist to delete. remove\_symbol(_[symbol](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove_symbol "tastytrade.watchlists.PrivateWatchlist.remove_symbol.symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[instrument\_type](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove_symbol "tastytrade.watchlists.PrivateWatchlist.remove_symbol.instrument_type (Python parameter)") : [InstrumentType](https://tastyworks-api.readthedocs.io/en/latest/api/order.html#tastytrade.order.InstrumentType "tastytrade.order.InstrumentType (Python enum) — Bases: str, Enum") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.remove_symbol "Link to this definition") Removes a symbol from the watchlist. update(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.update.session "tastytrade.watchlists.PrivateWatchlist.update.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.update "Link to this definition") Updates the existing private remote watchlist. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.update-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.update.session "Permalink to this definition") the session to use for the request. upload(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.upload.session "tastytrade.watchlists.PrivateWatchlist.upload.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.upload "Link to this definition") Creates a private remote watchlist identical to this local one. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.upload-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PrivateWatchlist.upload.session "Permalink to this definition") the session to use for the request. _pydantic model_ tastytrade.watchlists.PublicWatchlist(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist "tastytrade.watchlists.PublicWatchlist.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[watchlist\_entries](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist "tastytrade.watchlists.PublicWatchlist.watchlist_entries (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]\] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[group\_name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist "tastytrade.watchlists.PublicWatchlist.group_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'default'`_, _[order\_index](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist "tastytrade.watchlists.PublicWatchlist.order_index (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `9999`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist "Link to this definition") Bases: [`Watchlist`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist (Python model) — Bases: TastytradeData") Dataclass that contains symbols from a public watchlist. Show JSON schema `{ "title": "PublicWatchlist", "description": "Dataclass that contains symbols from a public watchlist.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist-fields "Permalink to this headline") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.session "tastytrade.watchlists.PublicWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _\*_, _[counts\_only](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.counts_only "tastytrade.watchlists.PublicWatchlist.a_get.counts_only (Python parameter) — whether to only fetch the counts of the watchlists.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get "Link to this definition") _async classmethod_ a\_get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.session "tastytrade.watchlists.PublicWatchlist.a_get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.name "tastytrade.watchlists.PublicWatchlist.a_get.name (Python parameter) — the name of the watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches a list of all Tastytrade public watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the watchlist to fetch. counts\_only: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.a_get.counts_only "Permalink to this definition") whether to only fetch the counts of the watchlists. _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.session "tastytrade.watchlists.PublicWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _\*_, _[counts\_only](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.counts_only "tastytrade.watchlists.PublicWatchlist.get.counts_only (Python parameter) — whether to only fetch the counts of the watchlists.") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get "Link to this definition") _classmethod_ get(_[session](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.session "tastytrade.watchlists.PublicWatchlist.get.session (Python parameter) — the session to use for the request.") : [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") _, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.name "tastytrade.watchlists.PublicWatchlist.get.name (Python parameter) — the name of the watchlist to fetch.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") Fetches a list of all Tastytrade public watchlists, or a specific one if a name is provided. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get-parameters "Permalink to this headline") session: [Session](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "tastytrade.session.Session (Python class) — Bases: object") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.session "Permalink to this definition") the session to use for the request. name: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") the name of the watchlist to fetch. counts\_only: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.PublicWatchlist.get.counts_only "Permalink to this definition") whether to only fetch the counts of the watchlists. _pydantic model_ tastytrade.watchlists.Watchlist(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[watchlist\_entries](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.watchlist_entries (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]\] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[group\_name](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.group_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'default'`_, _[order\_index](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.order_index (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `9999`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Show JSON schema `{ "title": "Watchlist", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist-fields "Permalink to this headline") * [`group_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.group_name (Python parameter)") * [`name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.name (Python parameter)") * [`order_index (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.order_index (Python parameter)") * [`watchlist_entries (list[dict[str, Any]] | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/watchlists.html#tastytrade.watchlists.Watchlist "tastytrade.watchlists.Watchlist.watchlist_entries (Python parameter)") Back to top --- # tastytrade.session - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/session.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/session.rst "View source of this page") tastytrade.session[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#module-tastytrade.session "Link to this heading") ========================================================================================================================================= _pydantic model_ tastytrade.session.Address(_\*_, _[city](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.city (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_domestic](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.is_domestic (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_foreign](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.is_foreign (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[postal\_code](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.postal_code (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[state\_region](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.state_region (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[street\_one](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_one (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[street\_two](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_two (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[street\_three](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_three (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing customer address information. Show JSON schema `{ "title": "Address", "description": "Dataclass containing customer address information.", "type": "object", "properties": { "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "postal-code": { "title": "Postal-Code", "type": "string" }, "state-region": { "title": "State-Region", "type": "string" }, "street-one": { "title": "Street-One", "type": "string" }, "street-two": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Two" }, "street-three": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Three" } }, "required": [ "city", "country", "is-domestic", "is-foreign", "postal-code", "state-region", "street-one" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address-fields "Permalink to this headline") * [`city (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.city (Python parameter)") * [`country (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.country (Python parameter)") * [`is_domestic (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.is_domestic (Python parameter)") * [`is_foreign (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.is_foreign (Python parameter)") * [`postal_code (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.postal_code (Python parameter)") * [`state_region (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.state_region (Python parameter)") * [`street_one (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_one (Python parameter)") * [`street_three (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_three (Python parameter)") * [`street_two (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address.street_two (Python parameter)") _pydantic model_ tastytrade.session.Customer(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[first\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.first_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[first\_surname](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.first_surname (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[last\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.last_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.address (Python parameter)") : [Address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address (Python model) — Bases: TastytradeData") _, _[customer\_suitability](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.customer_suitability (Python parameter)") : [CustomerSuitability](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability (Python model) — Bases: TastytradeData") _, _[mailing\_address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.mailing_address (Python parameter)") : [Address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address (Python model) — Bases: TastytradeData") _, _[is\_foreign](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_foreign (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[regulatory\_domain](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.regulatory_domain (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[usa\_citizenship\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.usa_citizenship_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[home\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.home_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[mobile\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.mobile_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[work\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.work_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[birth\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.birth_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[email](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.email (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.tax_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_number\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.tax_number_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[citizenship\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.citizenship_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[agreed\_to\_margining](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.agreed_to_margining (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[subject\_to\_tax\_withholding](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.subject_to_tax_withholding (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[agreed\_to\_terms](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.agreed_to_terms (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[ext\_crm\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.ext_crm_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[has\_industry\_affiliation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_industry_affiliation (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[has\_listed\_affiliation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_listed_affiliation (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[has\_political\_affiliation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_political_affiliation (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[has\_delayed\_quotes](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_delayed_quotes (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[has\_pending\_or\_approved\_application](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_pending_or_approved_application (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_professional](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_professional (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[permitted\_account\_types](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.permitted_account_types (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[CustomerAccountType](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType (Python model) — Bases: TastytradeData")\ \]_, _[created\_at](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.created_at (Python parameter)") : [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") _, _[identifiable\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.identifiable_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[person](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.person (Python parameter)") : [CustomerPerson](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson (Python model) — Bases: TastytradeData") _, _[gender](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.gender (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[middle\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.middle_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[prefix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.prefix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[second\_surname](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.second_surname (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[suffix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.suffix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[foreign\_tax\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.foreign_tax_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[birth\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.birth_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[visa\_expiration\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.visa_expiration_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[visa\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.visa_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[signature\_of\_agreement](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.signature_of_agreement (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[desk\_customer\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.desk_customer_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[entity](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.entity (Python parameter)") : [CustomerEntity](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity (Python model) — Bases: TastytradeData") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[family\_member\_names](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.family_member_names (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[has\_institutional\_assets](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_institutional_assets (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[industry\_affiliation\_firm](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.industry_affiliation_firm (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[is\_investment\_adviser](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_investment_adviser (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[listed\_affiliation\_symbol](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.listed_affiliation_symbol (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[political\_organization](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.political_organization (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[user\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.user_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing customer information. Show JSON schema `{ "title": "Customer", "description": "Dataclass containing customer information.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "first-surname": { "title": "First-Surname", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "customer-suitability": { "$ref": "#/$defs/CustomerSuitability" }, "mailing-address": { "$ref": "#/$defs/Address" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "regulatory-domain": { "title": "Regulatory-Domain", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "home-phone-number": { "title": "Home-Phone-Number", "type": "string" }, "mobile-phone-number": { "title": "Mobile-Phone-Number", "type": "string" }, "work-phone-number": { "title": "Work-Phone-Number", "type": "string" }, "birth-date": { "format": "date", "title": "Birth-Date", "type": "string" }, "email": { "title": "Email", "type": "string" }, "external-id": { "title": "External-Id", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" }, "tax-number-type": { "title": "Tax-Number-Type", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "agreed-to-margining": { "title": "Agreed-To-Margining", "type": "boolean" }, "subject-to-tax-withholding": { "title": "Subject-To-Tax-Withholding", "type": "boolean" }, "agreed-to-terms": { "title": "Agreed-To-Terms", "type": "boolean" }, "ext-crm-id": { "title": "Ext-Crm-Id", "type": "string" }, "has-industry-affiliation": { "title": "Has-Industry-Affiliation", "type": "boolean" }, "has-listed-affiliation": { "title": "Has-Listed-Affiliation", "type": "boolean" }, "has-political-affiliation": { "title": "Has-Political-Affiliation", "type": "boolean" }, "has-delayed-quotes": { "title": "Has-Delayed-Quotes", "type": "boolean" }, "has-pending-or-approved-application": { "title": "Has-Pending-Or-Approved-Application", "type": "boolean" }, "is-professional": { "title": "Is-Professional", "type": "boolean" }, "permitted-account-types": { "items": { "$ref": "#/$defs/CustomerAccountType" }, "title": "Permitted-Account-Types", "type": "array" }, "created-at": { "format": "date-time", "title": "Created-At", "type": "string" }, "identifiable-type": { "title": "Identifiable-Type", "type": "string" }, "person": { "$ref": "#/$defs/CustomerPerson" }, "gender": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Gender" }, "middle-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Middle-Name" }, "prefix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prefix-Name" }, "second-surname": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Second-Surname" }, "suffix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Suffix-Name" }, "foreign-tax-number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Foreign-Tax-Number" }, "birth-country": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Birth-Country" }, "visa-expiration-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Expiration-Date" }, "visa-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Type" }, "signature-of-agreement": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Signature-Of-Agreement" }, "desk-customer-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Desk-Customer-Id" }, "entity": { "anyOf": [ { "$ref": "#/$defs/CustomerEntity" }, { "type": "null" } ], "default": null }, "family-member-names": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Family-Member-Names" }, "has-institutional-assets": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Has-Institutional-Assets" }, "industry-affiliation-firm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Industry-Affiliation-Firm" }, "is-investment-adviser": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Is-Investment-Adviser" }, "listed-affiliation-symbol": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Listed-Affiliation-Symbol" }, "political-organization": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Political-Organization" }, "user-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User-Id" } }, "$defs": { "Address": { "description": "Dataclass containing customer address information.", "properties": { "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "postal-code": { "title": "Postal-Code", "type": "string" }, "state-region": { "title": "State-Region", "type": "string" }, "street-one": { "title": "Street-One", "type": "string" }, "street-two": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Two" }, "street-three": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Three" } }, "required": [ "city", "country", "is-domestic", "is-foreign", "postal-code", "state-region", "street-one" ], "title": "Address", "type": "object" }, "CustomerAccountMarginType": { "description": "Dataclass containing margin information for a customer account type.", "properties": { "name": { "title": "Name", "type": "string" }, "is-margin": { "title": "Is-Margin", "type": "boolean" } }, "required": [ "name", "is-margin" ], "title": "CustomerAccountMarginType", "type": "object" }, "CustomerAccountType": { "description": "Dataclass containing information for a type of customer account.", "properties": { "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "is-tax-advantaged": { "title": "Is-Tax-Advantaged", "type": "boolean" }, "is-publicly-available": { "title": "Is-Publicly-Available", "type": "boolean" }, "has-multiple-owners": { "title": "Has-Multiple-Owners", "type": "boolean" }, "margin-types": { "items": { "$ref": "#/$defs/CustomerAccountMarginType" }, "title": "Margin-Types", "type": "array" } }, "required": [ "name", "description", "is-tax-advantaged", "is-publicly-available", "has-multiple-owners", "margin-types" ], "title": "CustomerAccountType", "type": "object" }, "CustomerEntity": { "description": "Dataclass containing customer entity information.", "properties": { "id": { "title": "Id", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "business-nature": { "title": "Business-Nature", "type": "string" }, "email": { "title": "Email", "type": "string" }, "entity-officers": { "items": { "$ref": "#/$defs/EntityOfficer" }, "title": "Entity-Officers", "type": "array" }, "entity-suitability": { "$ref": "#/$defs/EntitySuitability" }, "entity-type": { "title": "Entity-Type", "type": "string" }, "foreign-institution": { "title": "Foreign-Institution", "type": "string" }, "grantor-birth-date": { "title": "Grantor-Birth-Date", "type": "string" }, "grantor-email": { "title": "Grantor-Email", "type": "string" }, "grantor-first-name": { "title": "Grantor-First-Name", "type": "string" }, "grantor-last-name": { "title": "Grantor-Last-Name", "type": "string" }, "grantor-middle-name": { "title": "Grantor-Middle-Name", "type": "string" }, "grantor-tax-number": { "title": "Grantor-Tax-Number", "type": "string" }, "has-foreign-bank-affiliation": { "title": "Has-Foreign-Bank-Affiliation", "type": "string" }, "has-foreign-institution-affiliation": { "title": "Has-Foreign-Institution-Affiliation", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "legal-name": { "title": "Legal-Name", "type": "string" }, "phone-number": { "title": "Phone-Number", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" } }, "required": [ "id", "address", "business-nature", "email", "entity-officers", "entity-suitability", "entity-type", "foreign-institution", "grantor-birth-date", "grantor-email", "grantor-first-name", "grantor-last-name", "grantor-middle-name", "grantor-tax-number", "has-foreign-bank-affiliation", "has-foreign-institution-affiliation", "is-domestic", "legal-name", "phone-number", "tax-number" ], "title": "CustomerEntity", "type": "object" }, "CustomerPerson": { "description": "Dataclass containing customer person information.", "properties": { "external-id": { "title": "External-Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "occupation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Occupation" }, "middle-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Middle-Name" }, "prefix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prefix-Name" }, "suffix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Suffix-Name" }, "birth-country": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Birth-Country" }, "birth-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Birth-Date" }, "visa-expiration-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Expiration-Date" }, "visa-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Type" }, "employer-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Employer-Name" }, "job-title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Job-Title" } }, "required": [ "external-id", "first-name", "last-name", "citizenship-country", "usa-citizenship-type", "employment-status", "marital-status", "number-of-dependents" ], "title": "CustomerPerson", "type": "object" }, "CustomerSuitability": { "description": "Dataclass containing customer suitability information.", "properties": { "id": { "title": "Id", "type": "integer" }, "annual-net-income": { "title": "Annual-Net-Income", "type": "integer" }, "covered-options-trading-experience": { "title": "Covered-Options-Trading-Experience", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "futures-trading-experience": { "title": "Futures-Trading-Experience", "type": "string" }, "liquid-net-worth": { "title": "Liquid-Net-Worth", "type": "integer" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "net-worth": { "title": "Net-Worth", "type": "integer" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "stock-trading-experience": { "title": "Stock-Trading-Experience", "type": "string" }, "uncovered-options-trading-experience": { "title": "Uncovered-Options-Trading-Experience", "type": "string" }, "customer-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Customer-Id" }, "employer-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Employer-Name" }, "job-title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Job-Title" }, "occupation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Occupation" }, "tax-bracket": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tax-Bracket" } }, "required": [ "id", "annual-net-income", "covered-options-trading-experience", "employment-status", "futures-trading-experience", "liquid-net-worth", "marital-status", "net-worth", "number-of-dependents", "stock-trading-experience", "uncovered-options-trading-experience" ], "title": "CustomerSuitability", "type": "object" }, "EntityOfficer": { "description": "Dataclass containing entity officer information.", "properties": { "id": { "title": "Id", "type": "string" }, "external-id": { "title": "External-Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "middle-name": { "title": "Middle-Name", "type": "string" }, "prefix-name": { "title": "Prefix-Name", "type": "string" }, "suffix-name": { "title": "Suffix-Name", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "birth-country": { "title": "Birth-Country", "type": "string" }, "birth-date": { "format": "date", "title": "Birth-Date", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "email": { "title": "Email", "type": "string" }, "employer-name": { "title": "Employer-Name", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "home-phone-number": { "title": "Home-Phone-Number", "type": "string" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "job-title": { "title": "Job-Title", "type": "string" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "mobile-phone-number": { "title": "Mobile-Phone-Number", "type": "string" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "occupation": { "title": "Occupation", "type": "string" }, "owner-of-record": { "title": "Owner-Of-Record", "type": "boolean" }, "relationship-to-entity": { "title": "Relationship-To-Entity", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" }, "tax-number-type": { "title": "Tax-Number-Type", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "visa-expiration-date": { "format": "date", "title": "Visa-Expiration-Date", "type": "string" }, "visa-type": { "title": "Visa-Type", "type": "string" }, "work-phone-number": { "title": "Work-Phone-Number", "type": "string" } }, "required": [ "id", "external-id", "first-name", "last-name", "middle-name", "prefix-name", "suffix-name", "address", "birth-country", "birth-date", "citizenship-country", "email", "employer-name", "employment-status", "home-phone-number", "is-foreign", "job-title", "marital-status", "mobile-phone-number", "number-of-dependents", "occupation", "owner-of-record", "relationship-to-entity", "tax-number", "tax-number-type", "usa-citizenship-type", "visa-expiration-date", "visa-type", "work-phone-number" ], "title": "EntityOfficer", "type": "object" }, "EntitySuitability": { "description": "Dataclass containing entity suitability information.", "properties": { "id": { "title": "Id", "type": "string" }, "annual-net-income": { "title": "Annual-Net-Income", "type": "integer" }, "covered-options-trading-experience": { "title": "Covered-Options-Trading-Experience", "type": "string" }, "entity-id": { "title": "Entity-Id", "type": "integer" }, "futures-trading-experience": { "title": "Futures-Trading-Experience", "type": "string" }, "liquid-net-worth": { "title": "Liquid-Net-Worth", "type": "integer" }, "net-worth": { "title": "Net-Worth", "type": "integer" }, "stock-trading-experience": { "title": "Stock-Trading-Experience", "type": "string" }, "tax-bracket": { "title": "Tax-Bracket", "type": "string" }, "uncovered-options-trading-experience": { "title": "Uncovered-Options-Trading-Experience", "type": "string" } }, "required": [ "id", "annual-net-income", "covered-options-trading-experience", "entity-id", "futures-trading-experience", "liquid-net-worth", "net-worth", "stock-trading-experience", "tax-bracket", "uncovered-options-trading-experience" ], "title": "EntitySuitability", "type": "object" } }, "required": [ "id", "first-name", "first-surname", "last-name", "address", "customer-suitability", "mailing-address", "is-foreign", "regulatory-domain", "usa-citizenship-type", "home-phone-number", "mobile-phone-number", "work-phone-number", "birth-date", "email", "external-id", "tax-number", "tax-number-type", "citizenship-country", "agreed-to-margining", "subject-to-tax-withholding", "agreed-to-terms", "ext-crm-id", "has-industry-affiliation", "has-listed-affiliation", "has-political-affiliation", "has-delayed-quotes", "has-pending-or-approved-application", "is-professional", "permitted-account-types", "created-at", "identifiable-type", "person" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer-fields "Permalink to this headline") * [`address (tastytrade.session.Address)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.address (Python parameter)") * [`agreed_to_margining (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.agreed_to_margining (Python parameter)") * [`agreed_to_terms (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.agreed_to_terms (Python parameter)") * [`birth_country (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.birth_country (Python parameter)") * [`birth_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.birth_date (Python parameter)") * [`citizenship_country (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.citizenship_country (Python parameter)") * [`created_at (datetime.datetime)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.created_at (Python parameter)") * [`customer_suitability (tastytrade.session.CustomerSuitability)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.customer_suitability (Python parameter)") * [`desk_customer_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.desk_customer_id (Python parameter)") * [`email (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.email (Python parameter)") * [`entity (tastytrade.session.CustomerEntity | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.entity (Python parameter)") * [`ext_crm_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.ext_crm_id (Python parameter)") * [`external_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.external_id (Python parameter)") * [`family_member_names (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.family_member_names (Python parameter)") * [`first_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.first_name (Python parameter)") * [`first_surname (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.first_surname (Python parameter)") * [`foreign_tax_number (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.foreign_tax_number (Python parameter)") * [`gender (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.gender (Python parameter)") * [`has_delayed_quotes (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_delayed_quotes (Python parameter)") * [`has_industry_affiliation (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_industry_affiliation (Python parameter)") * [`has_institutional_assets (str | bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_institutional_assets (Python parameter)") * [`has_listed_affiliation (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_listed_affiliation (Python parameter)") * [`has_pending_or_approved_application (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_pending_or_approved_application (Python parameter)") * [`has_political_affiliation (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.has_political_affiliation (Python parameter)") * [`home_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.home_phone_number (Python parameter)") * [`id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.id (Python parameter)") * [`identifiable_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.identifiable_type (Python parameter)") * [`industry_affiliation_firm (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.industry_affiliation_firm (Python parameter)") * [`is_foreign (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_foreign (Python parameter)") * [`is_investment_adviser (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_investment_adviser (Python parameter)") * [`is_professional (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.is_professional (Python parameter)") * [`last_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.last_name (Python parameter)") * [`listed_affiliation_symbol (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.listed_affiliation_symbol (Python parameter)") * [`mailing_address (tastytrade.session.Address)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.mailing_address (Python parameter)") * [`middle_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.middle_name (Python parameter)") * [`mobile_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.mobile_phone_number (Python parameter)") * [`permitted_account_types (list[tastytrade.session.CustomerAccountType])`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.permitted_account_types (Python parameter)") * [`person (tastytrade.session.CustomerPerson)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.person (Python parameter)") * [`political_organization (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.political_organization (Python parameter)") * [`prefix_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.prefix_name (Python parameter)") * [`regulatory_domain (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.regulatory_domain (Python parameter)") * [`second_surname (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.second_surname (Python parameter)") * [`signature_of_agreement (bool | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.signature_of_agreement (Python parameter)") * [`subject_to_tax_withholding (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.subject_to_tax_withholding (Python parameter)") * [`suffix_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.suffix_name (Python parameter)") * [`tax_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.tax_number (Python parameter)") * [`tax_number_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.tax_number_type (Python parameter)") * [`usa_citizenship_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.usa_citizenship_type (Python parameter)") * [`user_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.user_id (Python parameter)") * [`visa_expiration_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.visa_expiration_date (Python parameter)") * [`visa_type (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.visa_type (Python parameter)") * [`work_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer.work_phone_number (Python parameter)") _pydantic model_ tastytrade.session.CustomerAccountMarginType(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "tastytrade.session.CustomerAccountMarginType.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_margin](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "tastytrade.session.CustomerAccountMarginType.is_margin (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing margin information for a customer account type. Show JSON schema `{ "title": "CustomerAccountMarginType", "description": "Dataclass containing margin information for a customer account type.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "is-margin": { "title": "Is-Margin", "type": "boolean" } }, "required": [ "name", "is-margin" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType-fields "Permalink to this headline") * [`is_margin (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "tastytrade.session.CustomerAccountMarginType.is_margin (Python parameter)") * [`name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "tastytrade.session.CustomerAccountMarginType.name (Python parameter)") _pydantic model_ tastytrade.session.CustomerAccountType(_\*_, _[name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[description](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.description (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_tax\_advantaged](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.is_tax_advantaged (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[is\_publicly\_available](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.is_publicly_available (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[has\_multiple\_owners](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.has_multiple_owners (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[margin\_types](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.margin_types (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[CustomerAccountMarginType](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountMarginType "tastytrade.session.CustomerAccountMarginType (Python model) — Bases: TastytradeData")\ \]_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing information for a type of customer account. Show JSON schema `{ "title": "CustomerAccountType", "description": "Dataclass containing information for a type of customer account.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "description": { "title": "Description", "type": "string" }, "is-tax-advantaged": { "title": "Is-Tax-Advantaged", "type": "boolean" }, "is-publicly-available": { "title": "Is-Publicly-Available", "type": "boolean" }, "has-multiple-owners": { "title": "Has-Multiple-Owners", "type": "boolean" }, "margin-types": { "items": { "$ref": "#/$defs/CustomerAccountMarginType" }, "title": "Margin-Types", "type": "array" } }, "$defs": { "CustomerAccountMarginType": { "description": "Dataclass containing margin information for a customer account type.", "properties": { "name": { "title": "Name", "type": "string" }, "is-margin": { "title": "Is-Margin", "type": "boolean" } }, "required": [ "name", "is-margin" ], "title": "CustomerAccountMarginType", "type": "object" } }, "required": [ "name", "description", "is-tax-advantaged", "is-publicly-available", "has-multiple-owners", "margin-types" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType-fields "Permalink to this headline") * [`description (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.description (Python parameter)") * [`has_multiple_owners (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.has_multiple_owners (Python parameter)") * [`is_publicly_available (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.is_publicly_available (Python parameter)") * [`is_tax_advantaged (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.is_tax_advantaged (Python parameter)") * [`margin_types (list[tastytrade.session.CustomerAccountMarginType])`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.margin_types (Python parameter)") * [`name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerAccountType "tastytrade.session.CustomerAccountType.name (Python parameter)") _pydantic model_ tastytrade.session.CustomerEntity(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.address (Python parameter)") : [Address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address (Python model) — Bases: TastytradeData") _, _[business\_nature](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.business_nature (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[email](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.email (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[entity\_officers](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_officers (Python parameter)") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[EntityOfficer](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer (Python model) — Bases: TastytradeData")\ \]_, _[entity\_suitability](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_suitability (Python parameter)") : [EntitySuitability](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability (Python model) — Bases: TastytradeData") _, _[entity\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[foreign\_institution](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.foreign_institution (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_birth\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_birth_date (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_email](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_email (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_first\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_first_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_last\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_last_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_middle\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_middle_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[grantor\_tax\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_tax_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[has\_foreign\_bank\_affiliation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.has_foreign_bank_affiliation (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[has\_foreign\_institution\_affiliation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.has_foreign_institution_affiliation (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_domestic](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.is_domestic (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[legal\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.legal_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.tax_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing customer entity information. Show JSON schema `{ "title": "CustomerEntity", "description": "Dataclass containing customer entity information.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "business-nature": { "title": "Business-Nature", "type": "string" }, "email": { "title": "Email", "type": "string" }, "entity-officers": { "items": { "$ref": "#/$defs/EntityOfficer" }, "title": "Entity-Officers", "type": "array" }, "entity-suitability": { "$ref": "#/$defs/EntitySuitability" }, "entity-type": { "title": "Entity-Type", "type": "string" }, "foreign-institution": { "title": "Foreign-Institution", "type": "string" }, "grantor-birth-date": { "title": "Grantor-Birth-Date", "type": "string" }, "grantor-email": { "title": "Grantor-Email", "type": "string" }, "grantor-first-name": { "title": "Grantor-First-Name", "type": "string" }, "grantor-last-name": { "title": "Grantor-Last-Name", "type": "string" }, "grantor-middle-name": { "title": "Grantor-Middle-Name", "type": "string" }, "grantor-tax-number": { "title": "Grantor-Tax-Number", "type": "string" }, "has-foreign-bank-affiliation": { "title": "Has-Foreign-Bank-Affiliation", "type": "string" }, "has-foreign-institution-affiliation": { "title": "Has-Foreign-Institution-Affiliation", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "legal-name": { "title": "Legal-Name", "type": "string" }, "phone-number": { "title": "Phone-Number", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" } }, "$defs": { "Address": { "description": "Dataclass containing customer address information.", "properties": { "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "postal-code": { "title": "Postal-Code", "type": "string" }, "state-region": { "title": "State-Region", "type": "string" }, "street-one": { "title": "Street-One", "type": "string" }, "street-two": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Two" }, "street-three": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Three" } }, "required": [ "city", "country", "is-domestic", "is-foreign", "postal-code", "state-region", "street-one" ], "title": "Address", "type": "object" }, "EntityOfficer": { "description": "Dataclass containing entity officer information.", "properties": { "id": { "title": "Id", "type": "string" }, "external-id": { "title": "External-Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "middle-name": { "title": "Middle-Name", "type": "string" }, "prefix-name": { "title": "Prefix-Name", "type": "string" }, "suffix-name": { "title": "Suffix-Name", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "birth-country": { "title": "Birth-Country", "type": "string" }, "birth-date": { "format": "date", "title": "Birth-Date", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "email": { "title": "Email", "type": "string" }, "employer-name": { "title": "Employer-Name", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "home-phone-number": { "title": "Home-Phone-Number", "type": "string" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "job-title": { "title": "Job-Title", "type": "string" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "mobile-phone-number": { "title": "Mobile-Phone-Number", "type": "string" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "occupation": { "title": "Occupation", "type": "string" }, "owner-of-record": { "title": "Owner-Of-Record", "type": "boolean" }, "relationship-to-entity": { "title": "Relationship-To-Entity", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" }, "tax-number-type": { "title": "Tax-Number-Type", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "visa-expiration-date": { "format": "date", "title": "Visa-Expiration-Date", "type": "string" }, "visa-type": { "title": "Visa-Type", "type": "string" }, "work-phone-number": { "title": "Work-Phone-Number", "type": "string" } }, "required": [ "id", "external-id", "first-name", "last-name", "middle-name", "prefix-name", "suffix-name", "address", "birth-country", "birth-date", "citizenship-country", "email", "employer-name", "employment-status", "home-phone-number", "is-foreign", "job-title", "marital-status", "mobile-phone-number", "number-of-dependents", "occupation", "owner-of-record", "relationship-to-entity", "tax-number", "tax-number-type", "usa-citizenship-type", "visa-expiration-date", "visa-type", "work-phone-number" ], "title": "EntityOfficer", "type": "object" }, "EntitySuitability": { "description": "Dataclass containing entity suitability information.", "properties": { "id": { "title": "Id", "type": "string" }, "annual-net-income": { "title": "Annual-Net-Income", "type": "integer" }, "covered-options-trading-experience": { "title": "Covered-Options-Trading-Experience", "type": "string" }, "entity-id": { "title": "Entity-Id", "type": "integer" }, "futures-trading-experience": { "title": "Futures-Trading-Experience", "type": "string" }, "liquid-net-worth": { "title": "Liquid-Net-Worth", "type": "integer" }, "net-worth": { "title": "Net-Worth", "type": "integer" }, "stock-trading-experience": { "title": "Stock-Trading-Experience", "type": "string" }, "tax-bracket": { "title": "Tax-Bracket", "type": "string" }, "uncovered-options-trading-experience": { "title": "Uncovered-Options-Trading-Experience", "type": "string" } }, "required": [ "id", "annual-net-income", "covered-options-trading-experience", "entity-id", "futures-trading-experience", "liquid-net-worth", "net-worth", "stock-trading-experience", "tax-bracket", "uncovered-options-trading-experience" ], "title": "EntitySuitability", "type": "object" } }, "required": [ "id", "address", "business-nature", "email", "entity-officers", "entity-suitability", "entity-type", "foreign-institution", "grantor-birth-date", "grantor-email", "grantor-first-name", "grantor-last-name", "grantor-middle-name", "grantor-tax-number", "has-foreign-bank-affiliation", "has-foreign-institution-affiliation", "is-domestic", "legal-name", "phone-number", "tax-number" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity-fields "Permalink to this headline") * [`address (tastytrade.session.Address)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.address (Python parameter)") * [`business_nature (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.business_nature (Python parameter)") * [`email (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.email (Python parameter)") * [`entity_officers (list[tastytrade.session.EntityOfficer])`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_officers (Python parameter)") * [`entity_suitability (tastytrade.session.EntitySuitability)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_suitability (Python parameter)") * [`entity_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.entity_type (Python parameter)") * [`foreign_institution (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.foreign_institution (Python parameter)") * [`grantor_birth_date (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_birth_date (Python parameter)") * [`grantor_email (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_email (Python parameter)") * [`grantor_first_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_first_name (Python parameter)") * [`grantor_last_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_last_name (Python parameter)") * [`grantor_middle_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_middle_name (Python parameter)") * [`grantor_tax_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.grantor_tax_number (Python parameter)") * [`has_foreign_bank_affiliation (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.has_foreign_bank_affiliation (Python parameter)") * [`has_foreign_institution_affiliation (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.has_foreign_institution_affiliation (Python parameter)") * [`id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.id (Python parameter)") * [`is_domestic (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.is_domestic (Python parameter)") * [`legal_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.legal_name (Python parameter)") * [`phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.phone_number (Python parameter)") * [`tax_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerEntity "tastytrade.session.CustomerEntity.tax_number (Python parameter)") _pydantic model_ tastytrade.session.CustomerPerson(_\*_, _[external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[first\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.first_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[last\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.last_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[citizenship\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.citizenship_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[usa\_citizenship\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.usa_citizenship_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[employment\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.employment_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[marital\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.marital_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[number\_of\_dependents](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.number_of_dependents (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[occupation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.occupation (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[middle\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.middle_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[prefix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.prefix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[suffix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.suffix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[birth\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.birth_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[birth\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.birth_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[visa\_expiration\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.visa_expiration_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[visa\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.visa_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[employer\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.employer_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[job\_title](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.job_title (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing customer person information. Show JSON schema `{ "title": "CustomerPerson", "description": "Dataclass containing customer person information.", "type": "object", "properties": { "external-id": { "title": "External-Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "occupation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Occupation" }, "middle-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Middle-Name" }, "prefix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prefix-Name" }, "suffix-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Suffix-Name" }, "birth-country": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Birth-Country" }, "birth-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Birth-Date" }, "visa-expiration-date": { "anyOf": [ { "format": "date", "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Expiration-Date" }, "visa-type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Visa-Type" }, "employer-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Employer-Name" }, "job-title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Job-Title" } }, "required": [ "external-id", "first-name", "last-name", "citizenship-country", "usa-citizenship-type", "employment-status", "marital-status", "number-of-dependents" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson-fields "Permalink to this headline") * [`birth_country (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.birth_country (Python parameter)") * [`birth_date (datetime.date | str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.birth_date (Python parameter)") * [`citizenship_country (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.citizenship_country (Python parameter)") * [`employer_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.employer_name (Python parameter)") * [`employment_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.employment_status (Python parameter)") * [`external_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.external_id (Python parameter)") * [`first_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.first_name (Python parameter)") * [`job_title (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.job_title (Python parameter)") * [`last_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.last_name (Python parameter)") * [`marital_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.marital_status (Python parameter)") * [`middle_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.middle_name (Python parameter)") * [`number_of_dependents (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.number_of_dependents (Python parameter)") * [`occupation (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.occupation (Python parameter)") * [`prefix_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.prefix_name (Python parameter)") * [`suffix_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.suffix_name (Python parameter)") * [`usa_citizenship_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.usa_citizenship_type (Python parameter)") * [`visa_expiration_date (datetime.date | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.visa_expiration_date (Python parameter)") * [`visa_type (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerPerson "tastytrade.session.CustomerPerson.visa_type (Python parameter)") _pydantic model_ tastytrade.session.CustomerSuitability(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[annual\_net\_income](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.annual_net_income (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[covered\_options\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.covered_options_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[employment\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.employment_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[futures\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.futures_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[liquid\_net\_worth](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.liquid_net_worth (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[marital\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.marital_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[net\_worth](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.net_worth (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[number\_of\_dependents](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.number_of_dependents (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[stock\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.stock_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[uncovered\_options\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.uncovered_options_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[customer\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.customer_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[employer\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.employer_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[job\_title](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.job_title (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[occupation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.occupation (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[tax\_bracket](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.tax_bracket (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing customer suitability information. Show JSON schema `{ "title": "CustomerSuitability", "description": "Dataclass containing customer suitability information.", "type": "object", "properties": { "id": { "title": "Id", "type": "integer" }, "annual-net-income": { "title": "Annual-Net-Income", "type": "integer" }, "covered-options-trading-experience": { "title": "Covered-Options-Trading-Experience", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "futures-trading-experience": { "title": "Futures-Trading-Experience", "type": "string" }, "liquid-net-worth": { "title": "Liquid-Net-Worth", "type": "integer" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "net-worth": { "title": "Net-Worth", "type": "integer" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "stock-trading-experience": { "title": "Stock-Trading-Experience", "type": "string" }, "uncovered-options-trading-experience": { "title": "Uncovered-Options-Trading-Experience", "type": "string" }, "customer-id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Customer-Id" }, "employer-name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Employer-Name" }, "job-title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Job-Title" }, "occupation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Occupation" }, "tax-bracket": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Tax-Bracket" } }, "required": [ "id", "annual-net-income", "covered-options-trading-experience", "employment-status", "futures-trading-experience", "liquid-net-worth", "marital-status", "net-worth", "number-of-dependents", "stock-trading-experience", "uncovered-options-trading-experience" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability-fields "Permalink to this headline") * [`annual_net_income (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.annual_net_income (Python parameter)") * [`covered_options_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.covered_options_trading_experience (Python parameter)") * [`customer_id (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.customer_id (Python parameter)") * [`employer_name (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.employer_name (Python parameter)") * [`employment_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.employment_status (Python parameter)") * [`futures_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.futures_trading_experience (Python parameter)") * [`id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.id (Python parameter)") * [`job_title (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.job_title (Python parameter)") * [`liquid_net_worth (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.liquid_net_worth (Python parameter)") * [`marital_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.marital_status (Python parameter)") * [`net_worth (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.net_worth (Python parameter)") * [`number_of_dependents (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.number_of_dependents (Python parameter)") * [`occupation (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.occupation (Python parameter)") * [`stock_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.stock_trading_experience (Python parameter)") * [`tax_bracket (str | None)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.tax_bracket (Python parameter)") * [`uncovered_options_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.CustomerSuitability "tastytrade.session.CustomerSuitability.uncovered_options_trading_experience (Python parameter)") _pydantic model_ tastytrade.session.EntityOfficer(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[external\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.external_id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[first\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.first_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[last\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.last_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[middle\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.middle_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[prefix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.prefix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[suffix\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.suffix_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.address (Python parameter)") : [Address](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Address "tastytrade.session.Address (Python model) — Bases: TastytradeData") _, _[birth\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.birth_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[birth\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.birth_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[citizenship\_country](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.citizenship_country (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[email](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.email (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[employer\_name](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.employer_name (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[employment\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.employment_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[home\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.home_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_foreign](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.is_foreign (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[job\_title](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.job_title (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[marital\_status](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.marital_status (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[mobile\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.mobile_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[number\_of\_dependents](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.number_of_dependents (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[occupation](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.occupation (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[owner\_of\_record](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.owner_of_record (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") _, _[relationship\_to\_entity](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.relationship_to_entity (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.tax_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_number\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.tax_number_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[usa\_citizenship\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.usa_citizenship_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[visa\_expiration\_date](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.visa_expiration_date (Python parameter)") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") _, _[visa\_type](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.visa_type (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[work\_phone\_number](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.work_phone_number (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing entity officer information. Show JSON schema `{ "title": "EntityOfficer", "description": "Dataclass containing entity officer information.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "external-id": { "title": "External-Id", "type": "string" }, "first-name": { "title": "First-Name", "type": "string" }, "last-name": { "title": "Last-Name", "type": "string" }, "middle-name": { "title": "Middle-Name", "type": "string" }, "prefix-name": { "title": "Prefix-Name", "type": "string" }, "suffix-name": { "title": "Suffix-Name", "type": "string" }, "address": { "$ref": "#/$defs/Address" }, "birth-country": { "title": "Birth-Country", "type": "string" }, "birth-date": { "format": "date", "title": "Birth-Date", "type": "string" }, "citizenship-country": { "title": "Citizenship-Country", "type": "string" }, "email": { "title": "Email", "type": "string" }, "employer-name": { "title": "Employer-Name", "type": "string" }, "employment-status": { "title": "Employment-Status", "type": "string" }, "home-phone-number": { "title": "Home-Phone-Number", "type": "string" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "job-title": { "title": "Job-Title", "type": "string" }, "marital-status": { "title": "Marital-Status", "type": "string" }, "mobile-phone-number": { "title": "Mobile-Phone-Number", "type": "string" }, "number-of-dependents": { "title": "Number-Of-Dependents", "type": "integer" }, "occupation": { "title": "Occupation", "type": "string" }, "owner-of-record": { "title": "Owner-Of-Record", "type": "boolean" }, "relationship-to-entity": { "title": "Relationship-To-Entity", "type": "string" }, "tax-number": { "title": "Tax-Number", "type": "string" }, "tax-number-type": { "title": "Tax-Number-Type", "type": "string" }, "usa-citizenship-type": { "title": "Usa-Citizenship-Type", "type": "string" }, "visa-expiration-date": { "format": "date", "title": "Visa-Expiration-Date", "type": "string" }, "visa-type": { "title": "Visa-Type", "type": "string" }, "work-phone-number": { "title": "Work-Phone-Number", "type": "string" } }, "$defs": { "Address": { "description": "Dataclass containing customer address information.", "properties": { "city": { "title": "City", "type": "string" }, "country": { "title": "Country", "type": "string" }, "is-domestic": { "title": "Is-Domestic", "type": "boolean" }, "is-foreign": { "title": "Is-Foreign", "type": "boolean" }, "postal-code": { "title": "Postal-Code", "type": "string" }, "state-region": { "title": "State-Region", "type": "string" }, "street-one": { "title": "Street-One", "type": "string" }, "street-two": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Two" }, "street-three": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Street-Three" } }, "required": [ "city", "country", "is-domestic", "is-foreign", "postal-code", "state-region", "street-one" ], "title": "Address", "type": "object" } }, "required": [ "id", "external-id", "first-name", "last-name", "middle-name", "prefix-name", "suffix-name", "address", "birth-country", "birth-date", "citizenship-country", "email", "employer-name", "employment-status", "home-phone-number", "is-foreign", "job-title", "marital-status", "mobile-phone-number", "number-of-dependents", "occupation", "owner-of-record", "relationship-to-entity", "tax-number", "tax-number-type", "usa-citizenship-type", "visa-expiration-date", "visa-type", "work-phone-number" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer-fields "Permalink to this headline") * [`address (tastytrade.session.Address)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.address (Python parameter)") * [`birth_country (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.birth_country (Python parameter)") * [`birth_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.birth_date (Python parameter)") * [`citizenship_country (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.citizenship_country (Python parameter)") * [`email (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.email (Python parameter)") * [`employer_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.employer_name (Python parameter)") * [`employment_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.employment_status (Python parameter)") * [`external_id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.external_id (Python parameter)") * [`first_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.first_name (Python parameter)") * [`home_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.home_phone_number (Python parameter)") * [`id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.id (Python parameter)") * [`is_foreign (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.is_foreign (Python parameter)") * [`job_title (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.job_title (Python parameter)") * [`last_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.last_name (Python parameter)") * [`marital_status (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.marital_status (Python parameter)") * [`middle_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.middle_name (Python parameter)") * [`mobile_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.mobile_phone_number (Python parameter)") * [`number_of_dependents (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.number_of_dependents (Python parameter)") * [`occupation (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.occupation (Python parameter)") * [`owner_of_record (bool)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.owner_of_record (Python parameter)") * [`prefix_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.prefix_name (Python parameter)") * [`relationship_to_entity (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.relationship_to_entity (Python parameter)") * [`suffix_name (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.suffix_name (Python parameter)") * [`tax_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.tax_number (Python parameter)") * [`tax_number_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.tax_number_type (Python parameter)") * [`usa_citizenship_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.usa_citizenship_type (Python parameter)") * [`visa_expiration_date (datetime.date)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.visa_expiration_date (Python parameter)") * [`visa_type (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.visa_type (Python parameter)") * [`work_phone_number (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntityOfficer "tastytrade.session.EntityOfficer.work_phone_number (Python parameter)") _pydantic model_ tastytrade.session.EntitySuitability(_\*_, _[id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.id (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[annual\_net\_income](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.annual_net_income (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[covered\_options\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.covered_options_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[entity\_id](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.entity_id (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[futures\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.futures_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[liquid\_net\_worth](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.liquid_net_worth (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[net\_worth](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.net_worth (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") _, _[stock\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.stock_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[tax\_bracket](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.tax_bracket (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[uncovered\_options\_trading\_experience](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.uncovered_options_trading_experience (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "Link to this definition") Bases: [`TastytradeData`](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "tastytrade.utils.TastytradeData (Python model) — A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion.") Dataclass containing entity suitability information. Show JSON schema `{ "title": "EntitySuitability", "description": "Dataclass containing entity suitability information.", "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "annual-net-income": { "title": "Annual-Net-Income", "type": "integer" }, "covered-options-trading-experience": { "title": "Covered-Options-Trading-Experience", "type": "string" }, "entity-id": { "title": "Entity-Id", "type": "integer" }, "futures-trading-experience": { "title": "Futures-Trading-Experience", "type": "string" }, "liquid-net-worth": { "title": "Liquid-Net-Worth", "type": "integer" }, "net-worth": { "title": "Net-Worth", "type": "integer" }, "stock-trading-experience": { "title": "Stock-Trading-Experience", "type": "string" }, "tax-bracket": { "title": "Tax-Bracket", "type": "string" }, "uncovered-options-trading-experience": { "title": "Uncovered-Options-Trading-Experience", "type": "string" } }, "required": [ "id", "annual-net-income", "covered-options-trading-experience", "entity-id", "futures-trading-experience", "liquid-net-worth", "net-worth", "stock-trading-experience", "tax-bracket", "uncovered-options-trading-experience" ] }` Fields:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability-fields "Permalink to this headline") * [`annual_net_income (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.annual_net_income (Python parameter)") * [`covered_options_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.covered_options_trading_experience (Python parameter)") * [`entity_id (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.entity_id (Python parameter)") * [`futures_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.futures_trading_experience (Python parameter)") * [`id (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.id (Python parameter)") * [`liquid_net_worth (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.liquid_net_worth (Python parameter)") * [`net_worth (int)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.net_worth (Python parameter)") * [`stock_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.stock_trading_experience (Python parameter)") * [`tax_bracket (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.tax_bracket (Python parameter)") * [`uncovered_options_trading_experience (str)`](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.EntitySuitability "tastytrade.session.EntitySuitability.uncovered_options_trading_experience (Python parameter)") _class_ tastytrade.session.Session(_[provider\_secret](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.provider_secret "tastytrade.session.Session.__init__.provider_secret (Python parameter) — OAuth secret for your provider") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[refresh\_token](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.refresh_token "tastytrade.session.Session.__init__.refresh_token (Python parameter) — refresh token for the user") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[is\_test](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.is_test "tastytrade.session.Session.__init__.is_test (Python parameter) — whether to use the test API endpoints, default False") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[proxy](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.proxy "tastytrade.session.Session.__init__.proxy (Python parameter) — if provided, all requests will be made through this proxy, as well as web socket connections for streamers.") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session "Link to this definition") Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.14)") Contains a managed user login which can then be used to interact with the remote API. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session-parameters "Permalink to this headline") provider\_secret: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.provider_secret "Permalink to this definition") OAuth secret for your provider refresh\_token: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.refresh_token "Permalink to this definition") refresh token for the user is\_test: [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.is_test "Permalink to this definition") whether to use the test API endpoints, default False proxy: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.__init__.proxy "Permalink to this definition") if provided, all requests will be made through this proxy, as well as web socket connections for streamers. _async_ a\_get\_customer() → [Customer](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_get_customer "Link to this definition") Gets the customer dict from the API. _async_ a\_refresh() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_refresh "Link to this definition") Refreshes the acccess token using the stored refresh token. Also refreshes the streamer token if necessary. _async_ a\_validate() → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.a_validate "Link to this definition") Validates the current session by sending a request to the API. async\_client[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.async_client "Link to this definition") httpx client for async requests _classmethod_ deserialize(_[serialized](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.deserialize "tastytrade.session.Session.deserialize.serialized (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.deserialize "Link to this definition") Create a new Session object from a serialized string. get\_customer() → [Customer](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Customer "tastytrade.session.Customer (Python model) — Bases: TastytradeData") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.get_customer "Link to this definition") Gets the customer dict from the API. is\_test[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.is_test "Link to this definition") Whether this is a cert or real session provider\_secret[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.provider_secret "Link to this definition") OAuth secret for your provider proxy[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.proxy "Link to this definition") Proxy URL to use for requests and web sockets refresh() → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.refresh "Link to this definition") Refreshes the acccess token using the stored refresh token. Also refreshes the streamer token if necessary. refresh\_token[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.refresh_token "Link to this definition") Refresh token for the user serialize() → [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.serialize "Link to this definition") Serializes the session to a string, useful for storing a session for later use. Could be used with pickle, Redis, etc. streamer\_expiration[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.streamer_expiration "Link to this definition") expiration for streamer token sync\_client[¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.sync_client "Link to this definition") httpx client for sync requests validate() → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/session.html#tastytrade.session.Session.validate "Link to this definition") Validates the current session by sending a request to the API. Back to top --- # tastytrade.utils - tastytrade 11.1.0 documentation [Skip to content](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect) [](https://github.com/tastyware/tastytrade/blob/master/docs/api/utils.rst "Edit this page") [](https://github.com/tastyware/tastytrade/raw/master/docs/api/utils.rst "View source of this page") tastytrade.utils[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#module-tastytrade.utils "Link to this heading") =================================================================================================================================== _enum_ tastytrade.utils.PriceEffect(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect "tastytrade.utils.PriceEffect.value (Python parameter)") _)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect "Link to this definition") This is an [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") that shows the sign of a price effect, since Tastytrade is apparently against negative numbers. Member Type:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect-member-type "Permalink to this headline") [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") Valid values are as follows: CREDIT \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.CREDIT "Link to this definition") DEBIT \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.DEBIT "Link to this definition") NONE \= ``[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.NONE "Link to this definition") The [`Enum`](https://docs.python.org/3/library/enum.html#enum.Enum "(in Python v3.14)") and its members also have the following methods: encode(_[encoding](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.encode "tastytrade.utils.PriceEffect.encode.encoding (Python parameter)") \=`'utf-8'`_, _[errors](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.encode "tastytrade.utils.PriceEffect.encode.errors (Python parameter)") \=`'strict'`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.encode "Link to this definition") Encode the string using the codec registered for encoding. encoding The encoding in which to encode the string. errors The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register\_error that can handle UnicodeEncodeErrors. replace(_[old](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.replace "tastytrade.utils.PriceEffect.replace.old (Python parameter)") _, _[new](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.replace "tastytrade.utils.PriceEffect.replace.new (Python parameter)") _, _[count](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.replace "tastytrade.utils.PriceEffect.replace.count (Python parameter)") \=`-1`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.replace "Link to this definition") Return a copy with all occurrences of substring old replaced by new. > count > > Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences. If the optional argument count is given, only the first count occurrences are replaced. split(_[sep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.split "tastytrade.utils.PriceEffect.split.sep (Python parameter)") \=`None`_, _[maxsplit](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.split "tastytrade.utils.PriceEffect.split.maxsplit (Python parameter)") \=`-1`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.split "Link to this definition") Return a list of the substrings in the string, using sep as the separator string. > sep > > The separator used to split the string. > > When set to None (the default value), will split on any whitespace character (including \\n \\r \\t \\f and spaces) and will discard empty strings from the result. > > maxsplit > > Maximum number of splits (starting from the left). -1 (the default value) means no limit. Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module. rsplit(_[sep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rsplit "tastytrade.utils.PriceEffect.rsplit.sep (Python parameter)") \=`None`_, _[maxsplit](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rsplit "tastytrade.utils.PriceEffect.rsplit.maxsplit (Python parameter)") \=`-1`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rsplit "Link to this definition") Return a list of the substrings in the string, using sep as the separator string. > sep > > The separator used to split the string. > > When set to None (the default value), will split on any whitespace character (including \\n \\r \\t \\f and spaces) and will discard empty strings from the result. > > maxsplit > > Maximum number of splits (starting from the left). -1 (the default value) means no limit. Splitting starts at the end of the string and works to the front. join(_[iterable](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.join "tastytrade.utils.PriceEffect.join.iterable (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.join "Link to this definition") Concatenate any number of strings. The string whose method is called is inserted in between each given string. The result is returned as a new string. Example: ‘.’.join(\[‘ab’, ‘pq’, ‘rs’\]) -> ‘ab.pq.rs’ capitalize()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.capitalize "Link to this definition") Return a capitalized version of the string. More specifically, make the first character have upper case and the rest lower case. casefold()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.casefold "Link to this definition") Return a version of the string suitable for caseless comparisons. title()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.title "Link to this definition") Return a version of the string where each word is titlecased. More specifically, words start with uppercased characters and all remaining cased characters have lower case. center(_[width](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.center "tastytrade.utils.PriceEffect.center.width (Python parameter)") _, _[fillchar](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.center "tastytrade.utils.PriceEffect.center.fillchar (Python parameter)") \=`' '`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.center "Link to this definition") Return a centered string of length width. Padding is done using the specified fill character (default is a space). count(_[sub](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.count "tastytrade.utils.PriceEffect.count.sub (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.count "tastytrade.utils.PriceEffect.count.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.count "tastytrade.utils.PriceEffect.count.end (Python parameter)")\ _\]\]) → [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.count "Link to this definition") Return the number of non-overlapping occurrences of substring sub in string S\[start:end\]. Optional arguments start and end are interpreted as in slice notation. expandtabs(_[tabsize](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.expandtabs "tastytrade.utils.PriceEffect.expandtabs.tabsize (Python parameter)") \=`8`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.expandtabs "Link to this definition") Return a copy where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed. find(_[sub](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.find "tastytrade.utils.PriceEffect.find.sub (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.find "tastytrade.utils.PriceEffect.find.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.find "tastytrade.utils.PriceEffect.find.end (Python parameter)")\ _\]\]) → [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.find "Link to this definition") Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end\]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. partition(_[sep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.partition "tastytrade.utils.PriceEffect.partition.sep (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.partition "Link to this definition") Partition the string into three parts using the given separator. This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing the original string and two empty strings. index(_[sub](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.index "tastytrade.utils.PriceEffect.index.sub (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.index "tastytrade.utils.PriceEffect.index.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.index "tastytrade.utils.PriceEffect.index.end (Python parameter)")\ _\]\]) → [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.index "Link to this definition") Return the lowest index in S where substring sub is found, such that sub is contained within S\[start:end\]. Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found. ljust(_[width](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.ljust "tastytrade.utils.PriceEffect.ljust.width (Python parameter)") _, _[fillchar](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.ljust "tastytrade.utils.PriceEffect.ljust.fillchar (Python parameter)") \=`' '`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.ljust "Link to this definition") Return a left-justified string of length width. Padding is done using the specified fill character (default is a space). lower()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.lower "Link to this definition") Return a copy of the string converted to lowercase. lstrip(_[chars](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.lstrip "tastytrade.utils.PriceEffect.lstrip.chars (Python parameter)") \=`None`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.lstrip "Link to this definition") Return a copy of the string with leading whitespace removed. If chars is given and not None, remove characters in chars instead. rfind(_[sub](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rfind "tastytrade.utils.PriceEffect.rfind.sub (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rfind "tastytrade.utils.PriceEffect.rfind.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rfind "tastytrade.utils.PriceEffect.rfind.end (Python parameter)")\ _\]\]) → [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rfind "Link to this definition") Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end\]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. rindex(_[sub](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rindex "tastytrade.utils.PriceEffect.rindex.sub (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rindex "tastytrade.utils.PriceEffect.rindex.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rindex "tastytrade.utils.PriceEffect.rindex.end (Python parameter)")\ _\]\]) → [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rindex "Link to this definition") Return the highest index in S where substring sub is found, such that sub is contained within S\[start:end\]. Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found. rjust(_[width](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rjust "tastytrade.utils.PriceEffect.rjust.width (Python parameter)") _, _[fillchar](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rjust "tastytrade.utils.PriceEffect.rjust.fillchar (Python parameter)") \=`' '`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rjust "Link to this definition") Return a right-justified string of length width. Padding is done using the specified fill character (default is a space). rstrip(_[chars](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rstrip "tastytrade.utils.PriceEffect.rstrip.chars (Python parameter)") \=`None`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rstrip "Link to this definition") Return a copy of the string with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. rpartition(_[sep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rpartition "tastytrade.utils.PriceEffect.rpartition.sep (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.rpartition "Link to this definition") Partition the string into three parts using the given separator. This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing two empty strings and the original string. splitlines(_[keepends](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.splitlines "tastytrade.utils.PriceEffect.splitlines.keepends (Python parameter)") \=`False`_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.splitlines "Link to this definition") Return a list of the lines in the string, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true. strip(_[chars](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.strip "tastytrade.utils.PriceEffect.strip.chars (Python parameter)") \=`None`_, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.strip "Link to this definition") Return a copy of the string with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. swapcase()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.swapcase "Link to this definition") Convert uppercase characters to lowercase and lowercase characters to uppercase. translate(_[table](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.translate "tastytrade.utils.PriceEffect.translate.table (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.translate "Link to this definition") Replace each character in the string using the given translation table. > table > > Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None. The table must implement lookup/indexing via \_\_getitem\_\_, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted. upper()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.upper "Link to this definition") Return a copy of the string converted to uppercase. startswith(_[prefix](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.startswith "tastytrade.utils.PriceEffect.startswith.prefix (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.startswith "tastytrade.utils.PriceEffect.startswith.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.startswith "tastytrade.utils.PriceEffect.startswith.end (Python parameter)")\ _\]\]) → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.startswith "Link to this definition") Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try. endswith(_[suffix](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.endswith "tastytrade.utils.PriceEffect.endswith.suffix (Python parameter)") _\[, _[start](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.endswith "tastytrade.utils.PriceEffect.endswith.start (Python parameter)")\ _\[, _[end](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.endswith "tastytrade.utils.PriceEffect.endswith.end (Python parameter)")\ _\]\]) → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.endswith "Link to this definition") Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try. removeprefix(_[prefix](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removeprefix "tastytrade.utils.PriceEffect.removeprefix.prefix (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removeprefix "Link to this definition") Return a str with the given prefix string removed if present. If the string starts with the prefix string, return string\[len(prefix):\]. Otherwise, return a copy of the original string. removesuffix(_[suffix](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removesuffix "tastytrade.utils.PriceEffect.removesuffix.suffix (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.removesuffix "Link to this definition") Return a str with the given suffix string removed if present. If the string ends with the suffix string and that suffix is not empty, return string\[:-len(suffix)\]. Otherwise, return a copy of the original string. isascii()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isascii "Link to this definition") Return True if all characters in the string are ASCII, False otherwise. ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too. islower()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.islower "Link to this definition") Return True if the string is a lowercase string, False otherwise. A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string. isupper()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isupper "Link to this definition") Return True if the string is an uppercase string, False otherwise. A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string. istitle()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.istitle "Link to this definition") Return True if the string is a title-cased string, False otherwise. In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones. isspace()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isspace "Link to this definition") Return True if the string is a whitespace string, False otherwise. A string is whitespace if all characters in the string are whitespace and there is at least one character in the string. isdecimal()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isdecimal "Link to this definition") Return True if the string is a decimal string, False otherwise. A string is a decimal string if all characters in the string are decimal and there is at least one character in the string. isdigit()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isdigit "Link to this definition") Return True if the string is a digit string, False otherwise. A string is a digit string if all characters in the string are digits and there is at least one character in the string. isnumeric()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isnumeric "Link to this definition") Return True if the string is a numeric string, False otherwise. A string is numeric if all characters in the string are numeric and there is at least one character in the string. isalpha()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isalpha "Link to this definition") Return True if the string is an alphabetic string, False otherwise. A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string. isalnum()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isalnum "Link to this definition") Return True if the string is an alpha-numeric string, False otherwise. A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string. isidentifier()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isidentifier "Link to this definition") Return True if the string is a valid Python identifier, False otherwise. Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”. isprintable()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.isprintable "Link to this definition") Return True if the string is printable, False otherwise. A string is printable if all of its characters are considered printable in repr() or if it is empty. zfill(_[width](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.zfill "tastytrade.utils.PriceEffect.zfill.width (Python parameter)") _, _/_)[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.zfill "Link to this definition") Pad a numeric string with zeros on the left, to fill a field of the given width. The string is never truncated. format(_\*[args](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format "tastytrade.utils.PriceEffect.format.args (Python parameter)") _, _\*\*[kwargs](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format "tastytrade.utils.PriceEffect.format.kwargs (Python parameter)") _) → [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format "Link to this definition") Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’). format\_map(_[mapping](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format_map "tastytrade.utils.PriceEffect.format_map.mapping (Python parameter)") _) → [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.format_map "Link to this definition") Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’). _static_ maketrans()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect.maketrans "Link to this definition") Return a translation table usable for str.translate(). If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result. _pydantic model_ tastytrade.utils.TastytradeData[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData "Link to this definition") A pydantic dataclass that converts keys from snake case to dasherized and performs type validation and coercion. Show JSON schema `{ "title": "TastytradeData", "description": "A pydantic dataclass that converts keys from snake case to dasherized\nand performs type validation and coercion.", "type": "object", "properties": {} }` copy(_\*_, _[include](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy "tastytrade.utils.TastytradeData.copy.include (Python parameter)") : AbstractSetIntStr | MappingIntStrAny | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exclude](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy "tastytrade.utils.TastytradeData.copy.exclude (Python parameter)") : AbstractSetIntStr | MappingIntStrAny | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[update](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy "tastytrade.utils.TastytradeData.copy.update (Python parameter)") : [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[deep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy "tastytrade.utils.TastytradeData.copy.deep (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → Self[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.copy "Link to this definition") Returns a copy of the model. !!! warning “Deprecated” This method is now deprecated; use model\_copy instead. If you need include or exclude, use: `` `python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) ` `` Args: include: Optional set or mapping specifying which fields to include in the copied model. exclude: Optional set or mapping specifying which fields to exclude in the copied model. update: Optional dictionary of field-value pairs to override field values in the copied model. deep: If True, the values of fields that are Pydantic models will be deep-copied. Returns: A copy of the model with included, excluded and updated fields as specified. _classmethod_ model\_construct(_[\_fields\_set](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_construct "tastytrade.utils.TastytradeData.model_construct._fields_set (Python parameter)") : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _\*\*[values](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_construct "tastytrade.utils.TastytradeData.model_construct.values (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") _) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_construct "Link to this definition") Creates a new instance of the Model class with validated data. Creates a new model setting \_\_dict\_\_ and \_\_pydantic\_fields\_set\_\_ from trusted or pre-validated data. Default values are respected, but no other validation is performed. !!! note model\_construct() generally respects the model\_config.extra setting on the provided model. That is, if model\_config.extra == ‘allow’, then all extra passed values are added to the model instance’s \_\_dict\_\_ and \_\_pydantic\_extra\_\_ fields. If model\_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model\_construct(), having model\_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored. Args: \_fields\_set: A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the \[model\_fields\_set\]\[pydantic.BaseModel.model\_fields\_set\] attribute. Otherwise, the field names from the values argument will be used. values: Trusted or pre-validated data dictionary. Returns: A new instance of the Model class with validated data. model\_copy(_\*_, _[update](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_copy "tastytrade.utils.TastytradeData.model_copy.update (Python parameter)") : [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[deep](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_copy "tastytrade.utils.TastytradeData.model_copy.deep (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_copy "Link to this definition") !!! abstract “Usage Documentation” \[model\_copy\](../concepts/serialization.md#model\_copy) Returns a copy of the model. !!! note The underlying instance’s \[\_\_dict\_\_\]\[object.\_\_dict\_\_\] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of \[cached properties\]\[functools.cached\_property\]). Args: update: Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data. deep: Set to True to make a deep copy of the model. Returns: New model instance. model\_dump(_\*_, _[mode](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.mode (Python parameter)") : 'json' | 'python' | [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") \= `'python'`_, _[include](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.include (Python parameter)") : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exclude](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.exclude (Python parameter)") : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_alias](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.by_alias (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exclude\_unset](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.exclude_unset (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[exclude\_defaults](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.exclude_defaults (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[exclude\_none](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.exclude_none (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[round\_trip](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.round_trip (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[warnings](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.warnings (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | 'none' | 'warn' | 'error' \= `True`_, _[fallback](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.fallback (Python parameter)") : [Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.14)") \[\[[Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \], [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[serialize\_as\_any](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "tastytrade.utils.TastytradeData.model_dump.serialize_as_any (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump "Link to this definition") !!! abstract “Usage Documentation” \[model\_dump\](../concepts/serialization.md#modelmodel\_dump) Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. Args: mode: The mode in which to\_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects. include: A set of fields to include in the output. exclude: A set of fields to exclude from the output. context: Additional context to pass to the serializer. by\_alias: Whether to use the field’s alias in the dictionary key if defined. exclude\_unset: Whether to exclude fields that have not been explicitly set. exclude\_defaults: Whether to exclude fields that are set to their default value. exclude\_none: Whether to exclude fields that have a value of None. round\_trip: If True, dumped values should be valid as input for non-idempotent types such as Json\[T\]. warnings: How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, > “error” raises a \[PydanticSerializationError\]\[pydantic\_core.PydanticSerializationError\]. fallback: A function to call when an unknown value is encountered. If not provided, a \[PydanticSerializationError\]\[pydantic\_core.PydanticSerializationError\] error is raised. serialize\_as\_any: Whether to serialize fields with duck-typing serialization behavior. Returns: A dictionary representation of the model. model\_dump\_json(_\*_, _[indent](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.indent (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[include](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.include (Python parameter)") : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exclude](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.exclude (Python parameter)") : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ \] | [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping "(in Python v3.14)")\ \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , IncEx | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_alias](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.by_alias (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[exclude\_unset](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.exclude_unset (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[exclude\_defaults](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.exclude_defaults (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[exclude\_none](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.exclude_none (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[round\_trip](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.round_trip (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[warnings](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.warnings (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | 'none' | 'warn' | 'error' \= `True`_, _[fallback](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.fallback (Python parameter)") : [Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable "(in Python v3.14)") \[\[[Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \], [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[serialize\_as\_any](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "tastytrade.utils.TastytradeData.model_dump_json.serialize_as_any (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_) → [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_dump_json "Link to this definition") !!! abstract “Usage Documentation” \[model\_dump\_json\](../concepts/serialization.md#modelmodel\_dump\_json) Generates a JSON representation of the model using Pydantic’s to\_json method. Args: indent: Indentation to use in the JSON output. If None is passed, the output will be compact. include: Field(s) to include in the JSON output. exclude: Field(s) to exclude from the JSON output. context: Additional context to pass to the serializer. by\_alias: Whether to serialize using field aliases. exclude\_unset: Whether to exclude fields that have not been explicitly set. exclude\_defaults: Whether to exclude fields that are set to their default value. exclude\_none: Whether to exclude fields that have a value of None. round\_trip: If True, dumped values should be valid as input for non-idempotent types such as Json\[T\]. warnings: How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, > “error” raises a \[PydanticSerializationError\]\[pydantic\_core.PydanticSerializationError\]. fallback: A function to call when an unknown value is encountered. If not provided, a \[PydanticSerializationError\]\[pydantic\_core.PydanticSerializationError\] error is raised. serialize\_as\_any: Whether to serialize fields with duck-typing serialization behavior. Returns: A JSON string representation of the model. _classmethod_ model\_json\_schema(_[by\_alias: bool \= True](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "tastytrade.utils.TastytradeData.model_json_schema.by_alias: bool = True (Python parameter)") _, _[ref\_template: str \= '#/$defs/{model}'](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "tastytrade.utils.TastytradeData.model_json_schema.ref_template: str = '#/$defs/{model}' (Python parameter)") _, _[schema\_generator: type\[~pydantic.json\_schema.GenerateJsonSchema\] \= ](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "tastytrade.utils.TastytradeData.model_json_schema.schema_generator: type[~pydantic.json_schema.GenerateJsonSchema] = (Python parameter)") _, _[mode: ~typing.Literal\['validation'](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "tastytrade.utils.TastytradeData.model_json_schema.mode: ~typing.Literal['validation' (Python parameter)")\ _, _['serialization'\] \= 'validation'](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "tastytrade.utils.TastytradeData.model_json_schema.'serialization'] = 'validation' (Python parameter)") _) → [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_json_schema "Link to this definition") Generates a JSON schema for a model class. Args: by\_alias: Whether to use attribute aliases or not. ref\_template: The reference template. schema\_generator: To override the logic used to generate the JSON schema, as a subclass of > GenerateJsonSchema with your desired modifications mode: The mode in which to generate the schema. Returns: The JSON schema for the given model class. _classmethod_ model\_parametrized\_name(_[params](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_parametrized_name "tastytrade.utils.TastytradeData.model_parametrized_name.params (Python parameter)") : [tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.14)") \[[type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)")\ \[[Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \], ...\]_) → [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_parametrized_name "Link to this definition") Compute the class name for parametrizations of generic classes. This method can be overridden to achieve a custom naming scheme for generic BaseModels. Args: params: Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model\[str, int\], the value (str, int) would be passed to params. Returns: String representing the new class where params are passed to cls as type variables. Raises: TypeError: Raised when trying to generate concrete names for non-generic models. model\_post\_init(_[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_post_init "tastytrade.utils.TastytradeData.model_post_init.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") _, _/_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_post_init "Link to this definition") Override this method to perform additional initialization after \_\_init\_\_ and model\_construct. This is useful if you want to do some validation that requires the entire model to be initialized. _classmethod_ model\_rebuild(_\*_, _[force](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild "tastytrade.utils.TastytradeData.model_rebuild.force (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `False`_, _[raise\_errors](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild "tastytrade.utils.TastytradeData.model_rebuild.raise_errors (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") \= `True`_, _[\_parent\_namespace\_depth](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild "tastytrade.utils.TastytradeData.model_rebuild._parent_namespace_depth (Python parameter)") : [int](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)") \= `2`_, _[\_types\_namespace](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild "tastytrade.utils.TastytradeData.model_rebuild._types_namespace (Python parameter)") : MappingNamespace | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_rebuild "Link to this definition") Try to rebuild the pydantic-core schema for the model. This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails. Args: force: Whether to force the rebuilding of the model schema, defaults to False. raise\_errors: Whether to raise errors, defaults to True. \_parent\_namespace\_depth: The depth level of the parent namespace, defaults to 2. \_types\_namespace: The types namespace, defaults to None. Returns: Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding \_was\_ required, returns True if rebuilding was successful, otherwise False. _classmethod_ model\_validate(_[obj](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.obj (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") _, _\*_, _[strict](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.strict (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[from\_attributes](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.from_attributes (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_alias](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.by_alias (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_name](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "tastytrade.utils.TastytradeData.model_validate.by_name (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate "Link to this definition") Validate a pydantic model instance. Args: obj: The object to validate. strict: Whether to enforce types strictly. from\_attributes: Whether to extract data from object attributes. context: Additional context to pass to the validator. by\_alias: Whether to use the field’s alias when validating against the provided input data. by\_name: Whether to use the field’s name when validating against the provided input data. Raises: ValidationError: If the object could not be validated. Returns: The validated model instance. _classmethod_ model\_validate\_json(_[json\_data](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "tastytrade.utils.TastytradeData.model_validate_json.json_data (Python parameter)") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") | [bytes](https://docs.python.org/3/library/stdtypes.html#bytes "(in Python v3.14)") | [bytearray](https://docs.python.org/3/library/stdtypes.html#bytearray "(in Python v3.14)") _, _\*_, _[strict](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "tastytrade.utils.TastytradeData.model_validate_json.strict (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "tastytrade.utils.TastytradeData.model_validate_json.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_alias](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "tastytrade.utils.TastytradeData.model_validate_json.by_alias (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_name](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "tastytrade.utils.TastytradeData.model_validate_json.by_name (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_json "Link to this definition") !!! abstract “Usage Documentation” \[JSON Parsing\](../concepts/json.md#json-parsing) Validate the given JSON data against the Pydantic model. Args: json\_data: The JSON data to validate. strict: Whether to enforce types strictly. context: Extra variables to pass to the validator. by\_alias: Whether to use the field’s alias when validating against the provided input data. by\_name: Whether to use the field’s name when validating against the provided input data. Returns: The validated Pydantic model. Raises: ValidationError: If json\_data is not a JSON string or the object could not be validated. _classmethod_ model\_validate\_strings(_[obj](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "tastytrade.utils.TastytradeData.model_validate_strings.obj (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") _, _\*_, _[strict](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "tastytrade.utils.TastytradeData.model_validate_strings.strict (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[context](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "tastytrade.utils.TastytradeData.model_validate_strings.context (Python parameter)") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_alias](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "tastytrade.utils.TastytradeData.model_validate_strings.by_alias (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_, _[by\_name](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "tastytrade.utils.TastytradeData.model_validate_strings.by_name (Python parameter)") : [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [Self](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_validate_strings "Link to this definition") Validate the given object with string data against the Pydantic model. Args: obj: The object containing string data to validate. strict: Whether to enforce types strictly. context: Extra variables to pass to the validator. by\_alias: Whether to use the field’s alias when validating against the provided input data. by\_name: Whether to use the field’s name when validating against the provided input data. Returns: The validated Pydantic model. _property_ model\_extra : [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \] | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_extra "Link to this definition") Get extra fields set during validation. Returns: A dictionary of extra fields, or None if config.extra is not set to “allow”. _property_ model\_fields\_set : [set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeData.model_fields_set "Link to this definition") Returns the set of fields that have been explicitly set on this model instance. Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults. _exception_ tastytrade.utils.TastytradeError[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeError "Link to this definition") An internal error raised by the Tastytrade SDK. with\_traceback()[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.TastytradeError.with_traceback "Link to this definition") Exception.with\_traceback(tb) – set self.\_\_traceback\_\_ to tb and return self. _async_ tastytrade.utils.a\_paginate(_[client](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.client "tastytrade.utils.a_paginate.client (Python parameter) — the httpx client for making request") : AsyncClient_, _[model](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.model "tastytrade.utils.a_paginate.model (Python parameter) — the TastytradeData model for results") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\]_, _[url](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.url "tastytrade.utils.a_paginate.url (Python parameter) — the endpoint to use") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[params](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.params "tastytrade.utils.a_paginate.params (Python parameter) — parameters for request") : [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate "Link to this definition") Helper for paginated endpoints. Excepts params to have at least page-offset and per-page parameters. If params\[“page-offset”\] is None, iterates over all results; otherwise, gets a specific page. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate-parameters "Permalink to this headline") client: AsyncClient[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.client "Permalink to this definition") the httpx client for making request model: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.model "Permalink to this definition") the TastytradeData model for results url: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.url "Permalink to this definition") the endpoint to use params: [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.a_paginate.params "Permalink to this definition") parameters for request tastytrade.utils.get\_future\_fx\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_fx_monthly.day "tastytrade.utils.get_future_fx_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_fx_monthly "Link to this definition") Gets the monthly expiration associated with the FX futures: /6E, /6A, etc. As far as I can tell, these expire on the first Friday prior to the second Wednesday. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_fx_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_fx_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_future\_grain\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_grain_monthly.day "tastytrade.utils.get_future_grain_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_grain_monthly "Link to this definition") Gets the monthly expiration associated with the grain futures: /ZC, /ZW, etc. According to CME, these expire on the Friday which precedes, by at least 2 business days, the last business day of the month. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_grain_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_grain_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_future\_index\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_index_monthly.day "tastytrade.utils.get_future_index_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_index_monthly "Link to this definition") Gets the monthly expiration associated with the index futures: /ES, /RTY, /NQ, etc. According to CME, these expire on the last business day of the month. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_index_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_index_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_future\_metal\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_metal_monthly.day "tastytrade.utils.get_future_metal_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_metal_monthly "Link to this definition") Gets the monthly expiration associated with the metals futures: /GC, /SI, etc. According to CME, these expire on the 4th last business day of the month, unless that day occurs on a Friday or the day before a holiday, in which case they expire on the prior business day. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_metal_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_metal_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_future\_oil\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_oil_monthly.day "tastytrade.utils.get_future_oil_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_oil_monthly "Link to this definition") Gets the monthly expiration associated with the WTI oil futures: /CL and /MCL. According to CME, these expire 6 business days before the 25th day of the month, unless the 25th day is not a business day, in which case they expire 7 business days prior to the 25th day of the month. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_oil_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_oil_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_future\_treasury\_monthly(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_treasury_monthly.day "tastytrade.utils.get_future_treasury_monthly.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_treasury_monthly "Link to this definition") Gets the monthly expiration associated with the treasury futures: /ZN, /ZB, etc. According to CME, these expire the Friday before the 2nd last business day of the month. If this is not a business day, they expire 1 business day prior. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_treasury_monthly-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_future_treasury_monthly.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.get\_sign(_[value](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_sign.value "tastytrade.utils.get_sign.value (Python parameter) — value to check") : [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") _) → [PriceEffect](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.PriceEffect "tastytrade.utils.PriceEffect (Python enum) — This is an Enum that shows the sign of a price effect, since Tastytrade is apparently against negative numbers.") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_sign "Link to this definition") Get a PriceEffect for a signed value. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_sign-parameters "Permalink to this headline") value: [Decimal](https://docs.python.org/3/library/decimal.html#decimal.Decimal "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_sign.value "Permalink to this definition") value to check tastytrade.utils.get\_tasty\_monthly() → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_tasty_monthly "Link to this definition") Gets the monthly expiration closest to 45 days from the current date. tastytrade.utils.get\_third\_friday(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_third_friday.day "tastytrade.utils.get_third_friday.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_third_friday "Link to this definition") Gets the monthly expiration associated with the month of the given date, or the monthly expiration associated with today’s month. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_third_friday-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.get_third_friday.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.is\_market\_open\_now() → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_now "Link to this definition") Check if the market is currently open. tastytrade.utils.is\_market\_open\_on(_[day](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_on.day "tastytrade.utils.is_market_open_on.day (Python parameter) — date to check.") : [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`_) → [bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_on "Link to this definition") Returns whether the market was/is/will be open at ANY point during the given day. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_on-parameters "Permalink to this headline") day: [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") | [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") \= `None`[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.is_market_open_on.day "Permalink to this definition") date to check. If not provided defaults to current NY date. tastytrade.utils.now\_in\_new\_york() → [datetime](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.now_in_new_york "Link to this definition") Gets the current time in the New York timezone. tastytrade.utils.paginate(_[client](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.client "tastytrade.utils.paginate.client (Python parameter) — the httpx client for making request") : Client_, _[model](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.model "tastytrade.utils.paginate.model (Python parameter) — the TastytradeData model for results") : [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\]_, _[url](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.url "tastytrade.utils.paginate.url (Python parameter) — the endpoint to use") : [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") _, _[params](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.params "tastytrade.utils.paginate.params (Python parameter) — parameters for request") : [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \]_) → [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate "Link to this definition") Helper for paginated endpoints. Excepts params to have at least page-offset and per-page parameters. If params\[“page-offset”\] is None, iterates over all results; otherwise, gets a specific page. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate-parameters "Permalink to this headline") client: Client[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.client "Permalink to this definition") the httpx client for making request model: [type](https://docs.python.org/3/library/functions.html#type "(in Python v3.14)") \[T\][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.model "Permalink to this definition") the TastytradeData model for results url: [str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.url "Permalink to this definition") the endpoint to use params: [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.paginate.params "Permalink to this definition") parameters for request tastytrade.utils.set\_sign\_for(_[data](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for.data "tastytrade.utils.set_sign_for.data (Python parameter) — the raw, unprocessed model object") : [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") _, _[properties](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for.properties "tastytrade.utils.set_sign_for.properties (Python parameter) — the name of the number fields to set") : [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \]_) → [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for "Link to this definition") Handles setting the sign of a number using the associated “-effect” field. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for-parameters "Permalink to this headline") data: [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for.data "Permalink to this definition") the raw, unprocessed model object properties: [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.set_sign_for.properties "Permalink to this definition") the name of the number fields to set tastytrade.utils.today\_in\_new\_york() → [date](https://docs.python.org/3/library/datetime.html#datetime.date "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.today_in_new_york "Link to this definition") Gets the current date in the New York timezone. tastytrade.utils.validate\_and\_parse(_[response](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_and_parse.response "tastytrade.utils.validate_and_parse.response (Python parameter) — response to check for errors") : Response_) → [dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.14)") \[[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.14)")\ , [Any](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.14)")\ \][¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_and_parse "Link to this definition") Checks if the given code is an error; if so, raises an exception. Then, returns the JSON payload. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_and_parse-parameters "Permalink to this headline") response: Response[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_and_parse.response "Permalink to this definition") response to check for errors tastytrade.utils.validate\_response(_[response](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_response.response "tastytrade.utils.validate_response.response (Python parameter) — response to check for errors") : Response_) → [None](https://docs.python.org/3/library/constants.html#None "(in Python v3.14)") [¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_response "Link to this definition") Checks if the given code is an error; if so, raises an exception. Parameters:[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_response-parameters "Permalink to this headline") response: Response[¶](https://tastyworks-api.readthedocs.io/en/latest/api/utils.html#tastytrade.utils.validate_response.response "Permalink to this definition") response to check for errors Back to top ---