Appearance
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.
| Field | Type | Description |
|---|---|---|
symbol | Arc<str> | Underlying symbol. |
date | i32 | Trading-session date in YYYYMMDD form. |
ts_ms | i32 | Milliseconds since midnight at emission time. |
call_prem | f64 | Cumulative session call-side premium (USD). |
put_prem | f64 | Cumulative session put-side premium (USD). |
net_prem | f64 | call_prem − put_prem — the directional bias readout. |
call_vol | u64 | Cumulative session call-side volume (contracts). |
put_vol | u64 | Cumulative session put-side volume (contracts). |
sweep_ct | u32 | Cumulative session sweep count. |
block_ct | u32 | Cumulative session block count. |
Configuration (FlowSummaryParams)
Regenerated from the FlowSummaryParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Subscribe by underlying symbol — the engine expands across the chain and the summary aggregates by symbol. |
conditions | ConditionPolicy | Trade-condition admission policy. Default [ConditionPolicy::OpraRegular]. |
venues | ExchangeFilter | Exchange / venue admission policy. Default [ExchangeFilter::Any]. |
min_emit_interval_ms | i32 | Minimum interval between per-symbol emissions (milliseconds). Default [DEFAULT_MIN_EMIT_INTERVAL_MS]. |
block_min_size | i32 | Size threshold (contracts) above which a single print counts as one block. Default [DEFAULT_BLOCK_MIN_SIZE]. |
sweep_window_ms | i32 | Window inside which multi-venue prints on the same cell cluster as one sweep (milliseconds). Default [DEFAULT_SWEEP_WINDOW_MS]. |
sweep_min_venues | u32 | Minimum 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(())
# }