Endpoint reference

Options Max Pain API

GET/api/public/spx-max-pain

Get SPX max pain, the payout curve, and open interest per strike from the delayed CBOE chain. Nearest expiration by default, or pass ?expiration=YYYY-MM-DD. No API key required.

Parameters

No endpoint-specific parameters.

Examples

curl

curl 'https://api.squawkflow.com/api/public/spx-max-pain?expiration=2026-09-01'

python

import requests

response = requests.get("https://api.squawkflow.com/api/public/spx-max-pain?expiration=2026-09-01", timeout=15)
response.raise_for_status()
print(response.json()["data"])

javascript

const response = await fetch("https://api.squawkflow.com/api/public/spx-max-pain?expiration=2026-09-01");

if (!response.ok) throw new Error(`SquawkFlow ${response.status}`);
const { data } = await response.json();
console.log(data);

go

package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  res, err := http.Get("https://api.squawkflow.com/api/public/spx-max-pain?expiration=2026-09-01")
  if err != nil { panic(err) }
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}

rust

#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
    let body = reqwest::get("https://api.squawkflow.com/api/public/spx-max-pain?expiration=2026-09-01")
        .await?
        .error_for_status()?
        .text().await?;
    println!("{body}");
    Ok(())
}

Response

Successful responses use the standard success, data, meta, and usage envelope. See the live OpenAPI schema for generated response definitions.