🤖 xbot-twitter (bot @DataBlueAR)

Versión v1.0.0 · Generado: 2026-07-10 22:46:06 · https://x.com/DataBlueAR

Bot Python @DataBlueAR que postea en X/Twitter datos económicos argentinos: dólar blue, BCRA, IPC INDEC, BTC. Corre por cron (no servicio web).

📝 Cambios de esta versión:
Auto-regenerado: Modificado hace 58.2h después del último backup
🔐 CONFIDENCIAL. Este documento contiene credenciales. NO compartir. Si tu Gmail se compromete, rotar todas las claves listadas.

📋 Overview

Identidad

Handle@DataBlueAR
TipoBot CLI ejecutado por cron de ubuntu
Path/home/ubuntu/xbot_economia/
Comandocd /home/ubuntu/xbot_economia && python3 bot.py <comando>

📅 Crontab de ubuntu (jobs programados)

# ===== Crons del bot @DataBlueAR =====
# Horario del server en UTC. Córdoba = UTC-3.
# Para instalar:  crontab -e   y pegar estas líneas
# (o:  crontab /home/ubuntu/xbot_economia/crontab.txt  para reemplazar todo el crontab)

# --- Variables ---
BOT=/home/ubuntu/xbot_economia
PY=/usr/bin/python3

# 09:00 CBA (12:00 UTC) L-V  -> APERTURA (fija histórico del día)
0 12 * * 1-5 cd $BOT && $PY bot.py apertura >> $BOT/logs/cron.log 2>&1

# 13:00 CBA (16:00 UTC) L-V  -> MACRO (dato rotativo)
0 16 * * 1-5 cd $BOT && $PY bot.py macro >> $BOT/logs/cron.log 2>&1

# 18:00 CBA (21:00 UTC) todos -> CIERRE (el estrella)
0 21 * * * cd $BOT && $PY bot.py cierre >> $BOT/logs/cron.log 2>&1

# 21:00 CBA (00:00 UTC) todos -> SUELDO en dólares
0 0 * * 5 cd $BOT && $PY bot.py sueldo >> $BOT/logs/cron.log 2>&1

# Cada 20 min, 12:00-22:00 CBA (15:00-01:00 UTC) -> ALERTA (postea solo si salta >2%)
*/20 15-23,0,1 * * * cd $BOT && $PY bot.py alerta >> $BOT/logs/cron.log 2>&1

# 16:30 CBA (19:30 UTC) todos -> IPC (postea solo si el INDEC publicó un mes nuevo)
30 19 * * * cd $BOT && $PY bot.py ipc >> $BOT/logs/cron.log 2>&1

# 16:00 CBA (19:00 UTC) todos -> CRIPTO (BTC global + USDT/ARS)
0 19 * * * cd $BOT && $PY bot.py cripto >> $BOT/logs/cron.log 2>&1

# 11:00 CBA (14:00 UTC) sábados -> EFEMÉRIDE (blue hace 1 año vs hoy)
0 14 * * 6 cd $BOT && $PY bot.py efemeride >> $BOT/logs/cron.log 2>&1

# 10:00 CBA (13:00 UTC) L-V -> DATO BCRA (rota: reservas/tasa/base monetaria)
0 13 * * 1-5 cd $BOT && $PY bot.py bcra >> $BOT/logs/cron.log 2>&1

# 11:00 CBA (14:00 UTC) L-V -> BANDA (posición del oficial respecto al techo)
0 14 * * 1-5 cd $BOT && $PY bot.py bandapost >> $BOT/logs/cron.log 2>&1

# 12:00 y 17:00 CBA (15:00 y 20:00 UTC) -> TENDENCIA (postea solo si hay economica neutra)
0 15 * * * cd $BOT && $PY bot.py trend >> $BOT/logs/cron.log 2>&1
0 20 * * * cd $BOT && $PY bot.py trend >> $BOT/logs/cron.log 2>&1

