Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ MARKET_CATALOG_PRESTART_MAX_AGE_MS=21600000
GAMMA_API_BASE_URL=https://gamma-api.polymarket.com
TRADING_ENABLED=true
TRADING_MODE=shadow
RISK_PROFILE=extra_high
RISK_PROFILE=high
# Optional override path to a specific risk profile JSON file
RISK_PROFILE_PATH=
# Optional override path to the active risk profile selection file
Expand All @@ -70,14 +70,20 @@ MAX_CONCURRENT_MARKETS=3
MAX_CAPITAL_IN_FLIGHT=1000

# =============================================================================
# EV web search (direct API)
# EV web search + router providers
# =============================================================================
EXA_API_KEY=
EXA_BASE_URL=https://api.exa.ai
EXA_SEARCH_PATH=/search
EXA_CONTENTS_PATH=/contents
EXA_COOLDOWN_MS=300000
EXA_COOLDOWN_FAILURE_THRESHOLD=1
SERPER_API_KEY=
SERPER_BASE_URL=https://google.serper.dev
SERPER_SEARCH_PATH=/search
SERPER_NEWS_PATH=/news
# GDELT is keyless in the current runtime; override the base URL only if needed.
GDELT_BASE_URL=https://api.gdeltproject.org/api/v2/doc/doc
FIRECRAWL_API_KEY=
FIRECRAWL_BASE_URL=https://api.firecrawl.dev
FIRECRAWL_SEARCH_PATH=/v2/search
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ data/market-catalog.json

# Local artifacts
tmp/
.factory/
data/*.bak-*
services/ip-oracle/.venv/
services/ip-oracle/.venv*/
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ The runtime surfaces four strategy labels. Each has different risk shape, execut
| --- | --- | --- | --- |
| `near_zero` | Paired YES+NO arbitrage on one market | Symmetric two-leg execution, strict gate checks on spread/depth/staleness, strongest fill-discipline posture | `strategyMode=near_zero_risk`, `signalMode=near_zero|both`, `edgeRequired`, `minPairedFillRate`, `maxLegSkewMs` |
| `ev` | Single-sided directional execution from calibrated probability/insight | One-leg intent (`side=yes|no`), confidence/edge thresholding, cooldown + per-market/portfolio EV notional caps | `signalMode=ev|both`, `evEdgeRequired`, `evConfidenceMin`, `evCooldownSeconds`, `evMaxPerMarketNotional`, `evMaxPortfolioNotional` |
| `fw_projection` | Frank-Wolfe optimized projection for dependency-aware opportunity selection | Solver-driven lower-bound checks, only converged/feasible opportunities proceed, dependency graph quality affects candidate set | `fwDependency*`, `fwGapAbsTolerance`, `fwGapRelTolerance`, `fwMaxLoopRuntimeMs`, `fwMinEdgeThreshold` |
| `fw_projection` | Frank-Wolfe optimized projection for dependency-aware opportunity selection | Solver-driven lower-bound checks; strict profiles require converged loops, while permissive profiles may accept approximate positive iterates | `fwDependency*`, `fwGapAbsTolerance`, `fwGapRelTolerance`, `fwRequireConverged`, `fwMaxLoopRuntimeMs`, `fwMinEdgeThreshold` |
| `fw_basket` | Multi-market FW basket execution | Basket-level selection/ranking, market count bounds, configurable basket execution mode (`sequential_failfast` or `batch_best_effort`) | `fwBasketMinMarkets`, `fwBasketMaxMarkets`, `fwBasketExecutionMode`, `fwMaxPerMarketNotional`, `fwMaxPortfolioNotional` |

Operator notes:
- Dashboard intent labels are normalized to `near_zero`, `ev`, `fw_projection`, and `fw_basket`.
- `ev_single_side` is displayed as `ev`.
- If explicit strategy metadata is missing, IDs can infer strategy (`:fw:`, `:fwb:`, `:yes:`, `:no:`).
- Preset split: `near_zero`, `moderate`, and `high` keep FW convergence strict, while `extra_high` leaves `fwRequireConverged=false` for exploratory approximate-iterate operation.

## Minimum Requirements

Expand Down Expand Up @@ -134,6 +135,7 @@ In `.env`:

```bash
TRADING_MODE=paper
RISK_PROFILE=high
TRADING_ENABLED=true
OPS_API_TOKEN=replace-with-secure-token
# Optional dev-only localhost token prefill for /ops/* login
Expand Down Expand Up @@ -366,7 +368,7 @@ Set up OpenPolyTrader locally in safe paper mode.
Requirements:
1) Install backend and dashboard dependencies.
2) Create .env and dashboard/.env from examples.
3) Set TRADING_MODE=paper, TRADING_ENABLED=true.
3) Set `TRADING_MODE=paper`, `TRADING_ENABLED=true`, and `RISK_PROFILE=high`.
4) Set OPS_API_TOKEN and use runtime ops session login on /ops/*.
5) Start with `npm run paper:up` (alias: `npm run dev:ops`).
6) Verify:
Expand Down Expand Up @@ -409,7 +411,6 @@ curl -H "Authorization: Bearer $OPS_API_TOKEN" http://localhost:3000/health

- API reference: `docs/API.md`
- Architecture (with end-to-end event flow diagrams): `docs/ARCHITECTURE.md`
- Operator strategy report: `docs/Operations/operator-strategy-report.md`
- Local setup spec and quickstart details: `docs/Development/setup.md`
- Full command reference (start/help/stop/kill + diagnostics): `docs/Development/commands.md`
- Environment variable descriptions and defaults: `docs/Operations/environment-reference.md`
Expand Down
Loading
Loading