For Agents
Pull historical and latest bars, quotes, trades, snapshots, and news for US stocks, options, crypto, and forex from Alpaca's market data service.
Get started with Alpaca Market Data API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"get the latest stock price snapshot"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Alpaca Market Data API API.
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
GET STARTED
Use for: I need to fetch the latest quote for AAPL, Get historical 1-minute bars for TSLA over the past week, Retrieve the option chain snapshot for SPY, Pull crypto bars for BTC/USD over the past 24 hours
Not supported: Does not handle order placement, account management, or fundamentals data — use for market data retrieval across stocks, options, crypto, and forex only.
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.
Pull forex latest rates and historical currency-pair rates
Read corporate actions and news articles
Run screeners for top market movers and most-actives
Patterns agents use Alpaca Market Data API API for, with concrete tasks.
★ 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.
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.
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.
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.
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.
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.
45 endpoints — the alpaca market data api provides real-time and historical market data for us equities, options, crypto, crypto perpetual futures, and foreign exchange.
METHOD
PATH
DESCRIPTION
/v2/stocks/{symbol}/snapshot
Snapshot of latest bar, quote, and trade for a symbol
/v2/stocks/bars
Historical bars for multiple symbols
/v2/stocks/quotes/latest
Latest quotes for multiple symbols
/v1beta1/options/snapshots/{underlying_symbol}
Option chain snapshot for an underlying
/v1beta3/crypto/{loc}/bars
Historical crypto bars
/v1beta1/forex/latest/rates
Latest forex rates
/v1beta1/news
News articles for symbols
/v1beta1/screener/{market_type}/movers
Top market movers
/v2/stocks/{symbol}/snapshot
Snapshot of latest bar, quote, and trade for a symbol
/v2/stocks/bars
Historical bars for multiple symbols
/v2/stocks/quotes/latest
Latest quotes for multiple symbols
/v1beta1/options/snapshots/{underlying_symbol}
Option chain snapshot for an underlying
/v1beta3/crypto/{loc}/bars
Historical crypto bars
Three things that make agents converge on Jentic-routed access.
Credential isolation
APCA-API-KEY-ID and APCA-API-SECRET-KEY headers are stored encrypted in the Jentic vault and injected at execution time. Agents call operations by intent and the raw key and secret never enter the prompt context.
Intent-based discovery
Agents search 'get latest stock price' or 'historical crypto bars' and Jentic returns the matching operation with its input schema, including symbol parameters and timeframe options.
Time to first call
Direct Alpaca Market Data integration: 1-3 days across stocks, options, crypto, and forex endpoints. Through Jentic: under an hour — search, load, execute per operation.
Alternatives and complements available in the Jentic catalogue.
Alpaca Trading API
Trading executes orders driven by Market Data feeds
Use Alpaca Trading when market data signals lead to actual order placement on the developer's account
Alpaca Broker API
Broker covers managed account trading driven by Market Data signals
Use Alpaca Broker when an agent trades on behalf of customer accounts based on market data
OpenAI
Pair real-time prices with LLM summarisation for market commentary
Use OpenAI when a market data result needs to be turned into a natural-language summary for end users
Specific to using Alpaca Market Data API API through Jentic.
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?
Run pip install jentic, 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.
/v1beta1/forex/latest/rates
Latest forex rates
/v1beta1/news
News articles for symbols
/v1beta1/screener/{market_type}/movers
Top market movers