Expand description
Async Rust client for the Robinhood trading API.
Provides authenticated access to stock quotes, options chains, order
placement, and account data through RobinhoodClient.
§Example
use rhood_core::RobinhoodClient;
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);
}§Modules
auth- Device token generation, token caching, and auth state machineclient-RobinhoodClientstruct with authenticated HTTP helpersconfig-RhoodConfigloaded from TOML files and environment variablesendpoints- API methods organized by domain (stocks, options, orders, account)error-RhoodErrorenum withthiserrorintegrationmodels- Serde response types for API datapagination- Generic paginated response wrappersapi- Robinhood API path constants
Re-exports§
pub use client::RobinhoodClient;pub use config::RhoodConfig;pub use error::ChallengeType;pub use error::RhoodError;pub use resolver_cache::ResolverCache;
Modules§
- api
- Robinhood API path constants organized by domain. Robinhood REST API path constants.
- auth
- Authentication state machine, token caching, and device token generation. Authentication primitives for the Robinhood API client.
- client
- The
RobinhoodClientstruct and its HTTP transport methods. TheRobinhoodClientstruct and its HTTP transport layer. - config
- Configuration loaded from TOML files, environment variables, and defaults. Configuration for the rhood-core client.
- endpoints
- Endpoint methods on
RobinhoodClientorganized by domain. Endpoint implementations for the Robinhood API. - env
- Environment variable abstraction (
Env/SystemEnv/MapEnv) plusenv_non_emptyhelpers threaded through the config loader so tests can inject env values without mutating process state. Environment variable source abstraction used by the config loader. - error
- Error types for this crate.
Error types for the
rhood-corecrate. - models
- Serde response structs for Robinhood API data. Serde model types for Robinhood API responses.
- pagination
- Generic paginated and results response wrappers. Generic paginated response wrappers for the Robinhood API.
- resolver_
cache - In-memory caches for identity/metadata lookups (symbol ↔ id, etc.). In-memory caches for identity/metadata lookups.
- util
- Small shared helpers (e.g. URL parsing utilities). Small shared helpers.