Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/calesthio_breakoutanalysis.json
T

1 line
10 KiB
JSON

{"repo": "calesthio/breakoutanalysis", "files": {"SETUP.md": {"4e5619ac2a90958217d3d356da7528a96df9c000": {"t": 1785747212.260263, "n": 4709, "h": "0f6f20465e1caf6c", "c": "# Setup Guide\n\nThis guide walks you through setting up BreakoutAnalysis for the first time.\n\n---\n\n## 1. Install Prerequisites\n\n- **Python 3.10+** — [download](https://python.org)\n- **Git** — [download](https://git-scm.com)\n\n```bash\ngit clone https://github.com/your-username/BreakoutAnalysis.git\ncd BreakoutAnalysis\npip install -r requirements.txt\nplaywright install chromium\n```\n\n---\n\n## 2. Create Your Config File\n\n```bash\ncp config/config.example.json config/config.json\n```\n\nNow edit `config/config.json`. The sections below explain each part.\n\n> ⚠️ **Never commit `config/config.json`** — it's in `.gitignore` for a reason.\n\n---\n\n## 3. Alpaca API (Required for Historical Filtering)\n\n1. Create a free account at [alpaca.markets](https://alpaca.markets)\n2. Go to **API Keys** → generate a key for Paper Trading\n3. Set in config:\n ```json\n \"alpaca\": {\n \"api_key\": \"YOUR_KEY\",\n \"api_secret\": \"YOUR_SECRET\",\n \"use_paper\": true,\n \"data_feed\": \"iex\"\n }\n ```\n\n### Choosing Your Data Feed\n\n| Feed | Plan | Recommendation |\n|------|------|---------------|\n| `\"iex\"` | Free | Good for getting started |\n| `\"sip\"` | Algo Trader (~$9/mo) | **Recommended** — consolidated feed from all US exchanges, lower miss rate |\n\nTo use SIP, subscribe at [alpaca.markets/data](https://alpaca.markets/data) then change `\"data_feed\": \"sip\"`.\n\n> If no Alpaca key is set, the screener still runs — historical quality filtering is simply skipped.\n\n---\n\n## 4. LLM API Key (Required for AI Analysis)\n\n### Option A: Google Gemini (Recommended — free tier available)\n1. Get an API key from [Google AI Studio](https://aistudio.google.com/)\n2. Set in config under all `gemini-*` model entries:\n ```json\n { \"name\": \"gemini-2.5-flash\", \"api_key\": \"YOUR_GEMINI_KEY\" }\n ```\n3. Set `\"current_model\": \"gemini-2.5-flash\"`\n\n### Option B: OpenAI\n1. Get an API key from [platform.openai.com](https://platform.openai.com)\n2. Set in config under the `gpt-*` model you want to use\n3. Set `\"current_model\": \"gpt-4.1-mini\"` (or your preferred model)\n\n### Option C: Local Models (Ollama — no API key needed)\n- Install [Ollama](https://ollama.ai) and pull `llama3.2-vision` or `deepseek-r1-distill-qwen-7b`\n- No API key needed; set `\"current_model\": \"llama-3.2-vision\"`\n\n> If no LLM is configured, alerts are sent without AI analysis.\n\n---\n\n## 5. Discord Notifications (Optional)\n\n1. In your Discord server: **Server Settings → Integrations → Webhooks → New Webhook**\n2. Copy the webhook URL and set in config:\n ```json\n \"discord\": {\n \"webhook_url\": \"https://discord.com/api/webhooks/YOUR_STOCK_ALERTS_WEBHOOK\",\n \"webhook_url_market_report\": \"https://discord.com/api/webhooks/YOUR_MARKET_REPORT_WEBHOOK\"\n }\n ```\n You can use the same webhook for both or create two separate channels.\n\n> If not configured, Discord notifications are skipped silently.\n\n---\n\n## 6. Email Notifications (Optional)\n\nEmail uses Gmail OAuth2. This is the most involved setup.\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com)\n2. Create a project → Enable the **Gmail API**\n3. Create OAuth2 credentials (Desktop App type) → Download as `credentials.json`\n4. Place `credentials.json` in the project root\n5. Run the OAuth flow:\n ```bash\n python scripts/run_gmail_oauth_flow.py\n ```\n6. This generates `token.json` (gitignored)\n\n> If `credentials.json` / `token.json` are missing, email is skipped.\n\n---\n\n## 7. TradingView Chart Screenshots (Optional)\n\nScreenshots require a TradingView account and your chart's URL ID.\n\n1. Open your chart on TradingView — copy the ID from the URL:\n `https://www.tradingview.com/chart/**ABC123XY**/`\n2. Set in config:\n ```json\n \"tradingview\": {\n \"chart_id\": \"ABC123XY\",\n \"cookies\": {\n \"sessionid\": \"...\",\n \"sessionid_sign\": \"...\",\n \"device_t\": \"...\"\n }\n }\n ```\n3. To get cookies: open TradingView in Chrome → F12 → Application → Cookies → tradingview.com\n Copy the values for `sessionid`, `sessionid_sign`, and `device_t`\n\n> If cookies aren't set, screenshots are skipped. The screener and alerts still work.\n\n---\n\n## 8. Run It\n\n```bash\npython src/tradealerts.py\n```\n\nThe bot runs in a loop, checking every 15 minutes during market hours. Check the logs for startup messages confirming which integrations are active.\n\n---\n\n## Environment Variables (Docker / CI)\n\nInstead of editing `config/config.json`, you can set these environment variables:\n\n```bash\nexport ALPACA_API_KEY=your_key\nexport ALPACA_API_SECRET=your_secret\nexport ALPACA_DATA_FEED=sip\nexport GEMINI_API_KEY=your_gemini_key\nexport DISCORD_WEBHOOK_URL=your_webhook\n```\n\nSee `src/utils/config_loader.py` for the full list of supported overrides.\n"}, "7cbbcbef9b388c33e9419b3cb16cff2f711ec956": {"t": 1785771399.222449, "n": 4709, "h": "0f6f20465e1caf6c", "c": "# Setup Guide\n\nThis guide walks you through setting up BreakoutAnalysis for the first time.\n\n---\n\n## 1. Install Prerequisites\n\n- **Python 3.10+** — [download](https://python.org)\n- **Git** — [download](https://git-scm.com)\n\n```bash\ngit clone https://github.com/your-username/BreakoutAnalysis.git\ncd BreakoutAnalysis\npip install -r requirements.txt\nplaywright install chromium\n```\n\n---\n\n## 2. Create Your Config File\n\n```bash\ncp config/config.example.json config/config.json\n```\n\nNow edit `config/config.json`. The sections below explain each part.\n\n> ⚠️ **Never commit `config/config.json`** — it's in `.gitignore` for a reason.\n\n---\n\n## 3. Alpaca API (Required for Historical Filtering)\n\n1. Create a free account at [alpaca.markets](https://alpaca.markets)\n2. Go to **API Keys** → generate a key for Paper Trading\n3. Set in config:\n ```json\n \"alpaca\": {\n \"api_key\": \"YOUR_KEY\",\n \"api_secret\": \"YOUR_SECRET\",\n \"use_paper\": true,\n \"data_feed\": \"iex\"\n }\n ```\n\n### Choosing Your Data Feed\n\n| Feed | Plan | Recommendation |\n|------|------|---------------|\n| `\"iex\"` | Free | Good for getting started |\n| `\"sip\"` | Algo Trader (~$9/mo) | **Recommended** — consolidated feed from all US exchanges, lower miss rate |\n\nTo use SIP, subscribe at [alpaca.markets/data](https://alpaca.markets/data) then change `\"data_feed\": \"sip\"`.\n\n> If no Alpaca key is set, the screener still runs — historical quality filtering is simply skipped.\n\n---\n\n## 4. LLM API Key (Required for AI Analysis)\n\n### Option A: Google Gemini (Recommended — free tier available)\n1. Get an API key from [Google AI Studio](https://aistudio.google.com/)\n2. Set in config under all `gemini-*` model entries:\n ```json\n { \"name\": \"gemini-2.5-flash\", \"api_key\": \"YOUR_GEMINI_KEY\" }\n ```\n3. Set `\"current_model\": \"gemini-2.5-flash\"`\n\n### Option B: OpenAI\n1. Get an API key from [platform.openai.com](https://platform.openai.com)\n2. Set in config under the `gpt-*` model you want to use\n3. Set `\"current_model\": \"gpt-4.1-mini\"` (or your preferred model)\n\n### Option C: Local Models (Ollama — no API key needed)\n- Install [Ollama](https://ollama.ai) and pull `llama3.2-vision` or `deepseek-r1-distill-qwen-7b`\n- No API key needed; set `\"current_model\": \"llama-3.2-vision\"`\n\n> If no LLM is configured, alerts are sent without AI analysis.\n\n---\n\n## 5. Discord Notifications (Optional)\n\n1. In your Discord server: **Server Settings → Integrations → Webhooks → New Webhook**\n2. Copy the webhook URL and set in config:\n ```json\n \"discord\": {\n \"webhook_url\": \"https://discord.com/api/webhooks/YOUR_STOCK_ALERTS_WEBHOOK\",\n \"webhook_url_market_report\": \"https://discord.com/api/webhooks/YOUR_MARKET_REPORT_WEBHOOK\"\n }\n ```\n You can use the same webhook for both or create two separate channels.\n\n> If not configured, Discord notifications are skipped silently.\n\n---\n\n## 6. Email Notifications (Optional)\n\nEmail uses Gmail OAuth2. This is the most involved setup.\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com)\n2. Create a project → Enable the **Gmail API**\n3. Create OAuth2 credentials (Desktop App type) → Download as `credentials.json`\n4. Place `credentials.json` in the project root\n5. Run the OAuth flow:\n ```bash\n python scripts/run_gmail_oauth_flow.py\n ```\n6. This generates `token.json` (gitignored)\n\n> If `credentials.json` / `token.json` are missing, email is skipped.\n\n---\n\n## 7. TradingView Chart Screenshots (Optional)\n\nScreenshots require a TradingView account and your chart's URL ID.\n\n1. Open your chart on TradingView — copy the ID from the URL:\n `https://www.tradingview.com/chart/**ABC123XY**/`\n2. Set in config:\n ```json\n \"tradingview\": {\n \"chart_id\": \"ABC123XY\",\n \"cookies\": {\n \"sessionid\": \"...\",\n \"sessionid_sign\": \"...\",\n \"device_t\": \"...\"\n }\n }\n ```\n3. To get cookies: open TradingView in Chrome → F12 → Application → Cookies → tradingview.com\n Copy the values for `sessionid`, `sessionid_sign`, and `device_t`\n\n> If cookies aren't set, screenshots are skipped. The screener and alerts still work.\n\n---\n\n## 8. Run It\n\n```bash\npython src/tradealerts.py\n```\n\nThe bot runs in a loop, checking every 15 minutes during market hours. Check the logs for startup messages confirming which integrations are active.\n\n---\n\n## Environment Variables (Docker / CI)\n\nInstead of editing `config/config.json`, you can set these environment variables:\n\n```bash\nexport ALPACA_API_KEY=your_key\nexport ALPACA_API_SECRET=your_secret\nexport ALPACA_DATA_FEED=sip\nexport GEMINI_API_KEY=your_gemini_key\nexport DISCORD_WEBHOOK_URL=your_webhook\n```\n\nSee `src/utils/config_loader.py` for the full list of supported overrides.\n"}}}}