image

An option chain is a comprehensive matrix of available options contracts for a specific underlying security, categorized by expiration date and listed by strike price. Whether building a trading interface, analyzing market sentiment, or calculating liquidity, developers rely on this data to display calls and puts alongside real-time pricing.

This guide details how to retrieve option chains using the Mboum API, specifically comparing the v2 and v3 endpoints to help you select the appropriate method for your infrastructure.

You can obtain your API key here:
https://mboum.com/pages/api


Understanding the Versions (v2 vs. v3)

The Mboum API provides two distinct versions for accessing options data. Selecting the correct version depends on whether you need a full nested structure or optimized specific queries.


The v2 Options Endpoint

The v2 endpoint is the standard method for retrieving options data. It is typically structured to return a list of available expiration dates or the full chain for the nearest expiration if no specific date is provided. This structure is essential for applications that need to first index all valid dates before querying specific contracts.

Documentation:
https://docs.mboum.com/#stocks-options-GETapi-v2-markets-options


The v3 Options Endpoint

The v3 endpoint represents an iteration designed for more specific or streamlined data retrieval. It often handles data depth differently, allowing for more direct access to contract details or optimized payloads for high-frequency requests. Developers requiring faster access to specific strikes or a different data organization should utilize this version.

Documentation:
https://docs.mboum.com/#stocks-options-GETapi-v3-markets-options


The API Request (Python Example)

To fetch an option chain, you will use the markets/options endpoint. The following Python script demonstrates how to request data for a specific stock (e.g., SPY) using the v3 structure.

Note that the expiration parameter is often required to filter the chain for a specific date (usually provided as a Unix timestamp).

import requests
import json

# Configuration
# Replace with your actual API key
headers = {
    "X-Mboum-Secret": "demo"
}

# Define the endpoint URL
# Swapping 'v3' for 'v2' allows you to switch versions
url = "https://mboum.com/api/v3/markets/options"

# Parameters
# 'symbol' is required to identify the underlying asset.
# 'expiration' is required to specify which chain to retrieve.
params = {
    "symbol": "SPY",
    "expiration": "1735603200" # Example Unix Timestamp
}

try:
    response = requests.get(url, headers=headers, params=params)
    
    if response.status_code == 200:
        data = response.json()
        # Navigate the JSON structure to find the specific options list
        print("Successfully retrieved options chain.")
        print(json.dumps(data, indent=2))
    else:
        print(f"Error: {response.status_code} - {response.text}")

except Exception as e:
    print(f"Request failed: {str(e)}")

Analyzing the Option Chain Response

The response usually contains arrays for calls and puts. Below is a JSON snippet representing a single Call object from the chain.

{
  "contractSymbol": "SPY231229C00470000",
  "strike": 470.0,
  "currency": "USD",
  "lastPrice": 5.25,
  "change": 0.45,
  "percentChange": 9.37,
  "volume": 12050,
  "openInterest": 45000,
  "bid": 5.24,
  "ask": 5.26,
  "contractSize": "REGULAR",
  "expiration": 1735603200,
  "lastTradeDate": 1735590000,
  "impliedVolatility": 0.1254,
  "inTheMoney": true
}

Key fields to integrate into your application:

  • contractSymbol – The unique identifier for the specific contract

  • strike – The price at which the contract can be exercised

  • lastPrice – The most recent trade price for the contract

  • impliedVolatility – The market's forecast of a likely movement in the security's price

  • inTheMoney – Indicates if the contract currently holds intrinsic value

  • bid – The highest price a buyer is willing to pay

  • ask – The lowest price a seller is willing to accept


Practical Use Cases

Visualizing Skew

By plotting impliedVolatility against the strike price for a single expiration, developers can generate a volatility smile curve. This is crucial for traders analyzing how expensive Out-Of-The-Money (OTM) options are relative to At-The-Money (ATM) options.


UI Construction

When building a user interface similar to Robinhood or E*TRADE:

  1. Call the v2 endpoint to retrieve the list of available expiration dates

  2. Populate a horizontal scroll or dropdown menu with these dates

  3. On user selection, trigger a request to the v3 endpoint passing the selected expiration timestamp to render the table of calls and puts


Conclusion

Understanding the difference between the v2 and v3 endpoints allows developers to build efficient, data-rich financial applications. Whether you are aggregating complex datasets for analysis or building a consumer-facing trading UI, the Mboum API provides the necessary depth

You can obtain your API key here:
https://mboum.com/pages/api

How to Track Options Flow & Block Trades Programmatically with Mboum API Jan 10, 2026

How to Track Options Flow & Block Trades...

Learn to monitor institutional Options Flow and large block trades programmatically using the Mboum API and Python. Detect whale activity, filter for high-premium sweeps, and analyze market sentiment in real-time.

How to Calculate IV Rank and Percentile Using Mboum API Jan 10, 2026

How to Calculate IV Rank and Percentile Using...

Learn how to programmatically determine options volatility with the Mboum API. This guide explains the difference between IV Rank and IV Percentile and provides a Python example for retrieving volatility...

How to Detect Unusual Options Activity with the Mboum API Jan 10, 2026

How to Detect Unusual Options Activity with the...

Learn to detect Unusual Options Activity (UOA) programmatically using the Mboum API. This guide covers filtering volume vs. open interest to identify institutional smart money flows using Python.

How to Retrieve an Options Chain Using the Mboum API (v2 vs v3) Jan 10, 2026

How to Retrieve an Options Chain Using the...

Learn to retrieve and analyze option chains programmatically using the Mboum API. This technical guide compares the v2 and v3 endpoints, provides a Python implementation for fetching contracts, and details...