AI-powered trading terminal for prediction markets, crypto & futures
Claude + Odds = Clodds
Quick Start •
Features •
Channels •
Markets •
Docs
Clodds is a personal AI trading terminal for prediction markets, crypto spot, and perpetual futures with leverage. Run it on your own machine, chat via any of 22 messaging platforms, trade across 10 prediction markets + 6 futures exchanges (including on-chain Solana perps via Percolator), and manage your portfolio — all through natural conversation.
Built on Claude with arbitrage detection algorithms based on arXiv:2508.03474, which documented arbitrage patterns on Polymarket. See Arbitrage Limitations for practical considerations.
Deployment Options
| Self-Hosted | Full control, all features | 5 min | 22 channels, trading, DeFi, bots |
| Cloudflare Worker | Lightweight, edge deployment | 2 min | 3 webhook channels, market data, arbitrage |
| Compute API | Agents paying for compute | Live | LLM, code, web, data, storage |
Compute API
Live at: https://api.cloddsbot.com
Agents can pay USDC for compute resources — no API keys needed, just a wallet.
curl https://api.cloddsbot.com/health
curl https://api.cloddsbot.com/pricing
curl https://api.cloddsbot.com/balance/0xYourWallet
Services:
llm | $0.000003/token | Claude, GPT-4, Llama, Mixtral |
code | $0.001/second | Sandboxed Python, JS, Rust, Go |
web | $0.005/request | Web scraping with JS rendering |
data | $0.001/request | Prices, orderbooks, candles |
storage | $0.0001/MB | Key-value file storage |
trade | $0.01/call | Trade execution (Polymarket, DEXs) |
Payment flow:
- Send USDC to treasury wallet on Base
- Include payment proof in request
- API credits your balance
- Use compute services
See docs/API.md for full documentation.
Quick Start
Option 1: npm (recommended)
echo "@alsk1992:registry=https://npm.pkg.github.com" >> ~/.npmrc
npm install -g @alsk1992/clodds
export ANTHROPIC_API_KEY=sk-ant-...
clodds start
Option 2: From source
git clone https://github.com/alsk1992/CloddsBot.git && cd CloddsBot
npm install && cp .env.example .env
npm run build && npm start
Open http://localhost:18789/webchat — no account needed.
CLI
clodds start
clodds repl
clodds doctor
clodds secure
clodds locale set zh
clodds mcp
clodds mcp install
See docs/USER_GUIDE.md for all commands.
Everything We Built
At a Glance
| Messaging | 22 platforms (Telegram, Discord, WhatsApp, Slack, Teams, Signal, Matrix, iMessage, LINE, Nostr, and more) |
| Prediction Markets | 9 platforms (Polymarket, Kalshi, Betfair, Smarkets, Drift, Manifold, Metaculus, PredictIt) |
| Perpetual Futures | 5 exchanges (Binance, Bybit, Hyperliquid, MEXC, Percolator) with up to 200x leverage, database tracking, A/B testing |
| On-Chain Perps | Percolator protocol — Solana-native perpetual futures with pluggable matchers, keeper cranking, real-time slab polling |
| Token Security | GoPlus-powered audits — honeypot detection, rug-pull analysis, holder concentration, risk scoring |
| Security Shield | Code scanning (75 rules), scam DB (70+ addresses), multi-chain address checking, pre-trade tx validation |
| Trading | Order execution on 5 platforms, portfolio tracking, P&L, trade logging, DCA on 16 platforms |
| MCP Server | Expose all 113 skills as MCP tools for Claude Desktop and Claude Code |
| Arbitrage | Cross-platform detection, combinatorial analysis, semantic matching, real-time scanning |
| AI | 6 LLM providers, 4 specialized agents, semantic memory, 21 tools |
| i18n | 10 languages (EN, ZH, ES, JA, KO, DE, FR, PT, RU, AR) |
| Solana DeFi | Jupiter, Raydium, Orca, Meteora, Pump.fun integration |
| EVM DeFi | Uniswap V3, 1inch, Virtuals Protocol (ETH, ARB, OP, Base, Polygon) |
| Smart Trading | Whale tracking, copy trading, smart routing, MEV protection |
| Trade Ledger | Decision audit trail with confidence calibration, SHA-256 integrity hashing, statistics |
| Crypto Whale Tracking | Multi-chain whale monitoring (Solana, ETH, Polygon, ARB, Base, OP) |
| Payments | x402 protocol for machine-to-machine USDC payments (Base + Solana) |
| Bridging | Wormhole cross-chain token transfers |
| Bittensor Mining | Subnet mining with wallet management, earnings tracking, Chutes SN64 support |
| Automation | Trading bots, cron jobs, webhooks, skills system |
Channels (22)
Telegram, Discord, Slack, WhatsApp, Teams, Matrix, Signal, iMessage, LINE, Nostr, Twitch, WebChat, and more.
All channels support real-time sync, rich media, and offline queuing.
Prediction Markets (10)
| Polymarket | ✓ | Crypto (USDC) |
| Kalshi | ✓ | US Regulated |
| Betfair | ✓ | Sports Exchange |
| Smarkets | ✓ | Sports |
| Drift | ✓ | Solana DEX |
| Manifold | data | Play Money |
| Metaculus | data | Forecasting |
| PredictIt | data | US Politics |
| AgentBets | data | AI Agents / Solana (Colosseum Hackathon) |
Supports limit/market orders, maker rebates, real-time orderbooks, P&L tracking, and smart routing.
Crypto & DeFi
Solana: Jupiter, Raydium, Orca, Meteora, Pump.fun — with Jito MEV protection
EVM (5 chains): Uniswap V3, 1inch, Virtuals Protocol on Ethereum, Arbitrum, Optimism, Base, Polygon — with Flashbots MEV protection
Bridging: Wormhole cross-chain transfers (ETH ↔ Solana, Polygon ↔ Base)
Payments: x402 protocol for agent-to-agent USDC payments
Perpetual Futures (5 Exchanges)
| Binance | 125x | Yes | CEX |
| Bybit | 100x | Yes | CEX |
| Hyperliquid | 50x | No | DEX |
| MEXC | 200x | No | CEX |
| Percolator | Varies | No | On-chain (Solana) |
Long/short, cross/isolated margin, TP/SL, liquidation alerts, funding tracking, database logging.
/futures long BTCUSDT 0.1 10x
/futures sl BTCUSDT 95000
Percolator (On-Chain Solana Perps)
Trade perpetual futures directly on Solana via Anatoly Yakovenko's Percolator protocol — no KYC, no intermediaries, fully on-chain.
/percolator status # Oracle price, OI, funding, spread
/percolator positions # Your open positions
/percolator long 100 # Open $100 long
/percolator short 50 # Open $50 short
/percolator deposit 500 # Deposit USDC collateral
/percolator withdraw 100 # Withdraw USDC collateral
Configure: PERCOLATOR_ENABLED=true PERCOLATOR_SLAB=<pubkey> PERCOLATOR_ORACLE=<pubkey>
AI System
6 LLM providers: Claude (primary), GPT-4, Gemini, Groq, Together, Ollama
4 agents: Main, Trading, Research, Alerts
21 tools: Browser, docker, exec, files, git, email, sms, webhooks, sql, vision
Memory: Semantic search (LanceDB), hybrid BM25, user profiles, persistent facts
Arbitrage Detection
Based on arXiv:2508.03474. Detects internal, cross-platform, and combinatorial arbitrage with semantic matching, liquidity scoring, and Kelly sizing.
YES: 45c + NO: 52c = 97c → Buy both → 3c profit
Polymarket @ 52c vs Kalshi @ 55c → 3c spread
Note: Defaults to dry-run mode. Cross-platform has currency/settlement complexity.
Advanced Trading
Whale Tracking: Multi-chain monitoring (Solana, ETH, Polygon, ARB, Base, OP) with configurable thresholds
Copy Trading: Mirror successful wallets with sizing controls and SL/TP
Swarm Trading: Coordinated multi-wallet Pump.fun trading (20 wallets, Jito bundles)
Smart Routing: Best price, liquidity, or fees across platforms
External Data: FedWatch, 538, Silver Bulletin, RCP, Odds API for edge detection
Safety: Unified risk engine with circuit breaker, VaR/CVaR, volatility regime detection, stress testing, Kelly sizing, daily loss limits, kill switch
Bittensor Mining
Mine TAO on Bittensor subnets directly from Clodds:
clodds bittensor setup
clodds bittensor status
clodds bittensor wallet balance
clodds bittensor register 64
In chat: /tao status, /tao earnings daily, /tao wallet
Features: Wallet management via @polkadot/api, Python sidecar for btcli, Chutes SN64 GPU compute, earnings tracking with SQLite persistence, HTTP API at /api/bittensor/*.
Trading Bots
Built-in strategies: Mean Reversion, Momentum, Arbitrage, Market Making
Features: Configurable sizing, SL/TP, backtesting, live trading with safety limits
Security
- Sandboxed execution (shell commands need approval)
- Encrypted credentials (AES-256-GCM)
- Audit logging for all trades
Trade Ledger
Decision audit trail for AI trading transparency:
- Decision Capture: Every trade, copy, and risk decision logged with reasoning
- Confidence Calibration: Track AI prediction accuracy vs confidence levels
- Integrity Hashing: Optional SHA-256 hashes for tamper-proof records
- Onchain Anchoring: Anchor hashes to Solana, Polygon, or Base for immutable proof
- Statistics: Win rates, P&L, block reasons, accuracy by confidence bucket
clodds ledger stats
clodds ledger calibration
clodds ledger verify <id>
clodds ledger anchor <id>
Enable: clodds config set ledger.enabled true
Skills & Extensions
111 bundled skills across trading, data, automation, and infrastructure — lazy-loaded on first use so missing dependencies don't crash the app. Run /skills to see status.
| Trading | Polymarket, Kalshi, Betfair, Hyperliquid, Binance, Bybit, MEXC, Jupiter, Raydium, Orca, Percolator, DCA (16 platforms) |
| Analysis | Arbitrage detection, edge finding, whale tracking, copy trading, token security audits, security shield |
| Automation | Cron jobs, triggers, bots, webhooks |
| AI | Memory, embeddings, multi-agent routing |
7 extensions for Copilot, OpenTelemetry, LanceDB, and more.
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ GATEWAY │
│ HTTP • WebSocket • Auth • Rate Limiting • 1000 connections │
└─────────────────────────────────┬───────────────────────────────────┘
│
┌─────────────────────────┼─────────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ CHANNELS │ │ AGENTS │ │ FEEDS │
│ (22) │ │ (4) │ │ (9+) │
├───────────────┤ ├───────────────┤ ├───────────────┤
│ Telegram │ │ Main │ │ Polymarket │
│ Discord │ │ Trading │ │ Kalshi │
│ WhatsApp │ │ Research │ │ Betfair │
│ Slack │ │ Alerts │ │ Manifold │
│ Teams │ │ │ │ Crypto (10) │
│ Matrix │ │ Tools (21) │ │ │
│ Signal │ │ Skills (110) │ │ Arbitrage │
│ +15 more │ │ Memory │ │ Detector │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
└─────────────────────────┼─────────────────────────┘
│
┌─────────────────────────┼─────────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ TRADING │ │ SOLANA │ │ PAYMENTS │
│ │ │ DeFi │ │ (x402) │
├───────────────┤ ├───────────────┤ ├───────────────┤
│ Execution │ │ Jupiter │ │ Base USDC │
│ Portfolio │ │ Raydium │ │ Solana USDC │
│ Trade Logger │ │ Orca │ │ Auto-approve │
│ Bots │ │ Meteora │ │ │
│ Risk Manager │ │ Pump.fun │ │ Wormhole │
│ Backtesting │ │ │ │ Bridge │
└───────────────┘ └───────────────┘ └───────────────┘
│
┌───────────────┐
│ BITTENSOR │
├───────────────┤
│ Wallet │
│ Subnet Mining │
│ Earnings │
│ Chutes (SN64) │
└───────────────┘
│
┌───────────────┐
│ PERCOLATOR │
├───────────────┤
│ Slab Parser │
│ Trade CPI │
│ Keeper Crank │
│ Oracle Feed │
└───────────────┘
Configuration
ANTHROPIC_API_KEY=sk-ant-...
TELEGRAM_BOT_TOKEN=...
DISCORD_BOT_TOKEN=...
POLYMARKET_API_KEY=...
SOLANA_PRIVATE_KEY=...
Data stored in ~/.clodds/ (SQLite database, auto-created on first run).
Documentation
| User Guide | Commands, chat usage, workflows |
| API Reference | HTTP/WebSocket endpoints, authentication, error codes |
| Architecture | System design, components, data flow, extension points |
| Deployment | Environment variables, Docker, systemd, production checklist |
| Trading | Execution, bots, risk management, safety controls |
| Security | Security hardening, audit checklist |
| OpenAPI Spec | Full OpenAPI 3.0 specification |
Development
npm run dev
npm test
npm run typecheck
npm run lint
npm run build
Docker
docker compose up --build
Summary
| Messaging Channels | 22 |
| Prediction Markets | 9 |
| Futures Exchanges | 5 |
| AI Tools | 21 |
| Skills | 103 |
| LLM Providers | 6 |
| Solana DEX Protocols | 5 |
| Trading Strategies | 4 |
| Extensions | 7 |
License
MIT — see LICENSE
Clodds — Claude + Odds
Built with Claude by Anthropic