Experimental Telegram-only prediction-market signals for Polymarket opportunities.
Background intelligence, entry alerts, exit guidance, and click tracking without a dashboard.
What It Does • Endpoints • Runtime • Config • Safety • License
This is an abandoned experimental project, archived (read-only) on GitHub and shared for learning and reference. It is not financial advice, not a trading recommendation engine, and not production-ready software.
- Scans prediction-market opportunities in background tasks
- Sends entry and exit signals to Telegram
- Tracks opened links so exit alerts are only generated for positions the user actually opened
- Handles Telegram inline buttons for close/snooze actions
- Maintains paper/simulation data for calibration and signal pruning
Only these routes are intentionally exposed:
| Route | Purpose |
|---|---|
GET /health |
Host health check |
GET /api/polymarket/open |
Click tracker that redirects to Polymarket |
POST /api/polymarket/telegram-webhook |
Telegram callback handler for inline buttons |
All dashboard pages and legacy trading APIs were removed in v3.22.
Cortex runs background workers when POLYMARKET_WALLET_TRACKER_ENABLED=true:
- Wallet and market scanning
- Opportunity Telegram alerts
- Exit monitoring for tracked positions
- Historical backtest loop
- Paper simulator and calibration storage
The current codebase is signals-only. It does not include live-wallet execution, live order submission endpoints, private-key handling, or a dashboard UI.
- Python 3.11+
- An ASGI host such as Railway, Render, Fly.io, or a local Uvicorn process
- Telegram bot token and chat ID for notifications
- PostgreSQL via
DATABASE_URLfor persistent production storage
git clone https://github.com/gkaragioul/Cortex_Signals.git
cd Cortex_Signals
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
copy .env.example .env
.\.venv\Scripts\python.exe -m uvicorn app.main:app --host 127.0.0.1 --port 8000For safe local smoke tests without starting scanner/backtest background loops:
$env:POLYMARKET_WALLET_TRACKER_ENABLED="false"
.\.venv\Scripts\python.exe -m uvicorn app.main:app --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000/health to confirm the server is running; it returns {"status":"ok"}. To receive signals, fill in the Telegram variables in .env (see Configuration) and set POLYMARKET_WALLET_TRACKER_ENABLED=true. When CORTEX_PUBLIC_URL and TELEGRAM_BOT_TOKEN are both set, the app registers its Telegram webhook at startup. The included Procfile, Dockerfile, and railway.toml run the same app on a hosted platform.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Production | PostgreSQL connection string |
ANTHROPIC_API_KEY |
Optional | Enables AI analysis where configured |
TELEGRAM_BOT_TOKEN |
Yes for Telegram | Telegram bot token |
TELEGRAM_CHAT_ID |
Yes for Telegram | Authorized Telegram chat/user ID |
CORTEX_PUBLIC_URL |
Yes for Telegram webhook | Public app URL |
TELEGRAM_WEBHOOK_SECRET |
Optional | Secret token checked on Telegram webhook calls |
POLYMARKET_WALLET_TRACKER_ENABLED |
Optional | Enables background scanner/backtest loops; defaults to false |
POLYMARKET_SCAN_INTERVAL |
Optional | Scan interval in seconds |
POLYMARKET_MIN_EDGE_PCT |
Optional | Minimum edge threshold |
POLYMARKET_MAX_RESULTS |
Optional | Maximum returned/scored opportunities |
TAVILY_API_KEY |
Optional | Enhances news-speed signal research |
NTFY_TOPIC |
Optional | Legacy notification integration |
Cortex stores operational data in SQLite locally or PostgreSQL in production. Depending on enabled features, it may call third-party services including Polymarket/Gamma APIs, Telegram, Anthropic, Reddit public JSON endpoints, Tavily, weather APIs, and PostgreSQL. Telegram messages may include market titles, signal scores, entry/exit guidance, and Polymarket links.
No user-facing analytics SDK, browser tracker, or dashboard telemetry is included in the current Telegram-only app.
This repository is educational and experimental. Prediction markets and trading systems can lose money, behave unexpectedly, or produce incorrect signals. Review the code, use paper/simulation modes, protect secrets, and do not rely on this project as financial advice.
If you previously ran a private copy of this project, rotate any API keys, Telegram tokens, database credentials, or deployment passwords before publishing or sharing forks.
Python dependencies are installed from requirements.txt during deployment. See THIRD_PARTY_NOTICES.md for dependency license notes.
See SECURITY.md for reporting and secret-handling guidance.
Cortex Signals is provided as is, without warranty of any kind, under the MIT License. Use it at your own risk; you are responsible for how you deploy and use it. It does not place trades, but its signals can be wrong or late, and any position you open because of them is your own decision and your own risk. With the background workers enabled it calls the third-party services listed above using your own API keys and accounts.
MIT. See LICENSE for the full terms.