Autonomous high-accuracy trading bot for XRP prediction markets on Polymarket
XRP Polymarket Cash Bot is an autonomous trading system designed for maximum win rate accuracy:
✅ >70% Target Win Rate: Ultra-selective signal generation with multi-confirmation ✅ Scalable Capital: Works with $10 to $1000+ starting capital ✅ XRP Focused: Specialized for XRP prediction markets on Polymarket ✅ Whale Front-Running: Detect and act on large orders before they execute ✅ 15-Minute Intervals: Optimized for short-term XRP sentiment trading ✅ Real-Time Monitoring: 24/7 market surveillance and automated execution ✅ Telegram Alerts: Get notified instantly of trades and performance
- Multi-timeframe sentiment analysis (15m, 1h, 4h)
- Ultra-selective signal filtering (only >80% confidence)
- Confidence-weighted position sizing
- Dynamic stop-loss and take-profit optimization
- Win-rate protection (pause if drops below 65%)
- Micro Tier ($10-$50): 10% per trade, optimized for growth
- Small Tier ($50-$200): 5% per trade, balanced approach
- Medium Tier ($200-$1000): 3% per trade, conservative
- Large Tier ($1000+): 2% per trade, institutional-grade
- Real-time orderbook monitoring
- Detect orders >10x average size
- Automatic front-run execution
- 75%+ win rate on whale signals
- Dynamic position sizing by capital tier
- Daily loss limits (10-20% depending on tier)
- Maximum concurrent positions (2-5)
- Volatility-adjusted stop-losses
- Circuit breakers on losing streaks
- Python 3.11+
- PostgreSQL 15+
- Redis 7+
- Polymarket account with API access
# Clone repository
git clone https://github.com/yourusername/poly_cashbot.git
cd poly_cashbot
# Install dependencies (using Poetry - recommended)
pip install poetry
poetry install
# Alternative: Install with pip (if you don't want to use Poetry)
# pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
nano .env # Add your API keys
# Initialize database
poetry run alembic upgrade head
# Run tests
poetry run pytestEdit .env file with your credentials:
# Polymarket
POLYMARKET_API_KEY=your_api_key_here
POLYMARKET_SECRET_KEY=your_secret_here
# Database
DATABASE_URL=postgresql://user:pass@localhost/poly_cashbot
REDIS_URL=redis://localhost:6379
# Telegram
TELEGRAM_BOT_TOKEN=your_bot_token_here
# Trading Configuration
STARTING_CAPITAL=100 # Start with any amount ($10-$1000+)# Paper trading (recommended first)
poetry run python -m src.bot.main --paper-trading
# Live trading (after 30-day paper trading success)
poetry run python -m src.bot.main --liveFull Documentation: SETUP.md | AGENTS.md
| Document | Description |
|---|---|
| AGENTS.md | AI agent coordination guide (start here for AI assistants) |
| docs/prd.md | Product Requirements Document (full requirements) |
| docs/technical-specification.md | Technical architecture and stack |
| docs/mvp-definition.md | MVP scope and success criteria |
| docs/roadmap.md | Development phases and milestones |
| memory/constitution.md | Project principles and standards (the law) |
| SETUP.md | Installation and configuration guide |
cashbot-prediction-markets/
├── README.md # Este archivo
├── SETUP.md # Guía de instalación
├── pyproject.toml # Configuración de Poetry (dependencias)
├── poetry.lock # Versiones bloqueadas de dependencias
├── requirements.txt # Alternativa pip (generado desde Poetry)
├── .env.template # Template de variables
├── .gitignore # Archivos ignorados por Git
│
├── src/
│ ├── config.py # Configuración centralizada
│ ├── markets.py # Clientes Polymarket & Kalshi
│ ├── telegram_handlers.py # Handlers de comandos Telegram
│ └── __init__.py
│
├── notebooks/
│ ├── 01_hola_mundo.ipynb # Bot básico (START HERE)
│ ├── 02_prediction_markets.ipynb # Integración de APIs
│ └── 03_strategies.ipynb # Estrategias de trading
│
├── scripts/
│ ├── verify_setup.py # Verificación post-instalación
│ └── init_db.py # Inicializar base de datos
│
├── tests/
│ ├── test_markets.py
│ └── test_telegram.py
│
└── docs/
├── PLAN_PREDICTION_MARKETS_CASHBOT.md
├── HITO_1_CODIGO_BASE.md
└── GUIA_CREDENCIALES.md
- Polymarket API integration
- PostgreSQL + Redis setup
- Capital-agnostic architecture
- Database schema and models
- Multi-timeframe sentiment analyzer
- Signal filtering (>80% confidence)
- Backtest on 90 days historical data
- Achieve >70% historical win rate
- Order execution engine
- Scalable risk manager (all capital tiers)
- Whale detection and front-running
- Dynamic stop-loss system
- Performance analytics
- Telegram bot integration
- VPS deployment
- 30-day paper trading validation
- Deploy with $10-$50 capital
- Validate >70% win rate
- Scale to $200-$1000
- Achieve consistent profitability
Full Roadmap: docs/roadmap.md
- Win Rate: >70% (target >75% for v2.0)
- Profit Factor: >2.0 (gross profit / gross loss)
- Sharpe Ratio: >1.5 (risk-adjusted returns)
- Max Drawdown: <25%
- Average Trade: 3-8 per day (ultra-selective)
| Starting Capital | 30-Day Target (70% WR) | 90-Day Target |
|---|---|---|
| $10 | $24 (+140%) | $58 (+480%) |
| $50 | $75 (+50%) | $150 (+200%) |
| $200 | $298 (+49%) | $595 (+198%) |
| $1,000 | $1,450 (+45%) | $2,900 (+190%) |
Note: Results depend on win rate, market conditions, and risk management. Past performance does not guarantee future results.
- NUNCA commits el archivo
.env - NUNCA subas credenciales a Git
- Usa variables de entorno siempre
- Rota tus API keys regularmente
Ver .gitignore para archivos protegidos automáticamente.
- Fork el repositorio
- Crea rama:
git checkout -b feature/mi-feature - Commit:
git commit -m "Add mi-feature" - Push:
git push origin feature/mi-feature - Abre Pull Request
Ver CONTRIBUTING.md para más detalles.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentación: Ver carpeta
/docs - Comunidad: Discord (próximamente)
| Capa | Herramientas |
|---|---|
| Bot | python-telegram-bot, asyncio |
| APIs | Polymarket CLOB, Kalshi REST |
| Data | Pandas, NumPy, Scikit-learn |
| DB | SQLAlchemy, SQLite (dev), PostgreSQL (prod) |
| Dev | Jupyter Lab, Conda, Git |
| News | Feedparser, TextBlob (NLP) |
(Datos ficticios de paper trading)
| Mes | ROI | Trades | Win Rate | Max Drawdown |
|---|---|---|---|---|
| Nov 2025 | +32% | 48 | 58% | -8.2% |
| Dic 2025 | +28% | 42 | 61% | -6.5% |
| Ene 2026 | +41% | 55 | 63% | -7.8% |
MIT License - Libre para usar, modificar y distribuir.
Ver LICENSE para más detalles.
- Tu Nombre - Desarrollo inicial
- Comunidad - Contribuciones y feedback
- Polymarket por la excelente API
- Kalshi por la integración CFTC
- python-telegram-bot team
- Comunidad de prediction markets
Ver CHANGELOG.md para historial de versiones.
Este software es para propósitos educativos y de investigación.
- Trading en prediction markets conlleva riesgo financiero real
- No hay garantías de rentabilidad
- Usa solo capital que puedas perder
- Verifica regulaciones locales antes de usar en tu país
- Responsabilidad del usuario: cómo uses este software
Última actualización: Noviembre 2025
Versión: 1.0.0
Status: 🟢 Active Development
¿Empezamos? 👉 SETUP.md