Inspiration
Prediction markets (Kalshi, Polymarket) are growing fast, but most teams still trade them like a side project: spreadsheets, Discord alerts, and ad-hoc scripts. Arbitrage windows close in seconds, settlement rules differ by venue, and one mis-sized leg can wipe out a theoretical edge.
We were inspired by a simple question: What would Bloomberg + a prop risk desk look like if it were built for prediction markets from day one? Not another “AI trading bot” that fires orders from a chat window—but a controlled autonomous stack where every action is scored, gated, logged, and replayable.
What we built
APEX Autopilot is an institutional-grade paper-trading platform for cross-platform prediction-market arbitrage. It runs a disciplined L0–L4 pipeline:
| Layer | Role |
|---|---|
| L0 — Ingestion | Kalshi + Polymarket market data, retries, health checks, cache hydration |
| L1 — Finance Brain | Scoring, spread modeling, confidence calibration |
| L2 — Agent Panel | Multi-agent thesis and verdicts (BUY / SKIP / WAIT) with bounded budgets |
| L3 — Execution & Risk | Dual-leg paper routing through M01–M09 fail-fast gates (paper-only first) |
| L4 — Observability | Audit stream, telemetry, operator-facing events |
Operators use a Next.js terminal with Arb Radar, live proposals, intelligence overlays, and system health—designed to feel like a professional trading desk, not a consumer app.
On a typical run we surface 100+ ranked arb opportunities, maintain active proposals, and enforce paper mode at settings and execution layers so experimentation never drifts into accidental live exposure.
How we built it
- Backend core (Python 3.11+) — FastAPI API, typed domain models,
SQLiteStorefor persistence,arb_enginefor scanning,settlement_auditorandbacktest_enginefor validation loops. - Risk-first execution — Sequential gate stack: paper enforcement (M01), edge floors, volume, price sanity, settlement match, daily loss caps, orderbook depth / VWAP slippage, spread width, Kelly + CFTC notional checks.
- Intelligence layer — Bright Data–backed source checks and arb intelligence agents that soft-fail when optional services are offline (core scanning keeps running).
- Frontend — Next.js dashboard (arb radar, positions, proposals) with Playwright E2E tests to catch regressions.
- Operations — Unified
start_all.shstartup, pytest suite, 260-day execution runbooks (one-year-daily/), and architecture docs for long-horizon delivery.
We also ship investor materials: pitch brief, PPTX/PDF deck generators, and a full spoken narrative for demos.
What we learned
- Autonomy without discipline is a liability. Agents inform; gates execute. Rejection reasons must be plain strings, not vibes.
- Cross-venue arb is a settlement problem, not just a spread problem. Matching Kalshi and Polymarket contracts correctly matters as much as price.
- Paper-only is a feature for velocity: you can iterate on gates, calibration, and UX before capital and compliance paths.
- Operator trust is the product. If you cannot replay why a trade was blocked at 2 a.m., the terminal fails regardless of model quality.
Challenges we faced
- Fragmented runtimes — Wrong process on port 8000, missing
uvicornonpython3, and silent backend failures. We fixed startup with explicit Python discovery and health checks. - Data path confusion — Engine cache vs SQLite arb store (
/opportunitiesvs/api/arb/opportunities). We documented canonical endpoints and aligned the UI. - Optional intelligence dependencies — LLM adapters (e.g. Ollama) and external intel can be down; the system must degrade gracefully without blank dashboards.
- Speed vs explainability — Balancing sub-second scans with rich audit logs and gate-level forensics.
- Scope discipline — A 260-day roadmap tempts boilerplate; we regenerated early daily runbooks with concrete file/symbol targets and verification commands.
What’s next
Reliability + CI hardening, settlement precision, hosted staging, design-partner pilots, and staged autonomy controls—always behind paper gates until compliance and partner requirements are met.
Built for operators who want speed **and* a paper trail.*
Local demo (for judges who clone the repo):
git clone https://github.com/aaravjj2/Autopilot-public.git cd Autopilot-public bash start_all.sh
Log in or sign up for Devpost to join the conversation.