EVPoly is a Rust trading engine for Polymarket with multiple strategy loops, shared arbiter/risk enforcement, persistent tracking (tracking.db), remote alpha integrations, and a standalone manual execution API.
Work best on VULTR VPS, Recommended 2 vCPU and 4GB RAM, server Amsterdam
$300 free credit: https://www.vultr.com/?ref=9750476
New to Polymarket? Create your account with EVPoly to support the project:
https://polymarket.com/?r=EVPOLY
Use the referral link before creating a new Polymarket account. Existing users likely cannot retroactively apply it through the bot or by importing a private key.
This repository is source-available, non-commercial.
- You can use, modify, and share it for non-commercial use.
- You cannot sell it, offer it as paid SaaS/service, or use it for commercial profit without a separate commercial license.
See LICENSE.
premarket_v1endgame_sweep_v1evcurve_v1sessionband_v1evsnipe_v1mm_rewards_v1mm_sport_v1
- Strategy toggles default ON:
premarket,endgame,evcurve,sessionband,evsnipe - Strategy toggles default OFF:
mm_rewards,mm_sport - Default symbols (
premarket,sessionband):BTC,ETH,SOL,XRP - Default symbols (
endgame,evcurve,evsnipe):BTC,ETH,SOL,XRP,DOGE,BNB,HYPE - MM market mode default:
auto
Defaults are defined by runtime config loaders and reflected in .env.example / .env.full.example.
- Install dependencies:
git tmux sqlite3 python3 python3-pip python3-venv build-essential pkg-config libssl-dev curl - Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - Build:
cargo build --release --bin polymarket-arbitrage-bot - Create env file:
cp .env.example .env - Fill required secrets/URLs in
.env. - Start:
./ev start live
Use ./ev for bot lifecycle control. Do not run live bot with direct cargo run for the main runtime.
./ev handles release build checks, tmux session management, .env loading, disk-guard pruning, wallet-sync worker management, and managed auto-restart.
./ev start live./ev start dry./ev restart live./ev status./ev logs 200./ev stop./ev autorestart status./ev autorestart on 6h./ev autorestart off./ev autorestart run-now./scripts/doctor.sh./scripts/bootstrap_oss.sh
.env.example: minimal runtime template..env.full.example: full env surface reference..env: local runtime secrets/overrides (not committed).
Validate env coverage:
bash scripts/verify_env_coverage.sh --env-file .envBy default runtime resolves remote endpoints to https://alpha.evplus.ai/... and retries to https://alpha2.evplus.ai/... on transport/timeout/429/5xx failure classes.
Timeout policy currently hardcoded in runtime:
- Premarket alpha:
1000ms - Endgame alpha:
1000ms - EVcurve alpha:
1000ms - SessionBand alpha:
1000ms - EVSnipe remote discovery:
2000ms - Shared timeframe discovery:
2000ms
Recommended helper env:
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade requests eth-accountDebian 12 fallback if you do not want a venv:
python3 -m pip install --break-system-packages --upgrade requests eth-accountRun onboarding:
python3 scripts/remote_onboard.py \
--wallet "0xYOUR_EOA_WALLET" \
--private-key "$POLY_PRIVATE_KEY" \
--signature-type 1 \
--proxy-wallet "$POLY_PROXY_WALLET_ADDRESS" \
--write-env-file .envOnboarding writes all remote token destinations it can populate from API runtime, including signer, discovery, per-strategy alpha, and admin token defaults. Users normally only need the remote signer token. EVPOLY automatically reuses it for primary order signing unless onboarding returns a separate internal override token. It should populate those destinations for all strategies, not only the strategies currently enabled.
Important sizing note:
- Set strategy base-size vars explicitly:
EVPOLY_PREMARKET_BASE_SIZE_USDEVPOLY_ENDGAME_BASE_SIZE_USDEVPOLY_EVCURVE_BASE_SIZE_USDEVPOLY_SESSIONBAND_BASE_SIZE_USD
- If left blank, each defaults to
100USD.
Important relayer note:
- Redeem/merge primary path uses:
RELAYER_API_KEYRELAYER_API_KEY_ADDRESS
- Onboarding does not generate relayer credentials; you must create them manually in Polymarket.
- Get these from:
https://polymarket.com/settings?tab=api-keys
Run Setup Doctor when a setup looks incomplete or a remote credential was cleared:
python3 scripts/setup_doctor.py --env-file .envSetup Doctor:
- checks the baseline runtime credentials a healthy EVPOLY setup should have,
- reruns remote onboarding to refill any missing generateable remote fields,
- reports manual-only fields like relayer credentials as
needs_you, - does not block the bot from running.
Standalone HTTP API binary:
cargo run --release --bin manual_bot -- --bind 127.0.0.1 --port 8791Use --token (or EVPOLY_MANUAL_BOT_TOKEN) to protect endpoints.
Route details and payload examples:
Install/update retention cron:
./scripts/install_evpoly_retention_cron.shRun cleanup now:
./scripts/evpoly_retention_cleanup.shRun the same checks as CI before pushing:
cargo fmt --all -- --check
cargo check --all-targets
cargo test --all-targets --quiet
./scripts/security_audit.shtracking.dbevents.jsonlhistory.toml
If strategy logic/risk/sizing/defaults change, update strategy-changelog.md in the same task/PR.