rhood-cli
Terminal CLI for the Robinhood API.
Built on rhood-core.
Build
The binary is written to target/release/rhood. Add it to your PATH or invoke it directly.
Distribution packaging (pre-built binaries, cargo install, system packages) is out of scope for this crate.
Authentication
Authenticate interactively with your Robinhood credentials:
The command prompts for username, password, and MFA code (one-time code or TOTP secret). If credentials are pre-configured in the config file or environment, the corresponding prompts are skipped.
Tokens are cached on disk (default: ~/.rhood/.rhood-token) so subsequent commands do not re-authenticate. The cache path can be overridden with --token-cache or the RHOOD_TOKEN_CACHE_PATH environment variable.
To clear the saved session:
Global Flags
These flags apply to every subcommand.
--output <table|json|csv> Output format [default: table]
--config <PATH> Path to config.toml
--token-cache <PATH> Path to on-disk token cache
--read-write Enable order placement and cancellation
Logs are written to stderr. --output json and --output csv are therefore safe to pipe — stdout carries only structured data.
Read-Only Mode and Safety
The CLI defaults to read-only mode (read_only = true in config). Mutating commands — order buy/sell, recurring create/update/cancel, and watchlist add/remove — are blocked unless --read-write is passed.
Order placement also prompts interactively before submitting. Pass --yes to skip the prompt when running non-interactively (e.g. in scripts).
Command Reference
Stock
Quotes, history, fundamentals, and research data for equities.
| Subcommand | Description |
|---|---|
quote |
Real-time quotes for one or more symbols |
history |
Historical OHLCV candles |
fundamentals |
Sector, PE ratio, market cap, dividend yield |
latest-prices |
Latest trade price (uses extended-hours price) |
earnings |
Earnings history for a symbol |
ratings |
Analyst buy/hold/sell ratings |
news |
Recent news articles |
splits |
Stock split history |
tags |
Instruments in a category tag |
# Real-time quotes
# One year of daily candles
# Fundamentals for multiple symbols
# Latest prices (extended-hours aware)
# Earnings history
# Analyst ratings summary
# Recent news
# Split history
# Symbols in the "100-most-popular" tag
--interval values: 5minute, 10minute, hour (default), day, week
--span values: day, week (default), month, 3month, year, 5year
--bounds values: regular (default), extended, trading
Option
Option contract quotes, positions, and order history.
| Subcommand | Description |
|---|---|
positions |
Open option positions |
orders |
Option order history (all or open only) |
cancel-order |
Cancel an open option order by ID |
quote |
Live bid/ask, Greeks, volume, and open interest |
# Open option positions
# All option orders
# Open option orders only
# Orders updated since a date
# Cancel an open option order
# Quote a single contract (compact view)
# Quote with full Greeks
# Quote multiple contracts at once
--type values: call, put
Order
Place, list, and cancel stock orders.
| Subcommand | Description |
|---|---|
buy |
Place a buy order (requires --read-write) |
sell |
Place a sell order (requires --read-write) |
list |
List stock orders (all or filtered) |
cancel |
Cancel an open stock order by ID |
# Buy 10 shares at market (interactive confirmation)
# Buy $50 worth at market, skip confirmation prompt
# Sell 5 shares with a limit order
# Extended-hours limit buy
# List all stock orders
# List open orders only
# List orders updated since a date
# Cancel an order by ID
--type values: market (default), limit
--trigger values: immediate (default), stop
--market-hours values: regular (default), extended, all-day
--limit is required when --type limit is set; --stop-price is required when --trigger stop is set.
Market
Exchange listings and trading hours.
| Subcommand | Description |
|---|---|
list |
All available market exchanges |
hours |
Trading hours for a specific date |
today |
Today's trading hours |
movers |
Top 20 daily movers |
# List all exchanges
# Trading hours for NYSE on a specific date
# Today's hours for NASDAQ
# Top 20 daily movers
Market Identifier Codes (MICs): XNYS (NYSE), XNAS (NASDAQ), ARCX (NYSE Arca), and others returned by rhood market list.
Account
Positions, portfolio, profile, and income history.
| Subcommand | Description |
|---|---|
positions |
Open stock positions (non-zero quantity) |
all-positions |
All stock positions including closed (zero quantity) |
portfolio |
Portfolio summary (equity, market value) |
profile |
Account number, buying power, and cash |
buying-power |
Unified account summary |
dividends |
Dividend payment history |
interest |
Interest and sweep payment history |
transfers |
All transfers (ACH, wire, debit card) |
documents |
Account documents (statements, tax forms) |
day-trades |
Recent day trades and PDT status |
user-profile |
Authenticated user profile |
# Dividend history
# Dividend history since a date
# Total dividends earned (single value)
# All documents
# Filter by type
Futures
Futures contract lookup, real-time quotes, and order history.
| Subcommand | Description |
|---|---|
contract |
Look up a futures contract by symbol |
quote |
Real-time quotes for one or more contracts |
orders |
Futures order history |
account |
Show the futures account ID |
# Contract details
# Real-time quotes for multiple contracts
# Futures order history
# Orders updated since a date
# Futures account ID
Index
Index quotes and index option contracts.
| Subcommand | Description |
|---|---|
quote |
Real-time index quotes (SPX, NDX, VIX, RUT, XSP) |
options |
Search for index option contracts |
# Index quotes
# SPX call options expiring on a date
# Filter by strike as well
--option-type values: call, put
Recurring
Recurring investment schedules.
| Subcommand | Description |
|---|---|
list |
All recurring investment schedules |
create |
Create a new schedule (requires --read-write) |
update |
Update an existing schedule (requires --read-write) |
cancel |
Cancel a schedule (requires --read-write) |
next-date |
Look up the next investment date |
# List all schedules
# Create a $25 weekly investment in TSLA
# Update amount on an existing schedule
# Pause a schedule
# Cancel a schedule
# Next investment date for a biweekly schedule
--frequency values: weekly, biweekly, monthly
--source values: buying-power (default), ach
--state values for update: active, paused
Watchlist
Manage Robinhood watchlists.
| Subcommand | Description |
|---|---|
list |
All watchlists |
show |
Items in a specific watchlist |
add |
Add symbols to a watchlist (requires --read-write) |
remove |
Remove symbols from a watchlist (requires --read-write) |
# List all watchlists
# Show items in a watchlist
# Add symbols
# Remove a symbol
Output Formats and Scripting
The default output format is a human-readable table. Use --output json or --output csv for machine-readable output.
# Parse quotes with jq
|
# Write portfolio summary to CSV
# Pipe option positions to a file
Logs are always written to stderr, so stdout contains only structured data when --output json or --output csv is active. This makes it safe to pipe output without stripping log lines.
Configuration
Config file default location: ~/.config/rhood/config.toml
Override with --config <PATH> or the RHOOD_CONFIG environment variable.
Precedence: CLI flags > environment variables > config file.
See config.toml.example for all available fields and their defaults. Key CLI fields:
| Field / Env | Description |
|---|---|
read_only / RHOOD_READ_ONLY |
Disable write operations (default: true) |
auth.token_cache_path / RHOOD_TOKEN_CACHE_PATH |
Path to cached auth token |
auth.username / RHOOD_USERNAME |
Pre-configure Robinhood username |
auth.password / RHOOD_PASSWORD |
Pre-configure Robinhood password |
auth.mfa_secret / RHOOD_MFA |
TOTP secret for MFA |
log.level / RHOOD_LOG_LEVEL |
Log level: trace, debug, info, warn, error |