服务端期权流过滤
按标的、权利金、情绪、到期日和合约细节过滤,减少客户端无关数据。
正在准备 API 工作台…
实时期权数据 API:在美股交易时段经 WebSocket 流式接收期权成交,支持服务端过滤、Greeks、隐含波动率、权利金、情绪,以及 RAW 或 AGGREGATED 模式。适合期权流扫描、提醒与看板。
wss://ws.optiondata.io?token=YOUR_API_KEY&symbols=AAPL,SPYCopy 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: Realtime Option Trades API
- Product / playground page: https://www.optiondata.io/realtime_data
- Markdown: https://www.optiondata.io/md/realtime-option-trades-api
- HTML docs: https://www.optiondata.io/docs/realtime-option-trades-api
My question:
按标的、权利金、情绪、到期日和合约细节过滤,减少客户端无关数据。
每条成交可包含 Greeks、隐含波动率、权利金与方向上下文。当前字段列表以实时文档为准。
使用一个签名 API Key 支撑实时流监控、客户看板、提醒和内部交易工具。
是。实时 API 在美股交易时段通过 WebSocket 推送期权成交,也提供样例响应方便评估和阅读文档。
可以。你可以使用标的、权利金、到期日、情绪和模式等服务端过滤参数。
AGGREGATED 会合并同一时刻、同一合约的成交,生成更干净的事件;RAW 保留原始成交。
使用 API token(cus_… 或 apikey_…)连接 wss://ws.optiondata.io。美股期权交易时段推送 OPRA 授权成交;收盘后连接保持并发送心跳,下一交易日自动恢复。
通过查询参数做服务端过滤:symbols、premium、put_call、delta、expiry_days、sentiment、side、aggregation_mode(RAW/AGGREGATED)等。AGGREGATED 合并同一秒同一合约成交;RAW 为逐笔原始成交。
每条成交可含 30+ 字段(权利金、数量、Greeks、IV、未平仓量上下文、方向等)。test_mode=true 可在无实时行情时验证过滤与解析。字段列表以实时文档为准,本页不再复述。
import WebSocket from 'ws';
const ws = new WebSocket(
'wss://ws.optiondata.io?token=YOUR_API_KEY&symbols=AAPL,SPY&premium=[100000,null]&aggregation_mode=AGGREGATED'
);
ws.on('message', (raw) => {
const trade = JSON.parse(raw.toString());
console.log(trade.symbol, trade.premium, trade.delta);
});