跳到主要内容
OptionData
首年 50% 优惠
14 天免费试用后,首年可享 50% 优惠。请先创建账户;完成资格审核需要邀请码。

市场结构 API(GEX)

正在准备 API 工作台…

API 产品介绍与示例
市场结构 API

GEX 与交易商持仓市场结构 API

通过一个标的级快照分析完整期权链:按行权价和到期日的 Gamma Exposure、Gamma Flip、Call/Put 墙、Max Pain、IV Rank、IV Percentile、偏斜、期限结构、当日资金流与标的元数据。

Gamma Exposure APIGEX API交易商持仓 APIGamma Flip期权市场结构

Ask ChatGPT or Claude Code

Copy this prompt, paste it into ChatGPT, Claude, Claude Code, Cursor, or Codex, then add your question. It tells the model to read our public docs first — no API key needed for that step.

You are helping me use OptionData (https://www.optiondata.io/), an OPRA-licensed U.S. equity options data API.

Before answering, fetch these public files (no login required) and treat them as the source of truth:
- https://www.optiondata.io/llms.txt — short product map (same content as https://www.optiondata.io/llm.txt)
- https://www.optiondata.io/llms-full.txt — full API reference
- https://www.optiondata.io/openapi.json — HTTP OpenAPI

Do not invent endpoints, fields, tables, or limits. Prefer `Authorization: Bearer apikey_…` for HTTP APIs. Realtime uses `wss://ws.optiondata.io` with a `token` query parameter.

Products:
- Realtime trades WebSocket: wss://ws.optiondata.io
- Historical SQL: POST https://www.optiondata.io/api/historical/sql
- Option chain: POST https://www.optiondata.io/api/option-chain
- Market structure: GET https://www.optiondata.io/api/v1/market-structure/{symbol}

I am asking about: Market Structure API (GEX)
- Product / playground page: https://www.optiondata.io/market_structure/
- Markdown: https://www.optiondata.io/md/market-structure-api/
- HTML docs: https://www.optiondata.io/docs/market-structure-api/

My question:

按行权价和到期日的 GEX

直接使用完整期权链的带符号 Call/Put Gamma Exposure,无需每个客户端重复聚合。

持仓价位与波动率背景

同时读取 Gamma Flip、GEX/OI 墙、Max Pain、IV Rank、IV Percentile、偏斜、蝶式与期限斜率。

自包含的标的快照

每个响应都包含价格、成交量、市值、标的分类、当日资金流、新鲜度时间戳与结构数据。

适合场景

  • GEX 图与交易商持仓看板
  • Flyagonal、铁鹰与蝶式研究
  • 0DTE 与周度结构监控
  • 波动率状态与价位筛选

常见 API 问题

市场结构 API 与期权链 API 有什么区别?

期权链返回可筛选的合约级报价与 Greeks;市场结构返回预计算的完整期权链标的快照,用于持仓、波动率与关键价位分析。

交易商持仓是否代表已披露的真实交易商库存?

不是。端点对未平仓量 Gamma Exposure 使用文档化的交易商做空 Put 符号约定。这是结构模型,不是任何交易商真实账簿的报告。

可以请求历史市场结构快照吗?

可以。当保留的快照可用时添加 date=YYYY-MM-DD;省略 date 则请求当前快照。

可以从响应推导净 GEX 与 Put/Call OI 吗?

可以。推导方式见市场结构文档。本页不再复述公式。

市场结构快照如何工作

使用 Authorization: Bearer YOUR_API_KEY 请求 GET /api/v1/market-structure/:symbol。可选 date=YYYY-MM-DD 读取历史快照;省略则取当前快照。

每个响应是标的级快照:结构价位、波动率背景与轻量当日资金流,并带 as-of 时间戳。字段级 schema 见市场结构文档。

交易商持仓是基于未平仓量 Gamma 的带符号结构模型,不是已披露的真实账簿。需要可筛选合约报价时用期权链;需要预计算关键价位时用市场结构。

市场结构(GEX)API 参考 · 全部 API 文档 · openapi.json

示例:SPY 结构快照
curl 'https://www.optiondata.io/api/v1/market-structure/SPY' \
  -H 'Authorization: Bearer YOUR_API_KEY'

请求与响应结构

字段名、类型、过滤参数、限额与错误码以公开 API 文档为准。本产品页不再维护第二份 schema。

市场结构(GEX)API 参考 · openapi.json