Add manual long/short commands via Telegram plain text

- Extended telegram_command_bot.py with MessageHandler for plain text messages
- Supports 'long sol/eth/btc' and 'short sol/eth/btc' syntax
- Calls /api/trading/execute directly with preset healthy metrics
- Increased timeout to 60s for on-chain transaction completion
- No changes to webhook flow or existing commands
This commit is contained in:
mindesbunister
2025-11-06 13:48:38 +01:00
parent 6c7eaf5f04
commit b52a980138

View File

@@ -574,7 +574,7 @@ async def manual_trade_handler(update: Update, context: ContextTypes.DEFAULT_TYP
f"{TRADING_BOT_URL}/api/trading/execute", f"{TRADING_BOT_URL}/api/trading/execute",
headers={'Authorization': f'Bearer {API_SECRET_KEY}'}, headers={'Authorization': f'Bearer {API_SECRET_KEY}'},
json=payload, json=payload,
timeout=30, timeout=60,
) )
print(f"📥 Manual trade response: {response.status_code}", flush=True) print(f"📥 Manual trade response: {response.status_code}", flush=True)