3.8 KiB
Real Money Enablement Roadmap
This app is currently paper trading only. The Live Money tab and /api/live
endpoint are readiness scaffolding: they make the required product and backend
interfaces visible without moving funds or placing orders.
What is configured now
.env.examplelists the environment variables the production app needs./api/livereports which live-money providers are configured or missing./api/liveaccepts order intents only as dry-runs and returns an audit event.- The Live Money tab shows launch checks, wallet/deposit settings, agent risk limits, a dry-run order console, and an audit preview.
The app still refuses to place live orders. That is intentional until the legal, provider, wallet-signing, reconciliation, and monitoring steps below are done.
Required before live deposits or trading
-
Legal and eligibility
- Terms, risk disclosures, privacy policy, and jurisdiction policy.
- KYC / KYB provider.
- Age, location, sanctions, and restricted-market checks.
-
Account and wallet
- Real authentication.
- Non-custodial wallet connection or Polymarket deposit-wallet flow.
- User-controlled permissions for each agent.
-
Funds
- Deposit provider.
- Withdrawal provider.
- Balance reconciliation, statements, support, and accounting exports.
-
Execution
- Backend order router.
- Polymarket CLOB API credentials.
- EIP-712 order-signing flow.
- Order placement, cancellation, fill tracking, and position reconciliation.
-
Risk and controls
- Per-agent max allocation.
- Per-market max position size.
- Category exclusions.
- Manual approval mode.
- Emergency pause and cancel-all.
- Always-available withdrawal path.
-
Audit and monitoring
- Durable append-only audit log.
- Signal, approval, order, fill, cancellation, deposit, and withdrawal events.
- Admin monitoring and incident response.
Environment variables expected by /api/live
Copy .env.example into your local environment for development, then add the
same variables in Vercel Project Settings -> Environment Variables for
production.
KYC_PROVIDERKYC_API_KEYKYC_WEBHOOK_SECRETPAYMENTS_PROVIDERPAYMENTS_API_KEYPAYMENTS_WEBHOOK_SECRETWALLET_PROVIDERWALLET_PROJECT_IDWALLET_API_KEYDEPOSIT_WALLET_ADDRESSPOLYMARKET_SIGNATURE_TYPE=3POLYMARKET_CHAIN_ID=137SETTLEMENT_ASSET=pUSDSETTLEMENT_CHAIN=polygonPOLYMARKET_CLOB_API_KEYPOLYMARKET_CLOB_SECRETPOLYMARKET_CLOB_PASSPHRASEAUDIT_LOG_STOREADMIN_ALERT_EMAILLIVE_TRADING_ENABLED=trueonly after final approval and end-to-end testing
Even when all variables are present, live order placement remains intentionally unimplemented until wallet signing, compliance approval, and safe order routing are completed.
Polymarket integration notes
Polymarket's public docs describe trading as non-custodial. Orders are signed
and matched through the CLOB, and new API users generally use the deposit-wallet
flow with signature type 3.
Useful official docs:
- Trading overview: https://docs.polymarket.com/trading/overview
- Trading quickstart: https://docs.polymarket.com/trading/quickstart
- Deposit wallets: https://docs.polymarket.com/trading/deposit-wallets
Final setup checklist
- Choose and contract the KYC / eligibility provider.
- Choose the deposit and withdrawal provider.
- Choose the wallet or embedded-wallet provider and create a deposit wallet.
- Derive or create Polymarket CLOB credentials for the approved signing flow.
- Create durable append-only audit storage.
- Add all environment variables in Vercel.
- Run dry-runs against
/api/liveand verify audit events. - Complete legal review, terms, restricted jurisdiction rules, and support procedures.
- Only then set
LIVE_TRADING_ENABLED=true.