Name | robinhood-client JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | An unofficial Python REST client for Robinhood API. |
upload_time | 2025-09-06 23:59:49 |
maintainer | None |
docs_url | None |
author | Ryan Miller |
requires_python | >=3.10 |
license | MIT License
Copyright (c) 2018 Joshua M. Fernandes
Copyright (c) 2025 Ryan Miller
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
robinhood
api
client
stocks
trading
crypto
investing
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|



# A Lightweight Robinhood API Client
🚧 Under Construction 🚧
This unofficial API client provides a Python interface for interacting with the Robinhood API. The code is simple to use, easy to understand, and easy to modify. With this library, you can view information on stocks, options, and crypto-currencies in real-time, create your own robo-investor or trading algorithm.
# Installing
There is no need to download these files directly. This project is published on PyPi, so it can be installed by typing into terminal (on Mac) or into command prompt (on PC):
```bash
# Using pip
pip install robinhood-client
# Using Poetry
poetry add robinhood-client
```
Also be sure that Python 3.10 or higher is installed. If you need to install python you can download it from [Python.org](https://www.python.org/downloads/).
## Basic Usage
```python
import robinhood_client as rh
# Gets all crypto orders from Robinhood that are opened
rh.get_all_open_crypto_orders()
```
## Logging
The library includes a configurable logging system that works both when used as a library and when run as a script.
### Default Behavior
By default, logs are configured at the INFO level and output to the console. This happens automatically when you import the package:
```python
import robinhood_client
# Logs will appear in the console at INFO level
robinhood_client.login(username="your_username", password="your_password")
```
### Customizing Logging
You can customize the logging behavior using the `configure_logging` function:
```python
from robinhood_client.logging import configure_logging
import logging
# Set custom log level and optionally log to a file
configure_logging(
level=logging.DEBUG, # More detailed logs
log_file="robinhood.log" # Also write logs to this file
)
```
### Environment Variables
You can also configure logging using environment variables:
- `ROBINHOOD_LOG_LEVEL`: Set the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
- `ROBINHOOD_LOG_FILE`: Path to a log file where logs will be written
Example:
```bash
# On Linux/Mac
export ROBINHOOD_LOG_LEVEL=DEBUG
export ROBINHOOD_LOG_FILE=~/robinhood.log
# On Windows
set ROBINHOOD_LOG_LEVEL=DEBUG
set ROBINHOOD_LOG_FILE=C:\logs\robinhood.log
```
### Using in Cloud Environments
When deploying to cloud environments, the logging system will respect the configured log levels and can write to a file or stdout as needed, making it suitable for containerized environments and cloud logging systems.
---
## Contributing
See the [Contributing](/contributing.md) page for info about contributing to this project.
### Dependency Management with Poetry
This project uses Poetry for dependency management. Here are some common commands:
#### Installing Dependencies
```bash
# Install all dependencies (including development dependencies)
poetry install
```
#### Managing Dependencies
```bash
# Add a new dependency
poetry add package-name
# Add a development dependency
poetry add --group dev package-name
# Remove a dependency
poetry remove package-name
```
#### Updating Dependencies
```bash
# Update all dependencies according to the version constraints in pyproject.toml
poetry update
# Update a specific package
poetry update package-name
# Show outdated dependencies that can be updated
poetry show --outdated
```
#### Building and Publishing
```bash
# Build the package
poetry build
# Publish to PyPI
poetry publish
```
### Install Dev Dependencies
```bash
# Using pip
pip install -e .[dev]
# Using Poetry
poetry install
```
### Build and Install a Wheel
**Build**
```bash
# Using pip
python -m pip install build
python -m build
# Using Poetry
poetry build
```
**Install Wheel**
```bash
# Using pip
python -m pip install /path/to/robinhood-client/dist/robinhood-client-*.whl
# Using Poetry
poetry install
```
### Automatic Testing
If you are contributing to this project and would like to use automatic testing for your changes, you will need to install pytest and pytest-dotenv.
```bash
# Using pip
pip install pytest
pip install pytest-dotenv
# Using Poetry (dev dependencies are automatically installed)
poetry install
```
You will also need to fill out all the fields in `.test.env`. It is recommended to rename the file as `.env` once you are done adding in all your personal information. After that, you can run the tests:
```bash
# Using pip
pytest
# Using Poetry
poetry run pytest
```
To run specific tests or run all the tests in a specific class:
```bash
# Using pip
pytest tests/test_robinhood.py -k test_name_apple # runs only the 1 test
# Using Poetry
poetry run pytest tests/test_robinhood.py -k test_name_apple
```
Finally, if you would like the API calls to print out to terminal, then add the `-s` flag to any of the above pytest calls.
### Linting
The project uses `ruff` for linting.
```bash
# Using Poetry with ruff
poetry run ruff check .
```
### Updating Documentation
Docs are powered by [Sphinx](https://www.sphinx-doc.org/en/master/tutorial/getting-started.html).
```bash
# Using pip
cd docs
make html
# Using Poetry
cd docs
poetry run make html
```
**Build Docs**
```bash
sphinx-build -M html docs/source/ docs/build/
```
---
**Attribution:** This project is a fork of [robin_stocks](https://github.com/jmfernandes/robin_stocks) by Joseph Fernandes. **Robinhood Client** is a slimmed down version that supports only Robinhood and additional enhancements for cloud support, security, and other changes.
Raw data
{
"_id": null,
"home_page": null,
"name": "robinhood-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "robinhood, api, client, stocks, trading, crypto, investing",
"author": "Ryan Miller",
"author_email": "mrzodge@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ad/a4/942d0b6d96c412463391a0ffbd8baa8948d47045c56ee991431670b6a8b2/robinhood_client-0.1.1.tar.gz",
"platform": null,
"description": "\n\n\n\n\n# A Lightweight Robinhood API Client\n\n\ud83d\udea7 Under Construction \ud83d\udea7\n\nThis unofficial API client provides a Python interface for interacting with the Robinhood API. The code is simple to use, easy to understand, and easy to modify. With this library, you can view information on stocks, options, and crypto-currencies in real-time, create your own robo-investor or trading algorithm.\n\n# Installing\n\nThere is no need to download these files directly. This project is published on PyPi, so it can be installed by typing into terminal (on Mac) or into command prompt (on PC):\n\n```bash\n# Using pip\npip install robinhood-client\n\n# Using Poetry\npoetry add robinhood-client\n```\n\nAlso be sure that Python 3.10 or higher is installed. If you need to install python you can download it from [Python.org](https://www.python.org/downloads/).\n\n## Basic Usage\n\n```python\nimport robinhood_client as rh\n\n# Gets all crypto orders from Robinhood that are opened\nrh.get_all_open_crypto_orders() \n```\n\n## Logging\n\nThe library includes a configurable logging system that works both when used as a library and when run as a script.\n\n### Default Behavior\n\nBy default, logs are configured at the INFO level and output to the console. This happens automatically when you import the package:\n\n```python\nimport robinhood_client\n\n# Logs will appear in the console at INFO level\nrobinhood_client.login(username=\"your_username\", password=\"your_password\")\n```\n\n### Customizing Logging\n\nYou can customize the logging behavior using the `configure_logging` function:\n\n```python\nfrom robinhood_client.logging import configure_logging\nimport logging\n\n# Set custom log level and optionally log to a file\nconfigure_logging(\n level=logging.DEBUG, # More detailed logs\n log_file=\"robinhood.log\" # Also write logs to this file\n)\n```\n\n### Environment Variables\n\nYou can also configure logging using environment variables:\n\n- `ROBINHOOD_LOG_LEVEL`: Set the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n- `ROBINHOOD_LOG_FILE`: Path to a log file where logs will be written\n\nExample:\n```bash\n# On Linux/Mac\nexport ROBINHOOD_LOG_LEVEL=DEBUG\nexport ROBINHOOD_LOG_FILE=~/robinhood.log\n\n# On Windows\nset ROBINHOOD_LOG_LEVEL=DEBUG\nset ROBINHOOD_LOG_FILE=C:\\logs\\robinhood.log\n```\n\n### Using in Cloud Environments\n\nWhen deploying to cloud environments, the logging system will respect the configured log levels and can write to a file or stdout as needed, making it suitable for containerized environments and cloud logging systems.\n\n---\n\n## Contributing\n\nSee the [Contributing](/contributing.md) page for info about contributing to this project.\n\n### Dependency Management with Poetry\n\nThis project uses Poetry for dependency management. Here are some common commands:\n\n#### Installing Dependencies\n\n```bash\n# Install all dependencies (including development dependencies)\npoetry install\n```\n\n#### Managing Dependencies\n\n```bash\n# Add a new dependency\npoetry add package-name\n\n# Add a development dependency\npoetry add --group dev package-name\n\n# Remove a dependency\npoetry remove package-name\n```\n\n#### Updating Dependencies\n\n```bash\n# Update all dependencies according to the version constraints in pyproject.toml\npoetry update\n\n# Update a specific package\npoetry update package-name\n\n# Show outdated dependencies that can be updated\npoetry show --outdated\n```\n\n#### Building and Publishing\n\n```bash\n# Build the package\npoetry build\n\n# Publish to PyPI\npoetry publish\n```\n\n### Install Dev Dependencies\n\n```bash\n# Using pip\npip install -e .[dev]\n\n# Using Poetry\npoetry install\n```\n\n### Build and Install a Wheel\n\n**Build**\n```bash\n# Using pip\npython -m pip install build\npython -m build\n\n# Using Poetry\npoetry build\n```\n\n**Install Wheel**\n```bash\n# Using pip\npython -m pip install /path/to/robinhood-client/dist/robinhood-client-*.whl\n\n# Using Poetry\npoetry install\n```\n\n### Automatic Testing\n\nIf you are contributing to this project and would like to use automatic testing for your changes, you will need to install pytest and pytest-dotenv.\n\n```bash\n# Using pip\npip install pytest\npip install pytest-dotenv\n\n# Using Poetry (dev dependencies are automatically installed)\npoetry install\n```\n\nYou will also need to fill out all the fields in `.test.env`. It is recommended to rename the file as `.env` once you are done adding in all your personal information. After that, you can run the tests:\n\n```bash\n# Using pip\npytest\n\n# Using Poetry\npoetry run pytest\n```\n\nTo run specific tests or run all the tests in a specific class:\n\n```bash\n# Using pip\npytest tests/test_robinhood.py -k test_name_apple # runs only the 1 test\n\n# Using Poetry\npoetry run pytest tests/test_robinhood.py -k test_name_apple\n```\n\nFinally, if you would like the API calls to print out to terminal, then add the `-s` flag to any of the above pytest calls.\n\n### Linting\n\nThe project uses `ruff` for linting.\n\n```bash\n# Using Poetry with ruff\npoetry run ruff check .\n```\n\n### Updating Documentation\n\nDocs are powered by [Sphinx](https://www.sphinx-doc.org/en/master/tutorial/getting-started.html).\n\n```bash\n# Using pip\ncd docs\nmake html\n\n# Using Poetry\ncd docs\npoetry run make html\n```\n\n**Build Docs**\n\n```bash\nsphinx-build -M html docs/source/ docs/build/\n```\n\n---\n\n**Attribution:** This project is a fork of [robin_stocks](https://github.com/jmfernandes/robin_stocks) by Joseph Fernandes. **Robinhood Client** is a slimmed down version that supports only Robinhood and additional enhancements for cloud support, security, and other changes.\n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2018 Joshua M. Fernandes\n Copyright (c) 2025 Ryan Miller\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\n the Software without restriction, including without limitation the rights to\n use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n of the Software, and to permit persons to whom the Software is furnished to do\n so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "An unofficial Python REST client for Robinhood API.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/RvanMiller/robinhood-client",
"Repository": "https://github.com/RvanMiller/robinhood-client"
},
"split_keywords": [
"robinhood",
" api",
" client",
" stocks",
" trading",
" crypto",
" investing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "055080d655bbf3cede10896ca8b23d56c6a033d04e6c84c4ee70319207101ec1",
"md5": "256a121111a95e7fdf6586af98561e10",
"sha256": "3fb285e96cf17f11cb4da90e71bdfbee4dfac9bcbc044adc1e375afdfc1f01ba"
},
"downloads": -1,
"filename": "robinhood_client-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "256a121111a95e7fdf6586af98561e10",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 23001,
"upload_time": "2025-09-06T23:59:48",
"upload_time_iso_8601": "2025-09-06T23:59:48.442299Z",
"url": "https://files.pythonhosted.org/packages/05/50/80d655bbf3cede10896ca8b23d56c6a033d04e6c84c4ee70319207101ec1/robinhood_client-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ada4942d0b6d96c412463391a0ffbd8baa8948d47045c56ee991431670b6a8b2",
"md5": "caacd720811e73fd29c14f48ab5ec421",
"sha256": "d9a448c1049aeaf54d8ecfd6ee132210766d433cef2a94b3145a7179255630bb"
},
"downloads": -1,
"filename": "robinhood_client-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "caacd720811e73fd29c14f48ab5ec421",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 20565,
"upload_time": "2025-09-06T23:59:49",
"upload_time_iso_8601": "2025-09-06T23:59:49.875867Z",
"url": "https://files.pythonhosted.org/packages/ad/a4/942d0b6d96c412463391a0ffbd8baa8948d47045c56ee991431670b6a8b2/robinhood_client-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 23:59:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RvanMiller",
"github_project": "robinhood-client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "robinhood-client"
}