Skip to content

Trade Quote ​

FreeValueStandardPro

Fetch every option trade of one date, each paired with the NBBO quote at the time of the trade. The vendor keeps the most recent 7 calendar days.

Client
Auth
Style
from thetadatadx import Client

client = Client.from_env()

rows = client.market_data.option_flat_file_trade_quote(
    "",
)
for t in rows:
    print(t.ms_of_day, t.price, t.bid, t.ask)
Sample response · JSON
[
  {
    "ask": "0.29",
    "ask_condition": 50,
    "ask_exchange": 60,
    "ask_size": 51,
    "bid": "0.15",
    "bid_condition": 50,
    "bid_exchange": 65,
    "bid_size": 212,
    "condition": 18,
    "condition_flags": 0,
    "date": 20260803,
    "exchange": 76,
    "expiration": 20270319,
    "ext_condition1": 255,
    "ext_condition2": 255,
    "ext_condition3": 255,
    "ext_condition4": 255,
    "ms_of_day": 39481283,
    "ms_of_day2": 39481283,
    "price": "0.29",
    "price_flags": 7,
    "records_back": 0,
    "right": "C",
    "root": "AAPL",
    "sequence": -499850982,
    "size": 1,
    "strike": "540.0",
    "volume_type": 0
  },
  {
    "ask": "0.28",
    "ask_condition": 50,
    "ask_exchange": 4,
    "ask_size": 164,
    "bid": "0.21",
    "bid_condition": 50,
    "bid_exchange": 76,
    "bid_size": 9,
    "condition": 18,
    "condition_flags": 0,
    "date": 20260803,
    "exchange": 7,
    "expiration": 20270319,
    "ext_condition1": 255,
    "ext_condition2": 255,
    "ext_condition3": 255,
    "ext_condition4": 255,
    "ms_of_day": 39830528,
    "ms_of_day2": 39830528,
    "price": "0.24",
    "price_flags": 5,
    "records_back": 0,
    "right": "C",
    "root": "AAPL",
    "sequence": -463192089,
    "size": 3,
    "strike": "540.0",
    "volume_type": 0
  }
]

Parameters ​

NameTypeRequiredDefaultDescription
datedateyes-Date YYYYMMDD
timeout_msintno-Per-request deadline in milliseconds. 0 means no deadline.

Response ​

Rows of TradeQuoteTick:

FieldTypeDescription
ms_of_dayi32Milliseconds since midnight Eastern Time.
sequencei32Exchange-assigned trade sequence number.
ext_condition1i32Additional trade condition code.
ext_condition2i32Additional trade condition code.
ext_condition3i32Additional trade condition code.
ext_condition4i32Additional trade condition code.
conditioni32Trade condition code. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
sizei32Number of contracts or shares traded.
exchangei32Exchange code where the trade executed. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
pricef64Trade price.
condition_flagsi32Trade condition flags bitmap.
price_flagsi32Trade price flags bitmap.
volume_typei32Volume reporting mode, as sent. The vendor does not define this column.
records_backi32Offset of this record behind the most recent record.
quote_ms_of_dayi32Timestamp of the paired quote, milliseconds since midnight ET. The vendor names this column MS_OF_DAY2.
bid_sizei32Last NBBO bid size.
bid_exchangei32Exchange code of the NBBO bid. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
bidf64NBBO bid at the time of the trade.
bid_conditioni32Quote condition code on the bid side. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
ask_sizei32Last NBBO ask size.
ask_exchangei32Exchange code of the NBBO ask. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
askf64NBBO ask at the time of the trade.
ask_conditioni32Quote condition code on the ask side. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
datei32Trading date as a YYYYMMDD integer.

Every row carries expiration (YYYYMMDD), strike (dollars) and right ("C" / "P"); with the row's root, which the whole result carries per row, they identify the contract.

Released under the Apache-2.0 License.