Skip to content

BlockTrade

What it computes

Threshold-based block-trade emission. Fires one BlockTradeTick whenever an admitted option print exceeds the configured size or premium thresholds.

Methodology

Defaults follow the OPRA Pillar Options Trade Conditions block-eligibility convention (size ≥ 100 contracts OR premium ≥ $25,000). Both thresholds are configurable per subscription to match in-house desk conventions.

Inputs

  • Option TradeTick.

Output schema (BlockTradeTick)

The field / type / description table below is regenerated from the BlockTradeTick 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.
exchangei32Exchange code that printed the trade.
conditioni32Primary OPRA trade-condition code.
pricef64Trade price.
sizei32Trade size (contracts).
premiumf64Premium (price × size × 100).
size_blockbooltrue iff size >= min_size.
premium_blockbooltrue iff premium >= min_premium_usd.

A print emits if either the size or premium threshold is exceeded — the analytic fires on the OR of the two thresholds, not the AND.

Configuration (BlockTradeRequest)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks.
min_sizei32Minimum size in contracts to flag a print as a size-block. Default 100 per trade-alert.com convention.
min_premium_usdf64Minimum premium in USD to flag a print as a premium-block. Default $25,000.
conditionsConditionPolicyTrade-condition admission policy.
venuesExchangeFilterExchange / venue admission policy.

Operational characteristics

  • Per-tick latency. Constant-time threshold check.
  • Allocation discipline. Tick struct fields are stack-allocated; the emission Arc is the only heap allocation per fire.
  • Replay parity. Deterministic — the gate is a pure function of the print.

Example

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

use kairos::{Client, BlockTradeRow};

let client = Client::connect(("me@example.com", "secret"))?;

let sub = client
    .live()
    .block_trade(["QQQ"])
    .min_size(100)
    .min_premium_usd(100_000.0)
    .on_event(|row: &BlockTradeRow| {
        println!("price={} size={}", row.price, row.size)
    })?;
// ... later ...
sub.unsubscribe();

Proprietary. All rights reserved.