Polygon.io
Polygon.io — US stocks, options and crypto with a developer-grade API; the free tier is end-of-day only
When you are building something and want an API with proper docs, SDKs and a path to real-time — US stocks first, options and crypto beside them — and can live with the free tier's five calls a minute while you prototype.
Reach for it when…
When you are building something and want an API with proper docs, SDKs and a path to real-time — US stocks first, options and crypto beside them — and can live with the free tier's five calls a minute while you prototype.
Not for: Non-US markets (EODHD, Twelve Data), macro (FRED), free-tier real-time (paid only), anything you will redistribute.
Units, revisions, traps
Units. Prices in US dollars; timestamps are Unix milliseconds — convert with unit='ms'. Aggregates are adjusted by default (adjusted=true).
Revisions. Adjusted aggregates change with corporate actions.
- Five calls a minute on the free tier — add a sleep or the API returns 429.
- The previous-close endpoint is the cheapest way to get today's price; aggregates for a range cost one call regardless of length.
- Options tickers have their own format (O:AAPL260117C00200000).
Classic mistake: Reading the 't' timestamp as seconds.
Three recipes
- Recipe 1 · Daily aggregates for a stock
- Recipe 2 · Previous close for a list
- Recipe 3 · An option contract's daily bars (paid)
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1Daily aggregates for a stock
import requests, pandas as pd
KEY = "YOUR_POLYGON_KEY"
u = f"https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2026-01-01/2026-09-08?adjusted=true&sort=asc&limit=500&apiKey={KEY}"
df = pd.DataFrame(requests.get(u, timeout=30).json()["results"])
df["date"] = pd.to_datetime(df.t, unit="ms")
print(df.set_index("date")[["o", "h", "l", "c", "v"]].tail())- Data → From Web → the same URL; expand 'results'.
- No native JSON import — use the Python recipe.
Recipe 2Previous close for a list
import requests, time
KEY = "YOUR_POLYGON_KEY"
for t in ["AAPL", "MSFT", "NVDA"]:
j = requests.get(f"https://api.polygon.io/v2/aggs/ticker/{t}/prev?adjusted=true&apiKey={KEY}", timeout=30).json()
print(t, j["results"][0]["c"])
time.sleep(13) # free tier: 5 calls a minute- One From Web query per ticker.
- Use the Python recipe.
Recipe 3An option contract's daily bars (paid)
import requests, pandas as pd
KEY = "YOUR_POLYGON_KEY"
u = f"https://api.polygon.io/v2/aggs/ticker/O:AAPL260117C00200000/range/1/day/2026-01-01/2026-09-08?apiKey={KEY}"
print(requests.get(u, timeout=30).json().get("resultsCount"))- Use the Python recipe.
- Use the Python recipe.
Series → question map
The ids we use from Polygon.io, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| aggs · 1/day | Daily OHLC for a US stock | United States | ohlc_daily |
| aggs · 1/minute | Intraday bars (paid) | United States | intraday |
| options aggs | Option contract prices (paid) | United States | options |
| crypto aggs | Crypto bars | global | crypto_spot |
Compare with
Same question, different source: Twelve Data, EODHD, SEC EDGAR APIs. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Questions readers ask
What is free?
End-of-day aggregates, five calls a minute, two years back. Real-time and options need a paid plan.
Is Polygon good for non-US stocks?
No — it is US-centric. Use EODHD or Twelve Data for Asia and Europe.
Do they have a Python library?
Yes, polygon-api-client on PyPI; the raw REST calls above need nothing but requests.
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.