# ===== Crons guiadeia.ar v4.2 (8/12:30/19 CBA) - RECUPERACION batch 2 hasta 02/07 =====
0 11 * * * cd /home/ubuntu/guiadeia && /usr/bin/python3 generar_v4.py --batch 2 >> /home/ubuntu/guiadeia/cron.log 2>&1
30 15 * * * cd /home/ubuntu/guiadeia && /usr/bin/python3 generar_v4.py --batch 2 >> /home/ubuntu/guiadeia/cron.log 2>&1
0 22 * * * cd /home/ubuntu/guiadeia && /usr/bin/python3 generar_v4.py --batch 2 >> /home/ubuntu/guiadeia/cron.log 2>&1
# Frutos Morados - respuestas reseñas Google
0 */4 * * * cd /home/ubuntu/gmb && /usr/bin/python3 fm_reviews.py >> /home/ubuntu/gmb/fm_cron.log 2>&1
0 12 * * * cd /opt/dmarc-monitor && /usr/bin/python3 dmarc_monitor.py >> /opt/dmarc-monitor/run.log 2>&1
35 5 * * * cd /opt/tira && /opt/tira/venv/bin/python3 /opt/tira/localizar_assets.py --limite 500 >> /home/ubuntu/localizar.log 2>&1
40 8 * * * cd /opt/doko && . ./.env && export ANTHROPIC_API_KEY && /opt/doko/venv/bin/python -u precache.py >> /home/ubuntu/doko_precache.log 2>&1

🤖 Comandos del bot.py

Posteos programados

apertura09:00 CBA L-V — fija histórico del día
macro13:00 CBA L-V — dato rotativo macro
cierre18:00 CBA TODOS — el estrella
sueldo21:00 CBA viernes — sueldo en dólares
alertaCada 20 min 12-22hs — solo si salta >2%
ipc16:30 CBA TODOS — solo si INDEC publicó
cripto16:00 CBA TODOS — BTC + USDT/ARS
efemeride11:00 CBA sábados — blue 1 año atrás vs hoy
bcra10:00 CBA L-V — reservas/tasa/base monetaria (rotativo)
bandapost11:00 CBA L-V — posición oficial vs techo banda
trend12:00 y 17:00 CBA — tendencia económica neutra

🔌 APIs y credenciales (.env)

Estas son las claves productivas del bot. Si las rotás, actualizar /home/ubuntu/xbot_economia/.env

Anthropic (Claude)

API key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
UsoValidación de tendencias, generación de copy

X (Twitter) API

API KeyEgFmw8TlgPm9QtVBhxQ4VdVM8
API Secret0tPP14tR0NVUCoKVM4xyyAa3wHWb5oaJXhQjfVmxpkRJcAv8s0
Access Token2720055533-hpUBA2YG2aiWbV1G3SdDBys63pTbtTJXn4cb5QV
Access Token SecretVD7rVsKhQDgyJluVUInHW3jJGuSWTqOVh4wqSdwRIJnkG

GetXAPI (read X)

API keyget-x-api-a51e425227c04186d08682f2c03d456dd09820c61b979151
UsoContexto de tendencias, trends24.in scraper

fal.ai (imágenes)

API key15723bed-9877-48a4-b1bb-3430ecd57b67:7743afb44a59778519564b14d747ea9d
UsoGeneración de imágenes 16:9 con nano-banana-pro

📂 Archivos principales

Listado

bot.py10.7 KB · mod 2026-06-10
fuentes.py21.9 KB · mod 2026-06-10
redactor.py21.2 KB · mod 2026-06-10
publicar.py5.7 KB · mod 2026-06-05
grafico.py12.7 KB · mod 2026-06-10
crontab.txt1.9 KB · mod 2026-06-10

📊 Fuentes de datos económicos

Origen

BCRA reservas/tasa/baseXLSX BCRA con openpyxl
Banda cambiariaXLSX BCRA
IPCINDEC (publicación mensual)
BTC/USDTAPI público
Trends Xtrends24.in scraper + GetXAPI
Imágenesfal.ai nano-banana-pro 16:9

Filtros

Blacklist políticaNUNCA postear sobre Milei o gobierno
ValidaciónClaude Haiku confirma neutralidad antes de postear

⚙️ Comandos

Probar comando manual

cd /home/ubuntu/xbot_economia && python3 bot.py cierre
# o cualquier otro: apertura, macro, cripto, alerta, ipc, etc.

Ver logs

tail -f /home/ubuntu/xbot_economia/logs/cron.log

Editar crontab

crontab -e
# o reemplazar completo:
crontab /home/ubuntu/xbot_economia/crontab.txt

Bump versión

sudo /opt/backup-system/bump.sh xbot-twitter patch "Descripción"