tastytrade.instruments

pydantic model tastytrade.instruments.Cryptocurrency(*, instrument_type: InstrumentType, symbol: str, id: int, short_description: str, description: str, is_closing_only: bool, active: bool, tick_size: Decimal, destination_venue_symbols: list[DestinationVenueSymbol], streamer_symbol: str)

Bases: TradeableTastytradeData

Dataclass that represents a Tastytrade cryptocurrency object. Contains information about the cryptocurrency and methods to populate that data using cryptocurrency symbol(s).

Show JSON schema
{
   "title": "Cryptocurrency",
   "description": "Dataclass that represents a Tastytrade cryptocurrency object. Contains\ninformation about the cryptocurrency and methods to populate that data\nusing cryptocurrency symbol(s).",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "short-description": {
         "title": "Short-Description",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "tick-size": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Tick-Size"
      },
      "destination-venue-symbols": {
         "items": {
            "$ref": "#/$defs/DestinationVenueSymbol"
         },
         "title": "Destination-Venue-Symbols",
         "type": "array"
      },
      "streamer-symbol": {
         "title": "Streamer-Symbol",
         "type": "string"
      }
   },
   "$defs": {
      "DestinationVenueSymbol": {
         "description": "Dataclass representing a specific destination venue symbol for a\ncryptocurrency.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "symbol": {
               "title": "Symbol",
               "type": "string"
            },
            "destination-venue": {
               "title": "Destination-Venue",
               "type": "string"
            },
            "routable": {
               "title": "Routable",
               "type": "boolean"
            },
            "max-quantity-precision": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max-Quantity-Precision"
            },
            "max-price-precision": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max-Price-Precision"
            }
         },
         "required": [
            "id",
            "symbol",
            "destination-venue",
            "routable"
         ],
         "title": "DestinationVenueSymbol",
         "type": "object"
      },
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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": [
      "instrument-type",
      "symbol",
      "id",
      "short-description",
      "description",
      "is-closing-only",
      "active",
      "tick-size",
      "destination-venue-symbols",
      "streamer-symbol"
   ]
}

Fields:
field active : bool [Required]
field description : str [Required]
field destination_venue_symbols : list[DestinationVenueSymbol] [Required] (alias 'destination-venue-symbols')
field id : int [Required]
field is_closing_only : bool [Required] (alias 'is-closing-only')
field short_description : str [Required] (alias 'short-description')
field streamer_symbol : str [Required] (alias 'streamer-symbol')
field tick_size : Decimal [Required] (alias 'tick-size')
async classmethod get(session: Session, symbols: str) Self
async classmethod get(session: Session, symbols: Iterable[str] | None = None) list[Self]

Returns a list of cryptocurrency objects from the given symbols, or a single cryptocurrency if a list is not provided.

Parameters:
session: Session

the session to use for the request.

symbols: str
symbols: Iterable[str] | None = None

the symbol(s) to get the cryptocurrencies for.

pydantic model tastytrade.instruments.Deliverable(*, id: int, root_symbol: str, deliverable_type: str, description: str, amount: Decimal, percent: str, symbol: str | None = None, instrument_type: InstrumentType | None = None)

Bases: TastytradeData

Dataclass representing the deliverable for an option.

Show JSON schema
{
   "title": "Deliverable",
   "description": "Dataclass representing the deliverable for an option.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "deliverable-type": {
         "title": "Deliverable-Type",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "amount": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Amount"
      },
      "percent": {
         "title": "Percent",
         "type": "string"
      },
      "symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Symbol"
      },
      "instrument-type": {
         "anyOf": [
            {
               "$ref": "#/$defs/InstrumentType"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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": [
      "id",
      "root-symbol",
      "deliverable-type",
      "description",
      "amount",
      "percent"
   ]
}

Fields:
field amount : Decimal [Required]
field deliverable_type : str [Required] (alias 'deliverable-type')
field description : str [Required]
field id : int [Required]
field instrument_type : InstrumentType | None = None (alias 'instrument-type')
field percent : str [Required]
field root_symbol : str [Required] (alias 'root-symbol')
field symbol : str | None = None
pydantic model tastytrade.instruments.DestinationVenueSymbol(*, id: int, symbol: str, destination_venue: str, routable: bool, max_quantity_precision: int | None = None, max_price_precision: int | None = None)

Bases: TastytradeData

Dataclass representing a specific destination venue symbol for a cryptocurrency.

Show JSON schema
{
   "title": "DestinationVenueSymbol",
   "description": "Dataclass representing a specific destination venue symbol for a\ncryptocurrency.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "destination-venue": {
         "title": "Destination-Venue",
         "type": "string"
      },
      "routable": {
         "title": "Routable",
         "type": "boolean"
      },
      "max-quantity-precision": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max-Quantity-Precision"
      },
      "max-price-precision": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max-Price-Precision"
      }
   },
   "required": [
      "id",
      "symbol",
      "destination-venue",
      "routable"
   ]
}

Fields:
field destination_venue : str [Required] (alias 'destination-venue')
field id : int [Required]
field max_price_precision : int | None = None (alias 'max-price-precision')
field max_quantity_precision : int | None = None (alias 'max-quantity-precision')
field routable : bool [Required]
field symbol : str [Required]
pydantic model tastytrade.instruments.Equity(*, instrument_type: InstrumentType, symbol: str, id: int, is_index: bool, description: str, lendability: str, market_time_instrument_collection: str, is_closing_only: bool, is_options_closing_only: bool, active: bool, is_illiquid: bool, is_etf: bool, streamer_symbol: str, borrow_rate: Decimal | None = None, cusip: str | None = None, short_description: str | None = None, halted_at: datetime | None = None, stops_trading_at: datetime | None = None, is_fractional_quantity_eligible: bool | None = None, tick_sizes: list[TickSize] | None = None, listed_market: str | None = None, option_tick_sizes: list[TickSize] | None = None)

Bases: TradeableTastytradeData

Dataclass that represents a Tastytrade equity object. Contains information about the equity and methods to populate that data using equity symbol(s).

Show JSON schema
{
   "title": "Equity",
   "description": "Dataclass that represents a Tastytrade equity object. Contains information\nabout the equity and methods to populate that data using equity symbol(s).",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "is-index": {
         "title": "Is-Index",
         "type": "boolean"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "lendability": {
         "title": "Lendability",
         "type": "string"
      },
      "market-time-instrument-collection": {
         "title": "Market-Time-Instrument-Collection",
         "type": "string"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "is-options-closing-only": {
         "title": "Is-Options-Closing-Only",
         "type": "boolean"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "is-illiquid": {
         "title": "Is-Illiquid",
         "type": "boolean"
      },
      "is-etf": {
         "title": "Is-Etf",
         "type": "boolean"
      },
      "streamer-symbol": {
         "title": "Streamer-Symbol",
         "type": "string"
      },
      "borrow-rate": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Borrow-Rate"
      },
      "cusip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cusip"
      },
      "short-description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Short-Description"
      },
      "halted-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Halted-At"
      },
      "stops-trading-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stops-Trading-At"
      },
      "is-fractional-quantity-eligible": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Fractional-Quantity-Eligible"
      },
      "tick-sizes": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tick-Sizes"
      },
      "listed-market": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Listed-Market"
      },
      "option-tick-sizes": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Option-Tick-Sizes"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "instrument-type",
      "symbol",
      "id",
      "is-index",
      "description",
      "lendability",
      "market-time-instrument-collection",
      "is-closing-only",
      "is-options-closing-only",
      "active",
      "is-illiquid",
      "is-etf",
      "streamer-symbol"
   ]
}

Fields:
field active : bool [Required]
field borrow_rate : Decimal | None = None (alias 'borrow-rate')
field cusip : str | None = None
field description : str [Required]
field halted_at : datetime | None = None (alias 'halted-at')
field id : int [Required]
field is_closing_only : bool [Required] (alias 'is-closing-only')
field is_etf : bool [Required] (alias 'is-etf')
field is_fractional_quantity_eligible : bool | None = None (alias 'is-fractional-quantity-eligible')
field is_illiquid : bool [Required] (alias 'is-illiquid')
field is_index : bool [Required] (alias 'is-index')
field is_options_closing_only : bool [Required] (alias 'is-options-closing-only')
field lendability : str [Required]
field listed_market : str | None = None (alias 'listed-market')
field market_time_instrument_collection : str [Required] (alias 'market-time-instrument-collection')
field option_tick_sizes : list[TickSize] | None = None (alias 'option-tick-sizes')
field short_description : str | None = None (alias 'short-description')
field stops_trading_at : datetime | None = None (alias 'stops-trading-at')
field streamer_symbol : str [Required] (alias 'streamer-symbol')
field tick_sizes : list[TickSize] | None = None (alias 'tick-sizes')
async classmethod get(session: Session, symbols: str) Self
async classmethod get(session: Session, symbols: Iterable[str], *, per_page: int = 250, page_offset: int | None = 0, lendability: str | None = None, is_index: bool | None = None, is_etf: bool | None = None) list[Self]

Returns a list of Equity objects from the given symbols, or a single Equity object if a list is not provided.

Parameters:
session: Session

the session to use for the request.

symbols: str
symbols: Iterable[str]

the symbol(s) to get the equities for.

per_page: int = 250

the number of options to get per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

lendability: str | None = None

the lendability of the equities; e.g. ‘Easy To Borrow’, ‘Locate Required’, ‘Preborrow’

is_index: bool | None = None

whether the equities are indexes.

is_etf: bool | None = None

whether the equities are ETFs.

async classmethod get_active_equities(session: Session, per_page: int = 1000, page_offset: int | None = 0, lendability: str | None = None) list[Self]

Returns a list of actively traded Equity objects.

Parameters:
session: Session

the session to use for the request.

per_page: int = 1000

the number of equities to get per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

lendability: str | None = None

the lendability of the equities; e.g. ‘Easy To Borrow’, ‘Locate Required’, ‘Preborrow’

