Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/deniszidbaev-cmyk/polyclaw-trading/llms.txt

Use this file to discover all available pages before exploring further.

PolyClaw Trading is a self-hosted automation workspace for Polymarket prediction markets. It combines a deterministic BTC candle-based signal engine, a multi-layer risk management gate, and optional multi-role LLM orchestration — all behind a dry-run-first safety default that never sends a real order until you explicitly enable live mode.

Introduction

Understand the project, its safety model, and what it does before you run anything.

Quickstart

Clone, sync, and run your first dry-run pipeline pass in under five minutes.

Architecture

Learn how the 8-stage filesystem-contract pipeline keeps stages isolated and fail-closed.

Configuration Reference

Every environment variable, its default, and its valid range — in one place.

How it works

PolyClaw Trading runs a sequential, deterministic pipeline. Each stage reads and writes versioned JSON files under runtime/ — no shared memory, no race conditions, and every stage boundary validated before crossing.
1

Install dependencies

Run uv sync to install the Python 3.12+ environment. No other system dependencies are required for dry-run mode.
2

Copy and configure .env.local

Copy .env.example to .env.local. The defaults are safe: LIVE_TRADING=0 means no real orders will ever be placed.
3

Run the audit

Execute uv run python scripts/run_pipeline.py audit to verify the full test suite passes on your machine.
4

Run a dry-run pipeline pass

Execute uv run python scripts/run_pipeline.py dry-run --fixture tests/fixtures/btc_market.json to see the complete pipeline in action with an offline fixture.

Key capabilities

Signal Engine

EMA, RSI, ATR, candlestick patterns, and a weighted confidence score determine every YES/NO/HOLD decision.

Risk Management

Per-trade %, daily %, exposure cap, drawdown modes, and a circuit breaker protect your bankroll.

Pipeline Stages

Run individual stages or the full cycle. Every stage is independently executable and fail-closed.

Going Live

Step-by-step guide to enabling live execution — deliberately manual and multi-step.

Mission Control

Read-only Flask dashboard for equity, P&L, signals, and execution ledger views.

Copy Trading

Track public Polymarket wallets and generate copy-trade signals with wallet scoring.
LIVE_TRADING=0 is always the default. PolyClaw Trading will never place a real order unless you explicitly set LIVE_TRADING=1 in .env.local and complete the manual PolyClaw wallet approval step. Dry-run executions are still recorded in daily ledgers so behavior is fully auditable.

Build docs developers (and LLMs) love