Alert System

🟢 Beginner · 2025-03-28

Alert System

The alert system keeps you informed about your bot’s activity and health without requiring you to watch the dashboard constantly. Alerts notify you about completed trades, safety events, errors, and performance milestones through Telegram, so you can monitor your bot from anywhere.

Why Alerts Matter

Grid bots are designed to run autonomously, but they operate in a dynamic market environment. Unexpected events, exchange issues, or significant market moves can all require your attention. Without alerts, you would need to check the dashboard regularly to catch these situations.

Alerts let you adopt a hands-off approach while staying informed about events that need your attention. You can go about your day knowing that the bot will notify you if something important happens.

Alert Types

Gridera can send notifications for several categories of events:

Trade Alerts

Buy fill: A buy order filled at a grid level. The alert includes the grid level price, order size, and current position count. Useful for tracking how actively the bot is trading.

TP fill: A take-profit order completed. The alert shows the sell price, realized profit for the trade, and updated session PnL. This is the notification that tells you the bot just made money.

Trade summary: A periodic summary (e.g., every 4 hours or daily) showing total trades completed, realized PnL, and current position count since the last summary. Useful if individual trade alerts are too frequent.

Safety Alerts

Grid break warning: The price has entered the grid break buffer zone. The bot has not shut down yet, but it is close. This gives you a window to decide whether to adjust the range or let the bot shut down automatically.

Grid break shutdown: The price confirmed outside the grid range and the bot is performing a clean shutdown. This alert tells you the bot has stopped and positions are being closed.

Stop loss triggered: The cumulative loss has reached your stop loss threshold. The bot is shutting down to prevent further losses.

Take profit reached: The bot has reached its profit target. If tp_mode is “stop,” the bot is shutting down. If “continue,” it keeps running.

Health Alerts

Bot started: Confirmation that the bot successfully started and is running its cycle.

Bot stopped: The bot has stopped, either through manual action or an automated shutdown.

Connection error: The bot lost connection to the exchange API or WebSocket feed. It will attempt to reconnect, but persistent errors may require your attention.

Reconciliation correction: The self-healing system detected and corrected a discrepancy. Occasional corrections are normal. Frequent corrections may indicate an underlying issue.

Setting Up Telegram Alerts

To receive alerts via Telegram:

Step 1: Create a Telegram bot by messaging @BotFather on Telegram. Send the command /newbot, follow the prompts, and save the bot token you receive.

Step 2: Get your chat ID. Send any message to your new bot, then visit https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates to find your chat ID in the response.

Step 3: Add the Telegram configuration to your bot’s settings:

logging:
  telegram_token: "your-bot-token"
  telegram_chat_id: "your-chat-id"

Step 4: Restart the bot. You should receive a “Bot started” alert confirming the connection works.

Alert Cooldowns

To prevent alert fatigue, the system applies cooldowns to certain alert types. If the price bounces around a grid level rapidly, you will not receive a separate alert for every fill and un-fill.

Trade alerts: No cooldown by default. Each completed trade sends one notification.

Grid break warning: Cooldown of 5 minutes. If the price dips in and out of the buffer zone rapidly, you receive at most one warning every 5 minutes.

Connection errors: Cooldown of 10 minutes. Brief network hiccups do not flood your messages.

Reconciliation: Cooldown of 15 minutes. Minor corrections are batched rather than sent individually.

These cooldowns are designed to keep you informed without overwhelming your Telegram with messages during volatile periods.

Customizing Alert Levels

You can adjust which alerts you receive based on your preference:

Minimal: Only safety alerts (grid break, stop loss, errors). Best for experienced traders running stable configurations who only want to know about problems.

Standard: Safety alerts plus TP fills and daily summaries. Good balance of information without clutter.

Verbose: All alerts including individual buy fills, reconciliation events, and health checks. Best for new bots or configurations you are actively tuning.

Best Practices

Do not ignore safety alerts. Grid break warnings and error alerts require attention. Even if you decide not to act, acknowledge that you reviewed the situation.

Mute trade alerts during high activity. If the price is oscillating rapidly and you are getting dozens of TP fill alerts per hour, consider switching to summary mode temporarily.

Test your alert setup. After configuring alerts, start the bot in paper mode and verify you receive notifications. Better to discover a misconfiguration during testing than during a real trading event.

Keep your Telegram bot token secure. Treat it like a password. Do not share it or commit it to version control.

Connect Telegram (Easy Setup)

The simplest way to enable alerts is through the Connect Telegram page in the Gridera sidebar:

  1. Open Telegram and search for @userinfobot — send /start to get your Chat ID.
  2. Search for @Alert_gridera_bot and send it any message.
  3. Go to Connect Telegram in Gridera, paste your Chat ID, and click Connect.

You will receive a test message confirming the connection. From then on, all bot notifications are sent directly to your personal Telegram.

What Notifications You Receive

  • Bot Start/Stop — know when your bot starts, stops, or encounters errors.
  • Risk Alerts — liquidation warnings, high drawdown, margin alerts.
  • Take Profit / Stop Loss — notified when TP or SL triggers.
  • Grid Break — alert when price exits your grid range.
  • PnL Milestones — celebrate when you reach $50, $100, $200+ profit.

Summary

  • The alert system sends Telegram notifications for critical bot events so you can monitor without watching the dashboard.
  • Use the Connect Telegram page for easy one-click setup.
  • Alerts have built-in cooldowns to prevent notification fatigue.

Next Step

Learn how to diagnose and fix common issues in Troubleshooting.

✨ Was this article helpful?

Ask your questions on Ask on Discord →