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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Async Rust client for the Robinhood trading API.
//!
//! Provides authenticated access to stock quotes, options chains, order
//! placement, and account data through [`RobinhoodClient`].
//!
//! # Example
//!
//! ```no_run
//! use rhood_core::RobinhoodClient;
//!
//! # async fn run() -> rhood_core::Result<()> {
//! let client = RobinhoodClient::new()?;
//! client.login_from_cache().await?;
//!
//! let quotes = client.get_quotes(&["AAPL", "TSLA"]).await?;
//! for quote in quotes {
//! println!("{:?}: {:?}", quote.symbol, quote.last_trade_price);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # Modules
//!
//! - [`auth`] - Device token generation, token caching, and auth state machine
//! - [`client`] - [`RobinhoodClient`] struct with authenticated HTTP helpers
//! - [`config`] - [`RhoodConfig`] loaded from TOML files and environment variables
//! - [`endpoints`] - API methods organized by domain (stocks, options, orders, account)
//! - [`error`] - [`RhoodError`] enum with [`thiserror`] integration
//! - [`models`] - Serde response types for API data
//! - [`pagination`] - Generic paginated response wrappers
//! - [`api`] - Robinhood API path constants
/// Robinhood API path constants organized by domain.
/// Authentication state machine, token caching, and device token generation.
/// The [`RobinhoodClient`] struct and its HTTP transport methods.
/// Configuration loaded from TOML files, environment variables, and defaults.
/// Endpoint methods on [`RobinhoodClient`] organized by domain.
/// Environment variable abstraction ([`Env`](env::Env)/[`SystemEnv`](env::SystemEnv)/[`MapEnv`](env::MapEnv))
/// plus [`env_non_empty`](env::env_non_empty) helpers threaded through the config loader
/// so tests can inject env values without mutating process state.
/// Error types for this crate.
/// Serde response structs for Robinhood API data.
/// Generic paginated and results response wrappers.
/// In-memory caches for identity/metadata lookups (symbol ↔ id, etc.).
/// Small shared helpers (e.g. URL parsing utilities).
pub use RobinhoodClient;
pub use RhoodConfig;
pub use ;
pub use ResolverCache;
/// A specialized [`Result`](std::result::Result) type for this crate.
///
/// All fallible operations in `rhood-core` return this type.
pub type Result<T> = Result;