The most useful earnings-flow signal is an intersection: a name showing both an unusual options print and a report in the next few days. This guide builds a small dashboard that computes exactly that. It polls the OptionsBell unusual-flow API, cross-references the upcoming-earnings calendar from earningscalls.dev, and surfaces the overlap. The OptionsBell code below is concrete; the earningscalls.dev calls are kept generic and clearly labeled illustrative, since exact endpoint paths differ.
Poll OptionsBell for unusual flow
The unusual-flow endpoint accepts a since ISO timestamp, so on each poll you only fetch prints newer than last time. Auth is the X-API-Key header from the OPTIONSBELL_API_KEY env var. Keep polls within the Pro limits of 30 per minute and 2,000 per day; every five minutes is comfortably inside that.
import os, json, urllib.request
from datetime import datetime, timezone
API_KEY = os.environ["OPTIONSBELL_API_KEY"]
def fetch_unusual(since_iso):
url = "https://optionsbell.com/api/v1/options-flow/unusual?since=" + since_iso
req = urllib.request.Request(url, headers={"X-API-Key": API_KEY})
with urllib.request.urlopen(req) as r:
return json.load(r)
since = "2026-07-04T13:30:00Z"
prints = fetch_unusual(since)
flow_by_ticker = {}
for p in prints:
flow_by_ticker.setdefault(p["ticker"], []).append(p)Get who reports soon (illustrative)
On the earnings side you need the set of tickers reporting within your window. The call below is illustrative: treat the URL and shape as a placeholder for whatever the earningscalls.dev API or MCP server returns, and adapt to their actual response. The point is you get back a set of tickers with report dates.
# ILLUSTRATIVE earningscalls.dev call - adapt to the real endpoint/MCP tool.
# The goal is simply: tickers reporting in the next N days.
def fetch_upcoming(days=5):
# Placeholder - replace with the real earningscalls.dev request or MCP call.
# Expected to return something like:
# [{"ticker": "ABC", "report_date": "2026-07-07", "session": "amc"}, ...]
raise NotImplementedError("Wire up to earningscalls.dev")
upcoming = fetch_upcoming(days=5)
reporting_soon = {row["ticker"]: row for row in upcoming}Compute the intersection
The dashboard's whole value is the join. Keep only tickers that appear in both the flow map and the upcoming-earnings set, and carry through the fields you want to rank on.
rows = []
for ticker, flows in flow_by_ticker.items():
if ticker not in reporting_soon:
continue
total_premium = sum(f["premium"] for f in flows)
calls = sum(1 for f in flows if f["type"] == "call")
puts = sum(1 for f in flows if f["type"] == "put")
rows.append({
"ticker": ticker,
"report_date": reporting_soon[ticker]["report_date"],
"premium": total_premium,
"calls": calls,
"puts": puts,
})
rows.sort(key=lambda r: r["premium"], reverse=True)
for r in rows:
print(r["ticker"], r["report_date"], int(r["premium"]), r["calls"], "C /", r["puts"], "P")Rank so the signal rises
A raw intersection is already useful, but a little ranking makes it a dashboard. Sort by total premium so conviction floats up, and surface the call-versus-put skew so directionality is visible at a glance.
- Total premium: proxy for how much capital is behind the positioning
- Call/put skew: the market's directional lean into the print
- Days to report: tighter windows are higher urgency
- Optional: pull the last call summary for each surviving name
Enrich with the last call
For each name that survives the join, an optional final step is to attach the prior earnings-call summary from earningscalls.dev so a reader sees positioning and context side by side. In an interactive setting the MCP server is easier than the API for this.
For each ticker in my dashboard, pull its last earnings call summary
and whether guidance was raised, held, or cut. Return a compact table.Schedule and ship
Run the poll on a five-minute cron to match OptionsBell's scan cadence, cache the last since timestamp between runs, and refresh the earnings calendar once a day since report dates rarely move intraday. That is a genuinely useful earnings-flow board in well under a hundred lines.
Get an API key and read the reference at optionsbell.com/docs, wire up the MCP side via optionsbell.com/docs/mcp, and pull the calendar from earningscalls.dev.