Skip to content

Institutional Flow Score

Family: Flow surveillance

What it computes

Emits InstitutionalFlowScoreTick ticks carrying score 0-100, classification off trade + NBBO + OI.

Available on the live, historical, and replay drives.

Methodology

6-component composite (premium / spread / aggressor / OI / venue / DTE).

See the methodology overview for the citation index.

Inputs

Trade + NBBO + OI.

Key outputs

Score 0-100, classification. The full field set is in the tick table below.

Output schema (InstitutionalFlowScoreTick)

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

FieldTypeDescription
contractContractResolved contract metadata. Subscribers identify the security by (symbol, expiration, right, strike) on this field — the wire-level contract id is engine-internal and is not surfaced here.
datei32Trading-session date in YYYYMMDD form.
ms_of_dayi32Milliseconds since midnight of the print.
trade_sizei32Trade size (contracts).
trade_pricef64Trade price.
premium_usdf64Premium in USD — trade_size × trade_price × 100. Surfaced on the tick so downstream subscribers can audit the premium-tier bucket without re-deriving the multiplier convention.
scorei32Composite score in [0, 100].
classificationSmartMoneyClassificationClassification band the score lands in.
premium_tier_ptsi32Premium-tier contribution to the score (0, 10, 20, 30, or 40).
spread_ptsi32Spread-tightness contribution (0 or 15).
aggressor_ptsi32Aggressor-side contribution (0, 8, or 15).
oi_ptsi32Size-vs-OI contribution (0, 3, 6, or 10).
venue_ptsi32Multi-venue route contribution (0 or 10).
dte_ptsi32DTE-bucket contribution (0 or 10).

Configuration (InstitutionalFlowScoreParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks. Options-only — stock / index / rate ticks are rejected at the dispatch gate.
conditionsConditionPolicyTrade-condition admission policy. Defaults to [ConditionPolicy::OpraRegular].
venuesExchangeFilterExchange / venue admission policy. Defaults to [ExchangeFilter::Any] — the SIP-consolidated tape.
multi_venue_window_msi32Rolling window in milliseconds the multi-venue route detector reads when scoring the venue component. Same shape and default as the sweep_detector convention — 100 ms per the SEC Reg NMS / Rule 611 intermarket-sweep horizon.
max_window_tradesusizeMaximum entries kept in the per-contract rolling multi-venue window. Bounds memory on illiquid contracts that trade in bursts. Default 256.

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().institutional_flow_score(["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()
  .institutionalFlowScore(["SPX"])
  .onEvent((tick) => {
    console.log(tick);
  });

Rust

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

use kairos::{Client, InstitutionalFlowScoreRow};

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

let sub = client
    .live()
    .institutional_flow_score(["SPX"])
    .on_event(|row: &InstitutionalFlowScoreRow| println!("score={} classification={}", row.score, row.classification))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }

Proprietary. All rights reserved.