Contents
Overview
YES/NO.EVENTS is a professional-grade trading terminal for Polymarket prediction markets. It combines a Bloomberg Terminal-style interface with natural language AI trading capabilities.
Terminal TUI
Full-featured terminal interface with 17 screens, vim-like navigation, and keyboard-first operation.
./yesno.sh
Web Dashboard
Browser-based interface with real-time updates, charts, and mobile-responsive design.
./run.sh
Trading Cockpit
All-in-one trading interface with live feeds, orderbook, and trade execution.
python cockpit_web.py
Key Features
- 100+ API Functions - Full Polymarket integration (CLOB, Gamma, Data, Polyrouter)
- Local AI - Edge detection via Ollama (llama3.2), no API costs
- Real-time Streaming - WebSocket price updates and trade feeds
- Quant Tools - Monte Carlo, Kelly Criterion, momentum scanner
- Pre-computed Data - 31 days of Elon tweet analytics
Installation
Requirements
- Python 3.12+
- macOS, Linux, or WSL
- ~100MB disk space
Step 1: Clone Repository
# Clone the repository
git clone https://github.com/your-repo/yesno-events.git
cd yesno-events
Step 2: Create Virtual Environment
# Create and activate venv
python3.12 -m venv .venv
source .venv/bin/activate
Step 3: Install Dependencies
# Install required packages
pip install py-clob-client textual rich pyyaml numpy scikit-learn
# Make scripts executable
chmod +x *.sh
Step 4: Verify Installation
# Test the trading module
python -c "import trading; print('OK')"
# Run tests
./run_tests.sh
Optional: Enable AI Edge Detection
# Install Ollama (macOS)
brew install ollama
# Start Ollama server
ollama serve
# Pull the model
ollama pull llama3.2
Quick Start
Launch Terminal UI
./yesno.sh
Launch Web Dashboard
./run.sh
# Open http://localhost:8888
Launch Trading Cockpit
python cockpit_web.py
# Open http://localhost:8891
CLI Commands
# Scan markets
./trade.sh scan
# Find EV opportunities
./trade.sh ev
# Monte Carlo simulation
./quant.sh mc 450 72
# Search markets
./search.sh markets "bitcoin"
Project Structure
dashboard4all/
├── app.py # TUI terminal (Textual) - 6,752 lines
├── dashboard4all.py # Web dashboard - 12,779 lines
├── trading.py # API layer - 3,812 lines
├── cockpit_web.py # Trading cockpit (port 8891)
├── claude_trader.py # Natural language trading CLI
├── rtds_client.py # WebSocket real-time streaming
├── quant.py # Monte Carlo, Kelly criterion
├── search.py # TF-IDF vector search
├── tracker.py # Tweet calendar aggregation
│
├── *.sh # Shell wrappers
│
├── data/
│ ├── .trading_config.json # API credentials
│ ├── markets.db # SQLite market cache
│ └── cache/ # API response cache
│
├── docs/ # Documentation
├── tests/ # Test suite
├── calendar/ # Event tracking
├── strategies/ # Strategy templates
│
└── projects/ # Standalone packages
├── claude-trader/ # Natural language trading
├── poly-terminal/ # TUI package
├── poly-web/ # Web package
└── poly-calendar/ # Calendar package
CLI Reference
trade.sh - Market Operations
| Command | Description |
|---|---|
./trade.sh scan | Scan all Elon tweet markets |
./trade.sh ev | Find EV opportunities |
./trade.sh find "query" | Search markets |
./trade.sh price ID | Get current price |
./trade.sh book ID | View orderbook |
./trade.sh buy ID PRICE SIZE | Place buy order |
./trade.sh sell ID PRICE SIZE | Place sell order |
./trade.sh orders | View open orders |
quant.sh - Quantitative Models
| Command | Description |
|---|---|
./quant.sh mc CURR HOURS | Monte Carlo projection |
./quant.sh kelly ID PROB | Kelly criterion sizing |
./quant.sh momentum | Momentum scanner |
tracker.sh - Tweet Tracking
| Command | Description |
|---|---|
./tracker.sh cal | View tweet calendar |
./tracker.sh dash | Full dashboard |
./tracker.sh export | Export data |
search.sh - Vector Search
| Command | Description |
|---|---|
./search.sh markets "query" | Search markets by description |
./search.sh strats "query" | Search strategies |
./search.sh similar ID | Find similar markets |
API Integration
The platform integrates with 6 data sources:
| API | Endpoint | Purpose |
|---|---|---|
| CLOB | clob.polymarket.com | Trading, orderbook, prices |
| Gamma | gamma-api.polymarket.com | Markets, events, profiles |
| Data | data-api.polymarket.com | Positions, leaderboard |
| Polyrouter | api-v2.polyrouter.io | Fast search, trending |
| Ollama | localhost:11434 | Local AI analysis |
| WebSocket | ws-subscriptions-clob.polymarket.com | Real-time streaming |
Python Usage
from trading import *
# Search markets
markets = polyrouter_search("bitcoin")
# Get market price
price = get_clob_price(market_id)
# Get orderbook
book = get_orderbook(market_id)
# Place order (requires credentials)
result = place_order(market_id, "BUY", price=0.35, size=10)
Configuration
Trading Credentials
To enable trading, create data/.trading_config.json:
{
"private_key": "0x...",
"api_key": "...",
"api_secret": "...",
"passphrase": "...",
"funder": "0x..."
}
.gitignore excludes this file.
TUI Settings
TUI settings are stored in data/.yesno_config.json:
{
"theme": "dark",
"refresh_rate": 30,
"default_view": "markets"
}
Keyboard Shortcuts (TUI)
Navigation
| Key | Action |
|---|---|
1-9, 0, - | Switch screens |
j / k | Navigate down / up |
g / G | Go to top / bottom |
Tab | Next panel |
Enter | Select / View details |
/ | Search |
? | Help |
q | Quit |
Trading
| Key | Action |
|---|---|
b | Buy |
s | Sell |
f | Toggle favorite |
p | Portfolio view |
c | Chart view |
Disclaimer
This software is for educational and research purposes only. It is NOT investment advice, trading signals, or professional trading software. Trade at your own risk. Past performance does not guarantee future results.