How to Screen for High-Volume Options Contracts in Under 50 Lines of Code

Some option contracts trade far more than their open interest suggests. When 20,000 contracts change hands against 700 already open, someone is opening a large new position, or a lot of traders are crowding into one strike. That ratio of volume to open interest is the simplest unusual-activity filter there is.

SteadyAPI has a ready-made endpoint for a market-wide version of this. This guide shows the other route: scan the option chains of your own watchlist and apply your own filters. It fits in 46 lines of Python and needs only requests.

Prerequisites

  • A SteadyAPI key on a paid plan. The Free plan excludes the Options Data API, and options endpoints return 403 without it.
  • Python 3.8+ with requests.

The endpoint

GET https://api.steadyapi.com/v3/markets/options

It returns one expiration of the chain as body.Call and body.Put, and meta.expirations lists every available date, split into weekly and monthly. The weight is 2.

Each contract has volume, openInterest, bidPrice, askPrice, volatility and symbol, among other fields. They are all strings, with commas and percent signs. The script converts them before any math.

Without expiration, you get this week's Friday, or next Friday once this week's has passed. Pass expiration as YYYY-MM-DD for any other date.


The screener

import requests

URL = "https://api.steadyapi.com/v3/markets/options"
HEADERS = {"Authorization": "Bearer YOUR_STEADYAPI_KEY"}
WATCHLIST = ["AAPL", "TSLA", "NVDA"]
EXPIRATIONS = 2  # monthly expirations to scan after the default one
MIN_VOLUME, MIN_OI, MIN_RATIO, MAX_SPREAD = 500, 100, 1.5, 15  # spread in percent

def num(v):
    try:
        return float(str(v).replace(",", "").replace("%", "").replace("+", ""))
    except ValueError:
        return None

def chain(ticker, expiration=None):
    params = {"ticker": ticker, **({"expiration": expiration} if expiration else {})}
    r = requests.get(URL, headers=HEADERS, params=params, timeout=30)
    r.raise_for_status()
    data = r.json()
    if data.get("success") is False:
        raise RuntimeError(data.get("message", "Request failed"))
    return data

def contracts(ticker):
    first = chain(ticker)  # default expiration, plus the list of all expirations
    found = {c["symbol"]: c for side in first["body"].values() for c in side}
    for exp in first["meta"]["expirations"]["monthly"][:EXPIRATIONS]:
        for side in chain(ticker, exp)["body"].values():
            found.update({c["symbol"]: c for c in side})
    return found.values()


hits = []
for ticker in WATCHLIST:
    for c in contracts(ticker):
        vol, oi = num(c["volume"]), num(c["openInterest"])
        bid, ask = num(c["bidPrice"]), num(c["askPrice"])
        if not (vol and oi and ask and bid is not None):
            continue
        spread = (ask - bid) / ask * 100
        if vol >= MIN_VOLUME and oi >= MIN_OI and vol / oi >= MIN_RATIO and spread <= MAX_SPREAD:
            hits.append((vol / oi, c["symbol"], vol, oi, spread, num(c["volatility"])))

print(f"{'Contract':24}{'Vol':>9}{'OI':>9}{'Vol/OI':>8}{'Spread%':>9}{'IV%':>8}")
for ratio, symbol, vol, oi, spread, iv in sorted(hits, reverse=True)[:15]:
    print(f"{symbol:24}{vol:>9,.0f}{oi:>9,.0f}{ratio:>8.1f}{spread:>9.1f}{iv or 0:>8.1f}")

Replace YOUR_STEADYAPI_KEY and edit WATCHLIST and the four thresholds.


How it works

  • num() turns strings such as "13,923" and "46.4%" into floats, and bad values into None.
  • chain() makes one request. It raises on a non-200 status, and on the 200 response that carries "success": false.
  • contracts() calls the endpoint once with no date. That response gives the default expiration and the list of monthlies. It then fetches the next two monthlies. Contracts are stored by symbol, so a date that appears twice is counted once.
  • The filter drops contracts with no volume, no open interest, or no ask. Then it keeps the ones that pass all four tests: enough volume, enough open interest, a high enough ratio, and a bid-ask spread below the limit.

The open interest and spread tests matter. A contract with 3 open and 30 traded has a ratio of 10 and means nothing. A contract with a 40% spread shows a ratio but cannot be traded at a sensible price.


Sample output

Contract                      Vol       OI  Vol/OI  Spread%     IV%
TSLA|20261113|392.50P      13,923      315    44.2      2.3    46.4
TSLA|20261113|390.00P      16,163      689    23.5      2.0    46.8
AAPL|20261113|352.50P      21,080    1,062    19.8      1.4    25.7
NVDA|20261113|157.50C       4,350      250    17.4     10.5   102.8
TSLA|20261113|392.50C      17,916    1,586    11.3      3.3    45.8
NVDA|20261113|172.50P      29,269    3,091     9.5      1.1    62.2

This is a trimmed run during one trading day. Volume changes by the minute, so yours will differ. The symbol format is TICKER|YYYYMMDD|STRIKE followed by C or P.


Read the results with care

  • Open interest is not live. Volume updates through the day, while open interest typically comes from the previous close. A high ratio at the open may only mean a normal day on a small base.
  • Short-dated contracts dominate. In the sample, nearly every hit expires within days. Their ratios swing the most. Raise MIN_RATIO, or skip the nearest expiration.
  • Volume does not show direction. One screen cannot tell you whether a trader bought or sold, or whether the trade was a hedge. Treat a hit as a place to look, not a signal.
  • High IV is common on hits. Compare the volatility column with the stock's usual level before you read anything into it.

What it costs

Each ticker takes 3 requests: the default chain plus two monthlies. At weight 2 that is 6 per ticker, so the three-stock watchlist uses 18 requests per run. Ten tickers use 60. A failed lookup that returns HTTP 200 still counts.

Keep EXPIRATIONS small. Requests run one after another, which keeps you well under the limit of 10 requests per second.


The market-wide shortcut

If you do not have a watchlist, call the endpoint that does the scan for you:

GET https://api.steadyapi.com/v1/markets/options/unusual-options-activity

It has a weight of 2. It returns contracts expiring within 30 days, sorted by volume to open interest ratio, 20 per page. Without a date, it only includes contracts with a ratio of at least 1.24, volume of at least 500, open interest of at least 100, and a last price of at least $0.10. The unusual options activity guide covers it in full.

Use your own screen when you want your own thresholds, your own tickers, or the spread and Greeks on the same row. Use the endpoint to find names you were not watching. For a deeper look at one chain, see the options chain analyzer.


Conclusion

Volume to open interest is a blunt filter, and 46 lines of Python make it useful. Add a liquidity check, scan a few expirations, and you have a short list worth reading.

Create a free account at steadyapi.com (no card required), upgrade to a paid plan to use options data, and read the API documentation for every parameter and ready-made examples in cURL, JavaScript, PHP, and Python.