Appearance
DEX
Family: Flow surveillance
What it computes
Emits DexTick ticks carrying net_dex, call_dex, put_dex, strikes_used off chain + OI + spot.
Available on the live, historical, and replay drives.
Methodology
Dealer delta-exposure aggregator: Sum ±Δ_i × OI_i × multiplier × spot across chain.
See the methodology overview for the citation index.
Inputs
Chain + OI + spot.
Key outputs
Net_dex, call_dex, put_dex, strikes_used. The full field set is in the tick table below.
Output schema (DexTick)
The field / type / description table below is regenerated from the DexTick 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 underlying contract metadata. |
date | i32 | Trading-session date in YYYYMMDD form. |
ms_of_day | i32 | Milliseconds-of-day of the emission. |
spot | f64 | Spot price used to scale each contribution. |
net_dex | f64 | Net delta exposure across every contributing contract. |
call_dex | f64 | Sum of call-side delta exposures (positive under the dealer convention — dealers are net long calls, and call delta is positive). |
put_dex | f64 | Sum of put-side delta exposures (positive — dealers are net short puts, and the short side of a negative-delta contract carries positive delta). |
strikes_used | u32 | Number of (expiration, strike, right) triples that contributed (i.e. had a resolved Δ and an OI hit). |
Configuration (DexParams)
Regenerated from the DexParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. Typically a [SecurityFilter::Symbols] entry naming the underlying roots. |
rate | Arc<dyn RateService> | Risk-free rate provider, shared with the Greeks analytic. |
calendar | Arc<dyn MarketCalendar> | Market calendar provider, shared with the Greeks analytic. |
annual_dividend | Option<f64> | Annual continuously compounded dividend yield. None (default) treats the underlying as non-dividend-paying. |
dividend_cache | `std::sync::Arc<crate::reference_data::dividend_yield:: | |
| DividendYieldCache>` | Engine-wired per-symbol dividend-yield cache. Seated at subscribe time by DefaultSpec via wire_dividend_yield. Consulted on the dispatch path only when annual_dividend is None — the per-tick lookup resolves the continuous-dividend carry yield q = D / S from the live underlying spot the analytic already holds (O(1), lock-light, non-blocking). An explicit annual_dividend override always wins. | |
oi_cache | Arc<OpenInterestCache> | Engine-wide Option open-interest cache. |
spot_cache | SpotPriceCache | Shared underlying-spot cache. |
contract_multiplier | f64 | Contract multiplier. Default 100.0 for US-listed equity options. |
min_emit_interval_ms | i64 | Minimum interval between emissions, in milliseconds. Defaults to 1_000 (one snapshot per second). |
conditions | ConditionPolicy | Trade-condition admission policy applied to option NBBO quotes. |
venues | ExchangeFilter | Exchange / venue admission policy applied to option NBBO quotes. |
iv_cache | IvCacheConfig | IV reuse thresholds for the per-contract Greek recompute — the same drift policy the Greeks analytic applies. When the (option_mid, spot) pair drifts below both thresholds the bisection IV solve is skipped and the Greek is recomputed in closed form from the cached IV; the solver dominates per-quote cost, so the reuse path carries the steady-state throughput. [IvCacheConfig::off] re-solves on every quote. |
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().dex(["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()
.dex(["SPX"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, DexRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.dex(["SPX"])
.on_event(|row: &DexRow| {
println!("net_dex={} spot={}", row.net_dex, row.spot)
})?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }