options

suspend fun options(symbol: String, expirationDate: Long? = null): OptionsData(source)

Fetches options chain data from the Yahoo Finance Options API.

Return

OptionsData containing options chain with calls, puts, and underlying quote information

Parameters

symbol

The stock symbol to query (e.g., "AAPL", "TSLA")

expirationDate

Optional expiration date as Unix timestamp in seconds. If null, returns the nearest expiration date.

Throws

If the API call fails or returns an error response