pydantic model tastytrade.instruments.Forex(*, id: int, description: str, streamer_symbol: str, symbol: str, instrument_type: InstrumentType)

Bases: TastytradeData

Dataclass that represents a Tastytrade currency pair object. Contains information about the pair and ways to stream it.

Show JSON schema
{
   "title": "Forex",
   "description": "Dataclass that represents a Tastytrade currency pair object. Contains\ninformation about the pair and ways to stream it.",
   "type": "object",
   "properties": {
      "id": {
         "title": "Id",
         "type": "integer"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "dx-symbol": {
         "title": "Dx-Symbol",
         "type": "string"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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": [
      "id",
      "description",
      "dx-symbol",
      "symbol",
      "instrument-type"
   ]
}

Fields:
field description : str [Required]
field id : int [Required]
field instrument_type : InstrumentType [Required] (alias 'instrument-type')
field streamer_symbol : str [Required] (alias 'dx-symbol')
field symbol : str [Required]
async classmethod get(session: Session) list[Self]

Returns a list of all Forex objects from the API.

Parameters:
session: Session

the session to use for the request.

pydantic model tastytrade.instruments.Future(*, instrument_type: InstrumentType, symbol: str)

Bases: TradeableTastytradeData

Dataclass that represents a Tastytrade future object. Contains information about the future and methods to fetch futures for symbol(s).

Show JSON schema
{
   "title": "Future",
   "description": "Dataclass that represents a Tastytrade future object. Contains information\nabout the future and methods to fetch futures for symbol(s).",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType",
         "default": "Future"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "product-code": {
         "title": "Product-Code",
         "type": "string"
      },
      "tick-size": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Tick-Size"
      },
      "notional-multiplier": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Notional-Multiplier"
      },
      "display-factor": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Display-Factor"
      },
      "last-trade-date": {
         "format": "date",
         "title": "Last-Trade-Date",
         "type": "string"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "active-month": {
         "title": "Active-Month",
         "type": "boolean"
      },
      "next-active-month": {
         "title": "Next-Active-Month",
         "type": "boolean"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "stops-trading-at": {
         "format": "date-time",
         "title": "Stops-Trading-At",
         "type": "string"
      },
      "expires-at": {
         "format": "date-time",
         "title": "Expires-At",
         "type": "string"
      },
      "product-group": {
         "title": "Product-Group",
         "type": "string"
      },
      "exchange": {
         "title": "Exchange",
         "type": "string"
      },
      "streamer-exchange-code": {
         "title": "Streamer-Exchange-Code",
         "type": "string"
      },
      "back-month-first-calendar-symbol": {
         "title": "Back-Month-First-Calendar-Symbol",
         "type": "boolean"
      },
      "streamer-symbol": {
         "default": "",
         "title": "Streamer-Symbol",
         "type": "string"
      },
      "closing-only-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Closing-Only-Date"
      },
      "is-tradeable": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is-Tradeable"
      },
      "future-product": {
         "anyOf": [
            {
               "$ref": "#/$defs/FutureProduct"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "contract-size": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Contract-Size"
      },
      "main-fraction": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Main-Fraction"
      },
      "sub-fraction": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Sub-Fraction"
      },
      "first-notice-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "First-Notice-Date"
      },
      "roll-target-symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Roll-Target-Symbol"
      },
      "true-underlying-symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "True-Underlying-Symbol"
      },
      "future-etf-equivalent": {
         "anyOf": [
            {
               "$ref": "#/$defs/FutureEtfEquivalent"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "tick-sizes": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tick-Sizes"
      },
      "option-tick-sizes": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Option-Tick-Sizes"
      },
      "spread-tick-sizes": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Spread-Tick-Sizes"
      }
   },
   "$defs": {
      "FutureEtfEquivalent": {
         "description": "Dataclass that represents the ETF equivalent for a future (aka, the number\nof shares of the ETF that are equivalent to one future, leverage-wise).",
         "properties": {
            "symbol": {
               "title": "Symbol",
               "type": "string"
            },
            "share-quantity": {
               "title": "Share-Quantity",
               "type": "integer"
            }
         },
         "required": [
            "symbol",
            "share-quantity"
         ],
         "title": "FutureEtfEquivalent",
         "type": "object"
      },
      "FutureMonthCode": {
         "description": "Contains the valid month codes for futures.\n\nThis is really here for reference, as the API barely uses these codes.",
         "enum": [
            "F",
            "G",
            "H",
            "J",
            "K",
            "M",
            "N",
            "Q",
            "U",
            "V",
            "X",
            "Z"
         ],
         "title": "FutureMonthCode",
         "type": "string"
      },
      "FutureOptionProduct": {
         "description": "Dataclass that represents a Tastytrade future option product object.\nContains information about the future option product (deliverable for\nthe future option).",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "settlement-delay-days": {
               "title": "Settlement-Delay-Days",
               "type": "integer"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "clearing-price-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Clearing-Price-Multiplier"
            },
            "is-rollover": {
               "title": "Is-Rollover",
               "type": "boolean"
            },
            "future-product": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/FutureProduct"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            }
         },
         "required": [
            "root-symbol",
            "cash-settled",
            "code",
            "display-factor",
            "exchange",
            "product-type",
            "expiration-type",
            "settlement-delay-days",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "clearing-price-multiplier",
            "is-rollover"
         ],
         "title": "FutureOptionProduct",
         "type": "object"
      },
      "FutureProduct": {
         "description": "Dataclass that represents a Tastytrade future product object. Contains\ninformation about the future product and a method to fetch one for a\nsymbol.\n\nUseful for fetching general information about a family of futures, without\nknowing the specific expirations or symbols.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "listed-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Listed-Months",
               "type": "array"
            },
            "active-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Active-Months",
               "type": "array"
            },
            "notional-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Multiplier"
            },
            "tick-size": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Tick-Size"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "streamer-exchange-code": {
               "title": "Streamer-Exchange-Code",
               "type": "string"
            },
            "small-notional": {
               "title": "Small-Notional",
               "type": "boolean"
            },
            "back-month-first-calendar-symbol": {
               "title": "Back-Month-First-Calendar-Symbol",
               "type": "boolean"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "roll": {
               "$ref": "#/$defs/Roll"
            },
            "base-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Base-Tick"
            },
            "sub-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Sub-Tick"
            },
            "contract-limit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Contract-Limit"
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "security-group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Security-Group"
            },
            "true-underlying-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "True-Underlying-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "legacy-exchange-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Exchange-Code"
            },
            "option-products": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/FutureOptionProduct"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Option-Products"
            }
         },
         "required": [
            "root-symbol",
            "code",
            "description",
            "exchange",
            "product-type",
            "listed-months",
            "active-months",
            "notional-multiplier",
            "tick-size",
            "display-factor",
            "streamer-exchange-code",
            "small-notional",
            "back-month-first-calendar-symbol",
            "first-notice",
            "cash-settled",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "roll"
         ],
         "title": "FutureProduct",
         "type": "object"
      },
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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"
      },
      "Roll": {
         "description": "Dataclass representing a roll for a future.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "active-count": {
               "title": "Active-Count",
               "type": "integer"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "business-days-offset": {
               "title": "Business-Days-Offset",
               "type": "integer"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "active-count",
            "cash-settled",
            "business-days-offset",
            "first-notice"
         ],
         "title": "Roll",
         "type": "object"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "symbol",
      "product-code",
      "tick-size",
      "notional-multiplier",
      "display-factor",
      "last-trade-date",
      "expiration-date",
      "active",
      "active-month",
      "next-active-month",
      "is-closing-only",
      "stops-trading-at",
      "expires-at",
      "product-group",
      "exchange",
      "streamer-exchange-code",
      "back-month-first-calendar-symbol"
   ]
}

Fields:
field active : bool [Required]
field active_month : bool [Required] (alias 'active-month')
field back_month_first_calendar_symbol : bool [Required] (alias 'back-month-first-calendar-symbol')
field closing_only_date : date | None = None (alias 'closing-only-date')
field contract_size : Decimal | None = None (alias 'contract-size')
field display_factor : Decimal [Required] (alias 'display-factor')
field exchange : str [Required]
field expiration_date : date [Required] (alias 'expiration-date')
field expires_at : datetime [Required] (alias 'expires-at')
field first_notice_date : date | None = None (alias 'first-notice-date')
field future_etf_equivalent : FutureEtfEquivalent | None = None (alias 'future-etf-equivalent')
field future_product : FutureProduct | None = None (alias 'future-product')
field instrument_type : InstrumentType = InstrumentType.FUTURE (alias 'instrument-type')
field is_closing_only : bool [Required] (alias 'is-closing-only')
field is_tradeable : bool | None = None (alias 'is-tradeable')
field last_trade_date : date [Required] (alias 'last-trade-date')
field main_fraction : Decimal | None = None (alias 'main-fraction')
field next_active_month : bool [Required] (alias 'next-active-month')
field notional_multiplier : Decimal [Required] (alias 'notional-multiplier')
field option_tick_sizes : list[TickSize] | None = None (alias 'option-tick-sizes')
field product_code : str [Required] (alias 'product-code')
field product_group : str [Required] (alias 'product-group')
field roll_target_symbol : str | None = None (alias 'roll-target-symbol')
field spread_tick_sizes : list[TickSize] | None = None (alias 'spread-tick-sizes')
field stops_trading_at : datetime [Required] (alias 'stops-trading-at')
field streamer_exchange_code : str [Required] (alias 'streamer-exchange-code')
field streamer_symbol : str = '' (alias 'streamer-symbol')
field sub_fraction : Decimal | None = None (alias 'sub-fraction')
field tick_size : Decimal [Required] (alias 'tick-size')
field tick_sizes : list[TickSize] | None = None (alias 'tick-sizes')
field true_underlying_symbol : str | None = None (alias 'true-underlying-symbol')
async classmethod get(session: Session, symbols: str) Self
async classmethod get(session: Session, symbols: Iterable[str] | None = None, *, product_codes: list[str] | None = None, per_page: int = 250, page_offset: int | None = 0) list[Self]

