Chart dealer gamma exposure
The GEX plugin estimates dealer gamma exposure from an option chain; you draw its levels and its profile by strike on a chart, then read the same figures over the wire.
You need Taji built from source (cargo build -p taji-open) and the plugin built in its own directory. taji plugin dev plays the plugin's own recording, plugins/taji-gex/fixtures/, as if it were live; the example's dev file has the capture do the same:
(cd plugins/taji-gex && cargo build)
target/debug/taji plugin dev plugins/taji-gex
Everything below is that recording: made-up option chains for index:$SPX around 6,000, round strikes, open interest and implied volatility, played in a loop. The chart says so with its Taji replay tag. It is not live data, and its figures are not the market's. On your own Taji, stage the plugin under TAJI_PLUGINS (Install a plugin) and bind its layers to any chart whose symbol a linked provider serves a chain for.
plugin dev opens a desk with chart 1 on index:$SPX's 1-minute candles and binds the plugin's three chart layers and its two scripts, the same ones the indicator catalog lists under Plugins. calls.json then opens the product's stream and reads the levels and the profile by strike:
[
{"name": "stream", "stream": "/ws/market", "body": {"type": "stream", "id": "gex", "product": "taji-gex.levels", "symbols": ["index:$SPX"], "lens": "gamma"}, "take": 2},
{"name": "levels", "method": "GET", "route": "/get/taji-gex.levels?symbols=index:$SPX&lens=gamma", "until": "length >= 1"},
{"name": "strikes", "method": "GET", "route": "/get/taji-gex.strikes?symbols=index:$SPX&lens=gamma", "until": "length >= 1", "shot": true}
]

