QM_GetOptionChainActive: Retrieve Option Chain Data for a Symbol in Excel

The QM_GetOptionChainActive function enables you to quickly pull an active option chain for a specified symbol directly into Excel. With one simple formula, it fetches detailed quotes—with Greeks—so you can see real-time call and put option prices, volumes, and other essential metrics without leaving your spreadsheet.

Use this MarketXLS capability to analyze trading opportunities, evaluate potential option strategies, and gain a deeper understanding of the options market for any US stock symbol.

Why Use This Function?

  • Streamlines your workflow: Retrieve live option chain data directly into Excel, avoiding manual copy/paste from external sources.
  • Comprehensive details: Includes option prices, Greeks, volume, open interest, and more all at once.
  • Real-time updates: Get near real-time market data (subject to your data subscription) for accurate trading analysis.
  • Saves time: Perfect for quickly screening multiple strikes and expirations in a single step.
  • Ease of use: A single function call automatically arranges the information below your active cell in Excel.

How to Use in Excel

=QM_GetOptionChainActive("AAPL")
  1. Click any empty cell in Excel.
  2. Type =QM_GetOptionChainActive("SYMBOL"), replacing SYMBOL with your desired ticker (e.g., "AAPL").
  3. Press Enter, and MarketXLS will insert the option chain data, with each row containing detailed metrics for an option contract.

The function prints the data starting from the active cell, places headers in the row below, and then populates subsequent rows with real-time values.

Parameters Explained

Parameter Description Example Values Notes
Symbol The ticker symbol for which you want to retrieve the option chain. "MSFT" Required. You must have a valid data subscription for the given symbol.

• By default, the function requests the option chain with live Greeks, excludes expired options, and filters out zero-volume contracts.
• The function prints data directly to your sheet—there is no single-cell return value.

Note: Internally, MarketXLS calls mechanics such as “greeks=True,” “inclExpired=No,” and “inclZeroVol=False.” These are not settable from the standard Excel syntax shown here, but they can be adjusted in advanced scenarios if you customize the underlying VBA code or integrate with MarketXLS’s RequestListVBA function.

Example Usage

Basic Examples

  1. Retrieve option chain for Microsoft (MSFT):
    • In cell A1, type:
    =QM_GetOptionChainActive("MSFT")
    • Press Enter. Rows of calls and puts along with their last price, change, volume, and Greeks appear below A1.

  2. Retrieve option chain for Apple (AAPL):
    • In any empty cell, type:
    =QM_GetOptionChainActive("AAPL")
    • Press Enter. The data populates in columns and rows below that cell.

These examples demonstrate how easy it is to fetch current option data for a single ticker in just one line.

Advanced Scenarios

• Modifying Data Parameters: If you want to tweak parameters (e.g., to include expired options or filter by strike), you would need to adapt the VBA call in the RequestListVBA layer. By default, QM_GetOptionChainActive passes "inclExpired"="No" and "inclZeroVol"="False."
• Structured vs Unstructured Output: The code behind RequestListVBA supports a "structured" argument to output a more heavily formatted and combined call/put view. QM_GetOptionChainActive itself does not add "structured," but if you edit the underlying VBA call to include “structured,” MarketXLS will present calls and puts side by side in a more condensed data table.

Common Questions and Troubleshooting

• Q: Why am I getting "No Data Retrieved"?
A: Ensure you have a valid data subscription for the given symbol. Also verify there is actual option data for that ticker (some lower-volume securities might have minimal option listings).

• Q: The function overwrote existing cells. Can I undo this?
A: Because this VBA macro writes data directly to your active sheet, changes cannot always be undone with Ctrl+Z. Carefully select a blank area before calling the function.

• Q: How do I retrieve Greeks if my data plan doesn’t support them?
A: Ensure that your data subscription includes options and Greeks. If not, upgrade accordingly.

• Q: Can I schedule updates or refresh automatically?
A: Yes. MarketXLS can refresh data periodically. Check MarketXLS settings for auto-refresh intervals.

• Q: My function is returning an error about licensing.
A: QM_GetOptionChainActive requires a valid MarketXLS license and a configured QuoteMedia subscription. Verify both in Settings/Help.

This function makes it simple to fetch an entire option chain and its vital metrics for any ticker—perfect for active traders, analysts, and beginners alike. By centralizing your research in Excel, you can quickly compare multiple symbols, track changes in real time, and combine option data with other Excel formulas for deeper analytics.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Getoptionchainactive and Other Financial Formulas
How does MarketXLS work?