Files
trading_bot_v4/telegram_command_bot.py
mindesbunister bdf1be1571 fix: Add DNS retry logic to Telegram bot
Problem: Python urllib3 throwing 'Failed to resolve trading-bot-v4' errors
Root cause: Transient DNS resolution failures (similar to Node.js DNS issue)

Solution: Added retry_request() wrapper with exponential backoff:
- Retries DNS/connection errors up to 3 times
- 2s → 4s → 8s delays between attempts
- Same pattern as Node.js retryOperation() in drift/client.ts

Applied to:
- /status command (position fetching)
- Manual trade execution (most critical)

User request: Configure bot to handle DNS problems better
Result: Telegram bot now self-recovers from transient DNS failures
2025-11-16 00:57:16 +01:00

29 KiB