# --- Polymarket (Polygon mainnet, USDC.e) --- # Private key of the wallet that funds Polymarket. EOA. Hex string with 0x prefix. POLYMARKET_PK= # Optional: only set if your funder is a Polymarket proxy / Magic-link wallet (signature_type 1 or 2). # Leave empty for plain EOA (signature_type 0). POLYMARKET_FUNDER= POLYMARKET_SIGNATURE_TYPE=0 # CLOB host. Default is mainnet. POLYMARKET_HOST=https://clob.polymarket.com POLYMARKET_CHAIN_ID=137 # --- Kalshi --- # RSA-PSS auth (production scheme). Generate at https://kalshi.com/account/profile (API Keys). # KALSHI_KEY_ID is the access key id. # KALSHI_PRIVATE_KEY_PATH is the absolute path to the .pem private key file (do NOT paste key contents here). KALSHI_KEY_ID= KALSHI_PRIVATE_KEY_PATH= # Endpoint env: "prod" or "demo". KALSHI_ENV=demo # --- Trading mode --- # Default: paper mode. Set true ONLY when ready to risk real funds. # Live trading additionally requires the --live CLI flag on scripts/live_run.py. LIVE_TRADING_ENABLED=false # --- Edge / sizing --- # Minimum net edge (after fees + slippage est) to act on, in basis points. MIN_EDGE_BPS=50 # Hard cap on USD per single arbitrage opportunity. MAX_POSITION_USD=500 # Use quarter-Kelly sizing (recommended). Set false for full-Kelly (NOT recommended). QUARTER_KELLY=true # Drawdown threshold that flips the circuit breaker. 0.15 = 15% from peak. DRAWDOWN_LIMIT=0.15 # --- Matching --- # Confidence threshold for cross-exchange auto-trade. 0.85 = strict. # Pairs in [REVIEW_THRESHOLD, AUTO_THRESHOLD) are logged as review_required, never auto-traded. MATCH_AUTO_THRESHOLD=0.85 MATCH_REVIEW_THRESHOLD=0.65 # --- Loop / TTL --- # Seconds between scan cycles. SCAN_INTERVAL_SECONDS=5 # Opportunity is invalidated if older than this many ms when it reaches executor. OPPORTUNITY_TTL_MS=1500 # --- Storage --- # SQLite path. Relative paths resolve from repo root. DB_PATH=data/poly_arb.db # --- Logging --- LOG_LEVEL=INFO