# Gamma Exposure (GEX) Levels (`improving_victory/gex-levels`) Actor

Get gamma exposure (GEX) levels for any ticker — total GEX, gamma flip, call & put walls, and the full per-strike profile. Multi-ticker, export-ready.

- **URL**: https://apify.com/improving\_victory/gex-levels.md
- **Developed by:** [Dheeraj Palakurthi](https://apify.com/improving_victory) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Gamma Exposure (GEX) Levels

**Get gamma exposure levels for any ticker — total GEX, gamma flip, call/put walls, and the full per-strike profile — in one call.**

This Actor returns dealer gamma-exposure (GEX) levels for the stocks and ETFs you care about. Feed it a list of tickers and get back a clean, structured record per symbol: the net GEX, the gamma-flip price, the call wall and put wall, and the complete GEX-by-strike profile — ready to drop into a dashboard, alert, or trading model.

***

### Screenshots

**Pass one or more tickers — no code required.**

![Input](https://api.apify.com/v2/key-value-stores/nx7jAu2fLWDQgEeF4/records/01-input)

**See the dealer gamma-exposure profile with call and put walls.**

![GEX by strike](https://api.apify.com/v2/key-value-stores/nx7jAu2fLWDQgEeF4/records/02-gex-profile)

**Get one clean, structured record per ticker — export anywhere.**

![Structured output](https://api.apify.com/v2/key-value-stores/nx7jAu2fLWDQgEeF4/records/03-output)

***

### What you get

- **Total GEX** and **gamma regime** (positive/negative net gamma)
- **Gamma flip price** — the level where cumulative GEX crosses zero (from the API when available, otherwise estimated)
- **Call wall** — strike with the largest positive GEX
- **Put wall** — strike with the largest negative GEX
- **Key levels** — the most significant GEX strikes by magnitude
- **Full per-strike profile** (`allLevels`) — optional, for charting the whole curve
- **Spot price** and a fetch timestamp

***

### How to use it

1. Enter one or more **tickers** (e.g. `SPY`, `QQQ`, `MU`).
2. Optionally set an **expiry** (`YYYY-MM-DD`) to focus on a single expiration, or leave it blank to aggregate across all listed expirations.
3. Run. Export as **CSV, Excel, JSON, or via API**.

```json
{
  "tickers": ["SPY", "QQQ", "MU"],
  "expiry": null,
  "includeAllLevels": true
}
```

***

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `tickers` | `string[]` | — | Symbols to fetch GEX for (required). |
| `expiry` | `string` | `null` | Single expiration `YYYY-MM-DD`, or blank for all. |
| `includeAllLevels` | `boolean` | `true` | Include the full per-strike GEX profile. |
| `concurrency` | `integer` | `5` | Tickers fetched in parallel (1–20). |
| `apiBaseUrl` | `string` | FlowAlpha | GEX API base URL. |
| `apiPath` | `string` | `/api/gex` | GEX endpoint path on the API host. |

***

### Output

One record per ticker:

```json
{
  "ticker": "SPY",
  "expiry": null,
  "asOf": "2026-08-24T15:32:10Z",
  "marketSession": "regular",
  "spotPrice": 763.47,
  "totalGex": -2298352129.45,
  "netGexDollars": -2298352129.45,
  "gexPerOnePctMove": -22983521.29,
  "gammaRegime": "negative",
  "gammaFlipPrice": 761.2,
  "gammaFlipSource": "api",
  "distanceToFlipPct": -0.3,
  "absGammaStrike": 765,
  "putCallGammaRatio": 1.42,
  "callWall": 768, "callWallGex": 118605732.99, "callWallDistancePct": 0.59,
  "putWall": 763,  "putWallGex": -1087062811.25, "putWallDistancePct": -0.06,
  "levels": [ { "strike": 764, "gex": 511579028.15, "type": "positive" } ],
  "allLevels": [ { "strike": 718, "gex": -29727.2, "type": "negative" }, "… full profile …" ],
  "byExpiration": [ { "expiry": "2026-08-28", "totalGex": -523513045.14, "callWall": 768, "putWall": 763 } ],
  "history": { "prevTotalGex": -1850000000, "changeVsPrevPct": 24.2, "percentile20d": 0.88 },
  "fetchedAt": "2026-08-24T05:10:00.000Z"
}
```

`gammaFlipSource` is `api` when the endpoint supplies the flip, `estimated` when computed client-side, or `unavailable`. Enriched fields (`netGexDollars`, `byExpiration`, `history`, …) are populated when the API returns them and `null` otherwise. See **[API\_SPEC.md](API_SPEC.md)** for the full endpoint contract.

If a ticker can't be fetched, its record contains an `error` field instead.

***

### How it works

The Actor queries a GEX API (FlowAlpha by default) for each ticker, then derives the **call wall** (largest positive-GEX strike), **put wall** (largest negative-GEX strike), and a **gamma-flip estimate** (cumulative-GEX zero-crossing, interpolated between strikes) when the API doesn't supply one directly.

***

### Notes

- **Data source:** GEX values come from the configured API (`apiBaseUrl`). The Actor computes only the derived summary fields (walls, flip estimate, regime).
- **Not investment advice.** This Actor is a data utility. Gamma-exposure figures are estimates that depend on the underlying data and modeling assumptions; use them at your own risk.

***

### Changelog

#### 1.0.0

- Initial release.
- Multi-ticker GEX fetch with optional expiry filter.
- Derived call wall, put wall, gamma regime, and gamma-flip estimate.
- Dataset + output schemas with a table view.

***

### About the maker

Built and maintained by **Dheeraj Palakurthi** — a developer building options-market and trading-data tools. This Actor is actively maintained and improved based on user feedback.

⭐ If it's useful, a rating helps other traders find it.

# Actor input Schema

## `tickers` (type: `array`):

One or more stock/ETF symbols to fetch GEX for (e.g. SPY, QQQ, MU).

## `expiry` (type: `string`):

Filter GEX to a single option expiration date (YYYY-MM-DD). Leave empty to aggregate across all listed expirations.

## `includeAllLevels` (type: `boolean`):

If enabled, each record includes allLevels — the complete GEX-by-strike profile. Disable for a lighter response (top levels only).

## `concurrency` (type: `integer`):

How many tickers to fetch in parallel.

## `apiBaseUrl` (type: `string`):

Base URL of the GEX API. Defaults to the FlowAlpha endpoint.

## `apiPath` (type: `string`):

Path of the GEX endpoint on the API host.

## Actor input object example

```json
{
  "tickers": [
    "SPY",
    "QQQ"
  ],
  "includeAllLevels": true,
  "concurrency": 5,
  "apiBaseUrl": "https://www.flowalpha.cloud",
  "apiPath": "/api/gex-pro"
}
```

# Actor output Schema

## `levels` (type: `string`):

Per-ticker gamma exposure records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tickers": [
        "SPY",
        "QQQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("improving_victory/gex-levels").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tickers": [
        "SPY",
        "QQQ",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("improving_victory/gex-levels").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tickers": [
    "SPY",
    "QQQ"
  ]
}' |
apify call improving_victory/gex-levels --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,improving_victory/gex-levels"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/v3uDclvS1qwRbRj23/builds/bZvoXeBRV0bCHjh2j/openapi.json
