canonical: https://jentic.com/apis/alpaca.markets/market-data

# Alpaca Markets Alpaca Market Data API

The Alpaca Market Data API provides real-time and historical market data for US equities, options, crypto, crypto perpetual futures, and foreign exchange. Endpoints cover historical bars, quotes, trades, and auctions for stocks, options chains and snapshots, crypto bars and orderbooks, forex rates, screeners for movers and most-actives, news articles, corporate actions, and company logos. Authentication uses APCA-API-KEY-ID and APCA-API-SECRET-KEY headers. Both production and sandbox endpoints are exposed.

## For AI agents

Pull historical and latest bars, quotes, trades, snapshots, and news for US stocks, options, crypto, and forex from Alpaca's market data service.

## Scope

Does not handle order placement, account management, or fundamentals data - use for market data retrieval across stocks, options, crypto, and forex only.

## Capabilities

- Pull historical and latest bars, quotes, and trades for US stocks
- Read option chains, snapshots, and trades for listed options
- Fetch crypto bars, quotes, trades, and orderbooks across regions
- Stream-style snapshots for single symbols or multi-symbol queries
- Pull forex latest rates and historical currency-pair rates
- Read corporate actions and news articles
- Run screeners for top market movers and most-actives

## Use cases

### Real-time quote and price feed

Trading interfaces poll latest quote endpoints (e.g. GET /v2/stocks/quotes/latest, GET /v2/stocks/{symbol}/quotes/latest) to render live pricing for selected symbols. Snapshots return the most recent bar, quote, and trade in a single call so the UI does not have to assemble three separate requests.

Example prompt: Call GET /v2/stocks/{symbol}/snapshot for AAPL and post the latest price and volume to a Slack trading channel.

### Historical bar download for backtesting

Quants pull historical bars via GET /v2/stocks/bars or per-symbol /v2/stocks/{symbol}/bars for backtest pipelines. Crypto and options have parallel historical endpoints, so a single integration covers cross-asset backtesting without juggling multiple data vendors.

Example prompt: Pull 1-minute bars for SPY from 2026-01-01 to 2026-03-31 via GET /v2/stocks/SPY/bars and write to a parquet file.

### Options chain and snapshot lookups

Options strategies depend on chain and snapshot data, served by /v1beta1/options/snapshots/{underlying_symbol} for the chain and /v1beta1/options/snapshots for multi-contract snapshots. Latest quotes, latest trades, and historical bars are also exposed for individual contracts to support implied-vol calculations.

Example prompt: Fetch the option chain for SPY via GET /v1beta1/options/snapshots/SPY and return all contracts expiring this Friday.

### Crypto and forex pricing

Crypto bars, quotes, trades, and orderbooks are reachable under /v1beta3/crypto/{loc}, with crypto perpetual futures under /v1beta1/crypto-perps/{loc}. Forex rates are served from /v1beta1/forex/latest/rates and /v1beta1/forex/rates for historical data, so cross-asset agents only need one credential set.

Example prompt: Pull the latest BTC/USD bar via GET /v1beta3/crypto/us/latest/bars and the latest EUR/USD rate via GET /v1beta1/forex/latest/rates.

### AI agent market context retrieval

An AI agent answering 'what is the price of TSLA right now?' calls the snapshot endpoint, parses the result, and returns a clean answer. Through Jentic the agent searches by intent for the snapshot operation, loads the input schema, and executes - credentials never enter the prompt context.

Example prompt: Use Jentic to search 'get latest stock price', execute GET /v2/stocks/{symbol}/snapshot for the symbol the user asked about, and return the latest trade price.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v2/stocks/{symbol}/snapshot | Snapshot of latest bar, quote, and trade for a symbol |
| GET | /v2/stocks/bars | Historical bars for multiple symbols |
| GET | /v2/stocks/quotes/latest | Latest quotes for multiple symbols |
| GET | /v1beta1/options/snapshots/{underlying_symbol} | Option chain snapshot for an underlying |
| GET | /v1beta3/crypto/{loc}/bars | Historical crypto bars |
| GET | /v1beta1/forex/latest/rates | Latest forex rates |
| GET | /v1beta1/news | News articles for symbols |
| GET | /v1beta1/screener/{market_type}/movers | Top market movers |

## Key resources

