Appearance
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.
| Field | Type | Description |
|---|---|---|
contract | Contract | Resolved 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. |
date | i32 | Trading-session date in YYYYMMDD form. |
ms_of_day | i32 | Milliseconds since midnight. |
exchange | i32 | Exchange code that printed the trade. |
condition | i32 | Primary OPRA trade-condition code. |
price | f64 | Trade price. |
size | i32 | Trade size (contracts). |
premium | f64 | Premium (price × size × 100). |
size_block | bool | true iff size >= min_size. |
premium_block | bool | true 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.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. |
min_size | i32 | Minimum size in contracts to flag a print as a size-block. Default 100 per trade-alert.com convention. |
min_premium_usd | f64 | Minimum premium in USD to flag a print as a premium-block. Default $25,000. |
conditions | ConditionPolicy | Trade-condition admission policy. |
venues | ExchangeFilter | Exchange / venue admission policy. |
Operational characteristics
- Per-tick latency. Constant-time threshold check.
- Allocation discipline. Tick struct fields are stack-allocated; the emission
Arcis 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();