Polymarket Autonomous Trading Harness - Multi-agent AI trading system with LLM flexibility and native macOS app
Find a file
oho 32df398846 feat: Add Phase 1 Alpha Signal Enhancement module
- Add event calendar with FOMC, jobs reports, CPI release tracking
- Add news provider with multi-source aggregation (News API, Twitter, RSS)
- Add Grok integration for Twitter/X sentiment analysis
- Add signal aggregator combining technical, news, event, orderbook, and LLM signals
- Include comprehensive test suite (66 tests)

New modules:
- src/signals/events.py - Market-moving event detection and calendar
- src/signals/news.py - News fetching and sentiment analysis
- src/signals/aggregator.py - Multi-source signal aggregation and scoring
- tests/test_signals.py - Complete test coverage
2026-01-12 23:15:16 +01:00
docs Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
macos-app Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
scripts Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
src feat: Add Phase 1 Alpha Signal Enhancement module 2026-01-12 23:15:16 +01:00
tests feat: Add Phase 1 Alpha Signal Enhancement module 2026-01-12 23:15:16 +01:00
.env.example Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
.gitignore Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
AI trading in real markets.webarchive Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
alpha Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
cli.py Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
config.example.yaml Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
pyproject.toml Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
QUICKSTART.md Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
README.md Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
requirements.txt Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00
start Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness 2026-01-12 23:04:58 +01:00

Alpha Arena

Autonomous trading system for Polymarket prediction markets

Single objective: maximize PnL


Start in 10 Seconds

./alpha start

Then open http://localhost:8000

That's it. Everything runs in the background with macOS notifications.


Daily Commands

Command What it does
./alpha start Start server (background, notifies when ready)
./alpha stop Stop server (graceful shutdown)
./alpha status Check if running
./alpha logs Watch live logs
./alpha open Open web UI in browser

See QUICKSTART.md for the complete command reference.


What You Get

Web Control Center

Real-time dashboard at localhost:8000 with:

  • Live P&L and positions
  • Start/stop trading controls
  • Market browser and analysis
  • Risk management settings
  • Decision logs and metrics

Multi-Agent Trading

Four specialized AI agents collaborating:

  • Research - Market analysis, probability estimation
  • Risk - Position sizing with Kelly Criterion
  • Execution - Optimal order timing
  • Reflection - Learning from outcomes

Safety First

  • Kill switch for emergency stop
  • Daily loss limits
  • Position size caps
  • Simulation mode for testing

Requirements

  • Python 3.11+ (tested with 3.14)
  • macOS, Linux, or WSL
  • At least one LLM API key (Anthropic, OpenAI, or xAI)

First-Time Setup

The ./alpha start command handles setup automatically. For manual control:

# 1. Run setup
./scripts/setup.sh

# 2. Add your API keys
nano .env

# 3. Verify everything works
./scripts/check.sh

# 4. Start
./alpha start

Required API Keys

Add to .env:

# At least one LLM provider
ANTHROPIC_API_KEY=sk-ant-...
# or
OPENAI_API_KEY=sk-...

# For live trading (optional)
POLYMARKET_API_KEY=...
POLYMARKET_API_SECRET=...
POLYMARKET_PASSPHRASE=...

Architecture

┌────────────────────────────────────────────────────────┐
│              Web Application (FastAPI)                  │
│         Dashboard | Trading | Markets | Logs            │
└───────────────────────┬────────────────────────────────┘
                        │
          ┌─────────────┼─────────────┐
          ▼             ▼             ▼
    ┌──────────┐  ┌──────────┐  ┌──────────┐
    │ Trading  │  │  Agent   │  │   Risk   │
    │   Loop   │  │ System   │  │ Manager  │
    └──────────┘  └──────────┘  └──────────┘
          │             │
          ▼             ▼
    ┌──────────┐  ┌──────────┐
    │ Broker   │  │   LLM    │
    │Polymarket│  │ Providers│
    └──────────┘  └──────────┘

Project Structure

alpha-arena/
├── alpha                 # Master control script
├── QUICKSTART.md         # Daily command reference
├── scripts/
│   ├── setup.sh          # First-time setup
│   ├── check.sh          # System diagnostics
│   └── test.sh           # Run tests
├── src/
│   ├── web/              # Web application
│   ├── broker/           # Market execution
│   ├── agent/            # AI agents
│   ├── risk/             # Risk management
│   └── metrics/          # Logging
├── tests/                # Test suite (170+ tests)
├── docs/                 # Detailed documentation
├── .venv/                # Isolated Python (auto-created)
└── data/                 # Runtime data (auto-created)

Documentation

Document Purpose
QUICKSTART.md Daily commands, quick reference
docs/WEB_APP_MANUAL.md Web interface guide
docs/USER_MANUAL.md Full CLI and API reference
docs/TESTING.md Testing guide

Troubleshooting

Server won't start

./scripts/check.sh --fix

Missing dependencies

./scripts/setup.sh

API key issues

Check .env has valid keys, then restart.

Something else broke

./alpha logs    # See what's happening
./alpha status  # Check process status

Isolation

Everything runs in complete isolation:

  • .venv/ - Python packages (nothing global)
  • data/ - All runtime data
  • .env - Your configuration

Uninstall completely by deleting the folder.


License

MIT


Disclaimer

This software is for educational purposes. Trading prediction markets involves financial risk. Past performance does not guarantee future results. Use at your own risk.