- **Stocks** — Historical and latest bars, quotes, trades, snapshots, and auctions for US equities
- **Options** — Option chains, snapshots, latest quotes, latest trades, and historical bars
- **Crypto** — Crypto bars, quotes, trades, orderbooks, and snapshots across regions
- **Crypto perpetual futures** — Latest bars, quotes, trades, and orderbooks for crypto perps
- **Forex** — Latest and historical currency-pair rates
- **Screener** — Top market movers and most-active stocks
- **News** — News articles tagged to symbols
- **Corporate actions** — Splits, dividends, and other corporate event records

## Why Jentic

- **Setup:** Wiring the Alpaca Market Data API by hand means sending its API key headers to data.alpaca.markets and encoding the stock, option, crypto, and forex reads across their versioned paths yourself. Through Jentic you install once, import the Alpaca Market Data API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** The Alpaca Market Data API puts the symbol in the URL path (/v2/stocks/{symbol}/snapshot, /v1beta1/options/snapshots/{underlying_symbol}), so a rule can pin your agent to one symbol. This API is read-only, so you choose which of these data reads the agent may call.
- **Credential handling:** Your Alpaca Market Data API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get a stock snapshot' or 'read latest crypto bars', and Jentic returns the matching Alpaca Market Data operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Alpaca Trading API** — Trading executes orders driven by Market Data feeds
- **Alpaca Broker API** — Broker covers managed account trading driven by Market Data signals
- **OpenAI** — Pair real-time prices with LLM summarisation for market commentary

## FAQ

### What authentication does the Alpaca Market Data API use?

Two header-based API keys: APCA-API-KEY-ID and APCA-API-SECRET-KEY. Through Jentic, both values are stored encrypted in the vault and injected at execution time, so they never appear in agent prompts or logs.

### Can I get the latest price snapshot for a stock?

Yes. GET /v2/stocks/{symbol}/snapshot returns the latest bar, quote, and trade in a single call. Use GET /v2/stocks/snapshots for multi-symbol snapshots in one request.

### How do I pull historical 1-minute bars via Jentic?

Install Jentic One, import the Alpaca Market Data API from the API Directory, then have your agent search 'historical stock bars from Alpaca', load the input schema for GET /v2/stocks/{symbol}/bars, and execute with the symbol, timeframe, and date range. Repeat per symbol or use the multi-symbol endpoint for bulk pulls.

### Does the API cover options data?

Yes. /v1beta1/options/snapshots/{underlying_symbol} returns the option chain, and per-contract endpoints expose latest quotes, latest trades, and historical bars. Condition codes and exchange codes are available under /v1beta1/options/meta.

### Are crypto and forex pricing supported?

Yes. Crypto bars, quotes, trades, and orderbooks are under /v1beta3/crypto/{loc}, crypto perps are under /v1beta1/crypto-perps/{loc}, and forex latest and historical rates are under /v1beta1/forex. One credential set covers all four asset classes.

### What is the difference between the multi-symbol and per-symbol endpoints?

Multi-symbol endpoints (e.g. /v2/stocks/bars) accept a comma-separated list and return data keyed by symbol; per-symbol endpoints (e.g. /v2/stocks/{symbol}/bars) return data for a single symbol. Choose multi-symbol when batching across a watchlist.

### Is there an Alpaca Market Data MCP server?

Yes. Alpaca publishes an official MCP server, and its documented tools cover market data queries for bars, quotes, trades, snapshots, and option chains. You can also connect the Alpaca Market Data API directly through Jentic: your agent gets the full 45-endpoint surface from the spec without loading another server's tool definitions into its context, your APCA-API-KEY-ID and APCA-API-SECRET-KEY are injected at call time by your own self-hosted Jentic One instance instead of sitting in an MCP client config file, and your rules decide which operations the agent may call.

### Can I limit what my agent is allowed to do with the Alpaca Market Data API?

Yes. Because you run Jentic One yourself, your own rules decide which Alpaca Market Data operations and credentials the agent may use. Since this API is read-only, you choose which data reads the agent can call, whether that is the stock snapshot at GET /v2/stocks/{symbol}/snapshot, the option chain at /v1beta1/options/snapshots/{underlying_symbol}, or the crypto and forex reads. The symbol sits in the URL path, so a rule can pin the agent to a single symbol.