Returns a list of Future objects from the given symbols or product codes.

Parameters:
session: Session

the session to use for the request.

symbols: str
symbols: Iterable[str] | None = None

symbol(s) of the futures, e.g. ‘ESZ9’, ‘/ESZ9’.

product_codes: list[str] | None = None

the product codes of the futures, e.g. ‘ES’, ‘6A’. Ignored if symbols are provided.

per_page: int = 250

the number of options to get per page.

page_offset: int | None = 0

provide a specific page to get; if None, get all pages

pydantic model tastytrade.instruments.FutureEtfEquivalent(*, symbol: str, share_quantity: int)

Bases: TastytradeData

Dataclass that represents the ETF equivalent for a future (aka, the number of shares of the ETF that are equivalent to one future, leverage-wise).

Show JSON schema
{
   "title": "FutureEtfEquivalent",
   "description": "Dataclass that represents the ETF equivalent for a future (aka, the number\nof shares of the ETF that are equivalent to one future, leverage-wise).",
   "type": "object",
   "properties": {
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "share-quantity": {
         "title": "Share-Quantity",
         "type": "integer"
      }
   },
   "required": [
      "symbol",
      "share-quantity"
   ]
}

Fields:
field share_quantity : int [Required] (alias 'share-quantity')
field symbol : str [Required]
class tastytrade.instruments.FutureMonthCode(value)

Bases: StrEnum

Contains the valid month codes for futures.

This is really here for reference, as the API barely uses these codes.

APR = 'J'
AUG = 'Q'
DEC = 'Z'
FEB = 'G'
JAN = 'F'
JUL = 'N'
JUN = 'M'
MAR = 'H'
MAY = 'K'
NOV = 'X'
OCT = 'V'
SEP = 'U'
pydantic model tastytrade.instruments.FutureOption(*, instrument_type: InstrumentType = InstrumentType.FUTURE_OPTION, symbol: str, underlying_symbol: str, product_code: str, expiration_date: date, root_symbol: str, option_root_symbol: str, strike_price: Decimal, exchange: str, streamer_symbol: str, option_type: OptionType, exercise_style: str, is_vanilla: bool, is_primary_deliverable: bool, future_price_ratio: Decimal, multiplier: Decimal, underlying_count: Decimal, is_confirmed: bool, notional_value: Decimal, display_factor: Decimal, settlement_type: str, strike_factor: Decimal, maturity_date: date, is_exercisable_weekly: bool, last_trade_time: str, days_to_expiration: int, is_closing_only: bool, active: bool, stops_trading_at: datetime, expires_at: datetime, exchange_symbol: str, security_exchange: str, sx_id: str, future_option_product: FutureOptionProduct | None = None)

Bases: TradeableTastytradeData

Dataclass that represents a Tastytrade future option object. Contains information about the future option, and methods to get future options.

Show JSON schema
{
   "title": "FutureOption",
   "description": "Dataclass that represents a Tastytrade future option object. Contains\ninformation about the future option, and methods to get future options.",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType",
         "default": "Future Option"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "product-code": {
         "title": "Product-Code",
         "type": "string"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "option-root-symbol": {
         "title": "Option-Root-Symbol",
         "type": "string"
      },
      "strike-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Strike-Price"
      },
      "exchange": {
         "title": "Exchange",
         "type": "string"
      },
      "streamer-symbol": {
         "title": "Streamer-Symbol",
         "type": "string"
      },
      "option-type": {
         "$ref": "#/$defs/OptionType"
      },
      "exercise-style": {
         "title": "Exercise-Style",
         "type": "string"
      },
      "is-vanilla": {
         "title": "Is-Vanilla",
         "type": "boolean"
      },
      "is-primary-deliverable": {
         "title": "Is-Primary-Deliverable",
         "type": "boolean"
      },
      "future-price-ratio": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Future-Price-Ratio"
      },
      "multiplier": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Multiplier"
      },
      "underlying-count": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Underlying-Count"
      },
      "is-confirmed": {
         "title": "Is-Confirmed",
         "type": "boolean"
      },
      "notional-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Notional-Value"
      },
      "display-factor": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Display-Factor"
      },
      "settlement-type": {
         "title": "Settlement-Type",
         "type": "string"
      },
      "strike-factor": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Strike-Factor"
      },
      "maturity-date": {
         "format": "date",
         "title": "Maturity-Date",
         "type": "string"
      },
      "is-exercisable-weekly": {
         "title": "Is-Exercisable-Weekly",
         "type": "boolean"
      },
      "last-trade-time": {
         "title": "Last-Trade-Time",
         "type": "string"
      },
      "days-to-expiration": {
         "title": "Days-To-Expiration",
         "type": "integer"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "stops-trading-at": {
         "format": "date-time",
         "title": "Stops-Trading-At",
         "type": "string"
      },
      "expires-at": {
         "format": "date-time",
         "title": "Expires-At",
         "type": "string"
      },
      "exchange-symbol": {
         "title": "Exchange-Symbol",
         "type": "string"
      },
      "security-exchange": {
         "title": "Security-Exchange",
         "type": "string"
      },
      "sx-id": {
         "title": "Sx-Id",
         "type": "string"
      },
      "future-option-product": {
         "anyOf": [
            {
               "$ref": "#/$defs/FutureOptionProduct"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "FutureMonthCode": {
         "description": "Contains the valid month codes for futures.\n\nThis is really here for reference, as the API barely uses these codes.",
         "enum": [
            "F",
            "G",
            "H",
            "J",
            "K",
            "M",
            "N",
            "Q",
            "U",
            "V",
            "X",
            "Z"
         ],
         "title": "FutureMonthCode",
         "type": "string"
      },
      "FutureOptionProduct": {
         "description": "Dataclass that represents a Tastytrade future option product object.\nContains information about the future option product (deliverable for\nthe future option).",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "settlement-delay-days": {
               "title": "Settlement-Delay-Days",
               "type": "integer"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "clearing-price-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Clearing-Price-Multiplier"
            },
            "is-rollover": {
               "title": "Is-Rollover",
               "type": "boolean"
            },
            "future-product": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/FutureProduct"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            }
         },
         "required": [
            "root-symbol",
            "cash-settled",
            "code",
            "display-factor",
            "exchange",
            "product-type",
            "expiration-type",
            "settlement-delay-days",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "clearing-price-multiplier",
            "is-rollover"
         ],
         "title": "FutureOptionProduct",
         "type": "object"
      },
      "FutureProduct": {
         "description": "Dataclass that represents a Tastytrade future product object. Contains\ninformation about the future product and a method to fetch one for a\nsymbol.\n\nUseful for fetching general information about a family of futures, without\nknowing the specific expirations or symbols.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "listed-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Listed-Months",
               "type": "array"
            },
            "active-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Active-Months",
               "type": "array"
            },
            "notional-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Multiplier"
            },
            "tick-size": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Tick-Size"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "streamer-exchange-code": {
               "title": "Streamer-Exchange-Code",
               "type": "string"
            },
            "small-notional": {
               "title": "Small-Notional",
               "type": "boolean"
            },
            "back-month-first-calendar-symbol": {
               "title": "Back-Month-First-Calendar-Symbol",
               "type": "boolean"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "roll": {
               "$ref": "#/$defs/Roll"
            },
            "base-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Base-Tick"
            },
            "sub-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Sub-Tick"
            },
            "contract-limit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Contract-Limit"
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "security-group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Security-Group"
            },
            "true-underlying-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "True-Underlying-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "legacy-exchange-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Exchange-Code"
            },
            "option-products": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/FutureOptionProduct"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Option-Products"
            }
         },
         "required": [
            "root-symbol",
            "code",
            "description",
            "exchange",
            "product-type",
            "listed-months",
            "active-months",
            "notional-multiplier",
            "tick-size",
            "display-factor",
            "streamer-exchange-code",
            "small-notional",
            "back-month-first-calendar-symbol",
            "first-notice",
            "cash-settled",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "roll"
         ],
         "title": "FutureProduct",
         "type": "object"
      },
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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"
      },
      "OptionType": {
         "description": "Contains the valid types of options and their abbreviations in the API.",
         "enum": [
            "C",
            "P"
         ],
         "title": "OptionType",
         "type": "string"
      },
      "Roll": {
         "description": "Dataclass representing a roll for a future.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "active-count": {
               "title": "Active-Count",
               "type": "integer"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "business-days-offset": {
               "title": "Business-Days-Offset",
               "type": "integer"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "active-count",
            "cash-settled",
            "business-days-offset",
            "first-notice"
         ],
         "title": "Roll",
         "type": "object"
      }
   },
   "required": [
      "symbol",
      "underlying-symbol",
      "product-code",
      "expiration-date",
      "root-symbol",
      "option-root-symbol",
      "strike-price",
      "exchange",
      "streamer-symbol",
      "option-type",
      "exercise-style",
      "is-vanilla",
      "is-primary-deliverable",
      "future-price-ratio",
      "multiplier",
      "underlying-count",
      "is-confirmed",
      "notional-value",
      "display-factor",
      "settlement-type",
      "strike-factor",
      "maturity-date",
      "is-exercisable-weekly",
      "last-trade-time",
      "days-to-expiration",
      "is-closing-only",
      "active",
      "stops-trading-at",
      "expires-at",
      "exchange-symbol",
      "security-exchange",
      "sx-id"
   ]
}

