Skip to content

Flow Summary

Family: Flow surveillance

What it computes

Emits FlowSummaryTick ticks carrying call_prem, put_prem, net_prem, call/put_vol, sweep_ct, block_ct off option trade tape.

Available on the live, historical, and replay drives.

Methodology

Bloomberg OMON per-root rollup; sweep (multi-venue cluster) + block (size) classification.

See the methodology overview for the citation index.

Inputs

Option trade tape.

Key outputs

Call_prem, put_prem, net_prem, call/put_vol, sweep_ct, block_ct. The full field set is in the tick table below.

Output schema (FlowSummaryTick)

The field / type / description table below is regenerated from the FlowSummaryTick Rust source by docs-site/scripts/inject-doc-tables.ts on every npm run docs:build. Do not hand-edit between the sentinels.

FieldTypeDescription
symbolArc<str>Underlying symbol.
datei32Trading-session date in YYYYMMDD form.
ts_msi32Milliseconds since midnight at emission time.
call_premf64Cumulative session call-side premium (USD).
put_premf64Cumulative session put-side premium (USD).
net_premf64call_prem − put_prem — the directional bias readout.
call_volu64Cumulative session call-side volume (contracts).
put_volu64Cumulative session put-side volume (contracts).
sweep_ctu32Cumulative session sweep count.
block_ctu32Cumulative session block count.

Configuration (FlowSummaryParams)

Regenerated from the FlowSummaryParams Rust source — see the note above.

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Subscribe by underlying symbol — the engine expands across the chain and the summary aggregates by symbol.
conditionsConditionPolicyTrade-condition admission policy. Default [ConditionPolicy::OpraRegular].
venuesExchangeFilterExchange / venue admission policy. Default [ExchangeFilter::Any].
min_emit_interval_msi32Minimum interval between per-symbol emissions (milliseconds). Default [DEFAULT_MIN_EMIT_INTERVAL_MS].
block_min_sizei32Size threshold (contracts) above which a single print counts as one block. Default [DEFAULT_BLOCK_MIN_SIZE].
sweep_window_msi32Window inside which multi-venue prints on the same cell cluster as one sweep (milliseconds). Default [DEFAULT_SWEEP_WINDOW_MS].
sweep_min_venuesu32Minimum distinct venues required to fire one sweep. Default [DEFAULT_SWEEP_MIN_VENUES].

Example

Python

python
import kairos_thetadata as kt

client = kt.Client.connect(kt.Credentials.from_env())

def on_event(row):
    print(row)

sub = client.live().flow_summary(["SPX"]).on_event(on_event)
sub.wait(timeout_seconds=60.0)

TypeScript

typescript
import { Client, Credentials } from "kairos-thetadata";

const client = await Client.connect(Credentials.fromEnv());

await client
  .live()
  .flowSummary(["SPX"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

rust
// Cargo.toml:
//   kairos = "0.1"

use kairos::{Client, FlowSummaryRow};

# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;

let sub = client
    .live()
    .flow_summary(["SPX"])
    .on_event(|row: &FlowSummaryRow| println!("net_prem={} call_vol={}", row.net_prem, row.call_vol))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.