Crypto
alpaca-data::Client::crypto() exposes the crypto spot market-data resource family.
Implemented Mirror Methods
barsquotestradeslatest_barslatest_quoteslatest_tradeslatest_orderbookssnapshots
Convenience Methods
bars_allquotes_alltrades_allpreferred_location()ordered_snapshots(...)Snapshot::{timestamp, price, last_price, bid_price, ask_price, mark_price}
Typical Requests
Use BarsRequest for historical multi-symbol bars. The default location is Alpaca US:
use alpaca_data::{Client, crypto};
let client = Client::from_env()?;
let response = client
.crypto()
.bars(crypto::BarsRequest {
location: crypto::preferred_location(),
symbols: vec!["BTC/USD".into(), "ETH/USD".into()],
timeframe: crypto::TimeFrame::day_1(),
start: Some("2026-08-01T00:00:00Z".into()),
end: Some("2026-08-08T00:00:00Z".into()),
..crypto::BarsRequest::default()
})
.await?;
# let _ = response;
# Ok::<(), alpaca_data::Error>(())
Latest quotes, trades, bars, orderbooks, and snapshots all use the same batch request shape:
use alpaca_data::{Client, crypto};
let client = Client::from_env()?;
let latest = client
.crypto()
.latest_quotes(crypto::LatestQuotesRequest {
location: crypto::preferred_location(),
symbols: vec!["BTC/USD".into()],
})
.await?;
# let _ = latest;
# Ok::<(), alpaca_data::Error>(())
Request Notes
- all routes are
/v1beta3/crypto/{loc}/...; there are no single-symbol crypto paths preferred_location()isus(Alpaca US). Official locations also includeus-1,us-2,eu-1, andbs-1- symbols use slash pairs such as
BTC/USD - crypto volume and quote/trade sizes are fractional and map to
Decimal - historical endpoints support
start,end,limit,sort, and pagination limitvalidation follows the official endpoint contract- crypto bars may have quote-mid prices with
v = 0when no trade occurs in the interval
Not Implemented Here
- crypto perpetual futures market data
- websocket / stream APIs
- cache, facade, or mock coverage