Ollama Robinhood Chat 🤖📈
An interactive, terminal-based AI assistant powered by local Ollama (gemma4:e4b) with built-in tools for Exa Web Search and complete Robinhood Trading & Portfolio Automation via the robin_stocks SDK.
Key Features
- Local AI Chat: Chat natively with
gemma4:e4brunning on your local Ollama instance. - Web Search Tool: Powered by Exa Search API to retrieve real-time news, information, and answers.
- Robinhood Portfolio Analytics: Fetch accounts profile details, portfolio values, cash balances, buying power, and open stock/options positions.
- Equities & Options Trading: Query real-time quotes, chains, historical charts, list watchlists, place market/limit orders, and cancel open orders.
- Pre-Trade Simulation Reviews: Safe order review tools calculate estimated costs, check buying power, and inspect asset tradability flags before committing any trades.
- Smart Decimal Formatting: Automatically sanitizes raw Robinhood API outputs (e.g., converting
$2.7100to$2.71) for clean AI communication. - Interactive Multi-Factor Authentication (MFA): Prompts dynamically in the terminal to securely type in SMS or authenticator codes upon boot.
Project Structure
ollama-robin/
├── .env.example # Template env file for credentials
├── .gitignore # Prevents committing API keys / secrets
├── README.md # Guide & setup documentation
├── requirements.txt # Pinned python dependency packages
├── chat.py # Main interactive CLI chat loop
└── tools/
├── __init__.py
├── formatter.py # Recursive clean-up helper (2.7100 -> 2.71)
├── schemas.py # Declarative JSON schemas for Ollama tools
└── handlers.py # Python logic calling Exa and Robinhood APIs
Installation & Setup
1. Prerequisites
- Python 3.10+
- Ollama running locally with
gemma4:e4bpulled:ollama pull gemma4:e4b
2. Install Python Dependencies
pip install ollama exa-py robin_stocks python-dotenv
3. Configure Environment Variables
Create a file named .env.local in the project root:
# Exa API Key
EXA_API_KEY="your-exa-api-key-here"
# Robinhood Credentials
ROBINHOOD_USERNAME="your-login-email@example.com"
ROBINHOOD_PASSWORD="your-robinhood-password"
Running the Application
To start the interactive chat client:
python chat.py
- MFA Warning: If your Robinhood account has MFA active, the script will pause and prompt you to input the code directly into the terminal window during startup.
- Fallback Mode: If you run without Robinhood credentials, the chat will automatically disable Robinhood tools and fall back to standard chat + Exa web search.
Metadata
Release files for ollama-robin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ollama_robin-0.1.0.tar.gz | 8.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ollama_robin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / ollama_robin-0.1.0.tar.gz
| Download URL | ollama_robin-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0422db9810a564f32c631bdc8329aca22c12a6c3763c8fe87e0414b2990bbe7
|
|
BLAKE2b-256 checksum How to use checksums |
218d5a788e7d8ee3b7f2bcf8d0803c5d96804c8de564a03f5601a3898cd4a72f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / ollama_robin-0.1.0-py3-none-any.whl
| Download URL | ollama_robin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6f3d2ad7fa7e0971b205ca474fe43d3017f93939ccda8142575a572c280dd0d
|
|
BLAKE2b-256 checksum How to use checksums |
fbbfbcb7102a578de7790a9131d7d6b0fc355b4904eadae2fe0f23a9cbf764da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|