Options data for AI agents
Real-time price, quotes, Greeks, IV, and time and sales.
Via API, MCP, and WebSocket.
The data
Planned coverage: US equity, ETF and index options from OPRA. Access requires invitation, subscriber qualification and agreement, and an explicit data grant.
Chain
A snapshot of contracts for an underlying and expiration. Join records by the common contract ID, iid.
Quotes
NBBO bid/ask, sizes, exchanges and exchange times.
quotebidaskbid_sizeask_sizebid_exchangeask_exchangebid_timeask_time
Last trade
The latest trade price, size, exchange time and exchange.
tradelastlast_sizelast_timelast_exchange
IV & Greeks
In-house implied volatility and forward delta, gamma, theta, vega and rho, with calculation time and diagnostics.
option_analyticsivdeltagammathetavegarhocalc_timemethodquality
OI & Volume
Daily dated open interest and previous-day references. Headline volume counts regular, non-spread prints in the contract/regular bucket; the vendor’s day volume remains a separate reference.
oiopen_interestoi_dateprev_closeprev_day_volume
flow · contract/regularvolume
trade · vendor referencevendor_day_volume
| Strike | Bid | Bid size | Ask | Ask size | Last | IV | Delta | Gamma | Theta | Vega | Rho | OI | Volume |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 95 | 6.10 | 40 | 6.30 | 35 | 6.20 | 27.0% | 0.78 | 0.040 | −0.035 | 0.080 | 0.045 | 1,240 | 186 |
| 100 | 2.75 | 60 | 2.95 | 45 | 2.85 | 25.0% | 0.52 | 0.055 | −0.050 | 0.104 | 0.032 | 2,180 | 324 |
| 105 | 0.90 | 30 | 1.10 | 50 | 1.00 | 26.0% | 0.26 | 0.044 | −0.040 | 0.085 | 0.016 | 960 | 142 |
Time and Sales
Individual trade records with price, size, exchange, conditions and inferred side. iid is the common contract ID. status handles new/correction/cancel; orig_seq links corrections and cancels. Stored-history recv_time is ingest time, not stream output. Coverage and quality qualifications belong to the response.
printiidtrade_dateseqorig_seqpricesizeexchangeconditionstrade_timeevent_timerecv_timesideside_rulebid_atask_atethspread_legvalidstatusmethod
| Time | Contract | Price | Size | Flags | Aggressor |
|---|---|---|---|---|---|
| 14:29:58 | DEMO 100 Call | 2.85 | 12 | — | Buy |
| 14:29:56 | DEMO 95 Call | 6.20 | 5 | Spread leg | Sell |
| 14:29:52 | DEMO 105 Call | 1.00 | 20 | — | Undecided |
02 / Connect
REST
Fetch options data into your apps.
Base URL: https://api.optionsdata.ai/v1. Use your account’s API key as a Bearer token. Set OPTIONSDATA_API_KEY privately in your environment.
curl --fail-with-body \
-H "Authorization: Bearer $OPTIONSDATA_API_KEY" \
'https://api.optionsdata.ai/v1/underlyings/SPX'REST routes
| GET route | Returns |
|---|---|
/v1/underlyings | Served catalog |
/v1/underlyings/{underlying} | Underlying snapshot and available expirations |
/v1/chains/{underlying}?expiration=YYYY-MM-DD | One expiration’s chain snapshot |
/v1/contracts/{symbol} | Contract snapshot by OSI |
/v1/contracts/{symbol}/trades?start=…&end=… | Available prints, with corrections and cancels |
/v1/{record}/{iid}/series?start=…&end=…&fields=… | Available record series |
Examples and parameters
# Discover the served catalog:
curl --fail-with-body \
-H "Authorization: Bearer $OPTIONSDATA_API_KEY" \
'https://api.optionsdata.ai/v1/underlyings'
# Discover the currently served expirations for SPX:
curl --fail-with-body \
-H "Authorization: Bearer $OPTIONSDATA_API_KEY" \
'https://api.optionsdata.ai/v1/underlyings/SPX'
# Replace YYYY-MM-DD with an expiration from that response.
curl --fail-with-body --get \
-H "Authorization: Bearer $OPTIONSDATA_API_KEY" \
--data-urlencode 'expiration=YYYY-MM-DD' \
'https://api.optionsdata.ai/v1/chains/SPX'
# Only strikes 230-235, contract and quote records:
curl --fail-with-body --get \
-H "Authorization: Bearer $OPTIONSDATA_API_KEY" \
--data-urlencode 'expiration=YYYY-MM-DD' \
--data-urlencode 'strike_min=230' --data-urlencode 'strike_max=235' \
--data-urlencode 'records=contract,quote' \
'https://api.optionsdata.ai/v1/chains/AAPL'Option symbols use the full 21-character OCC/OSI form: a root padded to six characters, YYMMDD, C/P, then strike × 1000 as eight digits. Preserve spaces and URL-encode each path segment independently (AAPL 261016C00232500 becomes AAPL%20%20261016C00232500). Encode BRK/B as BRK%2FB.
fields selects comma-separated descriptor fields. Chain and underlying snapshots accept strike_min/strike_max (inclusive decimal bounds, either alone) and records (comma-separated record names). Strike filtering keeps contracts in range and their per-contract records; underlying records stay. fields need not include strike. Unknown query parameters are not applied: the response lists them in the X-Ignored-Query-Parameters header. History start/end accept decimal-string UTC nanoseconds or RFC3339. A range must fit one trade date and at most 24 hours. limit is 1–100000 (default 10000), a request pagination bound, not a subscription allowance. Pass trades’ returned next_cursor as cursor, URL-encoded. Series needs all descriptor key fields as query parameters; fill defaults to false.
03 / Stream
WebSocket
Stream options data into your apps.
Authenticate, subscribe by expiration, receive snapshots and updates as JSON (or compact binary PSF1).
wss://api.optionsdata.ai/v1/stream
- Authenticate
- Subscribe
- Snapshot → Delta
Control JSON · JSON or PSF1 frames
Connection example and protocol
Machines may send the Bearer key on upgrade. Browsers send {"type":"auth","bearer":"<API key>"} within five seconds, from an allowed origin. Keep credentials out of URLs and cookies.
// Row-count example; supply apiKey privately at runtime.
const ws = new WebSocket('wss://api.optionsdata.ai/v1/stream');
let subscribed = false;
ws.onopen = () => ws.send(JSON.stringify({
type: 'auth', bearer: apiKey
}));
ws.onmessage = ({ data }) => {
const m = JSON.parse(data);
if (m.type === 'hello') {
ws.send(JSON.stringify({ op: 'format', format: 'json' }));
ws.send(JSON.stringify({ op: 'list', underlying: 'SPX' }));
} else if (m.type === 'streams' && !subscribed) {
const expiration = m.expirations.find(x => x !== '');
if (!expiration) return;
subscribed = true;
ws.send(JSON.stringify({ op: 'sub', underlying: 'SPX',
expirations: [expiration, ''] }));
} else if (m.type === 'frame') {
console.log(Object.fromEntries(Object.entries(m.records)
.map(([record, rows]) => [record, rows.length])));
} else if (m.type === 'error') {
console.error(m.code); // Never print credentials.
}
};Text messages carry control JSON and, after selecting JSON mode before the first subscription, data frames. This example logs row counts only; use a lossless JSON parser before consuming large integer timestamps or sequences. Put all subscriptions on one connection: extra connections can be closed with session_limit.
{"op":"list"} lists all served underlyings. List an underlying to get its expirations; subscribe with expirations: ["YYYY-MM-DD", ""], where "" is its underlying stream. expirations: "all" selects every expiration plus that stream. Unsubscribe with op: "unsub" and the same shape.
PSF1 starts with its four magic bytes, underlying iid, expiration, sequence, tick time and snapshot flag, followed by record sections. Resolve record/field IDs, types, quanta and keys from the received schema. A snapshot resets that stream’s state and numeric bases; subsequent deltas must be contiguous. A missing field retains its value; explicit null clears it. Keyed rows use absolute integers. Timestamp-only changes do not trigger publication; stream state is not an event log. See the PSF1 specification, vectors and Python reference decoder.
On source_disconnected, mark only the named streams unavailable (all if unscoped) and wait for fresh snapshots. On a sequence gap, discard that stream’s state and unsubscribe then subscribe for a fresh snapshot. A snapshot restores state, not missed prints. Refetch prints over REST if needed; gap times are UTC milliseconds, unlike REST nanoseconds. Reconnect with fresh authentication, discovery and subscriptions after a closed connection.
04 / Ask
MCP
Connect your chatbot to options data.
For approved MCP testing, add this URL as a connector in ChatGPT or Claude, then sign in. Provider support and your access must be verified separately.
https://api.optionsdata.ai/mcpTool inputs and connection details
| Tool | Purpose |
|---|---|
list_underlyings | Served catalog |
get_chain | Chain or underlying snapshot |
get_contract | One contract snapshot |
get_trades | Available time and sales |
get_series | Available record history |
Read-only Streamable HTTP with OAuth. Authorize with your optionsdata.ai account when prompted; keep API keys out of conversations. Successful tool text content is JSON; parse it and check isError. The five read-only tools have a 100000-byte result budget; narrow fields, strike window or history range after response_too_large. MCP is stateless Streamable HTTP with no SSE, sessions or market-data streaming. OAuth uses mcp.read bound to the exact resource URL; a REST API key cannot replace it.
| Tool | Inputs (? = optional) |
|---|---|
list_underlyings | {query?} |
get_chain | {underlying, expiration?, fields?, strike_min?, strike_max?, records?} |
get_contract | {symbol, fields?} |
get_trades | {symbol, start, end, limit?, cursor?} |
get_series | {record, iid, start, end, fields, limit?, underlying?, fill?, keys?} |
strike_min/strike_max are inclusive decimal strings; projected fields must include strike when filtering. records selects record names. Without expiration, defaults are underlying_price, underlying_analytics and term. list_underlyings accepts an optional case-insensitive prefix query. get_chain with expiration returns that chain; without expiration it returns the underlying snapshot, not every expiration. get_trades returns next_cursor for pagination.
symbol is padded OSI; iid and limit are integers; fill is boolean; keys maps every descriptor key to a string. Supply underlying to get_series for access checks. Use tools/list for generated input schemas.
05 / Reference
Read the fields
REST and MCP snapshots use stream precision; history precision follows stored fidelity. IV is decimal (0.25 = 25%). Nulls and quality flags describe missing or uncertain values.
IV and forward Greeks use NBBO mid, put-call parity and Black-76, with time to settlement measured to the second. Derived values are recomputed once per second.
Field units, timestamps and calculation
| Fields | Meaning |
|---|---|
| Prices & sizes | Prices in the instrument’s currency; option quantities in contracts. iv is decimal: 0.25 = 25%. |
delta, gamma | Forward-referenced, per one point of the expiration’s implied forward F. |
theta, vega, rho | Price change per calendar day, per 1 volatility point (0.01), and per 1 continuous-rate point (0.01), respectively. |
| Times | UTC nanoseconds in the logical schema. bid_time, ask_time and trade_time describe events; calc_time describes calculation. Snapshot as_of is the frame tick bounding row receive times, not a promise of a fresh quote. Stored recv_time is ingest time; live snapshots and streams omit it. Exchange/receive timestamps have millisecond source resolution. |
open_interest, oi_date | Daily OI with its as-of date, not an intraday count. Headline volume counts regular non-spread prints; vendor_day_volume is a separate reference. |
| Null & quality | Missing values are absent/null, never fabricated zeros. Inspect quality; stale_input, crossed and partial_coverage (also called incomplete for gapped volume) affect interpretation. |
American options use a flagged approximation. Changed values and diagnostics publish with calc_time, method and quality; unchanged inputs alone do not trigger a stream update. Streaming quanta come from the schema.