Polybot

Polymarket prediction market trading assistant: market data ingestion, analysis and automated trading on the Polymarket CLOB. Crawl phase: the ingest-to-screening pipeline is operational, execution is stubbed.

status
active
Tags
#python#agents#ai#backend#polymarket
code
github ↗
posts
read →

Polymarket prediction market trading assistant. Multi-layer architecture for market data ingestion, analysis, and automated trading on the Polymarket CLOB exchange.

Phase: Crawl (MVP) — ingest-to-screening pipeline operational, trading execution stubbed.

Architecture

Valkey Streams → Ingestor → Clerk (Qwen) → Scores → TimescaleDB
                                     ↑
                       tag-first pre-filter (PostgreSQL && overlap)

Gamma API → Market Watch → Gates → Scout (Qwen) → Screening → DB
                ↓
          Market Sync → Metric Refresh → Rescreen Detection

Valkey Scan → Sub Discovery → Plumber (MiniMax) → Watchlist/Channels
  • Platform: polymarket py-sdk wrappers for Gamma, Data, CLOB APIs
  • Agents: Call-and-die, Atomic Agents contracts, 3 roles (Clerk, Scout, Plumber)
  • Monitor: Deterministic periodic jobs for discovery, refresh, sync
  • Storage: TimescaleDB (pg18), 16 tables, SQLAlchemy Core, async
  • Guardrails: Deterministic caps on channels, watchlist size

Quick Start

# Install
uv sync

# Start database
docker compose up -d


uv run python -m src.monitor.sub_discovery

# Run the ingest pipeline
uv run python -m src.orchestrator

# Run market discovery
uv run python -m src.monitor.market_watch

# (placeholder)
 uv run python -m  tests.plumber_watchlist_run

Setup

Copy .env.example to .env and configure database, Valkey, and LLM connections.

See SPEC.md for full architecture documentation, AGENTS.md for AI agent guidance.

License

Private — not yet licensed.