research
REST endpoint for on-demand gbR options chart assets, 3D volatility surfaces, and tabular CSV/JSON datasets across US optionable equities.
Research API Specification & Interactive Builder
The complete REST endpoint specification, accepted parameter schemas, response models, and interactive URL testing tools are maintained directly on the platform.
View Full API Specification & Builder on gexbot.com ↗Endpoint Overview
The Research API computes on-demand Greek exposures, volatility surfaces, open interest profiles, and price-spread parity. It serves index options, ETFs, and all US optionable equities.
GET /research/{ticker}/{metric}Architecture & Service Base URLs
- API Gateway:
/research/{ticker}/{metric} - Asset Storage & CDN:
https://assets.gexbot.com/(orhttps://r.gex.bot/). Theurlfield of a descriptor already starts withgbR/.
Operating Hours & Data Cadence
- Regular Market Hours (09:30–16:00 ET):
- Evaluates live option market quotes using the
gbRpricing model. - Caches requests on 15-minute floor intervals on-demand.
- Evaluates live option market quotes using the
- Index Option Extended Hours (16:00–16:15 ET):
- Index options (such as SPX and NDX) trade until 16:15 ET.
- Requests submitted at or after 16:15 ET include trades from this 15-minute post-close window.
- Premarket Hours (Before 09:30 ET):
- Open Interest (OI) refreshes daily at 08:00 ET.
- Calculations use previous session quotes under the
gbRmodel. The premarket cache refreshes once after 08:00 ET. - Option volume metrics remain disabled until market open at 09:30 ET.
- After Hours, Final Snapshots & Weekends:
- The final scheduled End-of-Day (EOD) snapshot generates every evening at 23:00 UTC (19:00 EDT / 18:00 EST).
- After 17:00 ET, all after-hours queries return the stabilized closing snapshot from the session.
- Queries on weekends and market holidays return the cached snapshot from the previous trading session.
Can I request data for a past date?
Most Research API metrics have no date parameter. They use the options chain that the cache holds at request time.
The hv metric also supports view=history. It returns daily volatility records, not past options chains. See
Daily volatility history.
For past options-chain snapshots, use the gexbot history endpoints:
- EOD report (
GET /hist/eod/{ticker}): the latest End-of-Day ZIP archive for one ticker. - Historical download (
GET /hist/{ticker}/{package}/{category}/{date}): one day of history, with a Quant API key.
These endpoints serve a different data model. Their files are the Classic, State and Orderflow {package}/{category} snapshots, such as classic/gex_zero and state/delta_one. They do not serve the Research metrics or the skew, term and surface views. They have no strikes, view or DTE parameters, so the strike window of this endpoint does not apply to them. They need a gexbot API key. A Research API key cannot call them.
Option Expiration & Settlement Cadence
- Settlement Timestamps:
- AM-Settled Series: Standard monthly index contracts expire at 10:00 ET on their expiration date.
- PM-Settled Series: Daily and weekly equity and index contracts expire at 16:00 ET on their expiration date.
- Expired Series Filtering:
- Contracts drop immediately from active expirations and calculations once the market clock reaches their expiration timestamp.
- DTE resolution, exposure metrics, and API responses exclude expired contracts automatically.
Authentication & Headers
All requests require a Research API key (prefix research_). You can create one when your account has the Research add-on. The endpoint refuses gexbot keys, including Quant keys, with 403. Pass the key in the Authorization header as a Bearer token:
Authorization: Bearer <YOUR_API_KEY>
User-Agent: <YOUR_APP_NAME>/1.0
Accept: application/json| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token format: Bearer <YOUR_API_KEY>. |
User-Agent | string | Yes | Unique identifier for your client application. |
Accept | string | Yes | Set to application/json, or text/csv for the csv format. |
Path Parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
ticker | string | Yes | SPX, NVDA, AAPL | Ticker symbol of the underlying asset (1 to 6 letters, not case-sensitive). Digits, dots and slashes are not accepted. |
metric | string | Yes | gex_oi, iv_mid, oi | The analytical metric or Greek exposure to calculate. |
Metric Aliases
The API translates legacy and shorthand metric names to internal engines. Metric names are not case-sensitive.
| Request Alias | Canonical Engine Metric | Category |
|---|---|---|
oi | open_interest | Market Data |
parity | put_call_parity | Market Data |
gamma_wall | gamma_wall_abs | Market Data |
vol_trigger | gamma_flip | Market Data |
iv_ask | ask_iv | Implied Volatility |
iv_mid | mid_iv | Implied Volatility |
iv_bid | bid_iv | Implied Volatility |
extrinsic | time_value | Market Data |
Max Pain (max_pain)
max_pain is a Market Data metric. It has no alias. For each expiration, it finds the strike where the total intrinsic value of all open calls and puts is lowest.
- The metric ignores
view. The defaultend_dteis64. - An image format draws the max pain strike of each expiration as a line across the expirations.
jsonandcsvreturn one row for each expiration, with the columnsEXPIRATION_DATE,STRIKE_PRICEandMAX_PAIN.STRIKE_PRICEis the max pain strike.MAX_PAINis the total intrinsic value at that strike, in dollars: the sum ofintrinsic value × open interest × 100over the contracts of the expiration. It is not a price.
Query Parameters
The view and type values are case-sensitive. All other values are not. Only the value true (any case) turns a boolean on. Any other value is false. A start_dte or end_dte value that is not an integer resets both parameters to their defaults. For chart formats an empty expiration window moves to the nearest expiration.
| Parameter | Type | Default | Accepted Values | Description |
|---|---|---|---|---|
format | string | webp | webp, png, jpeg, svg, pdf, json, csv | Response payload format. Image formats return an asset descriptor. |
view | string | skew | skew, term, surface, mirror, heatmap, what_if, history | Chart visualization mode. mirror applies to iv_bid, iv_mid and iv_ask only. heatmap, what_if and history apply to the hv metric (heatmap also applies to exposure, open interest, volume and implied-volatility metrics). Other metrics fall back to skew. |
type | string | line (bar for oi, volume and exposure metrics; scatter for parity) | bar, line, histogram, scatter | Series render style. |
theme | string | dark | dark, light | Color palette for rendered chart images. |
strikes | integer | 15 (50 for oi and volume, 30 for exposure metrics) | Integer, minimum 5. Image formats clamp to 5-250. json and csv have no 250 ceiling. | Number of listed strikes on each side of the spot price. The value counts strikes, not points or percent of price. One window applies to all expirations. The center is the spot of the requested ticker. For an index such as NDX, the center is the cash index spot, not the futures price. To translate it to a futures price, use indexconverter.com or gexbot.com/converter. The response omits each strike outside the window. For json and csv, a value of 30 or less can return every strike of the chain. This includes the defaults 15 and 30. A value above 30 returns that number of strikes on each side. A value larger than the chain returns the full chain. |
rows | integer | 500 | Integer 1-750 | Number of sessions in the hv heatmap or history view. |
start_dte | integer | 0 | Integer 0-1000 | Start days-to-expiration boundary (inclusive). |
end_dte | integer | 98 (365 for view=term, 64 for max_pain) | Integer 0-1000 | End days-to-expiration boundary (inclusive). |
expiration_filter | string | * (all expirations) | * (all), m (monthly), w (weekly), q (quarterly) | Keeps only one expiration series. An unknown value takes *. Has no effect on json or csv output. |
contract_filter | string | all | all, calls, puts | Filters calculation contracts by option side. |
moneyness_filter | string | None (ntm for iv_bid, iv_mid and iv_ask) | otm, ntm, itm, atm, d10, d15, d20, d25 | Filters contracts by moneyness or delta bucket. Default is ntm for iv_bid, iv_mid and iv_ask. |
contract_agg | boolean | true | true, false | When true, nets calls and puts into one value per strike. When false, keeps calls and puts as separate rows. |
expiry_agg | boolean | false | true, false | When true, aggregates all expiries across each strike. |
skew_adj | boolean | false | true, false | Adjusts Greek calculations for volatility skew. |
limit_y | boolean | true | true, false | Clamps the Y-axis scale to remove extreme statistical outliers. Send limit_y=false to disable the clamp. |
series | string | None | deltas, moneyness, strikes | For IV term view, plots term structure across delta tiers. |
Daily volatility history
Request GET /research/{ticker}/hv?view=history with format=json (history returns JSON only). Use rows (1 to
750, default 500) to set the number of sessions.
The response contains an iv_method map and rows in oldest-first order. Each row holds:
d: session date (YYYY-MM-DD).src: row source (eod,backfill, orreplay).c: session close price, ornullwhen unavailable.hv5throughhv360: 17 historical volatility windows in percent.iv4throughiv365: 14 implied volatility tenors in percent.iv_dte: the DTE (or pair of DTEs) used for each IV tenor.ivn7throughivn360(row version 4): the implied volatility of the one expiration nearest eachcmtenor, in percent.ivn_dte: the DTE of the expiration used for eachivnvalue.
The iv_method map marks each tenor as cm (constant maturity) or nearest. The cm method interpolates total
variance between two expirations. At an edge, it uses the nearest expiration. The nearest method takes the
expiration with the smallest distance in days from the tenor. At an equal distance, it takes the expiration with
the lower implied volatility. Rows before version 4 do not have the ivn keys.
Response Schemas
1. Image Asset Descriptor Response
When format is webp, png, svg, jpeg, or pdf, the server returns a JSON object containing the relative asset URL:
{
"url": "gbR/QUFQTF9za2V3X2NvbnRyYWN0X2FnZ18yMDI2MDcwOFQxNTQ4MDU.svg",
"name": "QUFQTF9za2V3X2NvbnRyYWN0X2FnZ18yMDI2MDcwOFQxNTQ4MDU.svg",
"content_type": "image/svg+xml",
"description": "$AAPL skew 20260708T154805",
"time_stamp": "20260708T154805",
"model_ts": "2026-07-08T15:45:00-04:00",
"model": "gbR"
}| Field | Type | Description |
|---|---|---|
url | string | Relative asset path. Resolve against https://r.gex.bot/ to fetch the file. |
name | string | Asset filename. Matches the last path segment of url. |
content_type | string | MIME type of the rendered file. |
description | string | Summary containing ticker, metric, and generation timestamp. |
time_stamp | string | Generation timestamp in YYYYMMDDTHHMMSS format. |
model_ts | string or null | ISO-8601 timestamp of the options-chain snapshot the chart used. |
model | string | Volatility model of the request. Default gbR. |
2. Tabular Data Response (format=csv and format=json)
When format=csv the endpoint returns text/csv with Content-Disposition: attachment; filename="SPX_data.csv". When format=json it returns application/json: an array of row objects with the same columns, with Content-Disposition: attachment; filename="SPX_data.json".
- Skew view columns:
idx_strike_price,idx_expiration_date(absent whenexpiry_agg=true),idx_call_put_flag(absent whencontract_agg=true, the default) and the metric id in upper case, for exampleGEX_OI. - Term view columns:
idx_expiration_date,idx_call_put_flag(absent whencontract_agg=true) and the metric. - Surface view: one row per strike and expiration with the metric.
gamma_flip,vol_trigger,gamma_wallandgamma_wall_absreturn the gamma-flip table instead. The table has one row for each expiration, with the columnsEXPIRATION_DATE,GAMMA FLIP,GAMMA WALL,CALL WALLandPUT WALL. It has no row for all expirations together.time_valueandextrinsicreturn the columnEXTRINSIC_VALUE: the mid quote less intrinsic value, with a minimum of zero. An image format draws extrinsic value by strike (skew), by expiration (term) or as a surface.parityandput_call_parityare images only.csvandjsonreturn400.skew_adjandexpiration_filterhave no effect oncsvorjsonoutput.
Example header with contract_agg=false:
idx_strike_price,idx_expiration_date,idx_call_put_flag,GEX_OISign of the GEX values
In gex_oi, gex_vol and gex_both rows, a call value is positive and a put value is negative. Do not negate the put rows. The API returns them negative.
- With
contract_agg=false, calls and puts are separate rows. Theidx_call_put_flagcolumn isCorP. - With
contract_agg=true, the value at a strike is the call value plus the put value. This net value is negative when the put exposure is larger.
Gamma Flip from the rows
The Research chart draws the Gamma Flip at the strike where the cumulative Net GEX is lowest. Use the signed value, not the absolute value. To get the flip for all expirations together from gex_oi rows:
- Request
format=jsonwithexpiry_agg=trueandcontract_agg=true. Use the samestart_dteandend_dteas the chart. Setstrikesto a value larger than the strike count of the chain, for example100000. - Sort the rows by
idx_strike_price, from the lowest strike to the highest strike. - Calculate the cumulative sum of
GEX_OI. - Find the row with the lowest cumulative value. Its
idx_strike_priceis the Gamma Flip.
The chart starts the cumulative sum at the lowest strike of the chain. Then it looks for the lowest value only in the strikes that it shows. A flip that you calculate from more strikes can thus be outside the chart window.
The GAMMA FLIP column of the gamma_flip table uses the same method for each expiration. It uses GEX_BOTH (open interest plus volume) and all strikes of the expiration. Thus it can be different from a flip that you calculate from gex_oi.
Error Handling & Rate Limits
| HTTP Status | Error Reason | Response Body / Behavior |
|---|---|---|
400 Bad Request | Unknown or restricted metric, or an invalid parameter. | {"error": "invalid request"}. Other messages: Invalid ticker., Invalid metric., Ticker ZZZZ is not a valid symbol., GEX_OI does not support skew adjustment., PUT_CALL_PARITY is available as an image only. Request an image format., Volume-based metrics are unavailable during pre-market hours. Please wait for market open., User-Agent not found., Authorization header not found. |
400 Bad Request | The selected metric cannot appear as a surface. | {"error": "The surface chart cannot show the <metric> metric."} |
400 Bad Request | No data is left after the filters. A metric with no value in the strike window gives the same result, for example a surface view when the Greeks are not available. | {"error": "No data found after applying filters. Try widening your strike range or checking your moneyness/contract filters."} |
401 Unauthorized | Invalid API key. A missing Authorization header returns 400. | The response carries no {"error": ...} body. |
403 Forbidden | The key is not a Research API key. | The response carries no {"error": ...} body. |
403 Forbidden | The requested format is not available to this key. | {"error": "This research data format is not available for restricted commercial access."} |
429 Too Many Requests | Query quota exceeded for the current window. | {"error": "Rate limit exceeded."} |
500 Internal Server Error | The research service failed. | {"error": "Failed to reach upstream research service."}, or a research-service message such as Failed to load data. or Failed to build chart. |
503 Service Unavailable | The research service could not get the Greeks for the chain. It does not return a chart with Greeks missing. Send the request again later. | {"error": "Server error."} |
Code Examples
BASE_URL="<your host and version>"
# Request SVG chart asset descriptor
curl -X GET "$BASE_URL/research/SPX/gex_oi?format=svg&strikes=25&contract_agg=true" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "User-Agent: MyResearchApp/1.0" \
-H "Accept: application/json"
# Request raw CSV dataset
curl -X GET "$BASE_URL/research/AAPL/gex_oi?format=csv&start_dte=0&end_dte=30" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "User-Agent: MyResearchApp/1.0" \
-H "Accept: text/csv"import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "<your host and version>"
headers = {
"Authorization": f"Bearer {API_KEY}",
"User-Agent": "PythonClient/1.0",
"Accept": "application/json",
}
# Fetch chart asset descriptor
url = f"{BASE_URL}/research/NVDA/iv_mid"
params = {
"format": "webp",
"view": "term",
"start_dte": 0,
"end_dte": 180
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
image_url = f"https://assets.gexbot.com/{data['url']}"
print(f"Chart available at: {image_url}")const API_KEY = 'YOUR_API_KEY';
const BASE_URL = '<your host and version>';
async function fetchResearchCSV(ticker: string, metric: string) {
const url = new URL(`${BASE_URL}/research/${ticker}/${metric}`);
url.searchParams.set('format', 'csv');
url.searchParams.set('start_dte', '0');
url.searchParams.set('end_dte', '98');
const res = await fetch(url.toString(), {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'User-Agent': 'NodeApp/1.0',
'Accept': 'text/csv',
},
});
if (!res.ok) {
throw new Error(`Request failed with status ${res.status}`);
}
const csvData = await res.text();
return csvData;
}