curl https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC \
-H "X-API-Key: gex_sk_your_key_here"
import requests
resp = requests.get(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
headers={"X-API-Key": "gex_sk_your_key_here"},
)
data = resp.json()["data"]
for exp in data["expirations"]:
t = exp["total"]
print(
f"{exp['date']} (d={exp['days_to_expiry']:>3}): "
f"OI=${t['oi_usd']:>14,.0f} "
f"net GEX={t['total_gex']:+14,.0f}"
)
const resp = await fetch(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
{ headers: { "X-API-Key": "gex_sk_your_key_here" } }
);
const { data } = await resp.json();
for (const exp of data.expirations) {
const t = exp.total;
console.log(
`${exp.date} (d=${exp.days_to_expiry}): ` +
`OI=$${t.oi_usd.toFixed(0)}, net GEX=${t.total_gex.toFixed(0)}`
);
}
{
"data": {
"expirations": [
{
"date": "15APR26",
"days_to_expiry": 0,
"timestamp": "2026-04-15T00:00:00+00:00",
"exchanges": {
"deribit": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
},
"total": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
}
],
"metadata": {
"basecoin": "BTC",
"exchanges_used": ["deribit"],
"current_price": 74037.30,
"expiration_count": 11
}
},
"meta": {
"timestamp": "2026-04-14T10:00:00+00:00",
"exchange": "all",
"coin": "BTC",
"rate_limit": {
"limit": 500,
"remaining": 494,
"reset": "2026-04-15T00:00:00+00:00"
}
}
}
Endpoints
GEX Term Structure
Open Interest and Gamma Exposure per expiration, broken down by exchange
GET
/
gex
/
term-oi
/
{exchange}
/
{coin}
curl https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC \
-H "X-API-Key: gex_sk_your_key_here"
import requests
resp = requests.get(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
headers={"X-API-Key": "gex_sk_your_key_here"},
)
data = resp.json()["data"]
for exp in data["expirations"]:
t = exp["total"]
print(
f"{exp['date']} (d={exp['days_to_expiry']:>3}): "
f"OI=${t['oi_usd']:>14,.0f} "
f"net GEX={t['total_gex']:+14,.0f}"
)
const resp = await fetch(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
{ headers: { "X-API-Key": "gex_sk_your_key_here" } }
);
const { data } = await resp.json();
for (const exp of data.expirations) {
const t = exp.total;
console.log(
`${exp.date} (d=${exp.days_to_expiry}): ` +
`OI=$${t.oi_usd.toFixed(0)}, net GEX=${t.total_gex.toFixed(0)}`
);
}
{
"data": {
"expirations": [
{
"date": "15APR26",
"days_to_expiry": 0,
"timestamp": "2026-04-15T00:00:00+00:00",
"exchanges": {
"deribit": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
},
"total": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
}
],
"metadata": {
"basecoin": "BTC",
"exchanges_used": ["deribit"],
"current_price": 74037.30,
"expiration_count": 11
}
},
"meta": {
"timestamp": "2026-04-14T10:00:00+00:00",
"exchange": "all",
"coin": "BTC",
"rate_limit": {
"limit": 500,
"remaining": 494,
"reset": "2026-04-15T00:00:00+00:00"
}
}
}
What it returns
For each non-expired expiration, this endpoint returns:- Open Interest in USD (calls, puts, and total) per exchange
- Gamma Exposure (total, upside, downside, absolute) per exchange
- Contract count per exchange
- Aggregated totals across all requested exchanges
- Per-expiration metadata — date, days to expiry, timestamp
Path parameters
Exchange name:
bybit, deribit, okx, or all (cross-exchange aggregation).Base coin symbol (uppercase).
Response shape
{
"data": {
"expirations": [
{
"date": "15APR26",
"days_to_expiry": 0,
"timestamp": "2026-04-15T00:00:00+00:00",
"exchanges": {
"deribit": {
"oi_usd": 252323000.06,
"call_oi_usd": 115940056.62,
"put_oi_usd": 136382943.44,
"contracts": 104,
"total_gex": -2481405.91,
"abs_gex": 23314299.33,
"upside_gex": 8007918.34,
"downside_gex": 15306380.99
}
},
"total": {
"oi_usd": 252323000.06,
"call_oi_usd": 115940056.62,
"put_oi_usd": 136382943.44,
"contracts": 104,
"total_gex": -2481405.91,
"abs_gex": 23314299.33,
"upside_gex": 8007918.34,
"downside_gex": 15306380.99
}
}
],
"metadata": {
"basecoin": "BTC",
"exchanges_used": ["deribit"],
"current_price": 74037.30,
"expiration_count": 11,
"timestamp": "2026-04-14T22:43:30.035178+00:00",
"timestamp_ms": 1776206610035
}
}
}
Per-expiration field guide
Each entry inexchanges.* and total contains the same metric set:
| Field | Meaning | ||||
|---|---|---|---|---|---|
oi_usd | Total open interest, USD notional | ||||
call_oi_usd | Open interest contributed by call options, USD | ||||
put_oi_usd | Open interest contributed by put options, USD | ||||
contracts | Number of option contracts (not USD) | ||||
total_gex | Net dealer gamma exposure (calls – puts), USD per 1% move | ||||
abs_gex | Absolute GEX magnitude — ` | call_gex | + | put_gex | ` |
upside_gex | GEX concentrated above spot | ||||
downside_gex | GEX concentrated below spot |
total holds the aggregate across all exchanges included in the response.
When querying a single exchange (e.g. deribit), exchanges.deribit and
total are identical.
Errors
Exchange name not recognized.
No data available for this coin/exchange combination.
curl https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC \
-H "X-API-Key: gex_sk_your_key_here"
import requests
resp = requests.get(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
headers={"X-API-Key": "gex_sk_your_key_here"},
)
data = resp.json()["data"]
for exp in data["expirations"]:
t = exp["total"]
print(
f"{exp['date']} (d={exp['days_to_expiry']:>3}): "
f"OI=${t['oi_usd']:>14,.0f} "
f"net GEX={t['total_gex']:+14,.0f}"
)
const resp = await fetch(
"https://api.gammaflip.io/api/v1/gex/term-oi/all/BTC",
{ headers: { "X-API-Key": "gex_sk_your_key_here" } }
);
const { data } = await resp.json();
for (const exp of data.expirations) {
const t = exp.total;
console.log(
`${exp.date} (d=${exp.days_to_expiry}): ` +
`OI=$${t.oi_usd.toFixed(0)}, net GEX=${t.total_gex.toFixed(0)}`
);
}
{
"data": {
"expirations": [
{
"date": "15APR26",
"days_to_expiry": 0,
"timestamp": "2026-04-15T00:00:00+00:00",
"exchanges": {
"deribit": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
},
"total": {
"oi_usd": 252323000,
"call_oi_usd": 115940056,
"put_oi_usd": 136382943,
"contracts": 104,
"total_gex": -2481405,
"abs_gex": 23314299,
"upside_gex": 8007918,
"downside_gex": 15306380
}
}
],
"metadata": {
"basecoin": "BTC",
"exchanges_used": ["deribit"],
"current_price": 74037.30,
"expiration_count": 11
}
},
"meta": {
"timestamp": "2026-04-14T10:00:00+00:00",
"exchange": "all",
"coin": "BTC",
"rate_limit": {
"limit": 500,
"remaining": 494,
"reset": "2026-04-15T00:00:00+00:00"
}
}
}
⌘I