Skip to content
Rulemancer Blog Blog & Docs
Guides

Alerts that reach you: Telegram, email and signed webhooks

Alerts that reach you: Telegram, email and signed webhooks

An alert is the only part of a trading bot you notice when it is missing. Bots run on a schedule you do not watch: a candle closes, a rule fires, an order fills. Without a notification the first sign of trouble is a balance you did not expect. Rulemancer routes eight trading events to four channels — in-app, email, Telegram and signed webhooks — so the bot tells you what happened instead of waiting to be asked.

Four channels, four jobs

Channel Best for Weakness
In-app A record you can scroll later Only seen when you log in
Email Anything that must survive a phone change Slow, easy to filter away
Telegram Seconds-level awareness on mobile Noisy if every event is on
Webhook Your own system, spreadsheet or bot You own the endpoint and its failures

Start with the events that need action

Eight events can be routed: bot started or stopped, trade executed, take-profit triggered, stop-loss triggered, daily loss limit reached, exchange disconnected, API errors, and insufficient balance. Turning all eight on produces a stream nobody reads. A practical split:

  • Telegram: stop-loss, daily loss limit, exchange disconnected, API errors.
  • Email: everything above, plus bot started or stopped — a durable log of when the bot changed state.
  • In-app: all events, always, because it is the history you will want next month.
  • Webhook: trade executed, if you keep your own trade ledger.

Telegram in two minutes

Create a bot with @BotFather, paste the token into the notification settings, then press Start on your bot. The platform links your chat to your account — the linking step exists so a token alone cannot send messages to a stranger. Quiet hours are worth setting even for a serious bot: a 03:00 alert about a take-profit is not actionable at 03:00, while a stop-loss at 03:00 is exactly when you want the phone to buzz. Route the two differently.

Webhooks: signed, timed, and hard to spoof

A webhook is an HTTPS POST with a JSON body. Two headers make it verifiable: X-Rulemancer-Timestamp and X-Rulemancer-Signature, where the signature is an HMAC-SHA256 of timestamp.body using the secret you generated for that endpoint. Recompute it on your side, compare, and reject anything whose timestamp is older than a few minutes — that is what stops a captured request from being replayed tomorrow.

The endpoint must be HTTPS and resolve to a public address; private, loopback and reserved ranges are refused. If your receiver is down, the delivery fails and the failure is visible in the webhook log rather than silently disappearing. Treat the secret like an API key: rotate it if it was ever pasted into a chat.

Alert hygiene that keeps the channel useful

  1. One channel per urgency. Stop-loss and disconnection go to the phone; routine fills go to email.
  2. Test before you trust. Send a test alert after every configuration change; an alert path that was never exercised is a guess.
  3. Watch for silence. A bot that normally trades twice a day and has been quiet for three is itself a signal — check the event log rather than assuming calm.
  4. Do not forward everything to a group chat. Notifications others cannot act on become noise they mute.

Notifications are configured per user under Notifications in the dashboard, and the same settings are what the trading engine reads on every event. If you are still connecting the exchange side, read trade-only API keys first — an alert about a leaked key is better than an alert about a withdrawal.

Ready to wire it up? Create a free account, start a paper bot and route one event to Telegram; that single test tells you more than any checklist.

Frequently asked questions

Can I get alerts for paper bots?

Yes. Paper bots emit the same events as live ones, which makes paper mode the right place to test your routing before real orders exist.

What happens if a webhook fails?

The delivery is recorded as failed in the webhook log with the HTTP status, and it does not block the bot. In-app and email channels are unaffected.

Do alerts include the trade details?

Each event carries the bot, the pair, the amount and the timestamp; trade events also carry the fill price and fee, so the alert alone is enough to log the trade elsewhere.