Skip to content

option_history_quote

FreeValueStandardPro

Retrieve NBBO quotes for an option contract, sampled at a specified interval.

Code Example

rust
let quotes: Vec<QuoteTick> = tdx.option_history_quote(
    "SPY", "20241220", "500000", "C", "20240315", "60000"
).await?;
python
quotes = tdx.option_history_quote("SPY", "20241220", "500000", "C",
                                     "20240315", "60000")
go
quotes, err := client.OptionHistoryQuote("SPY", "20241220", "500000", "C",
    "20240315", "60000")
cpp
auto quotes = client.option_history_quote("SPY", "20241220", "500000", "C",
                                           "20240315", "60000");

Parameters

symbolstringrequired
Underlying symbol
expirationstringrequired
Expiration date in YYYYMMDD format
strikestringrequired
Strike price as scaled integer
rightstringrequired
"C" for call, "P" for put
datestringrequired
Date in YYYYMMDD format
intervalstringrequired
Sampling interval in milliseconds. Use "0" for every quote change.
max_dteintoptional
Maximum days to expiration
strike_rangeintoptional
Strike range filter

Response

bid_pricefloat
Best bid price
bid_sizeint
Bid size
ask_pricefloat
Best ask price
ask_sizeint
Ask size
datestring
Date
ms_of_dayint
Milliseconds from midnight
bid_exchangeint
Bid exchange code
ask_exchangeint
Ask exchange code

Notes

  • Use "0" as the interval to get every quote change (tick-by-tick).
  • For liquid contracts with "0" interval, the response can be very large. In Rust, use the _stream variant.

Released under the GPL-3.0-or-later License.