Fields:
Validators:
field active : bool [Required]
field days_to_expiration : int [Required] (alias 'days-to-expiration')
field display_factor : Decimal [Required] (alias 'display-factor')
field exchange : str [Required]
field exchange_symbol : str [Required] (alias 'exchange-symbol')
field exercise_style : str [Required] (alias 'exercise-style')
field expiration_date : date [Required] (alias 'expiration-date')
field expires_at : datetime [Required] (alias 'expires-at')
field future_option_product : FutureOptionProduct | None = None (alias 'future-option-product')
field future_price_ratio : Decimal [Required] (alias 'future-price-ratio')
field instrument_type : InstrumentType = InstrumentType.FUTURE_OPTION (alias 'instrument-type')
field is_closing_only : bool [Required] (alias 'is-closing-only')
field is_confirmed : bool [Required] (alias 'is-confirmed')
field is_exercisable_weekly : bool [Required] (alias 'is-exercisable-weekly')
field is_primary_deliverable : bool [Required] (alias 'is-primary-deliverable')
field is_vanilla : bool [Required] (alias 'is-vanilla')
field last_trade_time : str [Required] (alias 'last-trade-time')
field maturity_date : date [Required] (alias 'maturity-date')
Validated by:
field multiplier : Decimal [Required]
field notional_value : Decimal [Required] (alias 'notional-value')
field option_root_symbol : str [Required] (alias 'option-root-symbol')
field option_type : OptionType [Required] (alias 'option-type')
field product_code : str [Required] (alias 'product-code')
field root_symbol : str [Required] (alias 'root-symbol')
field security_exchange : str [Required] (alias 'security-exchange')
field settlement_type : str [Required] (alias 'settlement-type')
field stops_trading_at : datetime [Required] (alias 'stops-trading-at')
field streamer_symbol : str [Required] (alias 'streamer-symbol')
field strike_factor : Decimal [Required] (alias 'strike-factor')
field strike_price : Decimal [Required] (alias 'strike-price')
field sx_id : str [Required] (alias 'sx-id')
field underlying_count : Decimal [Required] (alias 'underlying-count')
field underlying_symbol : str [Required] (alias 'underlying-symbol')
async classmethod get(session: Session, symbol: str) Self

Returns a FutureOption object corresponding to the given symbol.

Parameters:
session: Session

the session to use for the request.

symbol: str

the Tastytrade symbol to fetch.

validator parse_date_with_utc  »  maturity_date
pydantic model tastytrade.instruments.FutureOptionProduct(*, root_symbol: str, cash_settled: bool, code: str, display_factor: Decimal, exchange: str, product_type: str, expiration_type: str, settlement_delay_days: int, market_sector: str, clearing_code: str, clearing_exchange_code: str, clearing_price_multiplier: Decimal, is_rollover: bool, future_product: FutureProduct | None = None, product_subtype: str | None = None, legacy_code: str | None = None, clearport_code: str | None = None)

Bases: TastytradeData

Dataclass that represents a Tastytrade future option product object. Contains information about the future option product (deliverable for the future option).

Show JSON schema
{
   "$defs": {
      "FutureMonthCode": {
         "description": "Contains the valid month codes for futures.\n\nThis is really here for reference, as the API barely uses these codes.",
         "enum": [
            "F",
            "G",
            "H",
            "J",
            "K",
            "M",
            "N",
            "Q",
            "U",
            "V",
            "X",
            "Z"
         ],
         "title": "FutureMonthCode",
         "type": "string"
      },
      "FutureOptionProduct": {
         "description": "Dataclass that represents a Tastytrade future option product object.\nContains information about the future option product (deliverable for\nthe future option).",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "settlement-delay-days": {
               "title": "Settlement-Delay-Days",
               "type": "integer"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "clearing-price-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Clearing-Price-Multiplier"
            },
            "is-rollover": {
               "title": "Is-Rollover",
               "type": "boolean"
            },
            "future-product": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/FutureProduct"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            }
         },
         "required": [
            "root-symbol",
            "cash-settled",
            "code",
            "display-factor",
            "exchange",
            "product-type",
            "expiration-type",
            "settlement-delay-days",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "clearing-price-multiplier",
            "is-rollover"
         ],
         "title": "FutureOptionProduct",
         "type": "object"
      },
      "FutureProduct": {
         "description": "Dataclass that represents a Tastytrade future product object. Contains\ninformation about the future product and a method to fetch one for a\nsymbol.\n\nUseful for fetching general information about a family of futures, without\nknowing the specific expirations or symbols.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "listed-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Listed-Months",
               "type": "array"
            },
            "active-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Active-Months",
               "type": "array"
            },
            "notional-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Multiplier"
            },
            "tick-size": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Tick-Size"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "streamer-exchange-code": {
               "title": "Streamer-Exchange-Code",
               "type": "string"
            },
            "small-notional": {
               "title": "Small-Notional",
               "type": "boolean"
            },
            "back-month-first-calendar-symbol": {
               "title": "Back-Month-First-Calendar-Symbol",
               "type": "boolean"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "roll": {
               "$ref": "#/$defs/Roll"
            },
            "base-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Base-Tick"
            },
            "sub-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Sub-Tick"
            },
            "contract-limit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Contract-Limit"
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "security-group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Security-Group"
            },
            "true-underlying-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "True-Underlying-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "legacy-exchange-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Exchange-Code"
            },
            "option-products": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/FutureOptionProduct"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Option-Products"
            }
         },
         "required": [
            "root-symbol",
            "code",
            "description",
            "exchange",
            "product-type",
            "listed-months",
            "active-months",
            "notional-multiplier",
            "tick-size",
            "display-factor",
            "streamer-exchange-code",
            "small-notional",
            "back-month-first-calendar-symbol",
            "first-notice",
            "cash-settled",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "roll"
         ],
         "title": "FutureProduct",
         "type": "object"
      },
      "Roll": {
         "description": "Dataclass representing a roll for a future.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "active-count": {
               "title": "Active-Count",
               "type": "integer"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "business-days-offset": {
               "title": "Business-Days-Offset",
               "type": "integer"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "active-count",
            "cash-settled",
            "business-days-offset",
            "first-notice"
         ],
         "title": "Roll",
         "type": "object"
      }
   },
   "$ref": "#/$defs/FutureOptionProduct"
}

Fields:
field cash_settled : bool [Required] (alias 'cash-settled')
field clearing_code : str [Required] (alias 'clearing-code')
field clearing_exchange_code : str [Required] (alias 'clearing-exchange-code')
field clearing_price_multiplier : Decimal [Required] (alias 'clearing-price-multiplier')
field clearport_code : str | None = None (alias 'clearport-code')
field code : str [Required]
field display_factor : Decimal [Required] (alias 'display-factor')
field exchange : str [Required]
field expiration_type : str [Required] (alias 'expiration-type')
field future_product : FutureProduct | None = None (alias 'future-product')
field is_rollover : bool [Required] (alias 'is-rollover')
field legacy_code : str | None = None (alias 'legacy-code')
field market_sector : str [Required] (alias 'market-sector')
field product_subtype : str | None = None (alias 'product-subtype')
field product_type : str [Required] (alias 'product-type')
field root_symbol : str [Required] (alias 'root-symbol')
field settlement_delay_days : int [Required] (alias 'settlement-delay-days')
async classmethod get(session: Session) list[Self]
async classmethod get(session: Session, root_symbol: str, exchange: str = 'CME') Self

Returns a list of FutureOptionProduct objects available, or a single FutureOptionProduct object if a root symbol is provided.

Parameters:
session: Session

the session to use for the request.

root_symbol: str

the root symbol of the future option

exchange: str = 'CME'

the exchange to get the product from

pydantic model tastytrade.instruments.FutureProduct(*, root_symbol: str, code: str, description: str, exchange: str, product_type: str, listed_months: list[FutureMonthCode], active_months: list[FutureMonthCode], notional_multiplier: Decimal, tick_size: Decimal, display_factor: Decimal, streamer_exchange_code: str, small_notional: bool, back_month_first_calendar_symbol: bool, first_notice: bool, cash_settled: bool, market_sector: str, clearing_code: str, clearing_exchange_code: str, roll: Roll, base_tick: int | None = None, sub_tick: int | None = None, contract_limit: int | None = None, product_subtype: str | None = None, security_group: str | None = None, true_underlying_code: str | None = None, clearport_code: str | None = None, legacy_code: str | None = None, legacy_exchange_code: str | None = None, option_products: list[FutureOptionProduct] | None = None)

Bases: TastytradeData

Dataclass that represents a Tastytrade future product object. Contains information about the future product and a method to fetch one for a symbol.

Useful for fetching general information about a family of futures, without knowing the specific expirations or symbols.

