Alpaca Market Data API
Alpaca Market Data API
REST and WebSocket API for US stocks, crypto, and options with a free Basic plan. Free real-time equities = IEX only; options = indicative feed; 30 WebSocket symbols; history since 2016 (latest 15 minutes of historical data restricted on Basic).
Alpaca's Market Data API serves US stock and ETF, options and crypto data over REST and WebSocket. The free Basic plan includes real-time data from the IEX exchange only (options: indicative feed only), 30 WebSocket symbols, 200 historical API calls/min and history since 2016, with the latest 15 minutes of historical data restricted. The $99/mo Algo Trader Plus plan adds real-time data from all US stock exchanges (OPRA feed for options), unlimited stock WebSocket symbols and 10,000 historical API calls/min.
Coverage
US stocks and ETFs (IEX real-time on free; all US exchanges on paid), crypto, options (indicative feed on free); historical data since 2016 with bars, snapshots, and corporate actions
Good for
- Building real-time trading dashboards
- Backtesting strategies with historical OHLCV data
- Paper trading with live market simulation
Verdict
Strong free tier for backtesting, paper trading, and hobby projects. Real-time IEX WebSocket data (30-symbol limit) and 200 historical API calls/min are enough for prototypes and small strategies. Paid Algo Trader Plus ($99/mo) adds real-time data from all US exchanges, unlimited stock WebSocket symbols and 10,000 historical API calls/min.
Get the free weekly email
Free weekly email of newly verified free data. Unsubscribe by emailing us.
By entering your email and clicking Subscribe, you agree to receive the Signal Lab weekly email from Quantum Data Technologies Ltd., 3200-650 West Georgia Street, Vancouver, BC V6B 4P7, Canada (signal-lab@qdt.ai). You can unsubscribe at any time: reply "unsubscribe" to any email or write to signal-lab@qdt.ai. See our Privacy Policy.
Use in your agent
Load Alpaca historical stock bars into pandas and Parquet for personal use. Checked against the provider's documentation on Oct 29, 2026.
Access
- An Alpaca account and API credentials are required. Put them in APCA_API_KEY_ID and APCA_API_SECRET_KEY.
- The standard terms limit content to personal, non-commercial purposes.
Request
curl -H 'APCA-API-KEY-ID: '$APCA_API_KEY_ID -H 'APCA-API-SECRET-KEY: '$APCA_API_SECRET_KEY 'https://data.alpaca.markets/v2/stocks/AAPL/bars?timeframe=1Day&start=2026-10-01T00:00:00Z&limit=1000'Format
JSON: bars array plus symbol and next_page_token. Each bar has t, o, h, l, c, v, n and vw.
Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
"""Alpaca daily AAPL bars -> pandas -> Parquet. Personal, non-commercial use."""
import os
import requests
import pandas as pd
headers = {"APCA-API-KEY-ID": os.environ["APCA_API_KEY_ID"],
"APCA-API-SECRET-KEY": os.environ["APCA_API_SECRET_KEY"]}
params = {"timeframe": "1Day", "start": "2026-10-01T00:00:00Z", "limit": 1000}
r = requests.get("https://data.alpaca.markets/v2/stocks/AAPL/bars",
headers=headers, params=params, timeout=30)
r.raise_for_status()
df = pd.DataFrame(r.json()["bars"]).rename(columns={"t": "timestamp"})
df["timestamp"] = pd.to_datetime(df["timestamp"], utc=True)
df.to_parquet("alpaca_aapl_daily.parquet", index=False)
print(len(df), "bars", df["timestamp"].min().date(), "to", df["timestamp"].max().date())Needs a personal API key; not run.
Limits
- Basic: 200 historical API calls per minute.
- Basic historical data excludes the latest 15 minutes.
Quirks
- Follow next_page_token for longer queries.
- The free real-time stock feed is IEX only; specify the feed when that distinction matters.
- Timestamps are UTC RFC 3339 strings.
Terms and attribution
- Services and content are for personal, non-commercial purposes under the standard terms.
- A user-facing application requires 30 days advance written notice and may be restricted.
Sources
- https://docs.alpaca.markets/docs/about-market-data-api: “Historical API calls”
- https://docs.alpaca.markets/docs/about-market-data-api: “latest 15 minutes”
- https://files.alpaca.markets/disclosures/library/TermsAndConditions.pdf: “solely for your own personal and non-commercial purposes”
Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer