# GEX `GET` `https://api.unusualwhales.com/api/socket/gex` **NOTE:** This is the documentation for websocket channels `gex`, `gex:`, `gex_strike`, `gex_strike:`, `gex_strike_expiry`, and `gex_strike_expiry:`. Websocket access for personal use is only available through the[Advanced plan](https://unusualwhales.com/pricing?product=api). You can find fully-functional examples that stream data from many channels here: - Python: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output) - Javascript: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs) Connect to the websocket URI: `wss://api.unusualwhales.com/socket?token=` then `join` the channel you wish to stream, for example `gex:SPY` for live GEX updates for SPY, `gex_strike:SPY` for strike-level GEX data, or `gex_strike_expiry:SPY` for strike and expiry level GEX data. Omit the ticker suffix to receive the corresponding updates for every ticker. If you are connecting to multiple ticker specific GEX channels and just want updates for all tickers, connect only to the corresponding global channel: `gex`, `gex_strike`, or `gex_strike_expiry`. Payload format: Format for `gex:`: ``` [ "gex:SPY", { "ticker": "SPY", "timestamp": 1726670396000, "gamma_per_one_percent_move_oi": "-262444980.31", "delta_per_one_percent_move_oi": "", "charm_per_one_percent_move_oi": "-1677926539943.05", "vanna_per_one_percent_move_oi": "2842602508.57", "price": "562.86", "gamma_per_one_percent_move_vol": "-934307209.58", "delta_per_one_percent_move_vol": "", "charm_per_one_percent_move_vol": "-556207588704.10", "vanna_per_one_percent_move_vol": "128814703.59", "gamma_per_one_percent_move_dir": "-9372185.61", "charm_per_one_percent_move_dir": "-2055997560.50", "vanna_per_one_percent_move_dir": "-6220855.09" } ] ``` Format for `gex_strike:`: ``` [ "gex_strike:SPY", { "ticker": "SPY", "timestamp": 1726670426000, "call_delta_oi": "0.4521", "put_delta_oi": "-0.3812", "call_gamma_oi": "174792.59", "put_gamma_oi": "-1172037.66", "call_charm_oi": "85658181.72", "put_charm_oi": "-315259003.37", "call_vanna_oi": "-6103.51", "put_vanna_oi": "1337727.64", "call_delta_vol": "0.0413", "put_delta_vol": "-0.0288", "call_gamma_vol": "15596.81", "put_gamma_vol": "-236.69", "call_charm_vol": "-326871.58", "put_charm_vol": "-68457.78", "call_vanna_vol": "2063.13", "put_vanna_vol": "845.06", "strike": "290", "price": "562.96", "call_gamma_ask_vol": "-4064.62", "call_gamma_bid_vol": "11532.18", "put_gamma_ask_vol": "-140.95", "put_gamma_bid_vol": "95.73", "call_charm_ask_vol": "85184.72", "call_charm_bid_vol": "-241686.87", "put_charm_ask_vol": "-59412.37", "put_charm_bid_vol": "9045.42", "call_vanna_ask_vol": "-537.66", "call_vanna_bid_vol": "1525.46", "put_vanna_ask_vol": "523.79", "put_vanna_bid_vol": "-321.27" } ] ``` Format for `gex_strike_expiry:`: ``` [ "gex_strike_expiry:SPY", { "ticker": "SPY", "expiry": "2025-01-24", "timestamp": 1726670426000, "call_delta_oi": "0.4521", "put_delta_oi": "-0.3812", "call_gamma_oi": "174792.59", "put_gamma_oi": "-1172037.66", "call_charm_oi": "85658181.72", "put_charm_oi": "-315259003.37", "call_vanna_oi": "-6103.51", "put_vanna_oi": "1337727.64", "call_delta_vol": "0.0413", "put_delta_vol": "-0.0288", "call_gamma_vol": "15596.81", "put_gamma_vol": "-236.69", "call_charm_vol": "-326871.58", "put_charm_vol": "-68457.78", "call_vanna_vol": "2063.13", "put_vanna_vol": "845.06", "strike": "290", "price": "562.96", "call_gamma_ask_vol": "-4064.62", "call_gamma_bid_vol": "11532.18", "put_gamma_ask_vol": "-140.95", "put_gamma_bid_vol": "95.73", "call_charm_ask_vol": "85184.72", "call_charm_bid_vol": "-241686.87", "put_charm_ask_vol": "-59412.37", "put_charm_bid_vol": "9045.42", "call_vanna_ask_vol": "-537.66", "call_vanna_bid_vol": "1525.46", "put_vanna_ask_vol": "523.79", "put_vanna_bid_vol": "-321.27" } ] ``` ### Field reference: `gex:` (ticker-aggregate) Per-ticker totals of dealer Greek exposures, expressed as the dollar move per 1% move in the underlying. | Field | Type | Description | |---|---|---| | `ticker` | string | | | `timestamp` | int (ms) | Calculation time, unix epoch milliseconds. | | `price` | decimal string | Underlying spot at `timestamp`. | | `gamma_per_one_percent_move_oi` | decimal | Dollar gamma per 1% spot move, weighted by open interest. | | `delta_per_one_percent_move_oi` | decimal | Dollar delta per 1% spot move, weighted by open interest. | | `charm_per_one_percent_move_oi` | decimal | Dollar charm (delta decay) per 1% spot move, weighted by open interest. | | `vanna_per_one_percent_move_oi` | decimal | Dollar vanna (delta sensitivity to vol) per 1% spot move, weighted by open interest. | | `gamma_per_one_percent_move_vol`, `delta_per_one_percent_move_vol`, `charm_per_one_percent_move_vol`, `vanna_per_one_percent_move_vol` | decimal | Same metrics weighted by session volume rather than open interest. | | `gamma_per_one_percent_move_dir`, `charm_per_one_percent_move_dir`, `vanna_per_one_percent_move_dir` | decimal | Directional (bid/ask classified) volume-weighted variants. | ### Field reference: `gex_strike:` and `gex_strike_expiry:` Greek exposures broken out by strike (and additionally by expiry for the `_expiry` channel). All numeric Greek fields are decimal strings. Calls and puts are reported separately; sum them to get net exposure at the strike. | Field | Type | Description | |---|---|---| | `ticker` | string | | | `strike` | decimal string | Strike price. | | `expiry` | date string `YYYY-MM-DD` | Only on `gex_strike_expiry`. | | `timestamp` | int (ms) | Calculation time, unix epoch milliseconds. | | `price` | decimal string | Underlying spot at `timestamp`. | | `call_delta_oi` / `put_delta_oi` | decimal | Delta exposure from calls / puts at this strike, weighted by open interest. | | `call_gamma_oi` / `put_gamma_oi` | decimal | Gamma exposure from calls / puts at this strike, weighted by open interest. | | `call_charm_oi` / `put_charm_oi` | decimal | Charm exposure from calls / puts at this strike, weighted by open interest. | | `call_vanna_oi` / `put_vanna_oi` | decimal | Vanna exposure from calls / puts at this strike, weighted by open interest. | | `call_delta_vol`, `put_delta_vol`, `call_gamma_vol`, `put_gamma_vol`, `call_charm_vol`, `put_charm_vol`, `call_vanna_vol`, `put_vanna_vol` | decimal | Same metrics weighted by session volume rather than open interest. | | `call_gamma_ask_vol` / `call_gamma_bid_vol` / `put_gamma_ask_vol` / `put_gamma_bid_vol` | decimal | Gamma exposure attributed to ask-side (assumed dealer-sold) and bid-side (assumed dealer-bought) flow at this strike. | | `call_charm_ask_vol`, `call_charm_bid_vol`, `put_charm_ask_vol`, `put_charm_bid_vol` | decimal | Charm exposure split by side. | | `call_vanna_ask_vol`, `call_vanna_bid_vol`, `put_vanna_ask_vol`, `put_vanna_bid_vol` | decimal | Vanna exposure split by side. | ## Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ## Example ### curl ```bash curl -X GET "https://api.unusualwhales.com/api/socket/gex" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/socket/gex", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` ## Response Example ```json { "data": [] } ```