ent0n29/polybot

Reverse-engineering of every polymarket strategy and high-frequency trading infrastructure for Polymarket

Java

1,028

45 commits

updated Feb 20, 2026

See the code

README

Polybot

Open-source Polymarket trading infrastructure and strategy reverse-engineering toolkit.

Polybot is a multi-service system for:

  • automated execution (paper and live modes)
  • strategy runtime and market making
  • market/user trade ingestion into ClickHouse
  • quantitative analysis and replication scoring

Strategy Analysis Dashboard

Future Work: AWARE Fund

Polybot is the execution and market-data foundation for AWARE, the next product layer (trader intelligence, PSI indices, fund mirroring, API/UI).

What You Get

  • Java 21 microservices for execution, strategy, ingestion, analytics
  • ClickHouse + Redpanda event pipeline
  • Monitoring stack (Grafana, Prometheus, Alertmanager)
  • Research toolkit in research/ for snapshots, deep analysis, and replication metrics

Prerequisites

  • Amazon Corretto 21 (recommended) or any Java 21+
  • Maven 3.8+
  • Docker Engine/Desktop with Compose plugin
  • Python 3.11+ (for research scripts)

1. Clone

git clone https://github.com/ent0n29/polybot.git
cd polybot

2. Optional Environment Setup

cp .env.example .env
set -a; source .env; set +a

Note: Spring Boot does not auto-load .env; export variables in your shell when needed.

3. Start Everything

./start-all-services.sh

This script builds missing artifacts, starts infrastructure stacks, then starts all services with develop profile.

4. Verify

curl http://localhost:8080/actuator/health
curl http://localhost:8081/actuator/health
curl http://localhost:8082/actuator/health
curl http://localhost:8083/actuator/health
curl http://localhost:8084/actuator/health
curl http://localhost:8123 --data "SELECT 1"

5. Stop

./stop-all-services.sh

Operator Commands

Build and Test

mvn clean package -DskipTests
mvn test

Tail Logs

tail -f logs/executor-service.log
tail -f logs/strategy-service.log
tail -f logs/analytics-service.log
tail -f logs/ingestor-service.log
tail -f logs/infrastructure-orchestrator-service.log

Manual Startup (Alternative)

mvn clean package -DskipTests

java -jar infrastructure-orchestrator-service/target/infrastructure-orchestrator-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar executor-service/target/executor-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar strategy-service/target/strategy-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar ingestor-service/target/ingestor-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar analytics-service/target/analytics-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop

Services and Ports

ServicePortPurposeExample Endpoint
executor-service8080order execution, paper sim, settlement endpoints/api/polymarket/health
strategy-service8081strategy runtime and status/api/strategy/status
analytics-service8082analytics APIs on ClickHouse data/api/analytics/status
ingestor-service8083market/user-trade ingestion pipelines/actuator/health
infrastructure-orchestrator-service8084lifecycle of analytics + monitoring stacks/api/infrastructure/status
ClickHouse HTTP8123analytics SQL accessSELECT 1
Redpanda Kafka9092event streamingKafka bootstrap
Grafana3000dashboardsUI
Prometheus9090metrics scrapingUI
Alertmanager9093alert routingUI

Configuration Essentials

Key variables are documented in .env.example.

Most relevant:

  • POLYMARKET_TARGET_USER for strategy research workflows
  • POLYMARKET_PRIVATE_KEY, POLYMARKET_API_KEY, POLYMARKET_API_SECRET, POLYMARKET_API_PASSPHRASE for live trading
  • KAFKA_BOOTSTRAP_SERVERS, ANALYTICS_DB_URL, CLICKHOUSE_* for data pipeline
  • GRAFANA_ADMIN_PASSWORD, SLACK_WEBHOOK_URL for ops/alerts

Default mode in develop profile is paper trading (hft.mode: PAPER).

Included Strategy

Polybot includes a complete-set arbitrage strategy for Polymarket Up/Down binaries.

See docs/EXAMPLE_STRATEGY_SPEC.md for implementation details.

Research Workflow

The research/ directory contains scripts for:

  • snapshot extraction and reporting
  • replication and similarity scoring
  • backtesting and calibration
  • execution quality analysis

Start with research/README.md.

Repo Layout

polybot/
├── polybot-core/
├── executor-service/
├── strategy-service/
├── ingestor-service/
├── analytics-service/
├── infrastructure-orchestrator-service/
├── research/
├── monitoring/
├── start-all-services.sh
└── stop-all-services.sh

Contributing

See CONTRIBUTING.md for setup, style, testing, and PR process.

Disclaimer

This software is for educational and research purposes only.

Trading prediction markets carries financial risk. Always validate with paper mode before any live capital.

License

MIT. See LICENSE.

gabagool22
polymarket
polymarket-api
polymarket-bot
polymarket-trading-bot

ent0n29/polybot

Reverse-engineering of every polymarket strategy and high-frequency trading infrastructure for Polymarket

Java

