Crypto Trading Bots

PyhoodOpen-Source Robinhood Automation Client for Python Developers

Free open-source Python client for unattended Robinhood automation, with silent session refresh, options Greeks, IRA accounts and the official crypto API.

Free Open source Windows: Unverified v0.12.3 Updated 17 Sept 2026
10 min read Last update 17 Sept 2026 github.com/jamestford/pyhood

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.

02

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.

03

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.

04

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.

05

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.

06

Key features

Silent session refresh

Once the first login is approved, Pyhood renews sessions from a stored refresh token. Scripts that run overnight or on a schedule do not stop because a password prompt or device check appeared unexpectedly.

Typed responses

Responses come back as dataclasses with type hints rather than nested dictionaries. Editors can autocomplete fields, and type checkers can catch mistakes before a script places an order.

Retirement account support

The library can discover Traditional and Roth IRA accounts linked to your profile and direct trades to them, which is useful for automating retirement-account routines alongside taxable accounts.

Official crypto API

Pyhood can use Robinhood's official Crypto Trading API with API keys, so crypto orders can run through a documented interface rather than unofficial endpoints.

Futures support

Futures contracts, quotes, orders, positions and P&L helper functions are included, giving scripts a single client for several Robinhood product types.

Options-first coverage

Equity and index options are the library's strongest area. It exposes option chains, Greeks, volume, open interest and order helpers, which suits strategy research and systematic options tooling.

Safer session storage

Sessions are saved as JSON rather than Python pickle files. Pickle can execute arbitrary code when loaded, so JSON reduces the risk if a session file is ever tampered with.

Rate limiting and retries

Requests are throttled and retried automatically, which helps scripts avoid hammering the API and recover from transient failures without custom code.

Clear authentication errors

Explicit exceptions cover timeouts, MFA requirements, expired tokens and device approval failures. Your code can branch on each case instead of parsing generic error messages.

Maintained test suite

The project ships 360 tests and runs continuous integration across Python 3.10 through 3.14, which gives a reasonable signal that the library tracks current Python releases.
07

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.

08

How to install Pyhood on Windows

  1. 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. 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. 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. 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. 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. 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.

  7. 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.

09

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
10

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:

  1. Open a terminal inside your activated virtual environment.
  2. Run pyhood setup login and approve the device when Robinhood asks.
  3. Run python examples/verifystocks.py to confirm the session loads and account data is returned.
  4. Write a small script that imports the client and prints a few quotes, without placing any orders.
  5. Add error handling for the authentication exceptions so the script can report expired tokens or MFA prompts clearly.
  6. Test order logic with the smallest possible quantities, and review the output before scheduling the script to run unattended.
11

Pros & cons

Pros
  • 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
Cons
  • 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
12

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.
13

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.

14

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
15

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.

16

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.

Download now