import requests import time from datetime import datetime
BOT_TOKEN = "8105971100:AAE257vkFIw5RO_4z7MRgp3tElLnDraNWaw" CHAT_ID = "932913595" # Numeric ID hona chahiye
def send_alert(msg): url = f"https://api.telegram.org/bot{BOT_TOKEN}/sendMessage" payload = { "chat_id": CHAT_ID, "text": msg } try: response = requests.post(url, data=payload) print("✅ Message sent:", response.text) except Exception as e: print("❌ Error sending alert:", e)
def check_price(): price = 105000 # Example (replace with API value later) if price > 104700: message = f"""🚨 BUY Signal Alert 🚨 Coin: BTCUSDT Zone: BOS Price: {price} Time: {datetime.now().strftime('%H:%M:%S')}""" send_alert(message)
while True: check_price() time.sleep(300)