1,028

45 commits

updated Feb 20, 2026

See the code

README

Polybot

Open-source Polymarket trading infrastructure and strategy reverse-engineering toolkit.

Polybot is a multi-service system for:

  • automated execution (paper and live modes)
  • strategy runtime and market making
  • market/user trade ingestion into ClickHouse
  • quantitative analysis and replication scoring

Strategy Analysis Dashboard

Future Work: AWARE Fund

Polybot is the execution and market-data foundation for AWARE, the next product layer (trader intelligence, PSI indices, fund mirroring, API/UI).

What You Get

  • Java 21 microservices for execution, strategy, ingestion, analytics
  • ClickHouse + Redpanda event pipeline
  • Monitoring stack (Grafana, Prometheus, Alertmanager)
  • Research toolkit in research/ for snapshots, deep analysis, and replication metrics

Prerequisites

  • Amazon Corretto 21 (recommended) or any Java 21+
  • Maven 3.8+
  • Docker Engine/Desktop with Compose plugin
  • Python 3.11+ (for research scripts)

1. Clone

git clone https://github.com/ent0n29/polybot.git
cd polybot

2. Optional Environment Setup

cp .env.example .env
set -a; source .env; set +a

Note: Spring Boot does not auto-load .env; export variables in your shell when needed.

3. Start Everything

./start-all-services.sh

This script builds missing artifacts, starts infrastructure stacks, then starts all services with develop profile.

4. Verify

curl http://localhost:8080/actuator/health
curl http://localhost:8081/actuator/health
curl http://localhost:8082/actuator/health
curl http://localhost:8083/actuator/health
curl http://localhost:8084/actuator/health
curl http://localhost:8123 --data "SELECT 1"

5. Stop

./stop-all-services.sh

Operator Commands

Build and Test

mvn clean package -DskipTests
mvn test

Tail Logs

tail -f logs/executor-service.log
tail -f logs/strategy-service.log
tail -f logs/analytics-service.log
tail -f logs/ingestor-service.log
tail -f logs/infrastructure-orchestrator-service.log

Manual Startup (Alternative)

mvn clean package -DskipTests

java -jar infrastructure-orchestrator-service/target/infrastructure-orchestrator-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar executor-service/target/executor-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar strategy-service/target/strategy-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar ingestor-service/target/ingestor-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
java -jar analytics-service/target/analytics-service-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop

Services and Ports

ServicePortPurposeExample Endpoint
executor-service8080order execution, paper sim, settlement endpoints/api/polymarket/health
strategy-service8081strategy runtime and status/api/strategy/status
analytics-service8082analytics APIs on ClickHouse data/api/analytics/status
ingestor-service8083market/user-trade ingestion pipelines/actuator/health
infrastructure-orchestrator-service8084lifecycle of analytics + monitoring stacks/api/infrastructure/status
ClickHouse HTTP8123analytics SQL accessSELECT 1
Redpanda Kafka9092event streamingKafka bootstrap
Grafana3000dashboardsUI
Prometheus9090metrics scrapingUI
Alertmanager9093alert routingUI

Configuration Essentials

Key variables are documented in .env.example.

Most relevant:

  • POLYMARKET_TARGET_USER for strategy research workflows
  • POLYMARKET_PRIVATE_KEY, POLYMARKET_API_KEY, POLYMARKET_API_SECRET, POLYMARKET_API_PASSPHRASE for live trading
  • KAFKA_BOOTSTRAP_SERVERS, ANALYTICS_DB_URL, CLICKHOUSE_* for data pipeline
  • GRAFANA_ADMIN_PASSWORD, SLACK_WEBHOOK_URL for ops/alerts

Default mode in develop profile is paper trading (hft.mode: PAPER).

Included Strategy

Polybot includes a complete-set arbitrage strategy for Polymarket Up/Down binaries.

See docs/EXAMPLE_STRATEGY_SPEC.md for implementation details.

Research Workflow

The research/ directory contains scripts for:

  • snapshot extraction and reporting
  • replication and similarity scoring
  • backtesting and calibration
  • execution quality analysis

Start with research/README.md.

Repo Layout

polybot/
├── polybot-core/
├── executor-service/
├── strategy-service/
├── ingestor-service/
├── analytics-service/
├── infrastructure-orchestrator-service/
├── research/
├── monitoring/
├── start-all-services.sh
└── stop-all-services.sh

Contributing

See CONTRIBUTING.md for setup, style, testing, and PR process.

Disclaimer

This software is for educational and research purposes only.

Trading prediction markets carries financial risk. Always validate with paper mode before any live capital.

License

MIT. See LICENSE.

gabagool22
polymarket
polymarket-api
polymarket-bot
polymarket-trading-bot

Significant stargazers

Joshua Levy

4,659 followers · starred Mar 2026

BingEdward

14 followers · starred Aug 2026

Furkan Köykıran

86 followers · starred Sep 2026

Aras

14 followers · starred Feb 2026