Skip to main content

Option Quotes

Get current or historical end-of-day quotes for one or more options contracts.

Making Requests

Use the quotes() method on the options resource to fetch option quotes:

Output FormatReturn TypeDescription
JSONQuotesReturns a Quotes object containing option quote data (default).
CSVQuotesReturns a Quotes object with CSV data accessible via getCsv().
HTMLQuotesReturns a Quotes object with HTML data accessible via getHtml().
HTML Not Yet Available

Format::HTML is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API.

quotes

public function quotes(
string|array $option_symbols,
?string $date = null,
?string $from = null,
?string $to = null,
?Parameters $parameters = null
): Quotes

Get current or historical end-of-day quotes for one or more options contracts. When multiple symbols are provided, requests are made concurrently using a sliding window of up to 50 concurrent requests.

Parameters

  • option_symbols (string|array)

    The OCC-formatted option symbol(s). Can be a single string or an array of strings for multiple symbols. Use option_chain() or lookup() to find OCC symbols.

  • date (string, optional)

    Look up a historical end-of-day quote from a specific trading day. If omitted, returns the current quote during market hours or last trading day's quote when closed.

  • from (string, optional)

    Return a series of end-of-day quotes starting from this date (inclusive).

  • to (string, optional)

    Return a series of end-of-day quotes ending at this date (exclusive).

  • parameters (Parameters, optional)

    Universal parameters for customizing the output format.

Returns

  • Quotes

    A Quotes response object containing the option quote data.

Notes

  • For multiple symbols, the SDK uses concurrent requests for optimal throughput.
  • Failed requests for individual symbols are tolerated - the response includes data from successful requests.
<?php

use MarketDataApp\Client;

$client = new Client();

// Get quote for a single option
$quotes = $client->options->quotes('AAPL250117C00200000');

foreach ($quotes->quotes as $quote) {
echo "Symbol: " . $quote->option_symbol . "\n";
echo "Underlying: " . $quote->underlying . "\n";
echo "Strike: $" . $quote->strike . "\n";
echo "Expiration: " . $quote->expiration->format('Y-m-d') . "\n";
echo "Bid: $" . $quote->bid . " x " . $quote->bid_size . "\n";
echo "Ask: $" . $quote->ask . " x " . $quote->ask_size . "\n";
echo "Last: $" . $quote->last . "\n";
echo "Volume: " . number_format($quote->volume) . "\n";
echo "Open Interest: " . number_format($quote->open_interest) . "\n";
}

Output

Symbol: AAPL250117C00200000
Underlying: AAPL
Strike: $200
Expiration: 2025-01-17
Bid: $5.80 x 45
Ask: $5.95 x 30
Last: $5.85
Volume: 1,234
Open Interest: 15,678

Quotes

class Quotes extends ResponseBase
{
public string $status;
public array $quotes;
public ?Carbon $next_time;
public ?Carbon $prev_time;
public array $errors;
}

Represents option quote data for one or more contracts.

Properties

  • status (string): Response status ("ok" or "no_data").
  • quotes (array): Array of option quotes, each containing:
    • option_symbol (string): OCC-formatted option symbol
    • underlying (string): Underlying ticker symbol
    • expiration (Carbon): Expiration date
    • side (string): "call" or "put"
    • strike (float): Strike price
    • bid (float): Bid price
    • bid_size (int): Bid size
    • ask (float): Ask price
    • ask_size (int): Ask size
    • mid (float): Midpoint price
    • last (float): Last trade price
    • volume (int): Daily volume
    • open_interest (int): Open interest
    • delta (float|null): Delta greek
    • gamma (float|null): Gamma greek
    • theta (float|null): Theta greek
    • vega (float|null): Vega greek
    • iv (float|null): Implied volatility
    • updated (Carbon): Last update timestamp
  • next_time (Carbon|null): Next available data time (when status is no_data).
  • prev_time (Carbon|null): Previous available data time (when status is no_data).
  • errors (array): Map of symbol => error message for failed requests (multi-symbol only).

Methods

  • getCsv(): Returns the raw CSV data (when using Format::CSV).
  • getHtml(): Returns the raw HTML data (when using Format::HTML).
  • isJson(): Returns true if the response contains JSON data.