Skip to content

Expirations

FreeValueStandardPro

List available expiration dates for an option underlying.

Lists all dates of expirations that are available for an option with a given symbol. This endpoint is updated overnight.

rust
pub fn option_list_expirations(&self, symbol: &str) -> OptionListExpirationsBuilder<'_>

Execute with .awaitResult<Vec<String>, Error>.

Example

rust
let rows = tdx.option_list_expirations("SPY").await?;
for value in &rows {
    println!("{value}");
}

Parameters

NameTypeRequiredDefaultDescription
symbolstringyesTicker symbol (e.g. AAPL)
timeout_msintnoPer-request deadline in milliseconds. 0 means no deadline.

Response

A list of strings — one expiration value per row.

Released under the Apache-2.0 License.