HomeGuidesFor Alpaca › Alpaca Historical Options

Historical options data from Alpaca
expired contracts, sparse bars, and honest gaps

Alpaca will give you bars for contracts that expired years ago, but only if you ask for them correctly — and the default does not. This page covers the flag that makes expired contracts visible, where history genuinely begins, and why a missing bar must stay missing rather than becoming a zero.

History begins
~Feb 2024
earlier returns nothing
Default query
Active only
expired contracts hidden
Illiquid strikes
Sparse
days with no print at all
Correct answer
null
never an interpolation

Expired contracts are hidden by default

The contracts endpoint returns tradable contracts unless told otherwise. Any historical work — a backtest, a past-earnings study — is asking about contracts that have since expired, so without status=inactive you get an empty list and no error.

GET https://api.alpaca.markets/v2/options/contracts
      ?underlying_symbols=AAPL
      &status=inactive
      &expiration_date_gte=2025-05-01
      &expiration_date_lte=2025-06-15
      &limit=1000
History starts around February 2024

Requests for earlier dates return an empty result rather than an error. If your app shows a blank panel for a 2023 event, the data does not exist — say so, rather than letting it read as a failure.

Sparse bars are normal, and must stay visible

An illiquid strike may not print at all on a given day. There is no bar, and no amount of retrying will produce one. The temptation is to carry the previous close forward so the series looks continuous — which draws a flat line through days nothing traded and reads as "the price did not move" rather than "nobody traded this."

nonenonenonenonenoneclose15 sessions · 4 with no print
Real option bars for an illiquid strike. Carrying values forward would hide the gaps and imply a continuity that never existed.

Worked example: what the market priced before earnings

A genuinely useful use of this data is recovering the expected move the market charged before a past announcement — the at-the-money straddle on the last session before it.

1. contracts for the underlying, status=inactive, expiring on/after the event
2. nearest expiry that still CONTAINS the announcement
     before-open  → an expiry that day works
     after-close  → that contract died hours before the release; take the next
3. strike nearest the pre-event close
4. expected move % = (call close + put close) / spot × 100
The step everyone skips

Step 2 is not a detail. An after-close report on an expiry Friday, priced with that Friday's contract, uses a straddle with almost no time value left — so the expected move comes out near zero and every ratio built on it explodes. A number that looks computed and means nothing is worse than a blank.

GreeksView reconstructs past earnings moves this way and leaves the cell blank when the data cannot support an answer.

See past earnings moves

Questions

How do I get expired option contracts from Alpaca?

Pass status=inactive to the contracts endpoint. The default returns only tradable contracts, so historical queries come back empty with no error to explain why.

How far back does Alpaca options data go?

Roughly February 2024. Earlier requests return empty results rather than errors, so it is worth telling users the data does not exist instead of showing an unexplained gap.

Why are there missing days in my option bars?

Illiquid strikes do not print every day. The absence is real data — it means nobody traded. Carrying the previous close forward hides it and implies a continuity that did not exist.

Can I backtest options strategies with Alpaca data?

Within the history window, yes, but expect gaps on anything away from the money. Any backtest needs an explicit rule for missing bars, and skipping the trade is usually more honest than interpolating a price.

How do I find what the market expected before an earnings report?

Price the at-the-money straddle on the last session before the announcement, using the nearest expiry that still contains it. For after-close reports that means an expiry strictly after the earnings date.

Point it at your own Alpaca account

Full option chains, live Greeks, gamma exposure and payoff modelling — computed in your browser on your own API keys. Paper keys work identically, and nothing you hold ever reaches our server.

Start free — no card required
Already have an account? Sign in. Free tier has no time limit.