Converge is an MVP for cross-prediction-market arbitrage (Polymarket + Myriad to start). The goal is to prove the end-to-end flow—fetching prices, spotting spreads, entering a hedged position, exiting, and logging P&L—using a small, tightly scoped prototype. Automatic event matching, high-frequency trading, and production hardening are intentionally out of scope for now.
Key intent:
- Validate viability with 1–3 manually selected, event-matched markets.
- Detect arbitrage opportunities via configurable thresholds.
- Execute simulated or small real hedged trades with fixed size limits.
- Exit when prices converge; track basic P&L and timings.
- Keep the UI minimal (logs/console-first).
Tracking: see docs/WBS.md for the checklist of tasks mapped to GitHub issues.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython3 main.py- Select mode (currently only Simulation is available)
- Enter URLs for both Polymarket and Myriad events
- System auto-matches outcomes and detects arbitrage
- Confirm trade to open a hedged position
- Monitor P&L as prices converge
- Exit signal appears when profit threshold is reached
Ctrl+Cto stop
Copy .env.example to .env and fill in your values.
Myriad (required):
MYRIAD_API_BASE_URL— API base URLMYRIAD_NETWORK_ID— Network identifier
Polymarket (optional):
POLYMARKET_API_KEY— API key (falls back to public endpoints if not set)POLYMARKET_API_KEY_HEADER(default:Authorization)POLYMARKET_API_KEY_SCHEME(default:Bearer)POLYMARKET_PUBLIC_BASE_URL— custom base for the public APIPOLYMARKET_EVENT_ENDPOINT— custom event endpoint path