About YES/NO.EVENTS

Documentation, Installation Guide, and Reference

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
Note: Ollama is optional. The terminal works without AI features.

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

CommandDescription
./trade.sh scanScan all Elon tweet markets
./trade.sh evFind EV opportunities
./trade.sh find "query"Search markets
./trade.sh price IDGet current price
./trade.sh book IDView orderbook
./trade.sh buy ID PRICE SIZEPlace buy order
./trade.sh sell ID PRICE SIZEPlace sell order
./trade.sh ordersView open orders

quant.sh - Quantitative Models

CommandDescription
./quant.sh mc CURR HOURSMonte Carlo projection
./quant.sh kelly ID PROBKelly criterion sizing
./quant.sh momentumMomentum scanner

tracker.sh - Tweet Tracking

CommandDescription
./tracker.sh calView tweet calendar
./tracker.sh dashFull dashboard
./tracker.sh exportExport data

search.sh - Vector Search

CommandDescription
./search.sh markets "query"Search markets by description
./search.sh strats "query"Search strategies
./search.sh similar IDFind similar markets

API Integration

The platform integrates with 6 data sources:

APIEndpointPurpose
CLOBclob.polymarket.comTrading, orderbook, prices
Gammagamma-api.polymarket.comMarkets, events, profiles
Datadata-api.polymarket.comPositions, leaderboard
Polyrouterapi-v2.polyrouter.ioFast search, trending
Ollamalocalhost:11434Local AI analysis
WebSocketws-subscriptions-clob.polymarket.comReal-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..."
}
Security: Never commit credentials to git. The .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

KeyAction
1-9, 0, -Switch screens
j / kNavigate down / up
g / GGo to top / bottom
TabNext panel
EnterSelect / View details
/Search
?Help
qQuit

Trading

KeyAction
bBuy
sSell
fToggle favorite
pPortfolio view
cChart 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.