Stocks
alpaca-data::Client::stocks() exposes the stock market-data resource family.
Implemented Mirror Methods
barsbars_singlequotesquotes_singletradestrades_singlelatest_barslatest_barlatest_quoteslatest_quotelatest_tradeslatest_tradesnapshotssnapshotauctionsauctions_singlecondition_codesexchange_codes
Convenience Methods
bars_allbars_single_allquotes_allquotes_single_alltrades_alltrades_single_allauctions_allauctions_single_all
Typical Requests
Use BarsRequest when you need historical multi-symbol bars:
use alpaca_data::{Client, stocks};
let client = Client::from_env()?;
let response = client
.stocks()
.bars(stocks::BarsRequest {
symbols: vec!["AAPL".into(), "MSFT".into()],
timeframe: stocks::TimeFrame::OneDay,
start: Some("2026-04-01T00:00:00Z".into()),
end: Some("2026-04-08T00:00:00Z".into()),
..stocks::BarsRequest::default()
})
.await?;
# let _ = response;
# Ok::<(), alpaca_data::Error>(())
Use LatestQuoteRequest or LatestTradeRequest for single-symbol latest endpoints:
use alpaca_data::{Client, stocks};
let client = Client::from_env()?;
let latest = client
.stocks()
.latest_quote(stocks::LatestQuoteRequest {
symbol: "AAPL".into(),
..stocks::LatestQuoteRequest::default()
})
.await?;
# let _ = latest;
# Ok::<(), alpaca_data::Error>(())
Request Notes
- historical multi-symbol endpoints require a non-empty
symbolslist - single-symbol endpoints require a non-empty
symbol - historical endpoints support
feed,sort,asof,currency, and pagination where the official route supports them limitvalidation follows the official endpoint contract instead of silently auto-chunking requests
Not Implemented Here
- stock websocket or streaming APIs
- any cross-provider normalization layer
- caching, subscription, or application-side state management