Appearance
GEX Levels
Family: Flow surveillance
What it computes
Emits GexLevelsTick ticks carrying — dealer-gamma walls per SpotGamma / SqueezeMetrics; flat-tick stream ofN` events per snapshot, one per ladder rank off GEX_strike.
Drive availability: chain + OI + spot.
Methodology
Per-strike GEX clustering ranked by `.
See the methodology overview for the citation index.
Inputs
GEX_strike.
Key outputs
— dealer-gamma walls per SpotGamma / SqueezeMetrics; flat-tick stream ofN` events per snapshot, one per ladder rank. The full field set is in the tick table below.
Output schema (GexLevelsTick)
The field / type / description table below is regenerated from the GexLevelsTick 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. Identical across every per-snapshot event burst. |
rank | u32 | Rank in the ladder (0 = largest ` |
strike | i32 | Strike in vendor units (1/1000 of a dollar). |
gex | f64 | Signed per-strike GEX (calls + puts under the dealer-side flip). |
Configuration (GexLevelsParams)
Regenerated from the GexLevelsParams Rust source — see the note above.
| Field | Type | Description |
|---|---|---|
contracts | SecurityFilter | Contracts the subscription tracks. |
rate | Arc<dyn RateService> | Risk-free rate provider. |
calendar | Arc<dyn MarketCalendar> | Market calendar provider. |
annual_dividend | Option<f64> | Annual continuously compounded dividend yield. |
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. |
min_emit_interval_ms | i64 | Minimum emit interval (ms). Default 1_000. |
top_n | u32 | Maximum ladder depth — top_n events fire per snapshot, one per strike, ordered by descending ` |
conditions | ConditionPolicy | Trade-condition admission policy applied to option NBBO quotes. |
venues | ExchangeFilter | Exchange / venue admission policy applied to option NBBO quotes. |
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().gex_levels(["QQQ"]).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()
.gexLevels(["QQQ"])
.onEvent((tick) => {
console.log(tick);
});Rust
rust
// Cargo.toml:
// kairos = "0.1"
use kairos::{Client, GexLevelsRow};
# fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::connect(("me@example.com", "secret"))?;
let sub = client
.live()
.gex_levels(["QQQ"])
.on_event(|row: &GexLevelsRow| println!("strike={} gex={}", row.strike, row.gex))?;
// ... later ...
sub.unsubscribe();
# Ok(())
# }