INNER CODE UNIT · Python

TelegramNotifier

buzzsubash/algo_trading_strategies_india · broker-utilities/zerodha-kite-connect-auto-login.py:128

class TelegramNotifier:
    """Class to handle Telegram notifications"""

    def __init__(self, token):
        self.token = token
        self.base_url = f"https://api.telegram.org/bot{token}/sendMessage"

    def send_message(self, text, chat_id):
        """Send message to Telegram chat"""
        try:
            payload = {
                'chat_id': chat_id,
                'text': text,
                'parse_mode': 'HTML'
            }
            response = requests.post(self.base_url, json=payload, timeout=10)
            return response.json()
        except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…