Skip to main content

Crate rhood_core

Crate rhood_core 

Source
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

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 RobinhoodClient struct and its HTTP transport methods. The RobinhoodClient struct 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 RobinhoodClient organized by domain. Endpoint implementations for the Robinhood API.
env
Environment variable abstraction (Env/SystemEnv/MapEnv) plus env_non_empty helpers 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-core crate.
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.

Type Aliases§

Result
A specialized Result type for this crate.