Skip to content

Option Full Open Interest

NOT YET WIRED BY THETADATA SOFTWARE ENGINEERS

Streaming open interest is not live on the upstream feed yet, so this subscription does not deliver ticks. For open interest today, use the flat files (last 7 days) or the historical open-interest endpoint.

Streams the morning open-interest reports for every option contract — one subscription covering the entire OPRA universe. Each report delivers an OpenInterest event.

The snippets below assume a connected client with streaming started — see Getting Started for the connect-and-stream ladder.

rust
use thetadatadx::streaming::SecTypeExt;
use thetadatadx::streaming::{StreamData, StreamEvent};
use thetadatadx::SecType;

client.stream().start_streaming(|event: &StreamEvent| {
    if let StreamEvent::Data(StreamData::OpenInterest { contract, open_interest, .. }) = event {
        println!("{} oi={open_interest}", contract.symbol);
    }
})?;

let sub = SecType::Option.full_open_interest();
client.stream().subscribe(sub.clone())?;

// Remove this stream; the session stays open for other subscriptions.
client.stream().unsubscribe(sub)?;

OpenInterest event fields

Each update arrives as a OpenInterest event with these fields:

FieldTypeDescription
contractcontractResolved contract identity (symbol, security type, and option fields).
ms_of_dayi32Milliseconds since midnight Eastern Time.
open_interesti32Total outstanding contracts.
datei32Trading date as a YYYYMMDD integer.
received_at_nsu64Local receive timestamp, nanoseconds since the Unix epoch.

The contract field carries symbol, the security type, and — for options — expiration, right, and the strike. See Handling Events for the full event catalogue and per-language field shapes.

Released under the Apache-2.0 License.