Show JSON schema
{
   "$defs": {
      "FutureMonthCode": {
         "description": "Contains the valid month codes for futures.\n\nThis is really here for reference, as the API barely uses these codes.",
         "enum": [
            "F",
            "G",
            "H",
            "J",
            "K",
            "M",
            "N",
            "Q",
            "U",
            "V",
            "X",
            "Z"
         ],
         "title": "FutureMonthCode",
         "type": "string"
      },
      "FutureOptionProduct": {
         "description": "Dataclass that represents a Tastytrade future option product object.\nContains information about the future option product (deliverable for\nthe future option).",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "settlement-delay-days": {
               "title": "Settlement-Delay-Days",
               "type": "integer"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "clearing-price-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Clearing-Price-Multiplier"
            },
            "is-rollover": {
               "title": "Is-Rollover",
               "type": "boolean"
            },
            "future-product": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/FutureProduct"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            }
         },
         "required": [
            "root-symbol",
            "cash-settled",
            "code",
            "display-factor",
            "exchange",
            "product-type",
            "expiration-type",
            "settlement-delay-days",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "clearing-price-multiplier",
            "is-rollover"
         ],
         "title": "FutureOptionProduct",
         "type": "object"
      },
      "FutureProduct": {
         "description": "Dataclass that represents a Tastytrade future product object. Contains\ninformation about the future product and a method to fetch one for a\nsymbol.\n\nUseful for fetching general information about a family of futures, without\nknowing the specific expirations or symbols.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "code": {
               "title": "Code",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "exchange": {
               "title": "Exchange",
               "type": "string"
            },
            "product-type": {
               "title": "Product-Type",
               "type": "string"
            },
            "listed-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Listed-Months",
               "type": "array"
            },
            "active-months": {
               "items": {
                  "$ref": "#/$defs/FutureMonthCode"
               },
               "title": "Active-Months",
               "type": "array"
            },
            "notional-multiplier": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Multiplier"
            },
            "tick-size": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Tick-Size"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "streamer-exchange-code": {
               "title": "Streamer-Exchange-Code",
               "type": "string"
            },
            "small-notional": {
               "title": "Small-Notional",
               "type": "boolean"
            },
            "back-month-first-calendar-symbol": {
               "title": "Back-Month-First-Calendar-Symbol",
               "type": "boolean"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "market-sector": {
               "title": "Market-Sector",
               "type": "string"
            },
            "clearing-code": {
               "title": "Clearing-Code",
               "type": "string"
            },
            "clearing-exchange-code": {
               "title": "Clearing-Exchange-Code",
               "type": "string"
            },
            "roll": {
               "$ref": "#/$defs/Roll"
            },
            "base-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Base-Tick"
            },
            "sub-tick": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Sub-Tick"
            },
            "contract-limit": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Contract-Limit"
            },
            "product-subtype": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Product-Subtype"
            },
            "security-group": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Security-Group"
            },
            "true-underlying-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "True-Underlying-Code"
            },
            "clearport-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Clearport-Code"
            },
            "legacy-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Code"
            },
            "legacy-exchange-code": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Legacy-Exchange-Code"
            },
            "option-products": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/FutureOptionProduct"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Option-Products"
            }
         },
         "required": [
            "root-symbol",
            "code",
            "description",
            "exchange",
            "product-type",
            "listed-months",
            "active-months",
            "notional-multiplier",
            "tick-size",
            "display-factor",
            "streamer-exchange-code",
            "small-notional",
            "back-month-first-calendar-symbol",
            "first-notice",
            "cash-settled",
            "market-sector",
            "clearing-code",
            "clearing-exchange-code",
            "roll"
         ],
         "title": "FutureProduct",
         "type": "object"
      },
      "Roll": {
         "description": "Dataclass representing a roll for a future.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "active-count": {
               "title": "Active-Count",
               "type": "integer"
            },
            "cash-settled": {
               "title": "Cash-Settled",
               "type": "boolean"
            },
            "business-days-offset": {
               "title": "Business-Days-Offset",
               "type": "integer"
            },
            "first-notice": {
               "title": "First-Notice",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "active-count",
            "cash-settled",
            "business-days-offset",
            "first-notice"
         ],
         "title": "Roll",
         "type": "object"
      }
   },
   "$ref": "#/$defs/FutureProduct"
}

Fields:
field active_months : list[FutureMonthCode] [Required] (alias 'active-months')
field back_month_first_calendar_symbol : bool [Required] (alias 'back-month-first-calendar-symbol')
field base_tick : int | None = None (alias 'base-tick')
field cash_settled : bool [Required] (alias 'cash-settled')
field clearing_code : str [Required] (alias 'clearing-code')
field clearing_exchange_code : str [Required] (alias 'clearing-exchange-code')
field clearport_code : str | None = None (alias 'clearport-code')
field code : str [Required]
field contract_limit : int | None = None (alias 'contract-limit')
field description : str [Required]
field display_factor : Decimal [Required] (alias 'display-factor')
field exchange : str [Required]
field first_notice : bool [Required] (alias 'first-notice')
field legacy_code : str | None = None (alias 'legacy-code')
field legacy_exchange_code : str | None = None (alias 'legacy-exchange-code')
field listed_months : list[FutureMonthCode] [Required] (alias 'listed-months')
field market_sector : str [Required] (alias 'market-sector')
field notional_multiplier : Decimal [Required] (alias 'notional-multiplier')
field option_products : list[FutureOptionProduct] | None = None (alias 'option-products')
field product_subtype : str | None = None (alias 'product-subtype')
field product_type : str [Required] (alias 'product-type')
field roll : Roll [Required]
field root_symbol : str [Required] (alias 'root-symbol')
field security_group : str | None = None (alias 'security-group')
field small_notional : bool [Required] (alias 'small-notional')
field streamer_exchange_code : str [Required] (alias 'streamer-exchange-code')
field sub_tick : int | None = None (alias 'sub-tick')
field tick_size : Decimal [Required] (alias 'tick-size')
field true_underlying_code : str | None = None (alias 'true-underlying-code')
async classmethod get(session: Session) list[Self]
async classmethod get(session: Session, code: str, exchange: str = 'CME') Self

Returns a list of FutureProduct objects available, or a single FutureProduct object if a code is provided.

Parameters:
session: Session

the session to use for the request.

code: str

the product code, e.g. ‘ES’

exchange: str = 'CME'

the exchange to fetch from: ‘CME’, ‘SMALLS’, ‘CFE’, ‘CBOED’

pydantic model tastytrade.instruments.NestedFutureOptionChain(*, futures: list[NestedFutureOptionFuture], option_chains: list[NestedFutureOptionSubchain])

Bases: TastytradeData

Dataclass that represents a Tastytrade nested option chain object. Contains information about the option chain and a method to fetch one for a symbol.

This is cleaner than calling get_future_option_chain() but if you want to create actual FutureOption objects you’ll need to make an extra API request or two.

Show JSON schema
{
   "title": "NestedFutureOptionChain",
   "description": "Dataclass that represents a Tastytrade nested option chain object. Contains\ninformation about the option chain and a method to fetch one for a symbol.\n\nThis is cleaner than calling :meth:`get_future_option_chain` but if you\nwant to create actual :class:`FutureOption` objects you'll need to make an\nextra API request or two.",
   "type": "object",
   "properties": {
      "futures": {
         "items": {
            "$ref": "#/$defs/NestedFutureOptionFuture"
         },
         "title": "Futures",
         "type": "array"
      },
      "option-chains": {
         "items": {
            "$ref": "#/$defs/NestedFutureOptionSubchain"
         },
         "title": "Option-Chains",
         "type": "array"
      }
   },
   "$defs": {
      "NestedFutureOptionChainExpiration": {
         "description": "Dataclass representing an expiration in a nested future options chain.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "notional-value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Value"
            },
            "underlying-symbol": {
               "title": "Underlying-Symbol",
               "type": "string"
            },
            "strike-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Factor"
            },
            "days-to-expiration": {
               "title": "Days-To-Expiration",
               "type": "integer"
            },
            "option-root-symbol": {
               "title": "Option-Root-Symbol",
               "type": "string"
            },
            "expiration-date": {
               "format": "date",
               "title": "Expiration-Date",
               "type": "string"
            },
            "expires-at": {
               "format": "date-time",
               "title": "Expires-At",
               "type": "string"
            },
            "asset": {
               "title": "Asset",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "option-contract-symbol": {
               "title": "Option-Contract-Symbol",
               "type": "string"
            },
            "stops-trading-at": {
               "format": "date-time",
               "title": "Stops-Trading-At",
               "type": "string"
            },
            "settlement-type": {
               "title": "Settlement-Type",
               "type": "string"
            },
            "strikes": {
               "items": {
                  "$ref": "#/$defs/Strike"
               },
               "title": "Strikes",
               "type": "array"
            },
            "tick-sizes": {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "title": "Tick-Sizes",
               "type": "array"
            }
         },
         "required": [
            "root-symbol",
            "notional-value",
            "underlying-symbol",
            "strike-factor",
            "days-to-expiration",
            "option-root-symbol",
            "expiration-date",
            "expires-at",
            "asset",
            "expiration-type",
            "display-factor",
            "option-contract-symbol",
            "stops-trading-at",
            "settlement-type",
            "strikes",
            "tick-sizes"
         ],
         "title": "NestedFutureOptionChainExpiration",
         "type": "object"
      },
      "NestedFutureOptionFuture": {
         "description": "Dataclass representing an underlying future in a nested future options\nchain.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "days-to-expiration": {
               "title": "Days-To-Expiration",
               "type": "integer"
            },
            "expiration-date": {
               "format": "date",
               "title": "Expiration-Date",
               "type": "string"
            },
            "expires-at": {
               "format": "date-time",
               "title": "Expires-At",
               "type": "string"
            },
            "next-active-month": {
               "title": "Next-Active-Month",
               "type": "boolean"
            },
            "symbol": {
               "title": "Symbol",
               "type": "string"
            },
            "active-month": {
               "title": "Active-Month",
               "type": "boolean"
            },
            "stops-trading-at": {
               "format": "date-time",
               "title": "Stops-Trading-At",
               "type": "string"
            },
            "maturity-date": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Maturity-Date"
            }
         },
         "required": [
            "root-symbol",
            "days-to-expiration",
            "expiration-date",
            "expires-at",
            "next-active-month",
            "symbol",
            "active-month",
            "stops-trading-at"
         ],
         "title": "NestedFutureOptionFuture",
         "type": "object"
      },
      "NestedFutureOptionSubchain": {
         "description": "Dataclass that represents a Tastytrade nested future option chain for a\nspecific futures underlying symbol.",
         "properties": {
            "underlying-symbol": {
               "title": "Underlying-Symbol",
               "type": "string"
            },
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "exercise-style": {
               "title": "Exercise-Style",
               "type": "string"
            },
            "expirations": {
               "items": {
                  "$ref": "#/$defs/NestedFutureOptionChainExpiration"
               },
               "title": "Expirations",
               "type": "array"
            }
         },
         "required": [
            "underlying-symbol",
            "root-symbol",
            "exercise-style",
            "expirations"
         ],
         "title": "NestedFutureOptionSubchain",
         "type": "object"
      },
      "Strike": {
         "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
         "properties": {
            "strike-price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Price"
            },
            "call": {
               "title": "Call",
               "type": "string"
            },
            "put": {
               "title": "Put",
               "type": "string"
            },
            "call-streamer-symbol": {
               "title": "Call-Streamer-Symbol",
               "type": "string"
            },
            "put-streamer-symbol": {
               "title": "Put-Streamer-Symbol",
               "type": "string"
            }
         },
         "required": [
            "strike-price",
            "call",
            "put",
            "call-streamer-symbol",
            "put-streamer-symbol"
         ],
         "title": "Strike",
         "type": "object"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "futures",
      "option-chains"
   ]
}

