tastytrade.dxfeed
For general dxfeed symbology, go to Formats, where you’ll find information on various kinds of formatting.
For options on futures symbology, go to CME Group and look at the ‘Specs’ section for the given futures symbol.
If you want to double-check you typed the symbol right, or want to troubleshoot a hanging request, go to dxfeed Symbol Lookup and type in the same symbol.
Event
- pydantic model tastytrade.dxfeed.event.Event(*, eventSymbol: str, eventTime: int)
Base class for dxfeed events received from the data streamer.
Show JSON schema
{ "title": "Event", "description": "Base class for dxfeed events received from the data streamer.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" } }, "required": [ "eventSymbol", "eventTime" ] }
- Fields:
- Validators:
change_nan_to_none»all fields
- field event_symbol: str [Required] (alias 'eventSymbol')
symbol of this event
- Validated by:
change_nan_to_none
- pydantic model tastytrade.dxfeed.event.IndexedEvent(*, eventSymbol: str, eventTime: int, eventFlags: int)
A dxfeed IndexedEvent with flags computed bitwise. For info see here.
Show JSON schema
{ "title": "IndexedEvent", "description": "A dxfeed `IndexedEvent` with flags computed bitwise.\nFor info see `here <https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/IndexedEvent.html>`_.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" } }, "required": [ "eventSymbol", "eventTime", "eventFlags" ] }
- Fields:
- Validators:
- field event_flags: int [Required] (alias 'eventFlags')
flags for the event
- Validated by:
change_nan_to_none
- property pending: bool
TX_PENDING is an indicator of pending transactional update. When txPending is true it means, that an ongoing transaction update that spans multiple events is in process. All events with txPending true shall be put into a separate pending list for each source id and should be processed later when an event for this source id with txPending false comes.
- property remove: bool
REMOVE_EVENT is used to indicate that that the event with the corresponding index has to be removed.
- property snapshot_begin: bool
SNAPSHOT_BEGIN is used to indicate when the loading of a snapshot starts. Snapshot load starts on new subscription and the first indexed event that arrives for each non-zero source id on new subscription may have snapshotBegin set to true. It means, that an ongoing snapshot consisting of multiple events is incoming. All events for this source id shall be put into a separate pending list for each source id.
- property snapshot_end: bool
SNAPSHOT_END or SNAPSHOT_SNIP are used to indicate the end of a snapshot. The last event of a snapshot is marked with either snapshotEnd or snapshotSnip. At this time, all events from a pending list for the corresponding source can be processed, unless txPending is also set to true. In the later case, the processing shall be further delayed due to ongoing transaction.
The difference between snapshotEnd and snapshotSnip is the following: snapshotEnd indicates that the data source had sent all the data pertaining to the subscription for the corresponding indexed event, while snapshotSnip indicates that some limit on the amount of data was reached and while there still might be more data available, it will not be provided.
- property snapshot_mode: bool
SNAPSHOT_MODE is used to instruct dxFeed to use snapshot mode. It is intended to be used only for publishing to activate (if not yet activated) snapshot mode. The difference from SNAPSHOT_BEGIN flag is that SNAPSHOT_MODE only switches on snapshot mode without starting snapshot synchronization protocol. When a snapshot is empty or consists of a single event, then the event can have both snapshotBegin and snapshotEnd or snapshotSnip flags. In case of an empty snapshot, removeEvent on this event is also set to true.
- property snapshot_snip: bool
SNAPSHOT_END or SNAPSHOT_SNIP are used to indicate the end of a snapshot. The last event of a snapshot is marked with either snapshotEnd or snapshotSnip. At this time, all events from a pending list for the corresponding source can be processed, unless txPending is also set to true. In the later case, the processing shall be further delayed due to ongoing transaction.
The difference between snapshotEnd and snapshotSnip is the following: snapshotEnd indicates that the data source had sent all the data pertaining to the subscription for the corresponding indexed event, while snapshotSnip indicates that some limit on the amount of data was reached and while there still might be more data available, it will not be provided.
Candle
- pydantic model tastytrade.dxfeed.candle.Candle(*, eventSymbol: str, eventTime: int, eventFlags: int, index: int, time: int, sequence: int, count: int, volume: Decimal | None = None, vwap: Decimal | None = None, bidVolume: Decimal | None = None, askVolume: Decimal | None = None, impVolatility: Decimal | None = None, openInterest: int | None = None, open: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)], high: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)], low: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)], close: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)])
Bases:
IndexedEventA Candle event with open, high, low, close prices and other information for a specific period. Candles are build with a specified period using a specified price type with data taken from a specified exchange.
Show JSON schema
{ "title": "Candle", "description": "A Candle event with open, high, low, close prices and other information\nfor a specific period. Candles are build with a specified period using a\nspecified price type with data taken from a specified exchange.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" }, "index": { "title": "Index", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "count": { "title": "Count", "type": "integer" }, "volume": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Volume" }, "vwap": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Vwap" }, "bidVolume": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Bidvolume" }, "askVolume": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Askvolume" }, "impVolatility": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Impvolatility" }, "openInterest": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Openinterest" }, "open": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Open" }, "high": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "High" }, "low": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Low" }, "close": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Close" } }, "required": [ "eventSymbol", "eventTime", "eventFlags", "index", "time", "sequence", "count", "open", "high", "low", "close" ] }
- Fields:
- Validators:
- field ask_volume: Decimal | None = None (alias 'askVolume')
ask volume in the candle
- Validated by:
change_nan_to_none
- field bid_volume: Decimal | None = None (alias 'bidVolume')
bid volume in the candle
- Validated by:
change_nan_to_none
- field close: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)] [Required]
the last (close) price of the candle
- Constraints:
func = <function zero_from_none at 0x7f8c35dc8a60>
json_schema_input_type = PydanticUndefined
- Validated by:
change_nan_to_none
- field high: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)] [Required]
the maximal (high) price of the candle
- Constraints:
func = <function zero_from_none at 0x7f8c35dc8a60>
json_schema_input_type = PydanticUndefined
- Validated by:
change_nan_to_none
- field imp_volatility: Decimal | None = None (alias 'impVolatility')
implied volatility in the candle
- Validated by:
change_nan_to_none
- field index: int [Required]
unique per-symbol index of this candle event
- Validated by:
change_nan_to_none
- field low: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)] [Required]
the minimal (low) price of the candle
- Constraints:
func = <function zero_from_none at 0x7f8c35dc8a60>
json_schema_input_type = PydanticUndefined
- Validated by:
change_nan_to_none
- field open: Annotated[Decimal, WrapValidator(func=zero_from_none, json_schema_input_type=PydanticUndefined)] [Required]
the first (open) price of the candle
- Constraints:
func = <function zero_from_none at 0x7f8c35dc8a60>
json_schema_input_type = PydanticUndefined
- Validated by:
change_nan_to_none
- field open_interest: int | None = None (alias 'openInterest')
open interest in the candle
- Validated by:
change_nan_to_none
- field time: int [Required]
timestamp of the candle in milliseconds
- Validated by:
change_nan_to_none
Greeks
- pydantic model tastytrade.dxfeed.greeks.Greeks(*, eventSymbol: str, eventTime: int, eventFlags: int, index: int, time: int, sequence: int, price: Decimal, volatility: Decimal, delta: Decimal, gamma: Decimal, theta: Decimal, rho: Decimal, vega: Decimal)
Bases:
IndexedEventGreek ratios, or simply Greeks, are differential values that show how the price of an option depends on other market parameters: on the price of the underlying asset, its volatility, etc. Greeks are used to assess the risks of customer portfolios. Greeks are derivatives of the value of securities in different axes. If a derivative is very far from zero, then the portfolio has a risky sensitivity in this parameter.
Show JSON schema
{ "title": "Greeks", "description": "Greek ratios, or simply Greeks, are differential values that show how the\nprice of an option depends on other market parameters: on the price of the\nunderlying asset, its volatility, etc. Greeks are used to assess the risks\nof customer portfolios. Greeks are derivatives of the value of securities\nin different axes. If a derivative is very far from zero, then the\nportfolio has a risky sensitivity in this parameter.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" }, "index": { "title": "Index", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "volatility": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Volatility" }, "delta": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Delta" }, "gamma": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Gamma" }, "theta": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Theta" }, "rho": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Rho" }, "vega": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Vega" } }, "required": [ "eventSymbol", "eventTime", "eventFlags", "index", "time", "sequence", "price", "volatility", "delta", "gamma", "theta", "rho", "vega" ] }
- Fields:
- Validators:
- field sequence: int [Required]
sequence number to distinguish events that have the same time
- Validated by:
change_nan_to_none
Profile
- pydantic model tastytrade.dxfeed.profile.Profile(*, eventSymbol: str, eventTime: int, description: str, shortSaleRestriction: str, tradingStatus: str, haltStartTime: int, haltEndTime: int, exDividendDayId: int, statusReason: str | None = None, high52WeekPrice: Decimal | None = None, low52WeekPrice: Decimal | None = None, beta: Decimal | None = None, shares: Decimal | None = None, highLimitPrice: Decimal | None = None, lowLimitPrice: Decimal | None = None, earningsPerShare: Decimal | None = None, exDividendAmount: Decimal | None = None, dividendFrequency: Decimal | None = None, freeFloat: Decimal | None = None)
Bases:
EventA Profile event provides the security instrument description. It represents the most recent information that is available about the traded security on the market at any given moment of time.
Show JSON schema
{ "title": "Profile", "description": "A Profile event provides the security instrument description. It\nrepresents the most recent information that is available about the\ntraded security on the market at any given moment of time.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "description": { "title": "Description", "type": "string" }, "shortSaleRestriction": { "title": "Shortsalerestriction", "type": "string" }, "tradingStatus": { "title": "Tradingstatus", "type": "string" }, "haltStartTime": { "title": "Haltstarttime", "type": "integer" }, "haltEndTime": { "title": "Haltendtime", "type": "integer" }, "exDividendDayId": { "title": "Exdividenddayid", "type": "integer" }, "statusReason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Statusreason" }, "high52WeekPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "High52Weekprice" }, "low52WeekPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Low52Weekprice" }, "beta": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Beta" }, "shares": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Shares" }, "highLimitPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Highlimitprice" }, "lowLimitPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Lowlimitprice" }, "earningsPerShare": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Earningspershare" }, "exDividendAmount": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Exdividendamount" }, "dividendFrequency": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dividendfrequency" }, "freeFloat": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Freefloat" } }, "required": [ "eventSymbol", "eventTime", "description", "shortSaleRestriction", "tradingStatus", "haltStartTime", "haltEndTime", "exDividendDayId" ] }
- Fields:
- Validators:
- field beta: Decimal | None = None
the correlation coefficient of the instrument to the S&P500 index
- Validated by:
change_nan_to_none
- field description: str [Required]
description of the security instrument
- Validated by:
change_nan_to_none
- field dividend_frequency: Decimal | None = None (alias 'dividendFrequency')
frequency of cash dividends payments per year (calculated)
- Validated by:
change_nan_to_none
earnings per share
- Validated by:
change_nan_to_none
- field ex_dividend_amount: Decimal | None = None (alias 'exDividendAmount')
the amount of the last paid dividend
- Validated by:
change_nan_to_none
- field ex_dividend_day_id: int [Required] (alias 'exDividendDayId')
identifier of the ex-dividend date
- Validated by:
change_nan_to_none
- field free_float: Decimal | None = None (alias 'freeFloat')
the number of shares that are available to the public for trade
- Validated by:
change_nan_to_none
- field halt_end_time: int [Required] (alias 'haltEndTime')
ending time of the trading halt interval
- Validated by:
change_nan_to_none
- field halt_start_time: int [Required] (alias 'haltStartTime')
starting time of the trading halt interval
- Validated by:
change_nan_to_none
- field high_52_week_price: Decimal | None = None (alias 'high52WeekPrice')
maximal (high) price in last 52 weeks
- Validated by:
change_nan_to_none
- field high_limit_price: Decimal | None = None (alias 'highLimitPrice')
maximal (high) allowed price
- Validated by:
change_nan_to_none
- field low_52_week_price: Decimal | None = None (alias 'low52WeekPrice')
minimal (low) price in last 52 weeks
- Validated by:
change_nan_to_none
- field low_limit_price: Decimal | None = None (alias 'lowLimitPrice')
minimal (low) allowed price
- Validated by:
change_nan_to_none
shares outstanding
- Validated by:
change_nan_to_none
- field short_sale_restriction: str [Required] (alias 'shortSaleRestriction')
short sale restriction of the security instrument possible values are ACTIVE | INACTIVE | UNDEFINED
- Validated by:
change_nan_to_none
Quote
- pydantic model tastytrade.dxfeed.quote.Quote(*, eventSymbol: str, eventTime: int, sequence: int, timeNanoPart: int, bidTime: int, bidExchangeCode: str, askTime: int, askExchangeCode: str, bidPrice: Decimal, askPrice: Decimal, bidSize: Decimal | None = None, askSize: Decimal | None = None)
Bases:
EventA Quote event is a snapshot of the best bid and ask prices, and other fields that change with each quote.
Show JSON schema
{ "title": "Quote", "description": "A Quote event is a snapshot of the best bid and ask prices, and other\nfields that change with each quote.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "timeNanoPart": { "title": "Timenanopart", "type": "integer" }, "bidTime": { "title": "Bidtime", "type": "integer" }, "bidExchangeCode": { "title": "Bidexchangecode", "type": "string" }, "askTime": { "title": "Asktime", "type": "integer" }, "askExchangeCode": { "title": "Askexchangecode", "type": "string" }, "bidPrice": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Bidprice" }, "askPrice": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Askprice" }, "bidSize": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Bidsize" }, "askSize": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Asksize" } }, "required": [ "eventSymbol", "eventTime", "sequence", "timeNanoPart", "bidTime", "bidExchangeCode", "askTime", "askExchangeCode", "bidPrice", "askPrice" ] }
- Fields:
- Validators:
- field ask_exchange_code: str [Required] (alias 'askExchangeCode')
ask exchange code
- Validated by:
change_nan_to_none
- field ask_size: Decimal | None = None (alias 'askSize')
ask size as integer number (rounded toward zero) or decimal for cryptocurrencies
- Validated by:
change_nan_to_none
- field ask_time: int [Required] (alias 'askTime')
time of the last ask change
- Validated by:
change_nan_to_none
- field bid_exchange_code: str [Required] (alias 'bidExchangeCode')
bid exchange code
- Validated by:
change_nan_to_none
- field bid_size: Decimal | None = None (alias 'bidSize')
bid size as integer number (rounded toward zero) or decimal for cryptocurrencies
- Validated by:
change_nan_to_none
Summary
- pydantic model tastytrade.dxfeed.summary.Summary(*, eventSymbol: str, eventTime: int, dayId: int, dayClosePriceType: str, prevDayId: int, prevDayClosePriceType: str, openInterest: int, dayOpenPrice: Decimal | None = None, dayHighPrice: Decimal | None = None, dayLowPrice: Decimal | None = None, dayClosePrice: Decimal | None = None, prevDayClosePrice: Decimal | None = None, prevDayVolume: Decimal | None = None)
Bases:
EventSummary is an information snapshot about the trading session including session highs, lows, etc. This record has two goals: Transmit OHLC values, and provide data for charting. OHLC is required for a daily chart, and if an exchange does not provide it, the charting services refer to the Summary event.
Before opening the bidding, the values are reset to N/A or NaN.
Show JSON schema
{ "title": "Summary", "description": "Summary is an information snapshot about the trading session including\nsession highs, lows, etc. This record has two goals: Transmit OHLC\nvalues, and provide data for charting. OHLC is required for a daily chart,\nand if an exchange does not provide it, the charting services refer to the\nSummary event.\n\nBefore opening the bidding, the values are reset to N/A or NaN.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "dayId": { "title": "Dayid", "type": "integer" }, "dayClosePriceType": { "title": "Dayclosepricetype", "type": "string" }, "prevDayId": { "title": "Prevdayid", "type": "integer" }, "prevDayClosePriceType": { "title": "Prevdayclosepricetype", "type": "string" }, "openInterest": { "title": "Openinterest", "type": "integer" }, "dayOpenPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dayopenprice" }, "dayHighPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dayhighprice" }, "dayLowPrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Daylowprice" }, "dayClosePrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Daycloseprice" }, "prevDayClosePrice": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prevdaycloseprice" }, "prevDayVolume": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Prevdayvolume" } }, "required": [ "eventSymbol", "eventTime", "dayId", "dayClosePriceType", "prevDayId", "prevDayClosePriceType", "openInterest" ] }
- Fields:
- Validators:
- field day_close_price: Decimal | None = None (alias 'dayClosePrice')
the last (close) price for the day
- Validated by:
change_nan_to_none
- field day_close_price_type: str [Required] (alias 'dayClosePriceType')
the price type of the last (close) price for the day possible values are FINAL | INDICATIVE | PRELIMINARY | REGULAR
- Validated by:
change_nan_to_none
- field day_high_price: Decimal | None = None (alias 'dayHighPrice')
the maximal (high) price for the day
- Validated by:
change_nan_to_none
- field day_id: int [Required] (alias 'dayId')
identifier of the day that this summary represents
- Validated by:
change_nan_to_none
- field day_low_price: Decimal | None = None (alias 'dayLowPrice')
the minimal (low) price for the day
- Validated by:
change_nan_to_none
- field day_open_price: Decimal | None = None (alias 'dayOpenPrice')
the first (open) price for the day
- Validated by:
change_nan_to_none
- field open_interest: int [Required] (alias 'openInterest')
open interest of the symbol as the number of open contracts
- Validated by:
change_nan_to_none
- field prev_day_close_price: Decimal | None = None (alias 'prevDayClosePrice')
the last (close) price for the previous day
- Validated by:
change_nan_to_none
- field prev_day_close_price_type: str [Required] (alias 'prevDayClosePriceType')
the price type of the last (close) price for the previous day possible values are FINAL | INDICATIVE | PRELIMINARY | REGULAR
- Validated by:
change_nan_to_none
TimeAndSale
- pydantic model tastytrade.dxfeed.timeandsale.TimeAndSale(*, eventSymbol: str, eventTime: int, eventFlags: int, index: int, time: int, timeNanoPart: int, sequence: int, exchangeCode: str, price: Decimal, size: int, bidPrice: Decimal, askPrice: Decimal, exchangeSaleConditions: str, tradeThroughExempt: str, aggressorSide: str, spreadLeg: bool, extendedTradingHours: bool, validTick: bool, type: str, buyer: None, seller: None)
Bases:
IndexedEventTimeAndSale event represents a trade or other market event with a price, like market open/close price. TimeAndSale events are intended to provide information about trades in a continuous-time slice (unlike Trade events which are supposed to provide snapshots about the most recent trade). TimeAndSale events have a unique index that can be used for later correction/cancellation processing.
Show JSON schema
{ "title": "TimeAndSale", "description": "TimeAndSale event represents a trade or other market event with a price,\nlike market open/close price. TimeAndSale events are intended to provide\ninformation about trades in a continuous-time slice (unlike Trade events\nwhich are supposed to provide snapshots about the most recent trade).\nTimeAndSale events have a unique index that can be used for later\ncorrection/cancellation processing.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" }, "index": { "title": "Index", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "timeNanoPart": { "title": "Timenanopart", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "exchangeCode": { "title": "Exchangecode", "type": "string" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "size": { "title": "Size", "type": "integer" }, "bidPrice": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Bidprice" }, "askPrice": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Askprice" }, "exchangeSaleConditions": { "title": "Exchangesaleconditions", "type": "string" }, "tradeThroughExempt": { "title": "Tradethroughexempt", "type": "string" }, "aggressorSide": { "title": "Aggressorside", "type": "string" }, "spreadLeg": { "title": "Spreadleg", "type": "boolean" }, "extendedTradingHours": { "title": "Extendedtradinghours", "type": "boolean" }, "validTick": { "title": "Validtick", "type": "boolean" }, "type": { "title": "Type", "type": "string" }, "buyer": { "title": "Buyer", "type": "null" }, "seller": { "title": "Seller", "type": "null" } }, "required": [ "eventSymbol", "eventTime", "eventFlags", "index", "time", "timeNanoPart", "sequence", "exchangeCode", "price", "size", "bidPrice", "askPrice", "exchangeSaleConditions", "tradeThroughExempt", "aggressorSide", "spreadLeg", "extendedTradingHours", "validTick", "type", "buyer", "seller" ] }
- Fields:
- Validators:
- field aggressor_side: str [Required] (alias 'aggressorSide')
initiator of the trade
- Validated by:
change_nan_to_none
- field ask_price: Decimal [Required] (alias 'askPrice')
the ask price on the market when this time and sale event occured
- Validated by:
change_nan_to_none
- field bid_price: Decimal [Required] (alias 'bidPrice')
the bid price on the market when this time and sale event occured
- Validated by:
change_nan_to_none
- field exchange_code: str [Required] (alias 'exchangeCode')
exchange code of this time and sale event
- Validated by:
change_nan_to_none
- field exchange_sale_conditions: str [Required] (alias 'exchangeSaleConditions')
sale conditions provided for this event by data feed
- Validated by:
change_nan_to_none
- field extended_trading_hours: bool [Required] (alias 'extendedTradingHours')
whether this transaction is completed during extended trading hours
- Validated by:
change_nan_to_none
- field index: int [Required]
unique per-symbol index of this time and sale event
- Validated by:
change_nan_to_none
- field size: int [Required]
size of this time and sale event as integer number (rounded toward zero)
- Validated by:
change_nan_to_none
- field spread_leg: bool [Required] (alias 'spreadLeg')
whether this transaction is a part of a multi-leg order
- Validated by:
change_nan_to_none
- field time_nano_part: int [Required] (alias 'timeNanoPart')
microseconds and nanoseconds part of time of the last bid or ask change
- Validated by:
change_nan_to_none
- field trade_through_exempt: str [Required] (alias 'tradeThroughExempt')
transaction is concluded by exempting from compliance with some rule
- Validated by:
change_nan_to_none
TheoPrice
- pydantic model tastytrade.dxfeed.theoprice.TheoPrice(*, eventSymbol: str, eventTime: int, eventFlags: int, index: int, time: int, sequence: int, price: Decimal, underlyingPrice: Decimal, delta: Decimal, gamma: Decimal, dividend: Decimal, interest: Decimal)
Bases:
IndexedEventTheo price is a snapshot of the theoretical option price computation that is periodically performed by dxPrice model-free computation. dxFeed does not send recalculations for all options at the same time, so we provide you with a formula so you can perform calculations based on values from this event.
Show JSON schema
{ "title": "TheoPrice", "description": "Theo price is a snapshot of the theoretical option price computation that\nis periodically performed by dxPrice model-free computation. dxFeed does\nnot send recalculations for all options at the same time, so we provide\nyou with a formula so you can perform calculations based on values from\nthis event.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" }, "index": { "title": "Index", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "underlyingPrice": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Underlyingprice" }, "delta": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Delta" }, "gamma": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Gamma" }, "dividend": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Dividend" }, "interest": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Interest" } }, "required": [ "eventSymbol", "eventTime", "eventFlags", "index", "time", "sequence", "price", "underlyingPrice", "delta", "gamma", "dividend", "interest" ] }
- Fields:
- Validators:
- field dividend: Decimal [Required]
implied simple dividend return of the corresponding option series
- Validated by:
change_nan_to_none
- field interest: Decimal [Required]
implied simple interest return of the corresponding option series
- Validated by:
change_nan_to_none
- field sequence: int [Required]
sequence number to distinguish events that have the same time
- Validated by:
change_nan_to_none
Trade
- pydantic model tastytrade.dxfeed.trade.Trade(*, eventSymbol: str, eventTime: int, time: int, timeNanoPart: int, sequence: int, exchangeCode: str, dayId: int, tickDirection: str, extendedTradingHours: bool, price: Decimal, change: Decimal | None = None, size: int | None = None, dayVolume: int | None = None, dayTurnover: Decimal | None = None)
Bases:
EventA Trade event provides prices and the volume of the last transaction in regular trading hours, as well as the total amount per day in the number of securities and in their value. This event does not contain information about all transactions, but only about the last transaction for a single instrument.
Show JSON schema
{ "title": "Trade", "description": "A Trade event provides prices and the volume of the last transaction in\nregular trading hours, as well as the total amount per day in the number\nof securities and in their value. This event does not contain information\nabout all transactions, but only about the last transaction for a single\ninstrument.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "timeNanoPart": { "title": "Timenanopart", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "exchangeCode": { "title": "Exchangecode", "type": "string" }, "dayId": { "title": "Dayid", "type": "integer" }, "tickDirection": { "title": "Tickdirection", "type": "string" }, "extendedTradingHours": { "title": "Extendedtradinghours", "type": "boolean" }, "price": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Price" }, "change": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Change" }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Size" }, "dayVolume": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Dayvolume" }, "dayTurnover": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Dayturnover" } }, "required": [ "eventSymbol", "eventTime", "time", "timeNanoPart", "sequence", "exchangeCode", "dayId", "tickDirection", "extendedTradingHours", "price" ] }
- Fields:
- Validators:
- field day_id: int [Required] (alias 'dayId')
identifier of the current trading day
- Validated by:
change_nan_to_none
- field day_turnover: Decimal | None = None (alias 'dayTurnover')
total turnover traded for a day
- Validated by:
change_nan_to_none
- field day_volume: int | None = None (alias 'dayVolume')
total vlume traded for a day as integer number (rounded toward zero)
- Validated by:
change_nan_to_none
- field exchange_code: str [Required] (alias 'exchangeCode')
exchange code of the last trade
- Validated by:
change_nan_to_none
- field extended_trading_hours: bool [Required] (alias 'extendedTradingHours')
whether the last trade was in extended trading hours
- Validated by:
change_nan_to_none
- field size: int | None = None
size of the last trade as integer number (rounded toward zero)
- Validated by:
change_nan_to_none
Underlying
- pydantic model tastytrade.dxfeed.underlying.Underlying(*, eventSymbol: str, eventTime: int, eventFlags: int, index: int, time: int, sequence: int, volatility: Decimal, frontVolatility: Decimal, backVolatility: Decimal, callVolume: int, putVolume: int, optionVolume: int, putCallRatio: Decimal)
Bases:
IndexedEventUnderlying event is a snapshot of computed values that are available for an option underlying symbol based on the option prices on the market. It represents the most recent information that is available about the corresponding values on the market at any given moment of time.
Show JSON schema
{ "title": "Underlying", "description": "Underlying event is a snapshot of computed values that are available for\nan option underlying symbol based on the option prices on the market. It\nrepresents the most recent information that is available about the\ncorresponding values on the market at any given moment of time.", "type": "object", "properties": { "eventSymbol": { "title": "Eventsymbol", "type": "string" }, "eventTime": { "title": "Eventtime", "type": "integer" }, "eventFlags": { "title": "Eventflags", "type": "integer" }, "index": { "title": "Index", "type": "integer" }, "time": { "title": "Time", "type": "integer" }, "sequence": { "title": "Sequence", "type": "integer" }, "volatility": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Volatility" }, "frontVolatility": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Frontvolatility" }, "backVolatility": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Backvolatility" }, "callVolume": { "title": "Callvolume", "type": "integer" }, "putVolume": { "title": "Putvolume", "type": "integer" }, "optionVolume": { "title": "Optionvolume", "type": "integer" }, "putCallRatio": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "title": "Putcallratio" } }, "required": [ "eventSymbol", "eventTime", "eventFlags", "index", "time", "sequence", "volatility", "frontVolatility", "backVolatility", "callVolume", "putVolume", "optionVolume", "putCallRatio" ] }
- Fields:
- Validators:
- field back_volatility: Decimal [Required] (alias 'backVolatility')
back month implied volatility for the underlying using VIX methodology
- Validated by:
change_nan_to_none
- field call_volume: int [Required] (alias 'callVolume')
call options traded volume for a day
- Validated by:
change_nan_to_none
- field front_volatility: Decimal [Required] (alias 'frontVolatility')
front month implied volatility for the underlying using VIX methodology
- Validated by:
change_nan_to_none
- field option_volume: int [Required] (alias 'optionVolume')
options traded volume for a day
- Validated by:
change_nan_to_none
- field put_call_ratio: Decimal [Required] (alias 'putCallRatio')
ratio of put options volume to call options volume for a day
- Validated by:
change_nan_to_none
- field put_volume: int [Required] (alias 'putVolume')
put options traded volume for a day
- Validated by:
change_nan_to_none
- field sequence: int [Required]
sequence number of this event to distinguish events with the same time
- Validated by:
change_nan_to_none