Skip to content

Open Interest ​

FreeValueStandardPro

Fetch the open interest of every option contract for one date. The vendor keeps the most recent 7 calendar days.

Client
Auth
Style
from thetadatadx import Client

client = Client.from_env()

rows = client.market_data.option_flat_file_open_interest(
    "",
)
for t in rows:
    print(t.date, t.open_interest)
Sample response · JSON
[
  {
    "date": 20260803,
    "expiration": 20260821,
    "ms_of_day": 23401000,
    "open_interest": 13122,
    "right": "C",
    "root": "AAPL",
    "strike": "360.0"
  },
  {
    "date": 20260803,
    "expiration": 20260821,
    "ms_of_day": 23419000,
    "open_interest": 69,
    "right": "P",
    "root": "AAPL",
    "strike": "360.0"
  }
]

Parameters ​

NameTypeRequiredDefaultDescription
datedateyes-Date YYYYMMDD
timeout_msintno-Per-request deadline in milliseconds. 0 means no deadline.

Response ​

Rows of OpenInterestTick:

FieldTypeDescription
ms_of_dayi32Milliseconds since midnight Eastern Time.
open_interesti32Total outstanding contracts.
datei32Trading date as a YYYYMMDD integer.

Every row carries expiration (YYYYMMDD), strike (dollars) and right ("C" / "P"); with the row's root, which the whole result carries per row, they identify the contract.

Released under the Apache-2.0 License.