A simulation-first Polymarket trading system for short-duration crypto prediction markets and weather temperature contracts.
Wenbot combines a Rust backend, a React dashboard, and a SQLite ledger to run multiple strategy wallets against Polymarket-style YES/NO markets. The system is designed for fast iteration: you can test signal generation, sizing, settlement, and portfolio behavior with virtual capital before touching a live wallet.
Status: active personal project / research-grade trading simulator
Primary markets: BTC/ETH 15-minute up/down markets, BTC 5-minute variants, and weather temperature markets
Replace or update
docs/dashboard.pngif you want a more recent dashboard screenshot.
- Runs multi-strategy virtual wallets with separate balances and trade histories
- Trades BTC and ETH 15-minute binary markets using technical/microstructure signals
- Trades weather temperature markets using forecast-vs-market edge
- Tracks open positions, realized P&L, equity curves, win rate, and trade ledgers
- Provides a web dashboard for monitoring strategies and wallets in real time
- Supports an optional live Polymarket wallet connection alongside the simulator UI
The original project concept centered on 3 wallets (BTC, ETH, Weather). The current implementation in the repo exposes 5 virtual wallets:
| Wallet | Strategy | Default Starting Balance |
|---|---|---|
| W1 | BTC 15m fivesbot | $100 |
| W2 | ETH 15m fivesbot | $100 |
| W3 | BTC 15m 8-indicator variant | $100 |
| W4 | BTC 5m variant | $100 |
| W5 | Weather temperature markets | $100 |
If you want to present Wenbot more narrowly, W1/W2/W5 are the core production-like simulation wallets.
- BTC / ETH 15m binary options
- RSI
- Momentum
- VWAP
- SMA
- Market skew
- Kelly-based sizing
- BTC experimental variants
- 8-indicator BTC wallet
- 5-minute BTC wallet
- Weather markets
- Open-Meteo ensemble forecasts
- NWS / actual temperature settlement checks
- Edge-based YES/NO selection
- Exposure caps and daily loss controls
- Virtual balance, equity, unrealized P&L, and trade history
- Daily loss limits
- Max trade size caps
- Duplicate-position prevention
- Open exposure caps for weather strategies
- Settlement and mark-to-market price refresh loops
- Real-time dashboard for BTC/ETH/weather status
- Wallet-specific positions and history views
- Equity curve visualization across wallets
- Signal panels with confidence and indicator details
- Manual actions for sync / settle / deposit during development
┌───────────────────────────────────────────────────────────────────┐
│ Frontend (React) │
│ Dashboard / Wallets / Strategy tabs / Live status / Charts │
└───────────────────────────────┬───────────────────────────────────┘
│ HTTP / JSON
▼
┌───────────────────────────────────────────────────────────────────┐
│ API Server (Rust + Axum) │
│ - REST endpoints │
│ - background schedulers │
│ - live state cache │
│ - optional Polymarket wallet session handling │
└───────────────┬──────────────────────────────┬────────────────────┘
│ │
▼ ▼
┌───────────────────────────────┐ ┌───────────────────────────────┐
│ Strategy Crates │ │ Virtual Wallet │
│ - fivesbot-strategy │ │ - positions │
│ - wenbot-strategy │ │ - history │
│ - polymarket-client │ │ - P&L / settlement │
└───────────────┬───────────────┘ │ - SQLite storage │
│ └───────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────────────┐
│ External Data Sources │
│ Binance · CryptoCompare · Polymarket Gamma/CLOB · Open-Meteo │
└───────────────────────────────────────────────────────────────────┘
wenbot/
├── frontend/ # React + Vite dashboard
├── rust-backend/
│ ├── api-server/ # Axum API server + schedulers + websocket/live state
│ ├── fivesbot-strategy/ # BTC/ETH signal generation
│ ├── wenbot-strategy/ # Weather strategy
│ ├── virtual-wallet/ # Simulation wallet + ledger + settlement
│ ├── polymarket-client/ # Polymarket market/client helpers
│ └── backtest/ # Backtesting crate
├── docs/ # Screenshots / docs assets
├── .env.example # Example env config
└── README.md
| Crate | Purpose |
|---|---|
api-server |
HTTP API, schedulers, shared app state, route handlers |
fivesbot-strategy |
BTC/ETH strategy logic and indicator scoring |
wenbot-strategy |
Weather signal generation and forecast-based edge modeling |
virtual-wallet |
Position lifecycle, balances, settlement, trade ledgers, SQLite |
polymarket-client |
Market fetch / Polymarket interaction helpers |
backtest |
Backtesting support |
The fivesbot strategy trades Polymarket up/down markets on short windows. It builds a directional signal from market microstructure and recent candles, then sizes positions with Kelly-style logic under hard caps.
Key components visible in the codebase:
- RSI
- Momentum
- VWAP
- SMA
- Market skew
- Confidence scoring
- Position sizing with max trade size and daily loss control
The current implementation includes:
- W3: BTC 15m 8-indicator variant
- W4: BTC 5m strategy variant
These are useful for comparing different feature sets and time horizons against the baseline wallet.
The weather engine scans daily temperature markets and compares market prices against forecast-derived probabilities.
Inputs and behaviors include:
- Open-Meteo ensemble forecast data
- NWS / actual observed temperature for settlement
- Edge threshold filtering
- Kelly-style sizing
- Exposure cap management
- Duplicate trade protection
- Periodic settlement loop for expired contracts
Wenbot exposes a fairly rich local API. The most important routes are:
GET /api/healthGET /api/bot/configGET /api/bot/status
GET /api/fivesbot/statusGET /api/fivesbot/signalsGET /api/fivesbot/tradesGET /api/fivesbot/eth/statusGET /api/fivesbot/eth/signalsGET /api/fivesbot/eth/trades
GET /api/wallet/balanceGET /api/wallet/positionsGET /api/wallet/historyPOST /api/wallet/deposit?amount=...POST /api/wallet/sync-pricesPOST /api/wallet/settle
Equivalent route groups exist for:
/api/wallet2/*→ ETH wallet/api/wallet3/*→ BTC 8-indicator wallet/api/wallet4/*→ BTC 5m wallet/api/weather/*→ Weather wallet
The frontend also includes a Polymarket wallet section and connection flow for a live wallet session.
- Rust
- Axum
- Tokio
- SQLx
- SQLite
- Reqwest
- React 18
- Vite
- TypeScript
- Tailwind CSS
- Recharts
- TanStack Query
- Lucide React
- Polymarket Gamma API for market discovery
- Polymarket CLOB API for token pricing / live-wallet integration
- Binance (
data-api.binance.vision) for candles - CryptoCompare as fallback market data
- Open-Meteo for weather forecasts
- Rust toolchain (1.75+ recommended)
- Node.js 18+
- npm
- Optional: PM2 for long-running backend process management
git clone git@github.com:whosl/wenbot.git
cd wenbotcp .env.example .env
cp frontend/.env.example frontend/.env.localAt minimum, check:
- backend database / runtime configuration
- any Polymarket credentials you intend to use
VITE_API_URLfor frontend deployment
For pure local simulation work, you can keep live-wallet credentials unset.
cd rust-backend
cargo run -p api-serverBy default the API server listens on:
http://localhost:8000
cd frontend
npm install
npm run devBy default the frontend runs on:
http://localhost:3000
Vite is configured to proxy /api requests to the Rust backend during local development.
cd frontend
npm install
npm run buildcd rust-backend
cargo build --release -p api-serverThe repo already includes a PM2 config:
cd rust-backend
pm2 start ecosystem.config.cjs- The Rust server serves as the core runtime and scheduler.
- Frontend and backend can be deployed together or separately.
- The local setup in this repo uses:
- backend on port
8000 - frontend dev server on port
3000 - SQLite database file at
rust-backend/virtual_wallet.db
- backend on port
- Proxy settings may matter for Polymarket / Binance access depending on your network environment.
Useful local paths from the codebase:
rust-backend/api-server/src/scheduler.rs— scheduler loops and execution flowrust-backend/api-server/src/routes.rs— main API routesrust-backend/fivesbot-strategy/src/— technical strategy implementationrust-backend/wenbot-strategy/src/— weather strategy implementationfrontend/src/App.tsx— main dashboard shellfrontend/src/wallet/OverviewTab.tsx— multi-wallet overviewfrontend/src/wallet/WalletTab.tsx— wallet-specific views
Wenbot is a trading research and simulation project. Even if a live-wallet path exists in the codebase, this repository should not be treated as financial advice, production-grade execution infrastructure, or a guarantee of profitability.
Use it carefully. Markets are very good at humbling overconfident bots.
No license file is currently present in this repository.
If you plan to open-source Wenbot formally, add a LICENSE file and update this section accordingly.