Fields:
field futures : list[NestedFutureOptionFuture] [Required]
field option_chains : list[NestedFutureOptionSubchain] [Required] (alias 'option-chains')
async classmethod get(session: Session, symbol: str) Self

Gets the futures option chain for the given symbol in nested format.

Parameters:
session: Session

the session to use for the request.

symbol: str

the symbol to get the option chain for.

pydantic model tastytrade.instruments.NestedFutureOptionChainExpiration(*, root_symbol: str, notional_value: Decimal, underlying_symbol: str, strike_factor: Decimal, days_to_expiration: int, option_root_symbol: str, expiration_date: date, expires_at: datetime, asset: str, expiration_type: str, display_factor: Decimal, option_contract_symbol: str, stops_trading_at: datetime, settlement_type: str, strikes: list[Strike], tick_sizes: list[TickSize])

Bases: TastytradeData

Dataclass representing an expiration in a nested future options chain.

Show JSON schema
{
   "title": "NestedFutureOptionChainExpiration",
   "description": "Dataclass representing an expiration in a nested future options chain.",
   "type": "object",
   "properties": {
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "notional-value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Notional-Value"
      },
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "strike-factor": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Strike-Factor"
      },
      "days-to-expiration": {
         "title": "Days-To-Expiration",
         "type": "integer"
      },
      "option-root-symbol": {
         "title": "Option-Root-Symbol",
         "type": "string"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "expires-at": {
         "format": "date-time",
         "title": "Expires-At",
         "type": "string"
      },
      "asset": {
         "title": "Asset",
         "type": "string"
      },
      "expiration-type": {
         "title": "Expiration-Type",
         "type": "string"
      },
      "display-factor": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Display-Factor"
      },
      "option-contract-symbol": {
         "title": "Option-Contract-Symbol",
         "type": "string"
      },
      "stops-trading-at": {
         "format": "date-time",
         "title": "Stops-Trading-At",
         "type": "string"
      },
      "settlement-type": {
         "title": "Settlement-Type",
         "type": "string"
      },
      "strikes": {
         "items": {
            "$ref": "#/$defs/Strike"
         },
         "title": "Strikes",
         "type": "array"
      },
      "tick-sizes": {
         "items": {
            "$ref": "#/$defs/TickSize"
         },
         "title": "Tick-Sizes",
         "type": "array"
      }
   },
   "$defs": {
      "Strike": {
         "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
         "properties": {
            "strike-price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Price"
            },
            "call": {
               "title": "Call",
               "type": "string"
            },
            "put": {
               "title": "Put",
               "type": "string"
            },
            "call-streamer-symbol": {
               "title": "Call-Streamer-Symbol",
               "type": "string"
            },
            "put-streamer-symbol": {
               "title": "Put-Streamer-Symbol",
               "type": "string"
            }
         },
         "required": [
            "strike-price",
            "call",
            "put",
            "call-streamer-symbol",
            "put-streamer-symbol"
         ],
         "title": "Strike",
         "type": "object"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "root-symbol",
      "notional-value",
      "underlying-symbol",
      "strike-factor",
      "days-to-expiration",
      "option-root-symbol",
      "expiration-date",
      "expires-at",
      "asset",
      "expiration-type",
      "display-factor",
      "option-contract-symbol",
      "stops-trading-at",
      "settlement-type",
      "strikes",
      "tick-sizes"
   ]
}

Fields:
field asset : str [Required]
field days_to_expiration : int [Required] (alias 'days-to-expiration')
field display_factor : Decimal [Required] (alias 'display-factor')
field expiration_date : date [Required] (alias 'expiration-date')
field expiration_type : str [Required] (alias 'expiration-type')
field expires_at : datetime [Required] (alias 'expires-at')
field notional_value : Decimal [Required] (alias 'notional-value')
field option_contract_symbol : str [Required] (alias 'option-contract-symbol')
field option_root_symbol : str [Required] (alias 'option-root-symbol')
field root_symbol : str [Required] (alias 'root-symbol')
field settlement_type : str [Required] (alias 'settlement-type')
field stops_trading_at : datetime [Required] (alias 'stops-trading-at')
field strike_factor : Decimal [Required] (alias 'strike-factor')
field strikes : list[Strike] [Required]
field tick_sizes : list[TickSize] [Required] (alias 'tick-sizes')
field underlying_symbol : str [Required] (alias 'underlying-symbol')
pydantic model tastytrade.instruments.NestedFutureOptionFuture(*, root_symbol: str, days_to_expiration: int, expiration_date: date, expires_at: datetime, next_active_month: bool, symbol: str, active_month: bool, stops_trading_at: datetime, maturity_date: date | None = None)

Bases: TastytradeData

Dataclass representing an underlying future in a nested future options chain.

Show JSON schema
{
   "title": "NestedFutureOptionFuture",
   "description": "Dataclass representing an underlying future in a nested future options\nchain.",
   "type": "object",
   "properties": {
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "days-to-expiration": {
         "title": "Days-To-Expiration",
         "type": "integer"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "expires-at": {
         "format": "date-time",
         "title": "Expires-At",
         "type": "string"
      },
      "next-active-month": {
         "title": "Next-Active-Month",
         "type": "boolean"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "active-month": {
         "title": "Active-Month",
         "type": "boolean"
      },
      "stops-trading-at": {
         "format": "date-time",
         "title": "Stops-Trading-At",
         "type": "string"
      },
      "maturity-date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Maturity-Date"
      }
   },
   "required": [
      "root-symbol",
      "days-to-expiration",
      "expiration-date",
      "expires-at",
      "next-active-month",
      "symbol",
      "active-month",
      "stops-trading-at"
   ]
}

Fields:
Validators:
field active_month : bool [Required] (alias 'active-month')
field days_to_expiration : int [Required] (alias 'days-to-expiration')
field expiration_date : date [Required] (alias 'expiration-date')
field expires_at : datetime [Required] (alias 'expires-at')
field maturity_date : date | None = None (alias 'maturity-date')
Validated by:
field next_active_month : bool [Required] (alias 'next-active-month')
field root_symbol : str [Required] (alias 'root-symbol')
field stops_trading_at : datetime [Required] (alias 'stops-trading-at')
field symbol : str [Required]
validator parse_date_with_utc  »  maturity_date
pydantic model tastytrade.instruments.NestedFutureOptionSubchain(*, underlying_symbol: str, root_symbol: str, exercise_style: str, expirations: list[NestedFutureOptionChainExpiration])

Bases: TastytradeData

Dataclass that represents a Tastytrade nested future option chain for a specific futures underlying symbol.

Show JSON schema
{
   "title": "NestedFutureOptionSubchain",
   "description": "Dataclass that represents a Tastytrade nested future option chain for a\nspecific futures underlying symbol.",
   "type": "object",
   "properties": {
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "exercise-style": {
         "title": "Exercise-Style",
         "type": "string"
      },
      "expirations": {
         "items": {
            "$ref": "#/$defs/NestedFutureOptionChainExpiration"
         },
         "title": "Expirations",
         "type": "array"
      }
   },
   "$defs": {
      "NestedFutureOptionChainExpiration": {
         "description": "Dataclass representing an expiration in a nested future options chain.",
         "properties": {
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "notional-value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Notional-Value"
            },
            "underlying-symbol": {
               "title": "Underlying-Symbol",
               "type": "string"
            },
            "strike-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Factor"
            },
            "days-to-expiration": {
               "title": "Days-To-Expiration",
               "type": "integer"
            },
            "option-root-symbol": {
               "title": "Option-Root-Symbol",
               "type": "string"
            },
            "expiration-date": {
               "format": "date",
               "title": "Expiration-Date",
               "type": "string"
            },
            "expires-at": {
               "format": "date-time",
               "title": "Expires-At",
               "type": "string"
            },
            "asset": {
               "title": "Asset",
               "type": "string"
            },
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "display-factor": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Display-Factor"
            },
            "option-contract-symbol": {
               "title": "Option-Contract-Symbol",
               "type": "string"
            },
            "stops-trading-at": {
               "format": "date-time",
               "title": "Stops-Trading-At",
               "type": "string"
            },
            "settlement-type": {
               "title": "Settlement-Type",
               "type": "string"
            },
            "strikes": {
               "items": {
                  "$ref": "#/$defs/Strike"
               },
               "title": "Strikes",
               "type": "array"
            },
            "tick-sizes": {
               "items": {
                  "$ref": "#/$defs/TickSize"
               },
               "title": "Tick-Sizes",
               "type": "array"
            }
         },
         "required": [
            "root-symbol",
            "notional-value",
            "underlying-symbol",
            "strike-factor",
            "days-to-expiration",
            "option-root-symbol",
            "expiration-date",
            "expires-at",
            "asset",
            "expiration-type",
            "display-factor",
            "option-contract-symbol",
            "stops-trading-at",
            "settlement-type",
            "strikes",
            "tick-sizes"
         ],
         "title": "NestedFutureOptionChainExpiration",
         "type": "object"
      },
      "Strike": {
         "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
         "properties": {
            "strike-price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Price"
            },
            "call": {
               "title": "Call",
               "type": "string"
            },
            "put": {
               "title": "Put",
               "type": "string"
            },
            "call-streamer-symbol": {
               "title": "Call-Streamer-Symbol",
               "type": "string"
            },
            "put-streamer-symbol": {
               "title": "Put-Streamer-Symbol",
               "type": "string"
            }
         },
         "required": [
            "strike-price",
            "call",
            "put",
            "call-streamer-symbol",
            "put-streamer-symbol"
         ],
         "title": "Strike",
         "type": "object"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "underlying-symbol",
      "root-symbol",
      "exercise-style",
      "expirations"
   ]
}

