Stocks
- Module path:
alpaca_data::stocks - Client type:
StocksClient - docs.rs module: https://docs.rs/alpaca-data/latest/alpaca_data/stocks/
- Site rustdoc module: https://wmzhai.github.io/alpaca-data-rs/api/alpaca_data/stocks/
- Scope: Public API surface
Stock market data endpoints. Mirror methods cover historical batch and single-symbol endpoints, latest endpoints, auction history, snapshots, and metadata endpoints. Convenience methods add:
Methods
| Method | Kind | Async | Request | Return | docs.rs | Site rustdoc |
|---|---|---|---|---|---|---|
bars | mirror | yes | BarsRequest | Result<BarsResponse, Error> | docs.rs | site |
auctions | mirror | yes | AuctionsRequest | Result<AuctionsResponse, Error> | docs.rs | site |
auctions_all | convenience | yes | AuctionsRequest | Result<AuctionsResponse, Error> | docs.rs | site |
auctions_single | mirror | yes | AuctionsSingleRequest | Result<AuctionsSingleResponse, Error> | docs.rs | site |
auctions_single_all | convenience | yes | AuctionsSingleRequest | Result<AuctionsSingleResponse, Error> | docs.rs | site |
auctions_stream | convenience | no | AuctionsRequest | ResponseStream<Result<AuctionsResponse, Error>> | docs.rs | site |
auctions_single_stream | convenience | no | AuctionsSingleRequest | ResponseStream<Result<AuctionsSingleResponse, Error>> | docs.rs | site |
bars_all | convenience | yes | BarsRequest | Result<BarsResponse, Error> | docs.rs | site |
bars_single | mirror | yes | BarsSingleRequest | Result<BarsSingleResponse, Error> | docs.rs | site |
bars_single_all | convenience | yes | BarsSingleRequest | Result<BarsSingleResponse, Error> | docs.rs | site |
bars_stream | convenience | no | BarsRequest | ResponseStream<Result<BarsResponse, Error>> | docs.rs | site |
bars_single_stream | convenience | no | BarsSingleRequest | ResponseStream<Result<BarsSingleResponse, Error>> | docs.rs | site |
quotes | mirror | yes | QuotesRequest | Result<QuotesResponse, Error> | docs.rs | site |
quotes_all | convenience | yes | QuotesRequest | Result<QuotesResponse, Error> | docs.rs | site |
quotes_single | mirror | yes | QuotesSingleRequest | Result<QuotesSingleResponse, Error> | docs.rs | site |
quotes_single_all | convenience | yes | QuotesSingleRequest | Result<QuotesSingleResponse, Error> | docs.rs | site |
quotes_stream | convenience | no | QuotesRequest | ResponseStream<Result<QuotesResponse, Error>> | docs.rs | site |
quotes_single_stream | convenience | no | QuotesSingleRequest | ResponseStream<Result<QuotesSingleResponse, Error>> | docs.rs | site |
trades | mirror | yes | TradesRequest | Result<TradesResponse, Error> | docs.rs | site |
trades_all | convenience | yes | TradesRequest | Result<TradesResponse, Error> | docs.rs | site |
trades_single | mirror | yes | TradesSingleRequest | Result<TradesSingleResponse, Error> | docs.rs | site |
trades_single_all | convenience | yes | TradesSingleRequest | Result<TradesSingleResponse, Error> | docs.rs | site |
trades_stream | convenience | no | TradesRequest | ResponseStream<Result<TradesResponse, Error>> | docs.rs | site |
trades_single_stream | convenience | no | TradesSingleRequest | ResponseStream<Result<TradesSingleResponse, Error>> | docs.rs | site |
latest_bars | mirror | yes | LatestBarsRequest | Result<LatestBarsResponse, Error> | docs.rs | site |
latest_bar | mirror | yes | LatestBarRequest | Result<LatestBarResponse, Error> | docs.rs | site |
latest_quotes | mirror | yes | LatestQuotesRequest | Result<LatestQuotesResponse, Error> | docs.rs | site |
latest_quote | mirror | yes | LatestQuoteRequest | Result<LatestQuoteResponse, Error> | docs.rs | site |
latest_trades | mirror | yes | LatestTradesRequest | Result<LatestTradesResponse, Error> | docs.rs | site |
latest_trade | mirror | yes | LatestTradeRequest | Result<LatestTradeResponse, Error> | docs.rs | site |
snapshots | mirror | yes | SnapshotsRequest | Result<SnapshotsResponse, Error> | docs.rs | site |
snapshot | mirror | yes | SnapshotRequest | Result<SnapshotResponse, Error> | docs.rs | site |
condition_codes | mirror | yes | ConditionCodesRequest | Result<ConditionCodesResponse, Error> | docs.rs | site |
exchange_codes | mirror | yes | - | Result<ExchangeCodesResponse, Error> | docs.rs | site |
Requests
AuctionsRequest
- Kind: struct
- Summary: -
- docs.rs: AuctionsRequest
- Site rustdoc: AuctionsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
asof | asof | Option<String> | - |
feed | feed | Option<AuctionFeed> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
sort | sort | Option<Sort> | - |
AuctionsSingleRequest
- Kind: struct
- Summary: -
- docs.rs: AuctionsSingleRequest
- Site rustdoc: AuctionsSingleRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
asof | asof | Option<String> | - |
feed | feed | Option<AuctionFeed> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
sort | sort | Option<Sort> | - |
BarsRequest
- Kind: struct
- Summary: -
- docs.rs: BarsRequest
- Site rustdoc: BarsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
timeframe | timeframe | TimeFrame | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
adjustment | adjustment | Option<Adjustment> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
BarsSingleRequest
- Kind: struct
- Summary: -
- docs.rs: BarsSingleRequest
- Site rustdoc: BarsSingleRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
timeframe | timeframe | TimeFrame | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
adjustment | adjustment | Option<Adjustment> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
ConditionCodesRequest
- Kind: struct
- Summary: -
- docs.rs: ConditionCodesRequest
- Site rustdoc: ConditionCodesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
ticktype | ticktype | TickType | - |
tape | tape | Tape | - |
LatestBarRequest
- Kind: struct
- Summary: -
- docs.rs: LatestBarRequest
- Site rustdoc: LatestBarRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
LatestBarsRequest
- Kind: struct
- Summary: -
- docs.rs: LatestBarsRequest
- Site rustdoc: LatestBarsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
LatestQuoteRequest
- Kind: struct
- Summary: -
- docs.rs: LatestQuoteRequest
- Site rustdoc: LatestQuoteRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
LatestQuotesRequest
- Kind: struct
- Summary: -
- docs.rs: LatestQuotesRequest
- Site rustdoc: LatestQuotesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
LatestTradeRequest
- Kind: struct
- Summary: -
- docs.rs: LatestTradeRequest
- Site rustdoc: LatestTradeRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
LatestTradesRequest
- Kind: struct
- Summary: -
- docs.rs: LatestTradesRequest
- Site rustdoc: LatestTradesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
QuotesRequest
- Kind: struct
- Summary: -
- docs.rs: QuotesRequest
- Site rustdoc: QuotesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
QuotesSingleRequest
- Kind: struct
- Summary: -
- docs.rs: QuotesSingleRequest
- Site rustdoc: QuotesSingleRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
SnapshotRequest
- Kind: struct
- Summary: -
- docs.rs: SnapshotRequest
- Site rustdoc: SnapshotRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
SnapshotsRequest
- Kind: struct
- Summary: -
- docs.rs: SnapshotsRequest
- Site rustdoc: SnapshotsRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
feed | feed | Option<DataFeed> | - |
currency | currency | Option<Currency> | - |
TradesRequest
- Kind: struct
- Summary: -
- docs.rs: TradesRequest
- Site rustdoc: TradesRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbols | symbols | Vec<String> | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
TradesSingleRequest
- Kind: struct
- Summary: -
- docs.rs: TradesSingleRequest
- Site rustdoc: TradesSingleRequest
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
start | start | Option<String> | - |
end | end | Option<String> | - |
limit | limit | Option<u32> | - |
feed | feed | Option<DataFeed> | - |
sort | sort | Option<Sort> | - |
asof | asof | Option<String> | - |
currency | currency | Option<Currency> | - |
page_token | page_token | Option<String> | - |
Responses
AuctionsResponse
- Kind: struct
- Summary: -
- docs.rs: AuctionsResponse
- Site rustdoc: AuctionsResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
auctions | auctions | HashMap<String, Vec<DailyAuction>> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
AuctionsSingleResponse
- Kind: struct
- Summary: -
- docs.rs: AuctionsSingleResponse
- Site rustdoc: AuctionsSingleResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
auctions | auctions | Vec<DailyAuction> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
BarsResponse
- Kind: struct
- Summary: -
- docs.rs: BarsResponse
- Site rustdoc: BarsResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
bars | bars | HashMap<String, Vec<Bar>> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
BarsSingleResponse
- Kind: struct
- Summary: -
- docs.rs: BarsSingleResponse
- Site rustdoc: BarsSingleResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
bars | bars | Vec<Bar> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
ConditionCodesResponse
- Kind: type
- Summary: -
- docs.rs: ConditionCodesResponse
- Site rustdoc: ConditionCodesResponse
- Alias target:
HashMap<String, String>
ExchangeCodesResponse
- Kind: type
- Summary: -
- docs.rs: ExchangeCodesResponse
- Site rustdoc: ExchangeCodesResponse
- Alias target:
HashMap<String, String>
LatestBarResponse
- Kind: struct
- Summary: -
- docs.rs: LatestBarResponse
- Site rustdoc: LatestBarResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
bar | bar | Bar | - |
currency | currency | Option<Currency> | - |
LatestBarsResponse
- Kind: struct
- Summary: -
- docs.rs: LatestBarsResponse
- Site rustdoc: LatestBarsResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
bars | bars | HashMap<String, Bar> | - |
currency | currency | Option<Currency> | - |
LatestQuoteResponse
- Kind: struct
- Summary: -
- docs.rs: LatestQuoteResponse
- Site rustdoc: LatestQuoteResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
quote | quote | Quote | - |
currency | currency | Option<Currency> | - |
LatestQuotesResponse
- Kind: struct
- Summary: -
- docs.rs: LatestQuotesResponse
- Site rustdoc: LatestQuotesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
quotes | quotes | HashMap<String, Quote> | - |
currency | currency | Option<Currency> | - |
LatestTradeResponse
- Kind: struct
- Summary: -
- docs.rs: LatestTradeResponse
- Site rustdoc: LatestTradeResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
trade | trade | Trade | - |
currency | currency | Option<Currency> | - |
LatestTradesResponse
- Kind: struct
- Summary: -
- docs.rs: LatestTradesResponse
- Site rustdoc: LatestTradesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
trades | trades | HashMap<String, Trade> | - |
currency | currency | Option<Currency> | - |
QuotesResponse
- Kind: struct
- Summary: -
- docs.rs: QuotesResponse
- Site rustdoc: QuotesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
quotes | quotes | HashMap<String, Vec<Quote>> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
QuotesSingleResponse
- Kind: struct
- Summary: -
- docs.rs: QuotesSingleResponse
- Site rustdoc: QuotesSingleResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
quotes | quotes | Vec<Quote> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
SnapshotResponse
- Kind: struct
- Summary: -
- docs.rs: SnapshotResponse
- Site rustdoc: SnapshotResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
currency | currency | Option<Currency> | - |
latestTrade | latestTrade | Option<Trade> | - |
latestQuote | latestQuote | Option<Quote> | - |
minuteBar | minuteBar | Option<Bar> | - |
dailyBar | dailyBar | Option<Bar> | - |
prevDailyBar | prevDailyBar | Option<Bar> | - |
SnapshotsResponse
- Kind: type
- Summary: -
- docs.rs: SnapshotsResponse
- Site rustdoc: SnapshotsResponse
- Alias target:
HashMap<String, Snapshot>
TradesResponse
- Kind: struct
- Summary: -
- docs.rs: TradesResponse
- Site rustdoc: TradesResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
trades | trades | HashMap<String, Vec<Trade>> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
TradesSingleResponse
- Kind: struct
- Summary: -
- docs.rs: TradesSingleResponse
- Site rustdoc: TradesSingleResponse
| Field | Official Word | Type | Notes |
|---|---|---|---|
symbol | symbol | String | - |
trades | trades | Vec<Trade> | - |
next_page_token | next_page_token | Option<String> | - |
currency | currency | Option<Currency> | - |
Models
Auction
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
x | x | Option<String> | - |
p | p | Option<f64> | - |
s | s | Option<u64> | - |
c | c | Option<String> | - |
Bar
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
o | o | Option<f64> | - |
h | h | Option<f64> | - |
l | l | Option<f64> | - |
c | c | Option<f64> | - |
v | v | Option<u64> | - |
n | n | Option<u64> | - |
vw | vw | Option<f64> | - |
DailyAuction
- Kind: struct
- Summary: -
- docs.rs: DailyAuction
- Site rustdoc: DailyAuction
| Field | Official Word | Type | Notes |
|---|---|---|---|
d | d | Option<String> | - |
o | o | Vec<Auction> | - |
c | c | Vec<Auction> | - |
Quote
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
bx | bx | Option<String> | - |
bp | bp | Option<f64> | - |
bs | bs | Option<u64> | - |
ax | ax | Option<String> | - |
ap | ap | Option<f64> | - |
r#as | as | Option<u64> | - |
c | c | Option<Vec<String>> | - |
z | z | Option<String> | - |
Snapshot
| Field | Official Word | Type | Notes |
|---|---|---|---|
latestTrade | latestTrade | Option<Trade> | - |
latestQuote | latestQuote | Option<Quote> | - |
minuteBar | minuteBar | Option<Bar> | - |
dailyBar | dailyBar | Option<Bar> | - |
prevDailyBar | prevDailyBar | Option<Bar> | - |
Trade
| Field | Official Word | Type | Notes |
|---|---|---|---|
t | t | Option<Timestamp> | - |
x | x | Option<String> | - |
p | p | Option<f64> | - |
s | s | Option<u64> | - |
i | i | Option<u64> | - |
c | c | Option<Vec<String>> | - |
z | z | Option<String> | - |
u | u | Option<String> | - |
Enums
Adjustment
- Kind: struct
- Summary: -
- docs.rs: Adjustment
- Site rustdoc: Adjustment
- Example constructors:
raw -> raw,split -> split,dividend -> dividend,spin_off -> spin-off,all -> all
AuctionFeed
- Kind: enum
- Summary: -
- docs.rs: AuctionFeed
- Site rustdoc: AuctionFeed
| Variant | Official Value |
|---|---|
Sip | sip |
DataFeed
| Variant | Official Value |
|---|---|
DelayedSip | delayed_sip |
Iex | iex |
Otc | otc |
Sip | sip |
Boats | boats |
Overnight | overnight |
Tape
| Variant | Official Value |
|---|---|
A | A |
B | B |
C | C |
TickType
| Variant | Official Value |
|---|---|
Trade | trade |
Quote | quote |
TimeFrame
- Kind: struct
- Summary: -
- docs.rs: TimeFrame
- Site rustdoc: TimeFrame
- Example constructors:
min_1 -> 1Min,day_1 -> 1Day
Related Repository Artifacts
- Examples:
examples/stocks_bars_all.rs,examples/stocks_latest_bar.rs - Tests:
tests/live_stocks_auctions.rs,tests/live_stocks_batch_historical.rs,tests/live_stocks_latest_snapshot.rs,tests/live_stocks_metadata.rs,tests/live_stocks_single_historical.rs,tests/mock_stocks_errors.rs - Benchmarks:
benches/stocks.rs
Coverage Notes
- The strict endpoint parity ledger for this module lives in API Coverage.
- Generated reference pages mirror the shipped Rust surface and do not claim unimplemented Alpaca endpoints as available.