Pyhood is a free, open-source Python client for the Robinhood API, built for developers and quantitative traders who want to automate their Robinhood accounts without babysitting a login prompt every time a session expires. It is aimed at people who already write scripts and want a typed, well-tested library instead of hand-rolled requests against undocumented endpoints.
The main idea is unattended operation. After you approve a device once, Pyhood stores the session and renews it from a refresh token, so scheduled jobs and long-running scripts can keep working without a password or a new device approval prompt. The library covers stocks, equity and index options with Greeks, futures, IRA accounts and the official Crypto Trading API, which makes it a practical toolkit for anyone building their own Robinhood workflows on Windows, macOS or Linux.
What Is Pyhood and Who Is It For?
Pyhood is a programming library, not a point-and-click trading application. You install it into a Python environment, write code that calls its functions, and run that code yourself. It is best suited to developers, data analysts and quantitative traders who already know Python and want to script Robinhood actions.
The typical user is someone who wants to check positions on a schedule, pull options chains for research, rebalance a portfolio on rules they define, or log account activity to a spreadsheet or database. If you only want to place a few trades by hand, the official Robinhood app is a simpler choice. Pyhood earns its place when repetition, data collection or custom logic is involved.
How Session Persistence Works in Practice
Most unofficial Robinhood clients break the first time a session expires and a script needs a fresh login. Pyhood addresses this by storing a session after an approved login and using a refresh token to renew it later. In practice, this means the first run requires you to be at the keyboard to approve the device, and later runs can proceed unattended.
This design has a trade-off worth understanding. Anyone who can read the stored session file may be able to act on your account until the token is revoked, so the session file should be treated like a credential. Keep it on a machine you control, restrict file permissions, and do not commit it to a version control repository.
Practical Scenarios for Scripted Robinhood Workflows
A few examples show where a library like this fits. A developer might run a script each morning that pulls the current chain for a index option, calculates Greeks, and writes the results to a CSV file for review. Another might monitor futures positions and compute running P&L across several contracts in one place.
Retirement-account users can use the IRA discovery feature to confirm which accounts are available before a script places orders, which reduces the chance of sending an order to the wrong account. Crypto-focused users can use the official Crypto Trading API route to keep orders within a documented interface. Each scenario benefits from the typed responses, because the script can validate data before acting on it.
Key Terms for Readers New to Trading Automation
Several terms come up repeatedly in this category. A refresh token is a long-lived credential that lets a client obtain new access tokens without the user re-entering a password. Greeks are sensitivity measures for options: delta estimates how an option price moves with the underlying asset, gamma tracks how delta changes, theta measures time decay and vega measures sensitivity to implied volatility.
Open interest is the number of outstanding option contracts that have not been closed, while volume counts contracts traded during a period. Rate limiting refers to a cap on how many requests a client may send in a given time window. Understanding these concepts makes it easier to read the library's output and to design scripts that behave sensibly.
Key features
Silent session refresh
Typed responses
Retirement account support
Official crypto API
Futures support
Options-first coverage
Safer session storage
Rate limiting and retries
Clear authentication errors
Maintained test suite
Supported coins
The documentation mentions Bitcoin (BTC) and Ethereum (ETH) as examples of crypto assets accessible through the official Crypto Trading API. The library's main strength, however, lies in equities, equity and index options, and futures rather than a broad crypto catalog.
How to install Pyhood on Windows
- 1
Confirm your Python version
Pyhood is tested on Python 3.10 through 3.14. Open a terminal and run python --version to check which interpreter you have. If you need a newer version, install it from the official python.org download page before continuing.
- 2
Download Pyhood
Get the project from the official GitHub repository at https://github.com/jamestford/pyhood, either by cloning it with Git or by downloading the source archive from the Releases page. The current release is v0.12.3. Download only from the official repository to avoid tampered copies.
- 3
Verify the download
Compare the checksum of the downloaded archive with the value published on the Releases page, and check any signature the maintainers provide. This step confirms the file has not been altered in transit.
- 4
Set up a virtual environment
Create an isolated environment with python -m venv venv, then activate it. On Windows, run venv\Scripts\activate. Keeping dependencies inside a virtual environment prevents conflicts with other Python projects on your machine.
- 5
Install the package
Move into the project folder and install it with pip, following the instructions in the repository README. Once installed, the pyhood command-line entry point becomes available inside the active environment.
- 6
Store your first session
Run pyhood setup login from the terminal and complete the approval flow for your Robinhood account. You will be asked to approve the device and possibly enter an MFA code. After this, the session is stored and later runs can renew it automatically.
-
Run a verification script
Execute python examples/verifystocks.py to confirm the stored session works and that the client can read your account data. Fix any authentication errors before building larger automation on top of the library.
System requirements
- Windows, macOS or another platform with a working Python 3.10 to 3.14 interpreter
- A Robinhood account with device approval completed on first login
- Internet access to reach Robinhood's servers
- A terminal or command prompt for the setup and verification commands
How to use Pyhood
Pyhood is used from Python code, so the workflow is a short setup followed by scripts you write. The first step is always to create a stored session, because later scripts depend on it. Once the session exists, your code can import the client, request account information and place orders. Start with read-only calls such as fetching positions or quotes before you attempt any order placement.
A simple sequence looks like this:
- Open a terminal inside your activated virtual environment.
- Run pyhood setup login and approve the device when Robinhood asks.
- Run python examples/verifystocks.py to confirm the session loads and account data is returned.
- Write a small script that imports the client and prints a few quotes, without placing any orders.
- Add error handling for the authentication exceptions so the script can report expired tokens or MFA prompts clearly.
- Test order logic with the smallest possible quantities, and review the output before scheduling the script to run unattended.
Pros & cons
- Free and MIT-licensed, so you can read, modify and reuse the code
- Silent session refresh keeps unattended scripts running after the first approval
- Typed dataclass responses make the code easier to read and safer to maintain
- Covers options Greeks, futures and IRA accounts in one library
- Uses JSON session storage instead of pickle
- Tested against Python 3.10 through 3.14 in continuous integration
- Requires Python programming skills; there is no graphical interface
- Options and futures coverage is broader than the crypto catalog
- Depends on Robinhood's account and API behavior, which can change
- Stored sessions act as credentials and need careful handling
- Windows is mentioned in the documentation but not as thoroughly verified as macOS
Is Pyhood safe?
Pyhood connects to a brokerage account, so treat it with the same caution you would apply to any trading software. Download only from the official GitHub repository, verify the checksum or signature of the release, and install the package inside a virtual environment. Never enter your Robinhood password or seed phrases on third-party websites that claim to offer a Pyhood download or an upgraded version.
Guard the session file as if it were a password. Anyone with access to it may be able to act on your account until the token is revoked. Keep the file out of shared folders and version control, and revoke sessions in your Robinhood settings if you suspect exposure. The project's last code update is recent, but check the official repository for the latest version before relying on any release for live trading.
- Official source only. Download from github.com/jamestford/pyhood. Ignore ads and lookalike domains.
- Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
- Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
Alternatives
Pyhood differs from the other tools in this catalog mainly by focus. OctoBot and Hummingbot are general trading bot platforms with their own strategy frameworks and, in OctoBot's case, a web interface. Pyhood is narrower: it is a client library for one broker's API, aimed at developers who want direct access to Robinhood accounts, options data and IRA routing rather than a finished bot with built-in strategies.
If you want research tooling, Quantify and Gunbot Quant offer backtesting and screening environments, while StockSharp is a larger algorithmic trading platform in C#. Tradingview MCP suits users who want AI assistants to run analysis. Gekko and Catalyst are archived projects and are no longer maintained, so they are less suitable for new work. Choose Pyhood when your priority is scripted access to a Robinhood account.
Specifications
- Price
- Free
- Type
- Open source
- License
- MIT
- Latest version
- v0.12.3
- Last update
- 17 Sept 2026
- Windows support
- Unverified (Windows mentioned in docs)
- Source code
- github.com/jamestford/pyhood
Frequently asked questions
Yes. Pyhood is released under the MIT license and is free to download, use and modify. There is no paid tier listed for the library itself, although using Robinhood's services and APIs may involve terms and costs set by Robinhood.
The documentation mentions Windows along with macOS as supported platforms, but Windows support is less thoroughly verified than macOS. Test the setup and verification commands on your own machine before building anything important on top of it.
No. Robinhood requires device approval on the first login. After that, Pyhood keeps the session alive by renewing it from a stored refresh token, so unattended scripts can run without a new approval prompt in normal circumstances.
Yes. The library covers equity and index options with chains, Greeks, volume and open interest, and it includes futures contracts, quotes, orders, positions and P&L helpers. Options coverage is the most emphasized part of the project.
Pyhood can discover Traditional and Roth IRA accounts and trade in them. Confirm account discovery output before placing orders so you send instructions to the intended account.
The library is open source, which lets you inspect the code, and it stores sessions as JSON rather than pickle. Safety still depends on how you handle the session file, download the software from the official repository and test your scripts carefully before live use.
Yes. Pyhood is a Python library with no graphical interface, so you need to be comfortable writing and running scripts, using a virtual environment and reading error messages.
The documentation mentions Bitcoin (BTC) and Ethereum (ETH) through the official Crypto Trading API. The library's broader strengths are in stocks, options and futures.
Verdict
Pyhood suits Python developers, quantitative traders and technically minded investors who want scripted, unattended access to their Robinhood accounts. Its silent session refresh, typed responses and options tooling are its strongest points. If you need a point-and-click app or a complete bot with built-in strategies, look at OctoBot or Hummingbot instead. Before relying on any version for live trading, check the latest release on the official repository.