Skip to content

From AlphaVantage — Realtime Options

Looking for a second source of option Greeks alongside AlphaVantage, or an alternative realtime options API with dividend-aware, early-exercise-aware pricing and extended Greeks? Lavender delivers independently computed Greeks through AlphaVantage's own wire format — no code changes required.

Already fetching option Greeks from AlphaVantage? Two changes to switch to Lavender:

What Changes

curl "https://www.alphavantage.co/query?function=realtime_options&symbol=AAPL&require_greeks=true&apikey=YOUR_KEY"
#     ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                 ^^^^^^^^^^^^^^^^
curl "http://localhost:2112/query?function=realtime_options&symbol=AAPL&require_greeks=true&apikey=YOUR_KEY"
#     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

That's it — swap the host. Your apikey parameter is accepted and ignored. The path, parameters, and response shape are identical.

Try it in your browser

http://localhost:2112/query?function=realtime_options&symbol=SPY&format=html

Paste this into any browser to see AlphaVantage-format Greeks rendered as an HTML table. No code needed.

Same Response Format

The JSON you get back has the same envelope and field names you already parse:

{
  "endpoint": "Realtime Options",
  "message": "success",
  "data": [
    {
      "contractID": "AAPL261218C00230000",
      "symbol": "AAPL",
      "expiration": "2026-12-18",
      "strike": "230.00",
      "type": "call",
      "last": "0.00",
      "mark": "0.00",
      "bid": "0.00",
      "bid_size": "0",
      "ask": "0.00",
      "ask_size": "0",
      "volume": "0",
      "open_interest": "0",
      "date": "2026-03-13",
      "implied_volatility": "0.24500",
      "delta": "0.58300",
      "gamma": "0.01980",
      "theta": "-0.00039",
      "vega": "0.00312",
      "rho": "0.00301"
    }
  ]
}

Market data fields are zeroed

Fields like bid, ask, last, mark, volume, and open_interest are returned as "0.00" or "0". The Greek and IV fields contain Lavender's computed values.


Parameters

All parameter names and values are case-insensitive — same as AlphaVantage.

Parameter Type Required Allowed Values Default
function string Yes realtime_options
symbol string Yes Any underlying ticker (e.g., AAPL, SPY)
require_greeks string Yes true, 1, or yes
datatype string No json, csv, ndjson, html (ndjson/html are Lavender extensions) json
contract string No OSI contract symbol (e.g., AAPL261218C00230000)

Setting require_greeks to false or omitting it returns 501 Not Implemented — Lavender only serves Greeks, not raw quotes.

Response Fields

The response envelope has three fields:

Field Value
endpoint Always "Realtime Options"
message Always "success"
data Array of option contract objects

Each contract object contains:

Contract Identification

Field Format Example Description
contractID string "AAPL261218C00230000" OCC/OSI symbol (compact, no padding)
symbol string "AAPL" Underlying ticker
expiration string "2026-12-18" Expiration date (YYYY-MM-DD)
strike string "230.00" Strike price (2 decimal places)
type string "call" or "put" Option right (lowercase)

Market Data (zeroed)

The market data fields (last, mark, bid, bid_size, ask, ask_size, volume, open_interest) are present for wire compatibility but always contain "0.00" or "0". The date field contains the current date in Eastern Time (YYYY-MM-DD). The JSON example above shows the exact values.

Greeks

Field Format Example Description
implied_volatility string, 5dp "0.24500" Annualized IV (or "-" if unavailable)
delta string, 5dp "0.58300" \(\partial V / \partial S\)
gamma string, 5dp "0.01980" \(\partial^2 V / \partial S^2\)
theta string, 5dp "-0.00039" \(\partial V / \partial t\) — per calendar day
vega string, 5dp "0.00312" \(\partial V / \partial \sigma\) — per 1% IV move
rho string, 5dp "0.00301" \(\partial V / \partial r\) — per 1% rate move

All values are strings

Following AlphaVantage convention, every field is a string — including numeric values. Greeks are formatted to 5 decimal places; prices to 2 decimal places. Unavailable Greeks are represented as "-".

Greek Scaling

All Greeks pass through without conversion. AlphaVantage uses the same per-1% convention as the Lavender API for vega and rho — this is the standard across 8 of 9 supported vendors.

Greek Convention
Theta Per calendar day
Vega Per 1% IV move (0.01)
Rho Per 1% rate move (0.01)
Delta, Gamma, IV Standard units

Comparing across vendors

If you're comparing Greeks between AlphaVantage and ThetaData, note that ThetaData is the only vendor that returns vega and rho per unit (raw BSM) rather than per 1%. ThetaData values will be 100× larger. See the ThetaData compatibility guide for details.

Filtering by Contract

Pass an OSI symbol in the contract parameter to fetch a single contract:

curl "http://localhost:2112/query?function=realtime_options&symbol=AAPL&require_greeks=true&contract=AAPL261218C00230000"

The response data array will contain exactly one element (or be empty if the contract isn't found).

CSV Output

Set datatype=csv to receive comma-separated output with a header row. The response includes a Content-Disposition header for download:

Content-Disposition: attachment; filename=realtime_options_AAPL.csv

Column order matches the JSON field order.

How Lavender's Greeks Differ

AlphaVantage provides the standard five Greeks, but its computation methodology is not publicly documented. Running Lavender alongside AlphaVantage gives you:

  • Early exercise — Lavender prices American options, which is important for equity options where early exercise around ex-dividend dates can meaningfully affect option value
  • Discrete dividends — Lavender uses the actual dividend schedule rather than a continuous yield approximation
  • Implied borrow rates — Lavender solves for the borrow rate per expiry to enforce put-call parity, producing consistent call/put Greeks even in hard-to-borrow names
  • Two views of time decay — conventional theta (\(\partial V / \partial t\)) on this endpoint, plus a separate decay metric (expected change to next trading day, accounting for weekends and holidays) on the Lavender API
  • Extended Greeks — second and third-order Greeks (vanna, charm, volga, speed, and more) via the Lavender API

Migrating to the Lavender Native API

AlphaVantage Lavender API
symbol root (or underlying for multi-root)
expiration_date expiry
underlying_price und_price
implied_volatility lav_vol
theoretical_price lav_theo
contractID osym (always included)

Error Responses

Status Condition
200 Success
400 Missing or invalid symbol, unsupported function, invalid datatype
501 require_greeks not set to true (quote-only not supported)
502 Upstream data unavailable