Market Data
The Data API v1 will be deprecated on September 26th, 2021, so please make sure to update any existing systems to use the new endpoint before that date.
Overview
Alpaca Data API v1 provides the market data available to the client user through the REST and websocket streaming interfaces. The Alpaca Data API v1 consolidates data sources from a single exchange.
- IEX (Investors Exchange LLC)
Authentication
The authentication is done the same way as Trading API, and make sure you set the following fields in the HTTP header:
APCA-API-KEY-ID
APCA-API-SECRET-KEY
Endpoint
Please note the Data API endpoint is different from the Trading API endpoint. Although the Trading API documented herein references v2, the Data API endpoint should still point to v1 as follows:
https://data.alpaca.markets/v1
This URL is the same between paper trading and live trading.
Streaming trades, quotes and bars
Alpaca Data API provides websocket streaming for trades, quotes and minute bars with the same API key. For the details about the streaming, please see the reference page
Can I get the full volume data from Alpaca?
Yes, the Unlimited plan of Alpaca Data API v2 provides full volume data.
The bars API provides time-aggregated price and volume data. [GET] Get a list of bars GET/v1/bars/{timeframe} Retrieves a list of bars for each requested symbol. It is guaranteed all bars are in ascending order by time. Currently, no “incomplete” bars are returned. For example, a 1 minute bar for 09:30 will not be returned until 09:31. Parameters Path Parameters timeframe string One of minute, 1Min, 5Min, 15Min, day or 1D.
The Last Trade API provides last trade details for a symbol. [GET] Get the last trade GET/v1/last/stocks/{symbol} Retrieves the last trade for the requested symbol. Parameters Path Parameters symbol string A stock ticker symbol to retrieve the last trade of Response A Last Trade object enclosed by a response object. See example Errors 401 The API key is not valid, or the feature is not enabled.
The Last Quote API provides last quote details for a symbol. [GET] Get the last quote GET/v1/last_quote/stocks/{symbol} Retrieves the last quote for the requested symbol. Parameters Path Parameters symbol string A stock ticker symbol to retrieve the last quote of Response A Last Quote object enclosed by a response object. See example Errors 401 The API key is not valid, or the feature is not enabled.
Alpaca Data API provides websocket streaming for trades, quotes and minute bars. This helps receive the most up to date market information that could help your trading strategy to act upon certain market movement. Specifications Each account can have up to one concurrent websocket connection. Trades, quotes and minute bars are supported. Subscription is limited to 30 channels at a time for trades and quotes (T. and Q.). This limit is temporary and we may support more channels in the future.