Skip to content

Contracts

FreeValueStandardPro

List all option contracts for a symbol on a given date.

Lists all contracts that were traded or quoted on a particular date.

If the symbol parameter is specified, the returned contracts will be filtered to match the symbol. Multiple symbols can be specified by separating them with commas such as symbol=AAPL,SPY,AMD This endpoint is updated real-time.

rust
pub fn option_list_contracts(
    &self,
    request_type: &str,
    symbol: &str,
    date: &str,
) -> OptionListContractsBuilder<'_>

Optional parameters chain on the builder: .max_dte(i32). Execute with .awaitResult<Vec<OptionContract>, Error>, or decode chunk-by-chunk with .stream(handler).

Example

rust
let rows = tdx.option_list_contracts("trade", "SPY", "20250303").await?;
for t in &rows {
    println!("symbol={} expiration={} strike={} right={}", t.symbol, t.expiration, t.strike, t.right);
}

Parameters

NameTypeRequiredDefaultDescription
request_typestringyesRequest type. Accepted values: trade, quote, eod, ohlc.
symbolstringyesTicker symbol (e.g. AAPL)
datedateyesDate YYYYMMDD
max_dteintnoMaximum days to expiration
timeout_msintnoPer-request deadline in milliseconds. 0 means no deadline.

Response

Rows of OptionContract:

FieldTypeDescription
symbolstringUnderlying symbol of the contract.
expirationi32Expiration date of the contract as a YYYYMMDD integer.
strikef64Strike price of the contract in dollars.
rightstringContract right: 'C' for a call, 'P' for a put.

Released under the Apache-2.0 License.