Fields:
field exercise_style : str [Required] (alias 'exercise-style')
field expirations : list[NestedFutureOptionChainExpiration] [Required]
field root_symbol : str [Required] (alias 'root-symbol')
field underlying_symbol : str [Required] (alias 'underlying-symbol')
pydantic model tastytrade.instruments.NestedOptionChain(*, underlying_symbol: str, root_symbol: str, option_chain_type: str, shares_per_contract: int, tick_sizes: list[TickSize], expirations: list[NestedOptionChainExpiration], deliverables: list[Deliverable] | None = None)

Bases: TastytradeData

Dataclass that represents a Tastytrade nested option chain object. Contains information about the option chain and a method to fetch one for a symbol.

This is cleaner than calling get_option_chain() but if you want to create actual Option objects you’ll need to make an extra API request or two.

Show JSON schema
{
   "title": "NestedOptionChain",
   "description": "Dataclass that represents a Tastytrade nested option chain object.\nContains information about the option chain and a method to fetch one for\na symbol.\n\nThis is cleaner than calling :meth:`get_option_chain` but if you want to\ncreate actual :class:`Option` objects you'll need to make an extra API\nrequest or two.",
   "type": "object",
   "properties": {
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "option-chain-type": {
         "title": "Option-Chain-Type",
         "type": "string"
      },
      "shares-per-contract": {
         "title": "Shares-Per-Contract",
         "type": "integer"
      },
      "tick-sizes": {
         "items": {
            "$ref": "#/$defs/TickSize"
         },
         "title": "Tick-Sizes",
         "type": "array"
      },
      "expirations": {
         "items": {
            "$ref": "#/$defs/NestedOptionChainExpiration"
         },
         "title": "Expirations",
         "type": "array"
      },
      "deliverables": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/Deliverable"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Deliverables"
      }
   },
   "$defs": {
      "Deliverable": {
         "description": "Dataclass representing the deliverable for an option.",
         "properties": {
            "id": {
               "title": "Id",
               "type": "integer"
            },
            "root-symbol": {
               "title": "Root-Symbol",
               "type": "string"
            },
            "deliverable-type": {
               "title": "Deliverable-Type",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "amount": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Amount"
            },
            "percent": {
               "title": "Percent",
               "type": "string"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            },
            "instrument-type": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/InstrumentType"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "required": [
            "id",
            "root-symbol",
            "deliverable-type",
            "description",
            "amount",
            "percent"
         ],
         "title": "Deliverable",
         "type": "object"
      },
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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"
      },
      "NestedOptionChainExpiration": {
         "description": "Dataclass representing an expiration in a nested options chain.",
         "properties": {
            "expiration-type": {
               "title": "Expiration-Type",
               "type": "string"
            },
            "expiration-date": {
               "format": "date",
               "title": "Expiration-Date",
               "type": "string"
            },
            "days-to-expiration": {
               "title": "Days-To-Expiration",
               "type": "integer"
            },
            "settlement-type": {
               "title": "Settlement-Type",
               "type": "string"
            },
            "strikes": {
               "items": {
                  "$ref": "#/$defs/Strike"
               },
               "title": "Strikes",
               "type": "array"
            }
         },
         "required": [
            "expiration-type",
            "expiration-date",
            "days-to-expiration",
            "settlement-type",
            "strikes"
         ],
         "title": "NestedOptionChainExpiration",
         "type": "object"
      },
      "Strike": {
         "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
         "properties": {
            "strike-price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Price"
            },
            "call": {
               "title": "Call",
               "type": "string"
            },
            "put": {
               "title": "Put",
               "type": "string"
            },
            "call-streamer-symbol": {
               "title": "Call-Streamer-Symbol",
               "type": "string"
            },
            "put-streamer-symbol": {
               "title": "Put-Streamer-Symbol",
               "type": "string"
            }
         },
         "required": [
            "strike-price",
            "call",
            "put",
            "call-streamer-symbol",
            "put-streamer-symbol"
         ],
         "title": "Strike",
         "type": "object"
      },
      "TickSize": {
         "description": "Dataclass representing the tick size for an instrument.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Value"
            },
            "threshold": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Threshold"
            },
            "symbol": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Symbol"
            }
         },
         "required": [
            "value"
         ],
         "title": "TickSize",
         "type": "object"
      }
   },
   "required": [
      "underlying-symbol",
      "root-symbol",
      "option-chain-type",
      "shares-per-contract",
      "tick-sizes",
      "expirations"
   ]
}

Fields:
field deliverables : list[Deliverable] | None = None
field expirations : list[NestedOptionChainExpiration] [Required]
field option_chain_type : str [Required] (alias 'option-chain-type')
field root_symbol : str [Required] (alias 'root-symbol')
field shares_per_contract : int [Required] (alias 'shares-per-contract')
field tick_sizes : list[TickSize] [Required] (alias 'tick-sizes')
field underlying_symbol : str [Required] (alias 'underlying-symbol')
async classmethod get(session: Session, symbol: str) list[Self]

Gets the option chain for the given symbol in nested format.

Parameters:
session: Session

the session to use for the request.

symbol: str

the symbol to get the option chain for.

pydantic model tastytrade.instruments.NestedOptionChainExpiration(*, expiration_type: str, expiration_date: date, days_to_expiration: int, settlement_type: str, strikes: list[Strike])

Bases: TastytradeData

Dataclass representing an expiration in a nested options chain.

Show JSON schema
{
   "title": "NestedOptionChainExpiration",
   "description": "Dataclass representing an expiration in a nested options chain.",
   "type": "object",
   "properties": {
      "expiration-type": {
         "title": "Expiration-Type",
         "type": "string"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "days-to-expiration": {
         "title": "Days-To-Expiration",
         "type": "integer"
      },
      "settlement-type": {
         "title": "Settlement-Type",
         "type": "string"
      },
      "strikes": {
         "items": {
            "$ref": "#/$defs/Strike"
         },
         "title": "Strikes",
         "type": "array"
      }
   },
   "$defs": {
      "Strike": {
         "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
         "properties": {
            "strike-price": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                     "type": "string"
                  }
               ],
               "title": "Strike-Price"
            },
            "call": {
               "title": "Call",
               "type": "string"
            },
            "put": {
               "title": "Put",
               "type": "string"
            },
            "call-streamer-symbol": {
               "title": "Call-Streamer-Symbol",
               "type": "string"
            },
            "put-streamer-symbol": {
               "title": "Put-Streamer-Symbol",
               "type": "string"
            }
         },
         "required": [
            "strike-price",
            "call",
            "put",
            "call-streamer-symbol",
            "put-streamer-symbol"
         ],
         "title": "Strike",
         "type": "object"
      }
   },
   "required": [
      "expiration-type",
      "expiration-date",
      "days-to-expiration",
      "settlement-type",
      "strikes"
   ]
}

Fields:
field days_to_expiration : int [Required] (alias 'days-to-expiration')
field expiration_date : date [Required] (alias 'expiration-date')
field expiration_type : str [Required] (alias 'expiration-type')
field settlement_type : str [Required] (alias 'settlement-type')
field strikes : list[Strike] [Required]
pydantic model tastytrade.instruments.Option(*, instrument_type: InstrumentType, symbol: str, active: bool, strike_price: Decimal, root_symbol: str, underlying_symbol: str, expiration_date: date, exercise_style: str, shares_per_contract: int, option_type: OptionType, option_chain_type: str, expiration_type: str, settlement_type: str, stops_trading_at: datetime, market_time_instrument_collection: str, days_to_expiration: int, is_closing_only: bool, expires_at: datetime | None = None, streamer_symbol: str = '', listed_market: str | None = None, halted_at: datetime | None = None, old_security_number: str | None = None)

Bases: TradeableTastytradeData

Dataclass that represents a Tastytrade option object. Contains information about the option and methods to populate that data using an option symbol.

Show JSON schema
{
   "title": "Option",
   "description": "Dataclass that represents a Tastytrade option object. Contains information\nabout the option and methods to populate that data using an option symbol.",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "strike-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Strike-Price"
      },
      "root-symbol": {
         "title": "Root-Symbol",
         "type": "string"
      },
      "underlying-symbol": {
         "title": "Underlying-Symbol",
         "type": "string"
      },
      "expiration-date": {
         "format": "date",
         "title": "Expiration-Date",
         "type": "string"
      },
      "exercise-style": {
         "title": "Exercise-Style",
         "type": "string"
      },
      "shares-per-contract": {
         "title": "Shares-Per-Contract",
         "type": "integer"
      },
      "option-type": {
         "$ref": "#/$defs/OptionType"
      },
      "option-chain-type": {
         "title": "Option-Chain-Type",
         "type": "string"
      },
      "expiration-type": {
         "title": "Expiration-Type",
         "type": "string"
      },
      "settlement-type": {
         "title": "Settlement-Type",
         "type": "string"
      },
      "stops-trading-at": {
         "format": "date-time",
         "title": "Stops-Trading-At",
         "type": "string"
      },
      "market-time-instrument-collection": {
         "title": "Market-Time-Instrument-Collection",
         "type": "string"
      },
      "days-to-expiration": {
         "title": "Days-To-Expiration",
         "type": "integer"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "expires-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Expires-At"
      },
      "streamer-symbol": {
         "default": "",
         "title": "Streamer-Symbol",
         "type": "string"
      },
      "listed-market": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Listed-Market"
      },
      "halted-at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Halted-At"
      },
      "old-security-number": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Old-Security-Number"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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"
      },
      "OptionType": {
         "description": "Contains the valid types of options and their abbreviations in the API.",
         "enum": [
            "C",
            "P"
         ],
         "title": "OptionType",
         "type": "string"
      }
   },
   "required": [
      "instrument-type",
      "symbol",
      "active",
      "strike-price",
      "root-symbol",
      "underlying-symbol",
      "expiration-date",
      "exercise-style",
      "shares-per-contract",
      "option-type",
      "option-chain-type",
      "expiration-type",
      "settlement-type",
      "stops-trading-at",
      "market-time-instrument-collection",
      "days-to-expiration",
      "is-closing-only"
   ]
}

