Skip to content

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.

FieldTypeDescription
contractContractResolved underlying contract metadata.
datei32Trading-session date in YYYYMMDD form.
ms_of_dayi32Milliseconds-of-day of the emission. Identical across every per-snapshot event burst.
ranku32Rank in the ladder (0 = largest `
strikei32Strike in vendor units (1/1000 of a dollar).
gexf64Signed per-strike GEX (calls + puts under the dealer-side flip).

Configuration (GexLevelsParams)

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

FieldTypeDescription
contractsSecurityFilterContracts the subscription tracks.
rateArc<dyn RateService>Risk-free rate provider.
calendarArc<dyn MarketCalendar>Market calendar provider.
annual_dividendOption<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_cacheArc<OpenInterestCache>Engine-wide Option open-interest cache.
spot_cacheSpotPriceCacheShared underlying-spot cache.
contract_multiplierf64Contract multiplier. Default 100.0.
min_emit_interval_msi64Minimum emit interval (ms). Default 1_000.
top_nu32Maximum ladder depth — top_n events fire per snapshot, one per strike, ordered by descending `
conditionsConditionPolicyTrade-condition admission policy applied to option NBBO quotes.
venuesExchangeFilterExchange / 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(())
# }

Proprietary. All rights reserved.