1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Async Rust client for the Alpaca Market Data HTTP API.
//!
//! The root entrypoint is [`Client`]. It exposes five resource clients:
//!
//! - [`Client::stocks`]
//! - [`Client::options`]
//! - [`Client::crypto`]
//! - [`Client::news`]
//! - [`Client::corporate_actions`]
//!
//! The crate keeps two layers:
//!
//! - Mirror layer: direct wrappers for the official HTTP endpoints
//! - Convenience layer: `*_all` and `*_stream` helpers for paginated endpoints
//!
//! # Example
//!
//! ```no_run
//! use alpaca_data::{Client, stocks};
//!
//! # async fn demo() -> Result<(), alpaca_data::Error> {
//! let client = Client::builder()
//! .api_key(std::env::var("APCA_API_KEY_ID").expect("APCA_API_KEY_ID is required"))
//! .secret_key(std::env::var("APCA_API_SECRET_KEY").expect("APCA_API_SECRET_KEY is required"))
//! .build()?;
//!
//! let _response = client
//! .stocks()
//! .latest_bars(stocks::LatestBarsRequest {
//! symbols: vec!["AAPL".into()],
//! feed: None,
//! currency: None,
//! })
//! .await?;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use Error;