Fields:
Validators:
field active : bool [Required]
Validated by:
field days_to_expiration : int [Required] (alias 'days-to-expiration')
Validated by:
field exercise_style : str [Required] (alias 'exercise-style')
Validated by:
field expiration_date : date [Required] (alias 'expiration-date')
Validated by:
field expiration_type : str [Required] (alias 'expiration-type')
Validated by:
field expires_at : datetime | None = None (alias 'expires-at')
Validated by:
field halted_at : datetime | None = None (alias 'halted-at')
Validated by:
field is_closing_only : bool [Required] (alias 'is-closing-only')
Validated by:
field listed_market : str | None = None (alias 'listed-market')
Validated by:
field market_time_instrument_collection : str [Required] (alias 'market-time-instrument-collection')
Validated by:
field old_security_number : str | None = None (alias 'old-security-number')
Validated by:
field option_chain_type : str [Required] (alias 'option-chain-type')
Validated by:
field option_type : OptionType [Required] (alias 'option-type')
Validated by:
field root_symbol : str [Required] (alias 'root-symbol')
Validated by:
field settlement_type : str [Required] (alias 'settlement-type')
Validated by:
field shares_per_contract : int [Required] (alias 'shares-per-contract')
Validated by:
field stops_trading_at : datetime [Required] (alias 'stops-trading-at')
Validated by:
field streamer_symbol : str = '' (alias 'streamer-symbol')
Validated by:
field strike_price : Decimal [Required] (alias 'strike-price')
Validated by:
field underlying_symbol : str [Required] (alias 'underlying-symbol')
Validated by:
async classmethod get(session: Session, symbol: str) Self

Returns an Option object corresponding to the given symbol.

Parameters:
session: Session

the session to use for the request.

symbol: str

the OCC symbol to fetch.

classmethod occ_to_streamer_symbol(occ: str) str

Returns the dxfeed symbol for use in the streamer from the given OCC 2010 symbol.

Parameters:
occ: str

the OCC symbol to convert

classmethod streamer_symbol_to_occ(streamer_symbol: str) str

Returns the OCC 2010 symbol equivalent to the given streamer symbol.

Parameters:
streamer_symbol: str

the streamer symbol to convert

validator set_streamer_symbol  »  all fields
class tastytrade.instruments.OptionType(value)

Bases: StrEnum

Contains the valid types of options and their abbreviations in the API.

CALL = 'C'
PUT = 'P'
pydantic model tastytrade.instruments.QuantityDecimalPrecision(*, instrument_type: InstrumentType, value: int, minimum_increment_precision: int, symbol: str | None = None)

Bases: TastytradeData

Dataclass representing the decimal precision (number of places) for an instrument.

Show JSON schema
{
   "title": "QuantityDecimalPrecision",
   "description": "Dataclass representing the decimal precision (number of places) for an\ninstrument.",
   "type": "object",
   "properties": {
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "value": {
         "title": "Value",
         "type": "integer"
      },
      "minimum-increment-precision": {
         "title": "Minimum-Increment-Precision",
         "type": "integer"
      },
      "symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Symbol"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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": [
      "instrument-type",
      "value",
      "minimum-increment-precision"
   ]
}

Fields:
field instrument_type : InstrumentType [Required] (alias 'instrument-type')
field minimum_increment_precision : int [Required] (alias 'minimum-increment-precision')
field symbol : str | None = None
field value : int [Required]
pydantic model tastytrade.instruments.Roll(*, name: str, active_count: int, cash_settled: bool, business_days_offset: int, first_notice: bool)

Bases: TastytradeData

Dataclass representing a roll for a future.

Show JSON schema
{
   "title": "Roll",
   "description": "Dataclass representing a roll for a future.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "active-count": {
         "title": "Active-Count",
         "type": "integer"
      },
      "cash-settled": {
         "title": "Cash-Settled",
         "type": "boolean"
      },
      "business-days-offset": {
         "title": "Business-Days-Offset",
         "type": "integer"
      },
      "first-notice": {
         "title": "First-Notice",
         "type": "boolean"
      }
   },
   "required": [
      "name",
      "active-count",
      "cash-settled",
      "business-days-offset",
      "first-notice"
   ]
}

Fields:
field active_count : int [Required] (alias 'active-count')
field business_days_offset : int [Required] (alias 'business-days-offset')
field cash_settled : bool [Required] (alias 'cash-settled')
field first_notice : bool [Required] (alias 'first-notice')
field name : str [Required]
pydantic model tastytrade.instruments.Strike(*, strike_price: Decimal, call: str, put: str, call_streamer_symbol: str, put_streamer_symbol: str)

Bases: TastytradeData

Dataclass representing a specific strike in an options chain, containing the symbols for the call and put options.

Show JSON schema
{
   "title": "Strike",
   "description": "Dataclass representing a specific strike in an options chain, containing\nthe symbols for the call and put options.",
   "type": "object",
   "properties": {
      "strike-price": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Strike-Price"
      },
      "call": {
         "title": "Call",
         "type": "string"
      },
      "put": {
         "title": "Put",
         "type": "string"
      },
      "call-streamer-symbol": {
         "title": "Call-Streamer-Symbol",
         "type": "string"
      },
      "put-streamer-symbol": {
         "title": "Put-Streamer-Symbol",
         "type": "string"
      }
   },
   "required": [
      "strike-price",
      "call",
      "put",
      "call-streamer-symbol",
      "put-streamer-symbol"
   ]
}

Fields:
field call : str [Required]
field call_streamer_symbol : str [Required] (alias 'call-streamer-symbol')
field put : str [Required]
field put_streamer_symbol : str [Required] (alias 'put-streamer-symbol')
field strike_price : Decimal [Required] (alias 'strike-price')
pydantic model tastytrade.instruments.TickSize(*, value: Decimal, threshold: Decimal | None = None, symbol: str | None = None)

Bases: TastytradeData

Dataclass representing the tick size for an instrument.

Show JSON schema
{
   "title": "TickSize",
   "description": "Dataclass representing the tick size for an instrument.",
   "type": "object",
   "properties": {
      "value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            }
         ],
         "title": "Value"
      },
      "threshold": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Threshold"
      },
      "symbol": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Symbol"
      }
   },
   "required": [
      "value"
   ]
}

Fields:
field symbol : str | None = None
field threshold : Decimal | None = None
field value : Decimal [Required]
pydantic model tastytrade.instruments.Warrant(*, symbol: str, instrument_type: InstrumentType, listed_market: str, description: str, is_closing_only: bool, active: bool, cusip: str | None = None)

Bases: TastytradeData

Dataclass that represents a Tastytrade warrant object. Contains information about the warrant, and methods to get warrants.

Show JSON schema
{
   "title": "Warrant",
   "description": "Dataclass that represents a Tastytrade warrant object. Contains\ninformation about the warrant, and methods to get warrants.",
   "type": "object",
   "properties": {
      "symbol": {
         "title": "Symbol",
         "type": "string"
      },
      "instrument-type": {
         "$ref": "#/$defs/InstrumentType"
      },
      "listed-market": {
         "title": "Listed-Market",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "is-closing-only": {
         "title": "Is-Closing-Only",
         "type": "boolean"
      },
      "active": {
         "title": "Active",
         "type": "boolean"
      },
      "cusip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Cusip"
      }
   },
   "$defs": {
      "InstrumentType": {
         "description": "Contains the valid types of instruments and 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",
      "listed-market",
      "description",
      "is-closing-only",
      "active"
   ]
}

Fields:
field active : bool [Required]
field cusip : str | None = None
field description : str [Required]
field instrument_type : InstrumentType [Required] (alias 'instrument-type')
field is_closing_only : bool [Required] (alias 'is-closing-only')
field listed_market : str [Required] (alias 'listed-market')
field symbol : str [Required]
async classmethod get(session: Session, symbols: str) Self
async classmethod get(session: Session, symbols: Iterable[str] | None = None) list[Self]

Returns a list of Warrant objects from the given symbols, or a single Warrant object if a list is not provided.

Parameters:
session: Session

the session to use for the request.

symbols: str
symbols: Iterable[str] | None = None

symbol(s) of the warrants, e.g. ‘NKLAW’

async tastytrade.instruments.get_future_option_chain(session: Session, symbol: str) dict[date, list[FutureOption]]

Returns a mapping of expiration date to a list of futures options objects representing the options chain for the given symbol.

In the case that there are two expiries on the same day (e.g. EW and ES options), both will be returned in the same list. If you just want one expiry, you’ll need to filter the list yourself, or use NestedFutureOptionChain instead.

Parameters:
session: Session

the session to use for the request.

symbol: str

the symbol to get the option chain for.

async tastytrade.instruments.get_option_chain(session: Session, symbol: str) dict[date, list[Option]]

Returns a mapping of expiration date to a list of option objects representing the options chain for the given symbol.

In the case that there are two expiries on the same day (e.g. SPXW and SPX AM options), both will be returned in the same list. If you just want one expiry, you’ll need to filter the list yourself, or use NestedOptionChain instead.

Parameters:
session: Session

the session to use for the request.

symbol: str

the symbol to get the option chain for.

async tastytrade.instruments.get_quantity_decimal_precisions(session: Session) list[QuantityDecimalPrecision]

Returns a list of QuantityDecimalPrecision objects for different types of instruments.

Parameters:
session: Session

the session to use for the request.