- The layers are the three
[[ui.layers]]rows ofplugins/taji-gex/taji-plugin.toml, bound withparams: {}, every word at its default:lensgamma,expiriesall,unitsusd, and a window of 15% around spot. A layer computes nothing in the kernel: the window reads its product and draws it.GEX levelsdraws a row oftaji-gex.levelsas horizontal lines, the flip solid.GEX profileandGEX curvedrawtaji-gex.strikesandtaji-gex.curvein docks at the right edge, green where the net is positive and pink where it is negative. streamopens/ws/marketand asks fortaji-gex.levelsonindex:$SPX. The plugin's history is only the snapshots Taji has held, so on a new Taji a read finds nothing until a stream has the plugin price a live chain. The window streams each layer it draws; with no window open, your client streams the product itself.levelsisGET /get/taji-gex.levels, repeated a second apart until it answers a row (until).strikesisGET /get/taji-gex.strikes, the strikes within the default 15% of spot.shotphotographs the chart once the calls are done.
The stream's first two frames, the socket's hello and the first row the plugin priced:
[
{
"header": {
"type": "hello",
"seq": 0
}
},
{
"header": {
"type": "rows",
"id": "gex",
"history": false,
"seq": 1
},
"rows": [
{
"ts_utc": 1796408644,
"spot": 6120,
"net": -63218722.651855946,
"calls": 39210729.391658336,
"puts": -102429452.04351428,
"same_day": 580939.8961673188,
"above_spot": -63389666.57895056,
"below_spot": 170943.92709462345,
"flip": 6093.9608642578,
"call_wall": null,
"put_wall": 6050,
"magnet": 6150,
"max_pain": 6050,
"oi_date": null,
"knowable_utc": 1796408645,
"recorded": false,
"version": "0.1.0"
}
]
}
]
The levels, one row per chain snapshot:
[
{
"ts_utc": 1796408644,
"spot": 6120,
"net": -63218722.651855946,
"calls": 39210729.391658336,
"puts": -102429452.04351428,
"same_day": 580939.8961673188,
"above_spot": -63389666.57895056,
"below_spot": 170943.92709462345,
"flip": 6093.9608642578,
"call_wall": null,
"put_wall": 6050,
"magnet": 6150,
"max_pain": 6050,
"oi_date": null,
"knowable_utc": 1796408644,
"recorded": true,
"version": "0.1.0"
}
]
spotis the recording's price when the chain was priced, 6,120, atts_utc. Every figure butspot,max_painandoi_dateis an estimate.- With the
gammalens andusdunits, each exposure is in dollars per 1% move in the index, as the product'smodelstates.netis about −$63 million, the sum ofcalls(+$39 million) andputs(−$102 million), dealers assumed long calls and short puts.same_dayis the part from the expiries ending today,above_spotandbelow_spotthe parts from the strikes on each side. flip, about 6,094, is the price where net exposure crosses zero, found by repricing the chain at hypothetical spots: the zero of the curve dock. Spot is above it, so net exposure is negative.call_wallisnull: no strike at or above spot has a positive net.put_wall, 6,050, is the strike at or below spot with the most negative net.magnetis the strike of the largest absolute net, 6,150.max_pain, 6,050, is the front expiry's strike of least payout to option holders.oi_date, the date of the open interest, isnull: the recording states none.- The kernel adds
knowable_utc,recordedandversionto every plugin row (the protocol);versionnames the plugin version that computed it.
The profile by strike, net and its parts:
[
{
"ts_utc": 1796408644,
"price": [
5900,
5950,
6050,
6150
],
"value": [
-4.631933813064908e-12,
38629789.49549102,
-38458845.5683964,
-63389666.57895056
],
"calls": [
0.0,
38629789.49549102,
580939.8961673188,
0.0
],
"puts": [
-4.631933813064908e-12,
0.0,
-39039785.46456371,
-63389666.57895056
],
"d0": [
-4.631933813064908e-12,
0.0,
580939.8961673188,
0.0
],
"d1_7": [
0.0,
0.0,
0.0,
0.0
],
"d8_30": [
0.0,
38629789.49549102,
-39039785.46456371,
-63389666.57895056
],
"d31_60": [
0.0,
0.0,
0.0,
0.0
],
"d61_120": [
0.0,
0.0,
0.0,
0.0
],
"d121": [
0.0,
0.0,
0.0,
0.0
],
"knowable_utc": 1796408644,
"recorded": true,
"version": "0.1.0"
}
]
Captured 2026-12-04 on taji plugin dev plugins/taji-gex --headless, playing the plugin's made-up fixtures/. The replay follows the wall clock, so a recapture can land on another snapshot of the loop.
priceholds the recording's strikes, 5,900, 5,950, 6,050 and 6,150, and each other list holds one value per strike, in the same order.valueis the net,callsandputsits two sides, andd0tod121the net split by days to expiry.- The most negative net, about −$63 million, is at 6,150, the magnet: the long pink bar in the profile dock. The most negative at or below spot, about −$38 million, is at 6,050, the put wall. The one positive net, about $39 million, is at 5,950, below spot, so there is no call wall.
d0is the part from the contracts expiring today: only 6,050 carries any.
Change it
Count only the contracts that expire today:
- {"name": "levels", "method": "GET", "route": "/get/taji-gex.levels?symbols=index:$SPX&lens=gamma", "until": "length >= 1"},
+ {"name": "levels", "method": "GET", "route": "/get/taji-gex.levels?symbols=index:$SPX&lens=gamma&expiries=0dte", "until": "length >= 1"},
Read vanna instead of gamma; lens also takes delta, charm, vega, iv_oi and oi:
- {"name": "levels", "method": "GET", "route": "/get/taji-gex.levels?symbols=index:$SPX&lens=gamma", "until": "length >= 1"},
+ {"name": "levels", "method": "GET", "route": "/get/taji-gex.levels?symbols=index:$SPX&lens=vanna", "until": "length >= 1"},
Read only the strikes within 1% of spot:
- {"name": "strikes", "method": "GET", "route": "/get/taji-gex.strikes?symbols=index:$SPX&lens=gamma", "until": "length >= 1", "shot": true}
+ {"name": "strikes", "method": "GET", "route": "/get/taji-gex.strikes?symbols=index:$SPX&lens=gamma&window_pct=1", "until": "length >= 1", "shot": true}
Next
- GEX: the four products, their words, the two script indicators and how history is kept.
- Draw a chart layer: the stock renderers these layers use, and the profile's shader.
- Build a feature plugin: a product, a layer and a script of your own.