Metadata-Version: 2.4
Name: trademind-ai
Version: 2.0.0
Summary: TradeMind AI — Asistente de Análisis Financiero con IA
Home-page: https://trademind.ai
Author: TradeMind AI
Keywords: trading bot ai crypto polymarket kalshi signals
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.104.0
Requires-Dist: uvicorn[standard]>=0.24.0
Requires-Dist: websockets>=12.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: aiofiles>=23.2.1
Requires-Dist: sqlalchemy>=2.0.23
Requires-Dist: aiosqlite>=0.19.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: aiohttp>=3.9.1
Requires-Dist: beautifulsoup4>=4.12.2
Requires-Dist: lxml>=4.9.4
Requires-Dist: feedparser>=6.0.11
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: ta>=0.10.2
Requires-Dist: ccxt>=4.1.77
Requires-Dist: yfinance>=0.2.36
Requires-Dist: openai>=1.6.1
Requires-Dist: apscheduler>=3.10.4
Requires-Dist: plyer>=2.1.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: pydantic-settings>=2.1.0
Requires-Dist: rich>=13.7.0
Requires-Dist: pyyaml>=6.0.1
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🤖 TradeMind AI — BTC Bot para Polymarket

**Versión 2.0** | Análisis de Mercados de Predicción en Tiempo Real

---

## ⚠️ ADVERTENCIA IMPORTANTE

**Este software NO es un asesor financiero.** Las señales son SUGERENCIAS basadas en indicadores técnicos. Usted es responsable de sus decisiones. NUNCA apueste dinero que no pueda perder.

> 📄 Lea el [DISCLAIMER completo](DISCLAIMER.md) antes de usar el software.

---

## 🚀 Instalación Rápida

### Requisitos

- **Python 3.8+**
- **Windows / Mac / Linux**
- Conexión a Internet (para datos de Kraken/CoinGecko)

### Instalación (1 minuto)

```bash
# 1. Clonar o descargar el proyecto
cd "TradeMind AI"

# 2. Instalar dependencias
pip install -r requirements.txt

# 3. Ejecutar el asistente de instalación
python setup.py
```

El asistente le guiará paso a paso:
1. ✅ Aceptar los riesgos
2. ✅ Seleccionar idioma
3. ✅ Elegir modo (PAPEL o REAL)
4. ✅ Configurar límites de riesgo
5. ✅ Iniciar el servidor

---

## 🎯 ¿Qué hace TradeMind AI?

| Funcionalidad | Descripción |
|---|---|
| **BTC Bot** | Analiza mercados "Bitcoin Up/Down" de 15 y 5 minutos |
| **Veredicto** | UP / DOWN / SIN SEÑAL basado en 7 indicadores técnicos |
| **Gráfica TradingView** | BTC/USD interactiva con timeframes 1m-1W |
| **Predicciones** | Probabilidad estimada para cada ventana de Polymarket |
| **Kelly Criterion** | Tamaño de apuesta óptimo basado en bankroll y edge |
| **Auto-Trading** | El bot puede apostar automáticamente (PAPEL o REAL) |
| **TP/SL** | Take Profit +25% / Stop Loss -50% automático |
| **Emergency Stop** | Botón para cerrar todas las posiciones al instante |

---

## 🕹️ Modos de Uso

### 🎭 Modo PAPEL (RECOMENDADO)
- Simula operaciones sin dinero real
- Ideal para probar el bot y ver resultados históricos
- Mismo panel de control, sin riesgo

### 💀 Modo REAL (EXPERIMENTAL)
- **REQUIERE**: Wallet de Polygon con USDC y MATIC
- **REQUIERE**: Llave privada (¡NUNCA la comparta!)
- El bot ejecuta órdenes reales en Polymarket CLOB
- **ALTO RIESGO de pérdida total**

---

## 📊 Panel de Control

Al abrir `http://localhost:3000` → BTC Bot, verá:

```
COLUMNA IZQUIERDA:
├── 🎯 Veredicto UP/DOWN con confianza
├── 💰 Bankroll y apuesta sugerida (Kelly)
├── 📈 Gráfica TradingView interactiva
├── 📊 Señal de Trading con Stop Loss / Take Profit
├── 📉 Predicciones en Vivo (4-6 ventanas)
└── 🎯 Mercados monitoreados

COLUMNA DERECHA:
├── ⚙️ Configuración del Bot
├── 🤖 TRADING AUTOMÁTICO ← NUEVO
│   ├── Selector PAPEL / REAL
│   ├── Balance, P&L, Posiciones
│   ├── [▶ Iniciar Auto-Trading]
│   └── [🛑 STOP]
└── 🚨 Advertencias
```

---

## 🔧 Configuración Manual

Para iniciar sin el wizard:

```bash
python main.py
# Abre http://localhost:3000
```

---

## 📜 Licencia

Este software se distribuye "TAL CUAL", sin garantías. Consulte [DISCLAIMER.md](DISCLAIMER.md).

---

## 🤝 Soporte

TradeMind AI es un proyecto independiente. Para preguntas o sugerencias, abra un issue en el repositorio.

---

## 🚀 Despliegue a producción

La app está lista para deployarse como **frontend estático en Netlify + backend FastAPI en Render.com** (ambos con plan free). Archivos de configuración ya incluidos en el repo:

| Archivo | Propósito |
|---|---|
| `frontend/netlify.toml` | Build + SPA fallback + cache headers |
| `frontend/public/_redirects` | SPA fallback belt+suspenders |
| `Dockerfile` | Backend image para Render/Railway/Fly |
| `render.yaml` | One-click deploy backend en Render (incluye disco persistente para SQLite) |
| `.env.production.example` | Checklist de env vars obligatorios |

### Paso 1: Backend en Render
1. Subí el repo a GitHub
2. en render.com → New → Blueprint → apuntá a tu repo
3. Render detecta `render.yaml` y crea todo: el web service + disco persistente de 1GB en `/app/data`
4. En el panel Environment, copiá los valores de `.env.production.example` y rellenálos:
   - `TRADEMIND_ADMIN_HASH` (generá con `python -c "import hashlib,sys;print(hashlib.sha256(sys.argv[1].encode()).hexdigest())" 'tu-clave'`)
   - `TRADEMIND_RESEND_API_KEY` + `TRADEMIND_RESEND_FROM` (ya configurados previamente)
   - `TRADEMIND_ALLOWED_ORIGINS=https://TU-SITIO.netlify.app`
5. Esperá el primer deploy (~5 min). Anotá la URL: `https://trademind-backend.onrender.com`

### Paso 2: Frontend en Netlify
1. en netlify.com → Add new site → Import from Git
2. Build command: `CI=false npm run build` (ya está en netlify.toml)
3. Publish directory: `build`
4. En Site settings → Environment variables, agregá:
   - `REACT_APP_API_BASE_URL` = `https://trademind-backend.onrender.com`
5. Deploy. Tu página queda en `https://TU-SITIO.netlify.app`

### ⚠️ Cosas a saber del free tier
- **Render spin-down**: el servicio se duerme a los 15min sin tráfico. El primer request tarda ~30s en despertar (es normal, mostrale un loading).
- **CORS**: si Netlify te da un subdominio distinto al que pusiste en `TRADEMIND_ALLOWED_ORIGINS`, los requests van a fallar. Verificá que coincidan exacto.

Para más detalles, consultá `SECURITY.md` (postura securidad) y `.freebuff/run.md` (procedimientos de operación local).

---

*Hecho con ❤️ para traders que entienden el riesgo.*
