About Market Data API

Access real-time and up to 7+ years of historical equities & crypto data.

Overview

Alpaca Market Data API v2 provides market data through an easy to use HTTP API for historical data and through websocket for real-time data.

We provide easy to use SDKs written in Python, Go, NodeJS and C#.

Developers can easily access our Market Data APIs via Postman at our public workspace or GitHub.

Subscription Plans

Market Data API v2 provides access to data in 3 different plans: Free, Trader Professional, and Broker Professional.

The Free plan is included in both paper-only and live trading accounts as the default plan for free.

FreeAlgo Trader PlusBroker Professional
PricingFree$99/month$99/mo/device
Securities coverageUS Stocks & ETFsUS Stocks & ETFsUS Stocks & ETFs
Real-time market coverageIEXAll US Stock ExchangesAll US Stock Exchanges
Websocket subscriptions30 symbolsUnlimitedUnlimited
Historical data timeframe7+ years7+ years7+ years
Historical data delay*15 minutesno delayno delay
Historical API calls200/min10,000/min10,000/min

We receive direct feeds from the CTA (administered by NYSE) and UTP (administered by Nasdaq) SIPs. These 2 feeds combined offer 100% market volume.

*Free users are only allowed to access the IEX (Investors Exchange LLC) stream. This restriction does not apply to historical data, however, because of the 15-minute delay, they cannot access the most recent SIP data in that period. This includes the latest endpoints, where SIP is not available to Free users at all.

📘

For Broker Professional plan

We provide separate pricing or Broker API partners looking to leverage market data. For more information, please contact us.

Exchanges

List of stock exchanges which are supported by Alpaca.

The tape id of each exchange is returned in all market data requests. You can use this table to map the code to an exchange.

Exchange CodeExchange Name
ANYSE American (AMEX)
BNASDAQ OMX BX
CNational Stock Exchange
DFINRA ADF
EMarket Independent
HMIAX
IInternational Securities Exchange
JCboe EDGA
KCboe EDGX
LLong Term Stock Exchange
MChicago Stock Exchange
NNew York Stock Exchange
PNYSE Arca
QNASDAQ OMX
SNASDAQ Small Cap
TNASDAQ Int
UMembers Exchange
VIEX
WCBOE
XNASDAQ OMX PSX
YCboe BYX
ZCboe BZX

Conditions

Each feed/exchange uses its own set of codes to identify trade and quote conditions, so the same condition may have a different code depending on the originator of the data.

Trade conditions

CTS

The table below shows codes that denotes a particular condition applicable to the trade from the CTA Plan.

For more information, see page 64 of the Consolidated Tape System (CTS) Specification.

CodeValue
SpaceRegular Sale
BAverage Price Trade
CCash Trade (Same Day Clearing)
EAutomatic Execution
FInter-market Sweep Order
HPrice Variation Trade
IOdd Lot Trade
KRule 127 (NYSE only) or Rule 155 (NYSE MKT only)
LSold Last (Late Reporting)
MMarket Center Official Close
NNext Day Trade (Next Day Clearing)
OMarket Center Opening Trade
PPrior Reference Price
QMarket Center Official Open
RSeller
TExtended Hours Trade
UExtended Hours Sold (Out Of Sequence)
VContingent Trade
XCross Trade
ZSold (Out Of Sequence)
4Derivatively Priced
5Market Center Reopening Trade
6Market Center Closing Trade
7Qualified Contingent Trade
8Reserved
9Corrected Consolidated Close Price as per Listing Market

UTDF

The table below shows condition codes from the UTP Plan.

For more information, see page 43 of the UTP Specification.

CodeValue
@Regular Sale
AAcquisition
BBunched Trade
CCash Sale
DDistribution
EPlaceholder
FIntermarket Sweep
GBunched Sold Trade
HPrice Variation Trade
IOdd Lot Trade`
KRule 155 Trade (AMEX)
LSold Last
MMarket Center Official Close
NNext Day
OOpening Prints
PPrior Reference Price
QMarket Center Official Open
RSeller
SSplit Trade
TForm T
UExtended trading hours (Sold Out of Sequence)
VContingent Trade
WAverage Price Trade
XCross Trade
YYellow Flag Regular Trade
ZSold (Out Of Sequence)
1Stopped Stock (Regular Trade)
4Derivatively Priced
5Re-Opening Prints
6Closing Prints
7Qualified Contingent Trade (QCT)
8Placeholder For 611 Exempt
9Corrected Consolidated Close (per listing market)

Quote conditions

CQS

The table below shows codes that denotes a particular condition applicable to a quote from the CTA Plan.

For more information, see Appendix G of the CQS Specification.

CodeValue
ASlow Quote Offer Side
BSlow Quote Bid Side
ESlow Quote LRP Bid Side
FSlow Quote LRP Offer Side
HSlow Quote Bid And Offer Side
OOpening Quote
RRegular Market Maker Open
WSlow Quote Set Slow List
CClosing Quote
LMarket Maker Quotes Closed
USlow Quote LRP Bid And Offer
NNon Firm Quote
4On Demand Intra Day Auction

UQDF

The table below shows condition codes from the UTP Plan.

For more information, see the UQDF Specification.

CodeValue
AManual Ask Automated Bid
BManual Bid Automated Ask
FFast Trading
HManual Bid And Ask
IOrder Imbalance
LClosed Quote
NNon Firm Quote
OOpening Quote Automated
RRegular Two Sided Open
UManual Bid And Ask Non Firm
YNo Offer No Bid One Sided Open
XOrder Influx
ZNo Open No Resume
4On Demand Intra Day Auction